* [PATCH] usb: core: hub: fix race condition about TRSMRCY of resume
@ 2021-05-11 10:15 ` Chunfeng Yun
0 siblings, 0 replies; 15+ messages in thread
From: Chunfeng Yun @ 2021-05-11 10:15 UTC (permalink / raw)
To: Greg Kroah-Hartman, Alan Stern
Cc: Matthias Brugger, Thinh Nguyen, Gustavo A . R . Silva,
Bixuan Cui, Eugeniu Rosca, Oliver Neukum, linux-usb,
linux-kernel, linux-arm-kernel, linux-mediatek, Tianping Fang,
Eddie Hung, Ikjoon Jang, Chunfeng Yun
This may happen if the port becomes resume status exactly
when usb_port_resume() gets port status, it still need provide
a TRSMCRY time before access the device.
Reported-by: Tianping Fang <tianping.fang@mediatek.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
drivers/usb/core/hub.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index b2bc4b7c4289..fc7d6cdacf16 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -3642,9 +3642,6 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
* sequence.
*/
status = hub_port_status(hub, port1, &portstatus, &portchange);
-
- /* TRSMRCY = 10 msec */
- msleep(10);
}
SuspendCleared:
@@ -3659,6 +3656,9 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
usb_clear_port_feature(hub->hdev, port1,
USB_PORT_FEAT_C_SUSPEND);
}
+
+ /* TRSMRCY = 10 msec */
+ msleep(10);
}
if (udev->persist_enabled)
--
2.18.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH] usb: core: hub: fix race condition about TRSMRCY of resume
@ 2021-05-11 10:15 ` Chunfeng Yun
0 siblings, 0 replies; 15+ messages in thread
From: Chunfeng Yun @ 2021-05-11 10:15 UTC (permalink / raw)
To: Greg Kroah-Hartman, Alan Stern
Cc: Matthias Brugger, Thinh Nguyen, Gustavo A . R . Silva,
Bixuan Cui, Eugeniu Rosca, Oliver Neukum, linux-usb,
linux-kernel, linux-arm-kernel, linux-mediatek, Tianping Fang,
Eddie Hung, Ikjoon Jang, Chunfeng Yun
This may happen if the port becomes resume status exactly
when usb_port_resume() gets port status, it still need provide
a TRSMCRY time before access the device.
Reported-by: Tianping Fang <tianping.fang@mediatek.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
drivers/usb/core/hub.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index b2bc4b7c4289..fc7d6cdacf16 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -3642,9 +3642,6 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
* sequence.
*/
status = hub_port_status(hub, port1, &portstatus, &portchange);
-
- /* TRSMRCY = 10 msec */
- msleep(10);
}
SuspendCleared:
@@ -3659,6 +3656,9 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
usb_clear_port_feature(hub->hdev, port1,
USB_PORT_FEAT_C_SUSPEND);
}
+
+ /* TRSMRCY = 10 msec */
+ msleep(10);
}
if (udev->persist_enabled)
--
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH] usb: core: hub: fix race condition about TRSMRCY of resume
@ 2021-05-11 10:15 ` Chunfeng Yun
0 siblings, 0 replies; 15+ messages in thread
From: Chunfeng Yun @ 2021-05-11 10:15 UTC (permalink / raw)
To: Greg Kroah-Hartman, Alan Stern
Cc: Matthias Brugger, Thinh Nguyen, Gustavo A . R . Silva,
Bixuan Cui, Eugeniu Rosca, Oliver Neukum, linux-usb,
linux-kernel, linux-arm-kernel, linux-mediatek, Tianping Fang,
Eddie Hung, Ikjoon Jang, Chunfeng Yun
This may happen if the port becomes resume status exactly
when usb_port_resume() gets port status, it still need provide
a TRSMCRY time before access the device.
Reported-by: Tianping Fang <tianping.fang@mediatek.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
drivers/usb/core/hub.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index b2bc4b7c4289..fc7d6cdacf16 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -3642,9 +3642,6 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
* sequence.
*/
status = hub_port_status(hub, port1, &portstatus, &portchange);
-
- /* TRSMRCY = 10 msec */
- msleep(10);
}
SuspendCleared:
@@ -3659,6 +3656,9 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
usb_clear_port_feature(hub->hdev, port1,
USB_PORT_FEAT_C_SUSPEND);
}
+
+ /* TRSMRCY = 10 msec */
+ msleep(10);
}
if (udev->persist_enabled)
--
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] usb: core: hub: fix race condition about TRSMRCY of resume
2021-05-11 10:15 ` Chunfeng Yun
(?)
@ 2021-05-11 11:27 ` Greg Kroah-Hartman
-1 siblings, 0 replies; 15+ messages in thread
From: Greg Kroah-Hartman @ 2021-05-11 11:27 UTC (permalink / raw)
To: Chunfeng Yun
Cc: Alan Stern, Matthias Brugger, Thinh Nguyen,
Gustavo A . R . Silva, Bixuan Cui, Eugeniu Rosca, Oliver Neukum,
linux-usb, linux-kernel, linux-arm-kernel, linux-mediatek,
Tianping Fang, Eddie Hung, Ikjoon Jang
On Tue, May 11, 2021 at 06:15:22PM +0800, Chunfeng Yun wrote:
> This may happen if the port becomes resume status exactly
> when usb_port_resume() gets port status, it still need provide
> a TRSMCRY time before access the device.
>
> Reported-by: Tianping Fang <tianping.fang@mediatek.com>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
> drivers/usb/core/hub.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Does this need to go to any older/stable kernels? If so, how far back?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] usb: core: hub: fix race condition about TRSMRCY of resume
@ 2021-05-11 11:27 ` Greg Kroah-Hartman
0 siblings, 0 replies; 15+ messages in thread
From: Greg Kroah-Hartman @ 2021-05-11 11:27 UTC (permalink / raw)
To: Chunfeng Yun
Cc: Alan Stern, Matthias Brugger, Thinh Nguyen,
Gustavo A . R . Silva, Bixuan Cui, Eugeniu Rosca, Oliver Neukum,
linux-usb, linux-kernel, linux-arm-kernel, linux-mediatek,
Tianping Fang, Eddie Hung, Ikjoon Jang
On Tue, May 11, 2021 at 06:15:22PM +0800, Chunfeng Yun wrote:
> This may happen if the port becomes resume status exactly
> when usb_port_resume() gets port status, it still need provide
> a TRSMCRY time before access the device.
>
> Reported-by: Tianping Fang <tianping.fang@mediatek.com>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
> drivers/usb/core/hub.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Does this need to go to any older/stable kernels? If so, how far back?
thanks,
greg k-h
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] usb: core: hub: fix race condition about TRSMRCY of resume
@ 2021-05-11 11:27 ` Greg Kroah-Hartman
0 siblings, 0 replies; 15+ messages in thread
From: Greg Kroah-Hartman @ 2021-05-11 11:27 UTC (permalink / raw)
To: Chunfeng Yun
Cc: Alan Stern, Matthias Brugger, Thinh Nguyen,
Gustavo A . R . Silva, Bixuan Cui, Eugeniu Rosca, Oliver Neukum,
linux-usb, linux-kernel, linux-arm-kernel, linux-mediatek,
Tianping Fang, Eddie Hung, Ikjoon Jang
On Tue, May 11, 2021 at 06:15:22PM +0800, Chunfeng Yun wrote:
> This may happen if the port becomes resume status exactly
> when usb_port_resume() gets port status, it still need provide
> a TRSMCRY time before access the device.
>
> Reported-by: Tianping Fang <tianping.fang@mediatek.com>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
> drivers/usb/core/hub.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Does this need to go to any older/stable kernels? If so, how far back?
thanks,
greg k-h
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] usb: core: hub: fix race condition about TRSMRCY of resume
2021-05-11 10:15 ` Chunfeng Yun
(?)
@ 2021-05-11 16:39 ` Alan Stern
-1 siblings, 0 replies; 15+ messages in thread
From: Alan Stern @ 2021-05-11 16:39 UTC (permalink / raw)
To: Chunfeng Yun
Cc: Greg Kroah-Hartman, Matthias Brugger, Thinh Nguyen,
Gustavo A . R . Silva, Bixuan Cui, Eugeniu Rosca, Oliver Neukum,
linux-usb, linux-kernel, linux-arm-kernel, linux-mediatek,
Tianping Fang, Eddie Hung, Ikjoon Jang
On Tue, May 11, 2021 at 06:15:22PM +0800, Chunfeng Yun wrote:
> This may happen if the port becomes resume status exactly
> when usb_port_resume() gets port status, it still need provide
> a TRSMCRY time before access the device.
>
> Reported-by: Tianping Fang <tianping.fang@mediatek.com>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
This should also say:
CC: <stable@vger.kernel.org>
> ---
> drivers/usb/core/hub.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index b2bc4b7c4289..fc7d6cdacf16 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -3642,9 +3642,6 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
> * sequence.
> */
> status = hub_port_status(hub, port1, &portstatus, &portchange);
> -
> - /* TRSMRCY = 10 msec */
> - msleep(10);
> }
>
> SuspendCleared:
> @@ -3659,6 +3656,9 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
> usb_clear_port_feature(hub->hdev, port1,
> USB_PORT_FEAT_C_SUSPEND);
> }
> +
> + /* TRSMRCY = 10 msec */
> + msleep(10);
> }
>
> if (udev->persist_enabled)
Acked-by: Alan Stern <stern@rowland.harvard.edu>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] usb: core: hub: fix race condition about TRSMRCY of resume
@ 2021-05-11 16:39 ` Alan Stern
0 siblings, 0 replies; 15+ messages in thread
From: Alan Stern @ 2021-05-11 16:39 UTC (permalink / raw)
To: Chunfeng Yun
Cc: Greg Kroah-Hartman, Matthias Brugger, Thinh Nguyen,
Gustavo A . R . Silva, Bixuan Cui, Eugeniu Rosca, Oliver Neukum,
linux-usb, linux-kernel, linux-arm-kernel, linux-mediatek,
Tianping Fang, Eddie Hung, Ikjoon Jang
On Tue, May 11, 2021 at 06:15:22PM +0800, Chunfeng Yun wrote:
> This may happen if the port becomes resume status exactly
> when usb_port_resume() gets port status, it still need provide
> a TRSMCRY time before access the device.
>
> Reported-by: Tianping Fang <tianping.fang@mediatek.com>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
This should also say:
CC: <stable@vger.kernel.org>
> ---
> drivers/usb/core/hub.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index b2bc4b7c4289..fc7d6cdacf16 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -3642,9 +3642,6 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
> * sequence.
> */
> status = hub_port_status(hub, port1, &portstatus, &portchange);
> -
> - /* TRSMRCY = 10 msec */
> - msleep(10);
> }
>
> SuspendCleared:
> @@ -3659,6 +3656,9 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
> usb_clear_port_feature(hub->hdev, port1,
> USB_PORT_FEAT_C_SUSPEND);
> }
> +
> + /* TRSMRCY = 10 msec */
> + msleep(10);
> }
>
> if (udev->persist_enabled)
Acked-by: Alan Stern <stern@rowland.harvard.edu>
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] usb: core: hub: fix race condition about TRSMRCY of resume
@ 2021-05-11 16:39 ` Alan Stern
0 siblings, 0 replies; 15+ messages in thread
From: Alan Stern @ 2021-05-11 16:39 UTC (permalink / raw)
To: Chunfeng Yun
Cc: Greg Kroah-Hartman, Matthias Brugger, Thinh Nguyen,
Gustavo A . R . Silva, Bixuan Cui, Eugeniu Rosca, Oliver Neukum,
linux-usb, linux-kernel, linux-arm-kernel, linux-mediatek,
Tianping Fang, Eddie Hung, Ikjoon Jang
On Tue, May 11, 2021 at 06:15:22PM +0800, Chunfeng Yun wrote:
> This may happen if the port becomes resume status exactly
> when usb_port_resume() gets port status, it still need provide
> a TRSMCRY time before access the device.
>
> Reported-by: Tianping Fang <tianping.fang@mediatek.com>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
This should also say:
CC: <stable@vger.kernel.org>
> ---
> drivers/usb/core/hub.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index b2bc4b7c4289..fc7d6cdacf16 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -3642,9 +3642,6 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
> * sequence.
> */
> status = hub_port_status(hub, port1, &portstatus, &portchange);
> -
> - /* TRSMRCY = 10 msec */
> - msleep(10);
> }
>
> SuspendCleared:
> @@ -3659,6 +3656,9 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
> usb_clear_port_feature(hub->hdev, port1,
> USB_PORT_FEAT_C_SUSPEND);
> }
> +
> + /* TRSMRCY = 10 msec */
> + msleep(10);
> }
>
> if (udev->persist_enabled)
Acked-by: Alan Stern <stern@rowland.harvard.edu>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] usb: core: hub: fix race condition about TRSMRCY of resume
2021-05-11 11:27 ` Greg Kroah-Hartman
(?)
@ 2021-05-12 2:02 ` Chunfeng Yun
-1 siblings, 0 replies; 15+ messages in thread
From: Chunfeng Yun @ 2021-05-12 2:02 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Alan Stern, Matthias Brugger, Thinh Nguyen,
Gustavo A . R . Silva, Bixuan Cui, Eugeniu Rosca, Oliver Neukum,
linux-usb, linux-kernel, linux-arm-kernel, linux-mediatek,
Tianping Fang, Eddie Hung, Ikjoon Jang
On Tue, 2021-05-11 at 13:27 +0200, Greg Kroah-Hartman wrote:
> On Tue, May 11, 2021 at 06:15:22PM +0800, Chunfeng Yun wrote:
> > This may happen if the port becomes resume status exactly
> > when usb_port_resume() gets port status, it still need provide
> > a TRSMCRY time before access the device.
> >
> > Reported-by: Tianping Fang <tianping.fang@mediatek.com>
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> > ---
> > drivers/usb/core/hub.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
>
> Does this need to go to any older/stable kernels? If so, how far back?
The flow is changed by
"b01b03f3ad82 USB: add new routine for checking port-resume type", but
it will cause conflict with
"ad493e5e5805 usb: add usb port auto power off mechanism"
>
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] usb: core: hub: fix race condition about TRSMRCY of resume
@ 2021-05-12 2:02 ` Chunfeng Yun
0 siblings, 0 replies; 15+ messages in thread
From: Chunfeng Yun @ 2021-05-12 2:02 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Alan Stern, Matthias Brugger, Thinh Nguyen,
Gustavo A . R . Silva, Bixuan Cui, Eugeniu Rosca, Oliver Neukum,
linux-usb, linux-kernel, linux-arm-kernel, linux-mediatek,
Tianping Fang, Eddie Hung, Ikjoon Jang
On Tue, 2021-05-11 at 13:27 +0200, Greg Kroah-Hartman wrote:
> On Tue, May 11, 2021 at 06:15:22PM +0800, Chunfeng Yun wrote:
> > This may happen if the port becomes resume status exactly
> > when usb_port_resume() gets port status, it still need provide
> > a TRSMCRY time before access the device.
> >
> > Reported-by: Tianping Fang <tianping.fang@mediatek.com>
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> > ---
> > drivers/usb/core/hub.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
>
> Does this need to go to any older/stable kernels? If so, how far back?
The flow is changed by
"b01b03f3ad82 USB: add new routine for checking port-resume type", but
it will cause conflict with
"ad493e5e5805 usb: add usb port auto power off mechanism"
>
> thanks,
>
> greg k-h
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] usb: core: hub: fix race condition about TRSMRCY of resume
@ 2021-05-12 2:02 ` Chunfeng Yun
0 siblings, 0 replies; 15+ messages in thread
From: Chunfeng Yun @ 2021-05-12 2:02 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Alan Stern, Matthias Brugger, Thinh Nguyen,
Gustavo A . R . Silva, Bixuan Cui, Eugeniu Rosca, Oliver Neukum,
linux-usb, linux-kernel, linux-arm-kernel, linux-mediatek,
Tianping Fang, Eddie Hung, Ikjoon Jang
On Tue, 2021-05-11 at 13:27 +0200, Greg Kroah-Hartman wrote:
> On Tue, May 11, 2021 at 06:15:22PM +0800, Chunfeng Yun wrote:
> > This may happen if the port becomes resume status exactly
> > when usb_port_resume() gets port status, it still need provide
> > a TRSMCRY time before access the device.
> >
> > Reported-by: Tianping Fang <tianping.fang@mediatek.com>
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> > ---
> > drivers/usb/core/hub.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
>
> Does this need to go to any older/stable kernels? If so, how far back?
The flow is changed by
"b01b03f3ad82 USB: add new routine for checking port-resume type", but
it will cause conflict with
"ad493e5e5805 usb: add usb port auto power off mechanism"
>
> thanks,
>
> greg k-h
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] usb: core: hub: fix race condition about TRSMRCY of resume
2021-05-11 16:39 ` Alan Stern
(?)
@ 2021-05-12 2:03 ` Chunfeng Yun
-1 siblings, 0 replies; 15+ messages in thread
From: Chunfeng Yun @ 2021-05-12 2:03 UTC (permalink / raw)
To: Alan Stern
Cc: Greg Kroah-Hartman, Matthias Brugger, Thinh Nguyen,
Gustavo A . R . Silva, Bixuan Cui, Eugeniu Rosca, Oliver Neukum,
linux-usb, linux-kernel, linux-arm-kernel, linux-mediatek,
Tianping Fang, Eddie Hung, Ikjoon Jang
On Tue, 2021-05-11 at 12:39 -0400, Alan Stern wrote:
> On Tue, May 11, 2021 at 06:15:22PM +0800, Chunfeng Yun wrote:
> > This may happen if the port becomes resume status exactly
> > when usb_port_resume() gets port status, it still need provide
> > a TRSMCRY time before access the device.
> >
> > Reported-by: Tianping Fang <tianping.fang@mediatek.com>
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
>
> This should also say:
>
> CC: <stable@vger.kernel.org>
OK, thanks
>
> > ---
> > drivers/usb/core/hub.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> > index b2bc4b7c4289..fc7d6cdacf16 100644
> > --- a/drivers/usb/core/hub.c
> > +++ b/drivers/usb/core/hub.c
> > @@ -3642,9 +3642,6 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
> > * sequence.
> > */
> > status = hub_port_status(hub, port1, &portstatus, &portchange);
> > -
> > - /* TRSMRCY = 10 msec */
> > - msleep(10);
> > }
> >
> > SuspendCleared:
> > @@ -3659,6 +3656,9 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
> > usb_clear_port_feature(hub->hdev, port1,
> > USB_PORT_FEAT_C_SUSPEND);
> > }
> > +
> > + /* TRSMRCY = 10 msec */
> > + msleep(10);
> > }
> >
> > if (udev->persist_enabled)
>
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] usb: core: hub: fix race condition about TRSMRCY of resume
@ 2021-05-12 2:03 ` Chunfeng Yun
0 siblings, 0 replies; 15+ messages in thread
From: Chunfeng Yun @ 2021-05-12 2:03 UTC (permalink / raw)
To: Alan Stern
Cc: Greg Kroah-Hartman, Matthias Brugger, Thinh Nguyen,
Gustavo A . R . Silva, Bixuan Cui, Eugeniu Rosca, Oliver Neukum,
linux-usb, linux-kernel, linux-arm-kernel, linux-mediatek,
Tianping Fang, Eddie Hung, Ikjoon Jang
On Tue, 2021-05-11 at 12:39 -0400, Alan Stern wrote:
> On Tue, May 11, 2021 at 06:15:22PM +0800, Chunfeng Yun wrote:
> > This may happen if the port becomes resume status exactly
> > when usb_port_resume() gets port status, it still need provide
> > a TRSMCRY time before access the device.
> >
> > Reported-by: Tianping Fang <tianping.fang@mediatek.com>
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
>
> This should also say:
>
> CC: <stable@vger.kernel.org>
OK, thanks
>
> > ---
> > drivers/usb/core/hub.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> > index b2bc4b7c4289..fc7d6cdacf16 100644
> > --- a/drivers/usb/core/hub.c
> > +++ b/drivers/usb/core/hub.c
> > @@ -3642,9 +3642,6 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
> > * sequence.
> > */
> > status = hub_port_status(hub, port1, &portstatus, &portchange);
> > -
> > - /* TRSMRCY = 10 msec */
> > - msleep(10);
> > }
> >
> > SuspendCleared:
> > @@ -3659,6 +3656,9 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
> > usb_clear_port_feature(hub->hdev, port1,
> > USB_PORT_FEAT_C_SUSPEND);
> > }
> > +
> > + /* TRSMRCY = 10 msec */
> > + msleep(10);
> > }
> >
> > if (udev->persist_enabled)
>
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] usb: core: hub: fix race condition about TRSMRCY of resume
@ 2021-05-12 2:03 ` Chunfeng Yun
0 siblings, 0 replies; 15+ messages in thread
From: Chunfeng Yun @ 2021-05-12 2:03 UTC (permalink / raw)
To: Alan Stern
Cc: Greg Kroah-Hartman, Matthias Brugger, Thinh Nguyen,
Gustavo A . R . Silva, Bixuan Cui, Eugeniu Rosca, Oliver Neukum,
linux-usb, linux-kernel, linux-arm-kernel, linux-mediatek,
Tianping Fang, Eddie Hung, Ikjoon Jang
On Tue, 2021-05-11 at 12:39 -0400, Alan Stern wrote:
> On Tue, May 11, 2021 at 06:15:22PM +0800, Chunfeng Yun wrote:
> > This may happen if the port becomes resume status exactly
> > when usb_port_resume() gets port status, it still need provide
> > a TRSMCRY time before access the device.
> >
> > Reported-by: Tianping Fang <tianping.fang@mediatek.com>
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
>
> This should also say:
>
> CC: <stable@vger.kernel.org>
OK, thanks
>
> > ---
> > drivers/usb/core/hub.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> > index b2bc4b7c4289..fc7d6cdacf16 100644
> > --- a/drivers/usb/core/hub.c
> > +++ b/drivers/usb/core/hub.c
> > @@ -3642,9 +3642,6 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
> > * sequence.
> > */
> > status = hub_port_status(hub, port1, &portstatus, &portchange);
> > -
> > - /* TRSMRCY = 10 msec */
> > - msleep(10);
> > }
> >
> > SuspendCleared:
> > @@ -3659,6 +3656,9 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
> > usb_clear_port_feature(hub->hdev, port1,
> > USB_PORT_FEAT_C_SUSPEND);
> > }
> > +
> > + /* TRSMRCY = 10 msec */
> > + msleep(10);
> > }
> >
> > if (udev->persist_enabled)
>
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2021-05-12 2:05 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11 10:15 [PATCH] usb: core: hub: fix race condition about TRSMRCY of resume Chunfeng Yun
2021-05-11 10:15 ` Chunfeng Yun
2021-05-11 10:15 ` Chunfeng Yun
2021-05-11 11:27 ` Greg Kroah-Hartman
2021-05-11 11:27 ` Greg Kroah-Hartman
2021-05-11 11:27 ` Greg Kroah-Hartman
2021-05-12 2:02 ` Chunfeng Yun
2021-05-12 2:02 ` Chunfeng Yun
2021-05-12 2:02 ` Chunfeng Yun
2021-05-11 16:39 ` Alan Stern
2021-05-11 16:39 ` Alan Stern
2021-05-11 16:39 ` Alan Stern
2021-05-12 2:03 ` Chunfeng Yun
2021-05-12 2:03 ` Chunfeng Yun
2021-05-12 2:03 ` Chunfeng Yun
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.