On Thu, 17 Oct 2013, Hans de Goede wrote:

> I thought it would be a good idea to also test uas with usb-2, and it turns 
> out
> it ws, as it did not work. The problem is that the uas driver was passing the
> bEndpointAddress' direction bit to usb_rcvbulkpipe, the xhci code seems to
> not care about this, but with the ehci code this causes usb_submit_urb
> failure.
> 
> With this fixed the uas code works nicely with an uas device plugged into
> an ehci port.
> 
> Signed-off-by: Hans de Goede <[email protected]>
> ---
>  drivers/usb/storage/uas.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
> index bf80ef1..078e962 100644
> --- a/drivers/usb/storage/uas.c
> +++ b/drivers/usb/storage/uas.c
> @@ -957,13 +957,13 @@ static void uas_configure_endpoints(struct uas_dev_info 
> *devinfo)
>               eps[3] = usb_pipe_endpoint(udev, devinfo->data_out_pipe);
>       } else {
>               devinfo->cmd_pipe = usb_sndbulkpipe(udev,
> -                                             eps[0]->desc.bEndpointAddress);
> +                                       eps[0]->desc.bEndpointAddress & 0xf);
>               devinfo->status_pipe = usb_rcvbulkpipe(udev,
> -                                             eps[1]->desc.bEndpointAddress);
> +                                       eps[1]->desc.bEndpointAddress & 0xf);
>               devinfo->data_in_pipe = usb_rcvbulkpipe(udev,
> -                                             eps[2]->desc.bEndpointAddress);
> +                                       eps[2]->desc.bEndpointAddress & 0xf);
>               devinfo->data_out_pipe = usb_sndbulkpipe(udev,
> -                                             eps[3]->desc.bEndpointAddress);
> +                                       eps[3]->desc.bEndpointAddress & 0xf);

Please use usb_endpoint_num() for this.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to