Re: [PATCH] xhci: extend quirk for Renesas cards

2014-03-12 Thread Sarah Sharp
On Mon, Mar 10, 2014 at 01:09:04PM +, David Laight wrote:
> From: Mathias Nyman
> > On 03/09/2014 04:20 PM, Igor Gnatenko wrote:
> > > After suspend another Renesas PCI-X USB 3.0 card doesn't work.
> > > 03:00.0 USB controller [0c03]: Renesas Technology Corp. uPD720202 USB 3.0 
> > > Host Controller
> > [1912:0015] (rev 02) (prog-if 30 [XHCI])
> ...
> > > diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
> > > index 04f986d..13d4add 100644
> > > --- a/drivers/usb/host/xhci-pci.c
> > > +++ b/drivers/usb/host/xhci-pci.c
> > > @@ -143,9 +143,7 @@ static void xhci_pci_quirks(struct device *dev, 
> > > struct xhci_hcd *xhci)
> > >   xhci->quirks |= XHCI_TRUST_TX_LENGTH;
> > >   }
> > >   if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
> > > - pdev->device == 0x0015 &&
> > > - pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG &&
> > > - pdev->subsystem_device == 0xc0cd)
> > > + pdev->device == 0x0015)
> > >   xhci->quirks |= XHCI_RESET_ON_RESUME;
> > >   if (pdev->vendor == PCI_VENDOR_ID_VIA)
> > >   xhci->quirks |= XHCI_RESET_ON_RESUME;
> > >
> > 
> > This will set the resume quirk for all devices with a Renesas  uPD720202
> > host.
> > 
> > Do they all need this quirk, or should just this card manufacturer be
> > added to the quirk? (subsystem vendor/device)
> 
> Given the number of systems that seem to need this quirk, it is almost
> worth reversing the quick?

No, we should avoid applying this quirk to all systems.

> ISTR there was a system where it caused grief?

The behavior of the quirk itself causes users grief.  When the host is
reset on resume from suspend, we tell the USB core the host lost power.
The core will then disconnect all USB devices and re-enumerate them.

If we apply this quirk broadly, we increase the time to bring up USB
devices on resume (which is critical for mobile systems), and USB
storage devices will be re-enumerated.  Without this quirk, I can start
watching a movie stored on a USB hard drive device, suspend the laptop,
resume it, and the movie will continue playing.  With this quirk, the
storage device will re-enumerated as a new block device, and the movie
will stop playing on resume.

So, I would like to limit the impact of this quirk as much as possible.
I wish I had limited it further to specific Etron and VIA versions;
maybe we can dig that information out of the original bug reports and
limit it to only impacted revisions.

> Although it might be that some delays have been added that fix that.

I think you're remembering a different quirk?

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


Re: [PATCH] xhci: extend quirk for Renesas cards

2014-03-12 Thread Igor Gnatenko
On Tue, 2014-03-11 at 18:50 +0200, Mathias Nyman wrote: 
> On 03/11/2014 04:54 PM, Anatoly C.K. wrote:
> > Igor do not have this card.
> >
> > [root@fedora-20 ~]# lspci -vmnnd 1912:
> > Device: 03:00.0
> > Class:  USB controller [0c03]
> > Vendor: Renesas Technology Corp. [1912]
> > Device: uPD720202 USB 3.0 Host Controller [0015]
> > SVendor:Renesas Technology Corp. [1912]
> > SDevice:uPD720202 USB 3.0 Host Controller [0015]
> > Rev:02
> > ProgIf: 30
> >
> 
> Thanks,
> 
> I think that as the host chip and add-on card are both made by Renesas 
> we can assume this quirk is needed for all renesas uPD720202 hosts.
> 
> If this is ok with Sarah I think we can apply the patch as is.
Thank you. I'll resend patch in 1-2m with updated description, fixed
reporter Last Name and added signed-off for you. 
> -Mathias
> 
> --
> 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
> 
-- 
-Igor Gnatenko

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


Re: [PATCH] xhci: extend quirk for Renesas cards

2014-03-11 Thread Mathias Nyman

On 03/11/2014 04:54 PM, Anatoly C.K. wrote:

Igor do not have this card.

[root@fedora-20 ~]# lspci -vmnnd 1912:
Device: 03:00.0
Class:  USB controller [0c03]
Vendor: Renesas Technology Corp. [1912]
Device: uPD720202 USB 3.0 Host Controller [0015]
SVendor:Renesas Technology Corp. [1912]
SDevice:uPD720202 USB 3.0 Host Controller [0015]
Rev:02
ProgIf: 30



Thanks,

I think that as the host chip and add-on card are both made by Renesas 
we can assume this quirk is needed for all renesas uPD720202 hosts.


If this is ok with Sarah I think we can apply the patch as is.

-Mathias

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


Re: [PATCH] xhci: extend quirk for Renesas cards

2014-03-11 Thread Mathias Nyman

On 03/11/2014 07:56 AM, Igor Gnatenko wrote:

On Mon, 2014-03-10 at 15:06 +0200, Mathias Nyman wrote:

On 03/09/2014 04:20 PM, Igor Gnatenko wrote:

After suspend another Renesas PCI-X USB 3.0 card doesn't work.
03:00.0 USB controller [0c03]: Renesas Technology Corp. uPD720202 USB 3.0 Host 
Controller [1912:0015] (rev 02) (prog-if 30 [XHCI])

Reported-and-tested-by: Anatoly K. 
Reference: http://redmine.russianfedora.pro/issues/1315
Signed-off-by: Igor Gnatenko 
---
   drivers/usb/host/xhci-pci.c | 4 +---
   1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 04f986d..13d4add 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -143,9 +143,7 @@ static void xhci_pci_quirks(struct device *dev, struct 
xhci_hcd *xhci)
xhci->quirks |= XHCI_TRUST_TX_LENGTH;
}
if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
-   pdev->device == 0x0015 &&
-   pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG &&
-   pdev->subsystem_device == 0xc0cd)
+   pdev->device == 0x0015)
xhci->quirks |= XHCI_RESET_ON_RESUME;
if (pdev->vendor == PCI_VENDOR_ID_VIA)
xhci->quirks |= XHCI_RESET_ON_RESUME;



This will set the resume quirk for all devices with a Renesas  uPD720202
host.

Do they all need this quirk, or should just this card manufacturer be
added to the quirk? (subsystem vendor/device)

I can't determine whay subsystem_(vendor|device) is needed for this
card. If you can help me determine this info - I can resend patch with
adding new quirk only for this device.


Could you both Igor and Anatoly run "lspci -vmnnd 1912:"

And reply with your result.

Thanks

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


Re: [PATCH] xhci: extend quirk for Renesas cards

2014-03-10 Thread Igor Gnatenko
On Mon, 2014-03-10 at 15:06 +0200, Mathias Nyman wrote: 
> On 03/09/2014 04:20 PM, Igor Gnatenko wrote:
> > After suspend another Renesas PCI-X USB 3.0 card doesn't work.
> > 03:00.0 USB controller [0c03]: Renesas Technology Corp. uPD720202 USB 3.0 
> > Host Controller [1912:0015] (rev 02) (prog-if 30 [XHCI])
> >
> > Reported-and-tested-by: Anatoly K. 
> > Reference: http://redmine.russianfedora.pro/issues/1315
> > Signed-off-by: Igor Gnatenko 
> > ---
> >   drivers/usb/host/xhci-pci.c | 4 +---
> >   1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
> > index 04f986d..13d4add 100644
> > --- a/drivers/usb/host/xhci-pci.c
> > +++ b/drivers/usb/host/xhci-pci.c
> > @@ -143,9 +143,7 @@ static void xhci_pci_quirks(struct device *dev, struct 
> > xhci_hcd *xhci)
> > xhci->quirks |= XHCI_TRUST_TX_LENGTH;
> > }
> > if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
> > -   pdev->device == 0x0015 &&
> > -   pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG &&
> > -   pdev->subsystem_device == 0xc0cd)
> > +   pdev->device == 0x0015)
> > xhci->quirks |= XHCI_RESET_ON_RESUME;
> > if (pdev->vendor == PCI_VENDOR_ID_VIA)
> > xhci->quirks |= XHCI_RESET_ON_RESUME;
> >
> 
> This will set the resume quirk for all devices with a Renesas  uPD720202 
> host.
> 
> Do they all need this quirk, or should just this card manufacturer be 
> added to the quirk? (subsystem vendor/device)
I can't determine whay subsystem_(vendor|device) is needed for this
card. If you can help me determine this info - I can resend patch with
adding new quirk only for this device. 
> 
> -Mathias
-- 
-Igor Gnatenko

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


Re: [PATCH] xhci: extend quirk for Renesas cards

2014-03-10 Thread Mathias Nyman

On 03/09/2014 04:20 PM, Igor Gnatenko wrote:

After suspend another Renesas PCI-X USB 3.0 card doesn't work.
03:00.0 USB controller [0c03]: Renesas Technology Corp. uPD720202 USB 3.0 Host 
Controller [1912:0015] (rev 02) (prog-if 30 [XHCI])

Reported-and-tested-by: Anatoly K. 
Reference: http://redmine.russianfedora.pro/issues/1315
Signed-off-by: Igor Gnatenko 
---
  drivers/usb/host/xhci-pci.c | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 04f986d..13d4add 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -143,9 +143,7 @@ static void xhci_pci_quirks(struct device *dev, struct 
xhci_hcd *xhci)
xhci->quirks |= XHCI_TRUST_TX_LENGTH;
}
if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
-   pdev->device == 0x0015 &&
-   pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG &&
-   pdev->subsystem_device == 0xc0cd)
+   pdev->device == 0x0015)
xhci->quirks |= XHCI_RESET_ON_RESUME;
if (pdev->vendor == PCI_VENDOR_ID_VIA)
xhci->quirks |= XHCI_RESET_ON_RESUME;



This will set the resume quirk for all devices with a Renesas  uPD720202 
host.


Do they all need this quirk, or should just this card manufacturer be 
added to the quirk? (subsystem vendor/device)


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