Re: [PATCH] xHCI: fix wMaxPacketSize mask

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

 



Thanks Andiry!

Sander, can you remove Andiry's previous patch and try just this one?
It won't fix your out-of-bandwidth error, but it should fix the
"unexpected completion error".  If it does fix it, I'll add it to my
tree.

Sarah Sharp

On Fri, Nov 05, 2010 at 05:16:42PM +0800, Andiry Xu wrote:
> >From 04eab836f639f16ffff09b85774ced6538509fb7 Mon Sep 17 00:00:00 2001
> From: Andiry Xu <andiry.xu@xxxxxxx>
> Date: Fri, 5 Nov 2010 15:18:04 +0800
> Subject: [PATCH 2/3] xHCI: fix wMaxPacketSize mask
> 
> USB2.0 spec 9.6.6 says: For all endpoints, bit 10..0 specify the maximum
> packet size(in bytes).
> 
> So the wMaxPacketSize mask should be 0x7ff rather than 0x3ff.
> 
> Reported-by: Sander Eikelenboom <linux@xxxxxxxxxxxxxx>
> Signed-off-by: Andiry Xu <andiry.xu@xxxxxxx>
> ---
>  drivers/usb/host/xhci-mem.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
> index 2027706..2b79cea 100644
> --- a/drivers/usb/host/xhci-mem.c
> +++ b/drivers/usb/host/xhci-mem.c
> @@ -1135,7 +1135,7 @@ int xhci_endpoint_init(struct xhci_hcd *xhci,
>  		/* Fall through */
>  	case USB_SPEED_FULL:
>  	case USB_SPEED_LOW:
> -		max_packet = ep->desc.wMaxPacketSize & 0x3ff;
> +		max_packet = ep->desc.wMaxPacketSize & 0x7ff;
>  		ep_ctx->ep_info2 |= MAX_PACKET(max_packet);
>  		break;
>  	default:
> -- 
> 1.7.1
> 
> 
> 
--
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