Re: [PATCH V3] USB: Add LVS Test device driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 27, 2014 at 10:04:37PM +0800, Alan Stern wrote:
> On Sat, 24 May 2014, Pratyush Anand wrote:
> 
> > OTG3 and EH Compliance Plan 1.0 talks about Super Speed OTG Verification
> > +		ret = usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0),
> > +			USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_PORT, 0, i,
> > +			port_status, sizeof(*port_status), 1000);
> > +		if (ret < 4)
> > +			continue;
> > +		/* handle only connection change notification */
> > +		if (!(port_status->wPortChange & USB_PORT_STAT_C_CONNECTION))
> > +			continue;
> 
> There will be other bits set in the wPortChange word from time to time,
> such as USB_PORT_STAT_C_RESET and maybe USB_PORT_STAT_C_ENABLE.  By not
> ever clearing them, you will cause this routine to be polled 4 times

To clear all the change notifications, it would be wise to use
usb_clear_port_feature. But to use that what do you suggest:

1. Move drivers/usb/core/hub.h to include/usb/hub.h
or
2. use extern definition of usb_clear_port_feature in lvstest.c?

Regards
Pratyush
> per second instead of only when there's a connect change.  This isn't
> terribly important but you should realize what you are doing.
> 
> Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux