Re: [RFC/PATCH] usb: misc: introduce OTG & EH Test Driver

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


On Mon, 4 Jun 2012, Felipe Balbi wrote:

> This patch introduces support for test modes as
> defined by the USB OTG & Embedded host Specification.
> 
> Note that we _must_ be able to suspend & resume ports
> as we wish, so this driver depends on USB_SUSPEND and
> makes use (well, somewhat abuses) usb autopm features
> to achieve what we want.

Have you tested the autopm stuff?  I don't think it will work the way 
you've got it.

...

> +static void otg_eh_disconnect(struct usb_interface *intf)
> +{
> +	struct usb_device		*udev;
> +
> +	udev = interface_to_usbdev(intf);
> +
> +	usb_lock_device_for_reset(udev, intf);

You don't need the locking around usb_reset_device().  Disconnect 
methods are called with the device lock already held.

> +	usb_reset_device(udev);
> +	usb_unlock_device(udev);
> +}

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


B and H Foto and Electronics Corp.

[Linux Media]     [Video for Linux]     [Linux Input]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]     [More Archives]

Add to Google Powered by Linux