2015-04-28 07:56:23

by Du, Changbin

[permalink] [raw]
Subject: [PATCH] usb: gadget: composite: enable BESL support

>From a6615937bcd9234e6d6bb817c3701fce44d0a84d Mon Sep 17 00:00:00 2001
From: Felipe Balbi <[email protected]>
Date: Tue, 30 Sep 2014 16:08:03 -0500
Subject: [PATCH] usb: gadget: composite: enable BESL support

According to USB 2.0 ECN Errata for Link Power
Management (USB2-LPM-Errata-final.pdf), BESL
must be enabled if LPM is enabled.

This helps with USB30CV TD 9.21 LPM L1
Suspend Resume Test.

Cc: <[email protected]> # 3.14
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Du, Changbin <[email protected]>
---
Hi,

This patch was introduced on v3.18. However the issue fixed already existed on
v3.14 and v3.14 is a long term support version.

So propose to backport it over there as well.

Du, Changbin
---
drivers/usb/gadget/composite.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index a8c18df..f6a51fd 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -560,7 +560,7 @@ static int bos_desc(struct usb_composite_dev *cdev)
usb_ext->bLength = USB_DT_USB_EXT_CAP_SIZE;
usb_ext->bDescriptorType = USB_DT_DEVICE_CAPABILITY;
usb_ext->bDevCapabilityType = USB_CAP_TYPE_EXT;
- usb_ext->bmAttributes = cpu_to_le32(USB_LPM_SUPPORT);
+ usb_ext->bmAttributes = cpu_to_le32(USB_LPM_SUPPORT | USB_BESL_SUPPORT);

/*
* The Superspeed USB Capability descriptor shall be implemented by all
--
1.9.1


2015-04-28 15:46:59

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH] usb: gadget: composite: enable BESL support

On Tue, Apr 28, 2015 at 07:56:13AM +0000, Du, Changbin wrote:
> From a6615937bcd9234e6d6bb817c3701fce44d0a84d Mon Sep 17 00:00:00 2001
> From: Felipe Balbi <[email protected]>
> Date: Tue, 30 Sep 2014 16:08:03 -0500
> Subject: [PATCH] usb: gadget: composite: enable BESL support

missing upstream commit.

> According to USB 2.0 ECN Errata for Link Power
> Management (USB2-LPM-Errata-final.pdf), BESL
> must be enabled if LPM is enabled.
>
> This helps with USB30CV TD 9.21 LPM L1
> Suspend Resume Test.
>
> Cc: <[email protected]> # 3.14

this should be backported all the way back to 3.1. The commit which this
patch is fixing, was applied on v3.1, so we're probably going to
backport to 3.10 and 3.14. When asking for backports, don't consider
only your project, think about the kernel/stable releases as a whole.

BTW, that should be v3.1+, the + tells the Stable team that from v3.1
forward, all kernels need the backport.

> Signed-off-by: Felipe Balbi <[email protected]>
> Signed-off-by: Du, Changbin <[email protected]>
> ---
> Hi,
>
> This patch was introduced on v3.18. However the issue fixed already existed on
> v3.14 and v3.14 is a long term support version.

the issue already existed on v3.1, why did you decide to backport only
to v3.14 ?

> So propose to backport it over there as well.
>
> Du, Changbin
> ---
> drivers/usb/gadget/composite.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
> index a8c18df..f6a51fd 100644
> --- a/drivers/usb/gadget/composite.c
> +++ b/drivers/usb/gadget/composite.c
> @@ -560,7 +560,7 @@ static int bos_desc(struct usb_composite_dev *cdev)
> usb_ext->bLength = USB_DT_USB_EXT_CAP_SIZE;
> usb_ext->bDescriptorType = USB_DT_DEVICE_CAPABILITY;
> usb_ext->bDevCapabilityType = USB_CAP_TYPE_EXT;
> - usb_ext->bmAttributes = cpu_to_le32(USB_LPM_SUPPORT);
> + usb_ext->bmAttributes = cpu_to_le32(USB_LPM_SUPPORT | USB_BESL_SUPPORT);
>
> /*
> * The Superspeed USB Capability descriptor shall be implemented by all

--
balbi


Attachments:
(No filename) (2.03 kB)
signature.asc (819.00 B)
Digital signature
Download all attachments

2015-04-29 03:05:00

by Du, Changbin

[permalink] [raw]
Subject: RE: [PATCH] usb: gadget: composite: enable BESL support

> > From: Felipe Balbi <[email protected]>
> > Date: Tue, 30 Sep 2014 16:08:03 -0500
> > Subject: [PATCH] usb: gadget: composite: enable BESL support
>
> missing upstream commit.
>
> > According to USB 2.0 ECN Errata for Link Power Management
> > (USB2-LPM-Errata-final.pdf), BESL must be enabled if LPM is enabled.
> >
> > This helps with USB30CV TD 9.21 LPM L1 Suspend Resume Test.
> >
> > Cc: <[email protected]> # 3.14
>
> this should be backported all the way back to 3.1. The commit which this
> patch is fixing, was applied on v3.1, so we're probably going to backport to
> 3.10 and 3.14. When asking for backports, don't consider only your project,
> think about the kernel/stable releases as a whole.
>
> BTW, that should be v3.1+, the + tells the Stable team that from v3.1 forward,
> all kernels need the backport.
>
> > Signed-off-by: Felipe Balbi <[email protected]>
> > Signed-off-by: Du, Changbin <[email protected]>
> > ---
> > Hi,
> >
> > This patch was introduced on v3.18. However the issue fixed already
> > existed on
> > v3.14 and v3.14 is a long term support version.
>
> the issue already existed on v3.1, why did you decide to backport only to
> v3.14 ?
>
> > So propose to backport it over there as well.
> >
> --
> balbi

Thanks for pointing it out, Balbi. Sorry for not considering the whole trees. This
is my first time to send backport request and now know how do it well. I will
resend request with field updated.

Du, Changbin
Regards

2015-04-29 05:55:09

by Felipe Balbi

[permalink] [raw]
Subject: Re: [PATCH] usb: gadget: composite: enable BESL support

On Wed, Apr 29, 2015 at 03:04:51AM +0000, Du, Changbin wrote:
> > > From: Felipe Balbi <[email protected]>
> > > Date: Tue, 30 Sep 2014 16:08:03 -0500
> > > Subject: [PATCH] usb: gadget: composite: enable BESL support
> >
> > missing upstream commit.
> >
> > > According to USB 2.0 ECN Errata for Link Power Management
> > > (USB2-LPM-Errata-final.pdf), BESL must be enabled if LPM is enabled.
> > >
> > > This helps with USB30CV TD 9.21 LPM L1 Suspend Resume Test.
> > >
> > > Cc: <[email protected]> # 3.14
> >
> > this should be backported all the way back to 3.1. The commit which this
> > patch is fixing, was applied on v3.1, so we're probably going to backport to
> > 3.10 and 3.14. When asking for backports, don't consider only your project,
> > think about the kernel/stable releases as a whole.
> >
> > BTW, that should be v3.1+, the + tells the Stable team that from v3.1 forward,
> > all kernels need the backport.
> >
> > > Signed-off-by: Felipe Balbi <[email protected]>
> > > Signed-off-by: Du, Changbin <[email protected]>
> > > ---
> > > Hi,
> > >
> > > This patch was introduced on v3.18. However the issue fixed already
> > > existed on
> > > v3.14 and v3.14 is a long term support version.
> >
> > the issue already existed on v3.1, why did you decide to backport only to
> > v3.14 ?
> >
> > > So propose to backport it over there as well.
> > >
> > --
> > balbi
>
> Thanks for pointing it out, Balbi. Sorry for not considering the whole
> trees. This is my first time to send backport request and now know how
> do it well. I will resend request with field updated.

ok, things which usually help are:

'git log -SLPM -- drivers/usb/gadget/composite.c'
this will help you find commits which have the string LPM in
their body and touch drivers/usb/gadget/composite.c

'git describe'
this will tell you when a commit was merged. Keep in mind that a
commit reaches a maintainer tree before Linus tags something, so
if git describe says: v3.0-rc3-212-gfoobar, that means commit
reaches mainline during v3.1 merge window.

Documentation/stable_kernel_rules.txt
This tells what a stable patch should look like

'git remote add stable \
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git \
&& git fetch stable && git log stable/linux-3.14.y'

This would help you see actual commits in a stable tree so you
can mimic the format.

cheers

--
balbi


Attachments:
(No filename) (2.34 kB)
signature.asc (819.00 B)
Digital signature
Download all attachments

2015-05-04 09:16:33

by Luis Henriques

[permalink] [raw]
Subject: Re: [PATCH] usb: gadget: composite: enable BESL support

On Tue, Apr 28, 2015 at 07:56:13AM +0000, Du, Changbin wrote:
> From a6615937bcd9234e6d6bb817c3701fce44d0a84d Mon Sep 17 00:00:00 2001
> From: Felipe Balbi <[email protected]>
> Date: Tue, 30 Sep 2014 16:08:03 -0500
> Subject: [PATCH] usb: gadget: composite: enable BESL support
>
> According to USB 2.0 ECN Errata for Link Power
> Management (USB2-LPM-Errata-final.pdf), BESL
> must be enabled if LPM is enabled.
>
> This helps with USB30CV TD 9.21 LPM L1
> Suspend Resume Test.
>
> Cc: <[email protected]> # 3.14
> Signed-off-by: Felipe Balbi <[email protected]>
> Signed-off-by: Du, Changbin <[email protected]>
> ---
> Hi,
>
> This patch was introduced on v3.18. However the issue fixed already existed on
> v3.14 and v3.14 is a long term support version.
>
> So propose to backport it over there as well.
>

Thank you, I'm also queuing it for the 3.16 kernel.

Cheers,
--
Lu?s

> Du, Changbin
> ---
> drivers/usb/gadget/composite.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
> index a8c18df..f6a51fd 100644
> --- a/drivers/usb/gadget/composite.c
> +++ b/drivers/usb/gadget/composite.c
> @@ -560,7 +560,7 @@ static int bos_desc(struct usb_composite_dev *cdev)
> usb_ext->bLength = USB_DT_USB_EXT_CAP_SIZE;
> usb_ext->bDescriptorType = USB_DT_DEVICE_CAPABILITY;
> usb_ext->bDevCapabilityType = USB_CAP_TYPE_EXT;
> - usb_ext->bmAttributes = cpu_to_le32(USB_LPM_SUPPORT);
> + usb_ext->bmAttributes = cpu_to_le32(USB_LPM_SUPPORT | USB_BESL_SUPPORT);
>
> /*
> * The Superspeed USB Capability descriptor shall be implemented by all
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html