Re: [PATCH] xhci: Bigendian fix for skip_isoc_td() and xhci_check_bandwidth()

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

 



On 30/05/11 15:08, Matt Evans wrote:
> 
> Some small endian problems were added in commits
>  834cb0fc4712a3b21c6b8c5cb55bd13607191311 and
>  926008c9386dde09b015753b6681c502177baa30 causing Sparse warnings.
> 
> Fix skip_isoc_td() to read DMA pointer correctly, and
> xhci_check_bandwidth() to read add/drop_flags LE.
> 
> Signed-off-by: Matt Evans <matt@xxxxxxxxxx>

I've just realised that one of these commits is CC: stable, and one not.

Please ignore this patch -- I will resubmit as two patches, one CCing stable
and one not.


Merci,

Matt


> ---
>  drivers/usb/host/xhci-ring.c |    2 +-
>  drivers/usb/host/xhci.c      |    4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
> index cc1485b..800f417 100644
> --- a/drivers/usb/host/xhci-ring.c
> +++ b/drivers/usb/host/xhci-ring.c
> @@ -1782,7 +1782,7 @@ static int skip_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td,
>  	struct usb_iso_packet_descriptor *frame;
>  	int idx;
>  
> -	ep_ring = xhci_dma_to_transfer_ring(ep, event->buffer);
> +	ep_ring = xhci_dma_to_transfer_ring(ep, le64_to_cpu(event->buffer));
>  	urb_priv = td->urb->hcpriv;
>  	idx = urb_priv->td_cnt;
>  	frame = &td->urb->iso_frame_desc[idx];
> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> index d9660eb..ecd2021 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -1849,8 +1849,8 @@ int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev)
>  
>  	/* Free any rings that were dropped, but not changed. */
>  	for (i = 1; i < 31; ++i) {
> -		if ((ctrl_ctx->drop_flags & (1 << (i + 1))) &&
> -				!(ctrl_ctx->add_flags & (1 << (i + 1))))
> +		if ((le32_to_cpu(ctrl_ctx->drop_flags) & (1 << (i + 1))) &&
> +		    !(le32_to_cpu(ctrl_ctx->add_flags) & (1 << (i + 1))))
>  			xhci_free_or_cache_endpoint_ring(xhci, virt_dev, i);
>  	}
>  	xhci_zero_in_ctx(xhci, virt_dev);

--
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