Re: [PATCH] xhci: Limit TD fragments to 1.0 xHCI hosts only.

2014-01-28 Thread walt
On 01/27/2014 03:49 PM, Sarah Sharp wrote:
> Walt reports that the PCI add-in card for his 0.96 ASMedia host dies in
> a particular machine.  This symptom goes away when commit
> 35773dac5f862cb1c82ea151eba3e2f6de51ec3e "usb: xhci: Link TRB must not
> occur within a USB payload burst" is reverted.
> 
> Only 1.0 xHCI hosts actually need TD fragments, so limit that patch to
> only work on 1.0 hosts.  Leave the scatter-gather entry length
> limitation in tact, to ensure consistent buffer limitation lengths
> across host controller versions.  Otherwise we'll have some very
> confused driver writers.
> 
> Signed-off-by: Sarah Sharp 
> Reported-by: walt 
> Cc: sta...@vger.kernel.org # 3.12
> Cc: David Laight 
> ---
> 
> Walt, will you please put your ASMedia host into the system it failed
> on, and test this patch on 3.13 (or the last vanilla kernel it failed
> on)?
> 
> Thanks,
> Sarah Sharp
> 
>  drivers/usb/host/xhci-ring.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
> index a0b248c34526..bdda69fd1651 100644
> --- a/drivers/usb/host/xhci-ring.c
> +++ b/drivers/usb/host/xhci-ring.c
> @@ -2971,6 +2971,8 @@ static int prepare_ring(struct xhci_hcd *xhci, struct 
> xhci_ring *ep_ring,
>   TRBS_PER_SEGMENT - 1 - trb;
>   u32 nop_cmd;
>  
> + if (xhci->hci_version < 0x100)
> + break;
>   /*
>* Section 4.11.7.1 TD Fragments states that a link
>* TRB must only occur at the boundary between

I unintentionally replied to Sarah's email.  This is a cc to the list that
the above patch restores normal behavior to my ASMedia adapter.


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


[PATCH] xhci: Limit TD fragments to 1.0 xHCI hosts only.

2014-01-27 Thread Sarah Sharp
Walt reports that the PCI add-in card for his 0.96 ASMedia host dies in
a particular machine.  This symptom goes away when commit
35773dac5f862cb1c82ea151eba3e2f6de51ec3e "usb: xhci: Link TRB must not
occur within a USB payload burst" is reverted.

Only 1.0 xHCI hosts actually need TD fragments, so limit that patch to
only work on 1.0 hosts.  Leave the scatter-gather entry length
limitation in tact, to ensure consistent buffer limitation lengths
across host controller versions.  Otherwise we'll have some very
confused driver writers.

Signed-off-by: Sarah Sharp 
Reported-by: walt 
Cc: sta...@vger.kernel.org # 3.12
Cc: David Laight 
---

Walt, will you please put your ASMedia host into the system it failed
on, and test this patch on 3.13 (or the last vanilla kernel it failed
on)?

Thanks,
Sarah Sharp

 drivers/usb/host/xhci-ring.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index a0b248c34526..bdda69fd1651 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -2971,6 +2971,8 @@ static int prepare_ring(struct xhci_hcd *xhci, struct 
xhci_ring *ep_ring,
TRBS_PER_SEGMENT - 1 - trb;
u32 nop_cmd;
 
+   if (xhci->hci_version < 0x100)
+   break;
/*
 * Section 4.11.7.1 TD Fragments states that a link
 * TRB must only occur at the boundary between
-- 
1.8.5.2

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