From: Neal Liu <neal_liu@aspeedtech.com> Date: 2021-12-08 10:05:57
These patch series include 2 parts. One is adding more features
to pass USB30CV compliance test, the other is fixing hw issues.
More detail descriptions are included below patchsets.
Change since v2:
- Add more description in changelog.
- Fix remote wakeup issue patch and make it more configurable.
Change since v1:
- Remove unnecessary configs for SET_CONFIGURATION.
- Separate supporting test mode to new patch.
*** BLURB HERE ***
Neal Liu (4):
usb: aspeed-vhub: add qualifier descriptor
usb: aspeed-vhub: fix remote wakeup failure in iKVM use case
usb: aspeed-vhub: fix ep0 OUT ack received wrong length issue
usb: aspeed-vhub: support test mode feature
drivers/usb/gadget/udc/aspeed-vhub/dev.c | 19 +++++++--
drivers/usb/gadget/udc/aspeed-vhub/ep0.c | 7 ++++
drivers/usb/gadget/udc/aspeed-vhub/epn.c | 5 +++
drivers/usb/gadget/udc/aspeed-vhub/hub.c | 47 ++++++++++++++++++++---
drivers/usb/gadget/udc/aspeed-vhub/vhub.h | 1 +
5 files changed, 69 insertions(+), 10 deletions(-)
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Neal Liu <neal_liu@aspeedtech.com> Date: 2021-12-08 10:06:03
Signaling remote wakeup if an emulated USB device has any activity
if the device is allowed by host.
Signed-off-by: Neal Liu <neal_liu@aspeedtech.com>
---
drivers/usb/gadget/udc/aspeed-vhub/epn.c | 5 +++++
1 file changed, 5 insertions(+)
From: Neal Liu <neal_liu@aspeedtech.com> Date: 2021-12-08 10:06:11
If multiple devices in vhub are enumerated simultaneously, ep0 OUT
ack might received wrong data length. Using expected data length
instead.
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Neal Liu <neal_liu@aspeedtech.com>
---
drivers/usb/gadget/udc/aspeed-vhub/ep0.c | 7 +++++++
1 file changed, 7 insertions(+)
From: Neal Liu <neal_liu@aspeedtech.com> Date: 2021-12-08 10:06:14
USB3 Command Verifier (USB3CV) is the official tool for
USB3 Hub and Device Framework testing.
A high-speed capable device that has different device information
for full-speed and high-speed must have a Device Qualifier Descriptor.
This patch is to support device qualifier to pass
USB3CV - Chapter 9 Test [USB 2 devices] - Device Qualifier Tests.
Signed-off-by: Neal Liu <neal_liu@aspeedtech.com>
---
drivers/usb/gadget/udc/aspeed-vhub/hub.c | 24 +++++++++++++++++++++++
drivers/usb/gadget/udc/aspeed-vhub/vhub.h | 1 +
2 files changed, 25 insertions(+)
From: Neal Liu <neal_liu@aspeedtech.com> Date: 2021-12-08 10:06:22
Support aspeed usb vhub set feature to test mode.
Signed-off-by: Neal Liu <neal_liu@aspeedtech.com>
---
drivers/usb/gadget/udc/aspeed-vhub/dev.c | 19 +++++++++++++++----
drivers/usb/gadget/udc/aspeed-vhub/hub.c | 23 +++++++++++++++++------
2 files changed, 32 insertions(+), 10 deletions(-)
On Wed, Dec 08, 2021 at 06:05:41PM +0800, Neal Liu wrote:
These patch series include 2 parts. One is adding more features
to pass USB30CV compliance test, the other is fixing hw issues.
More detail descriptions are included below patchsets.
Change since v2:
- Add more description in changelog.
- Fix remote wakeup issue patch and make it more configurable.
Change since v1:
- Remove unnecessary configs for SET_CONFIGURATION.
- Separate supporting test mode to new patch.
*** BLURB HERE ***
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2021-12-09 00:09:50
On Wed, 2021-12-08 at 18:05 +0800, Neal Liu wrote:
USB3 Command Verifier (USB3CV) is the official tool for
USB3 Hub and Device Framework testing.
A high-speed capable device that has different device information
for full-speed and high-speed must have a Device Qualifier
Descriptor.
This patch is to support device qualifier to pass
USB3CV - Chapter 9 Test [USB 2 devices] - Device Qualifier Tests.
Signed-off-by: Neal Liu <neal_liu@aspeedtech.com>
---
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
ast_vhub_ep *ep,
switch (wValue >> 8) {
case USB_DT_DEVICE:
case USB_DT_CONFIG:
+ case USB_DT_DEVICE_QUALIFIER:
+ case USB_DT_OTHER_SPEED_CONFIG:
return ast_vhub_rep_desc(ep, wValue >> 8,
wLength);
case USB_DT_STRING:
@@ -1033,6 +1053,10 @@ static int ast_vhub_init_desc(struct ast_vhub
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2021-12-09 00:10:58
On Wed, 2021-12-08 at 18:05 +0800, Neal Liu wrote:
Signaling remote wakeup if an emulated USB device has any activity
if the device is allowed by host.
Signed-off-by: Neal Liu <neal_liu@aspeedtech.com>
I still think it should fundamentally be the device making that
decision, but since they don't, this is an acceptable workaround, but
please, don't write the MMIO on every EP queue. Either keep track of
the bus being suspended, or turn on the AUTO bit in HW when wakeup_en
is set.
Cheers,
Ben.
From: Neal Liu <neal_liu@aspeedtech.com> Date: 2021-12-09 02:37:21
-----Original Message-----
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Sent: Thursday, December 9, 2021 8:05 AM
To: Neal Liu <neal_liu@aspeedtech.com>; Felipe Balbi <balbi@kernel.org>;
Greg Kroah-Hartman [off-list ref]; Joel Stanley
[off-list ref]; Andrew Jeffery [off-list ref]; Cai Huoqing
[off-list ref]; Tao Ren [off-list ref]; Julia Lawall
[off-list ref]; kernel test robot [off-list ref]; Sasha Levin
[off-list ref]; linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org;
linux-arm-kernel@lists.infradead.org; linux-aspeed@lists.ozlabs.org
Cc: BMC-SW <redacted>
Subject: Re: [PATCH v3 2/4] usb: aspeed-vhub: fix remote wakeup failure in
iKVM use case
On Wed, 2021-12-08 at 18:05 +0800, Neal Liu wrote:
quoted
Signaling remote wakeup if an emulated USB device has any activity if
the device is allowed by host.
Signed-off-by: Neal Liu <neal_liu@aspeedtech.com>
I still think it should fundamentally be the device making that decision, but
since they don't, this is an acceptable workaround, but please, don't write the
MMIO on every EP queue. Either keep track of the bus being suspended, or
turn on the AUTO bit in HW when wakeup_en is set.
Cheers,
Ben.
I'm confused. Signaling Wakeup when wakeup_en is set if it has any ep activities is not exactly what you said?
wakeup_en is set only if host allows this device have wakeup capability and bus being suspended.
Normal ep activities would not write the MMIO because wakeup_en is not set.
Thanks
-Neal
From: Neal Liu <neal_liu@aspeedtech.com> Date: 2021-12-09 02:40:02
-----Original Message-----
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sent: Wednesday, December 8, 2021 8:22 PM
To: Neal Liu <neal_liu@aspeedtech.com>
Cc: Felipe Balbi <balbi@kernel.org>; Joel Stanley <joel@jms.id.au>; Andrew
Jeffery [off-list ref]; Cai Huoqing [off-list ref]; Tao Ren
[off-list ref]; Julia Lawall [off-list ref]; kernel test
robot [off-list ref]; Sasha Levin [off-list ref];
linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org;
linux-arm-kernel@lists.infradead.org; linux-aspeed@lists.ozlabs.org;
benh@kernel.crashing.org; BMC-SW [off-list ref]
Subject: Re: [PATCH v3 0/4] Refactor Aspeed USB vhub driver
On Wed, Dec 08, 2021 at 06:05:41PM +0800, Neal Liu wrote:
quoted
These patch series include 2 parts. One is adding more features to
pass USB30CV compliance test, the other is fixing hw issues.
More detail descriptions are included below patchsets.
Change since v2:
- Add more description in changelog.
- Fix remote wakeup issue patch and make it more configurable.
Change since v1:
- Remove unnecessary configs for SET_CONFIGURATION.
- Separate supporting test mode to new patch.
*** BLURB HERE ***
Blurb is missing :(
I would remove this comment if new patch is necessary.
Thanks
-Neal
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
On Wed, Dec 08, 2021 at 06:05:43PM +0800, Neal Liu wrote:
Signaling remote wakeup if an emulated USB device has any activity
if the device is allowed by host.
Signed-off-by: Neal Liu <neal_liu@aspeedtech.com>
---
drivers/usb/gadget/udc/aspeed-vhub/epn.c | 5 +++++
1 file changed, 5 insertions(+)
What commit does this fix?
Does it need to go to stable kernels?
Should it be independent of this patch series that adds new features?
thanks,
greg k-h
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2021-12-14 02:41:19
On Thu, 2021-12-09 at 02:37 +0000, Neal Liu wrote:
I'm confused. Signaling Wakeup when wakeup_en is set if it has any ep
activities is not exactly what you said?
wakeup_en is set only if host allows this device have wakeup
capability and bus being suspended.
Normal ep activities would not write the MMIO because wakeup_en is
not set.
Hrm... I didn't think wakeup_en was limited to the bus being suspended,
but maybe I misremember, it's been a while.
Cheers,
Ben.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Neal Liu <neal_liu@aspeedtech.com> Date: 2021-12-20 02:23:08
-----Original Message-----
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Sent: Tuesday, December 14, 2021 10:36 AM
To: Neal Liu <neal_liu@aspeedtech.com>; Felipe Balbi <balbi@kernel.org>;
Greg Kroah-Hartman [off-list ref]; Joel Stanley
[off-list ref]; Andrew Jeffery [off-list ref]; Cai Huoqing
[off-list ref]; Tao Ren [off-list ref]; Julia Lawall
[off-list ref]; kernel test robot [off-list ref]; Sasha Levin
[off-list ref]; linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org;
linux-arm-kernel@lists.infradead.org; linux-aspeed@lists.ozlabs.org
Cc: BMC-SW <redacted>
Subject: Re: [PATCH v3 2/4] usb: aspeed-vhub: fix remote wakeup failure in
iKVM use case
On Thu, 2021-12-09 at 02:37 +0000, Neal Liu wrote:
quoted
I'm confused. Signaling Wakeup when wakeup_en is set if it has any ep
activities is not exactly what you said?
wakeup_en is set only if host allows this device have wakeup
capability and bus being suspended.
Normal ep activities would not write the MMIO because wakeup_en is not
set.
Hrm... I didn't think wakeup_en was limited to the bus being suspended, but
maybe I misremember, it's been a while.
Cheers,
Ben.
wakeup_en is only set in the case of host set USB_DEVICE_REMOTE_WAKEUP feature to vhub devices.
I think this behavior only occurs during host is going to suspend, and set this feature to any device which can wakeup itself before sleep.
Thanks
-Neal
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Neal Liu <neal_liu@aspeedtech.com> Date: 2021-12-27 02:07:09
-----Original Message-----
From: Neal Liu
Sent: Monday, December 20, 2021 10:23 AM
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>; Felipe Balbi
[off-list ref]; Greg Kroah-Hartman [off-list ref]; Joel
Stanley [off-list ref]; Andrew Jeffery [off-list ref]; Cai Huoqing
[off-list ref]; Tao Ren [off-list ref]; Julia Lawall
[off-list ref]; kernel test robot [off-list ref]; Sasha Levin
[off-list ref]; linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org;
linux-arm-kernel@lists.infradead.org; linux-aspeed@lists.ozlabs.org
Cc: BMC-SW <redacted>
Subject: RE: [PATCH v3 2/4] usb: aspeed-vhub: fix remote wakeup failure in
iKVM use case
quoted
-----Original Message-----
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Sent: Tuesday, December 14, 2021 10:36 AM
To: Neal Liu <neal_liu@aspeedtech.com>; Felipe Balbi
[off-list ref]; Greg Kroah-Hartman [off-list ref];
Joel Stanley [off-list ref]; Andrew Jeffery [off-list ref]; Cai
Huoqing [off-list ref]; Tao Ren [off-list ref]; Julia
Lawall [off-list ref]; kernel test robot [off-list ref];
Sasha Levin [off-list ref]; linux-usb@vger.kernel.org;
linux-kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
linux-aspeed@lists.ozlabs.org
Cc: BMC-SW <redacted>
Subject: Re: [PATCH v3 2/4] usb: aspeed-vhub: fix remote wakeup
failure in iKVM use case
On Thu, 2021-12-09 at 02:37 +0000, Neal Liu wrote:
quoted
I'm confused. Signaling Wakeup when wakeup_en is set if it has any
ep activities is not exactly what you said?
wakeup_en is set only if host allows this device have wakeup
capability and bus being suspended.
Normal ep activities would not write the MMIO because wakeup_en is
not set.
Hrm... I didn't think wakeup_en was limited to the bus being
suspended, but maybe I misremember, it's been a while.
Cheers,
Ben.
wakeup_en is only set in the case of host set USB_DEVICE_REMOTE_WAKEUP
feature to vhub devices.
I think this behavior only occurs during host is going to suspend, and set this
feature to any device which can wakeup itself before sleep.
Thanks
-Neal
Would you like to test it if you have some free time.
Please feel free for any feedback.
-Neal
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Neal Liu <neal_liu@aspeedtech.com> Date: 2022-01-10 06:29:23
-----Original Message-----
From: Neal Liu
Sent: Monday, December 27, 2021 10:07 AM
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>; Felipe Balbi
[off-list ref]; Greg Kroah-Hartman [off-list ref]; Joel
Stanley [off-list ref]; Andrew Jeffery [off-list ref]; Cai Huoqing
[off-list ref]; Tao Ren [off-list ref]; Julia Lawall
[off-list ref]; kernel test robot [off-list ref]; Sasha Levin
[off-list ref]; linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org;
linux-arm-kernel@lists.infradead.org; linux-aspeed@lists.ozlabs.org
Cc: BMC-SW <redacted>
Subject: RE: [PATCH v3 2/4] usb: aspeed-vhub: fix remote wakeup failure in
iKVM use case
quoted
-----Original Message-----
From: Neal Liu
Sent: Monday, December 20, 2021 10:23 AM
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>; Felipe Balbi
[off-list ref]; Greg Kroah-Hartman [off-list ref];
Joel Stanley [off-list ref]; Andrew Jeffery [off-list ref]; Cai
Huoqing [off-list ref]; Tao Ren [off-list ref]; Julia
Lawall [off-list ref]; kernel test robot [off-list ref];
Sasha Levin [off-list ref]; linux-usb@vger.kernel.org;
linux-kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
linux-aspeed@lists.ozlabs.org
Cc: BMC-SW <redacted>
Subject: RE: [PATCH v3 2/4] usb: aspeed-vhub: fix remote wakeup
failure in iKVM use case
quoted
-----Original Message-----
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Sent: Tuesday, December 14, 2021 10:36 AM
To: Neal Liu <neal_liu@aspeedtech.com>; Felipe Balbi
[off-list ref]; Greg Kroah-Hartman [off-list ref];
Joel Stanley [off-list ref]; Andrew Jeffery [off-list ref]; Cai
Huoqing [off-list ref]; Tao Ren [off-list ref];
Julia Lawall [off-list ref]; kernel test robot
[off-list ref]; Sasha Levin [off-list ref];
linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org;
linux-arm-kernel@lists.infradead.org;
linux-aspeed@lists.ozlabs.org
Cc: BMC-SW <redacted>
Subject: Re: [PATCH v3 2/4] usb: aspeed-vhub: fix remote wakeup
failure in iKVM use case
On Thu, 2021-12-09 at 02:37 +0000, Neal Liu wrote:
quoted
I'm confused. Signaling Wakeup when wakeup_en is set if it has any
ep activities is not exactly what you said?
wakeup_en is set only if host allows this device have wakeup
capability and bus being suspended.
Normal ep activities would not write the MMIO because wakeup_en is
not set.
Hrm... I didn't think wakeup_en was limited to the bus being
suspended, but maybe I misremember, it's been a while.
Cheers,
Ben.
wakeup_en is only set in the case of host set
USB_DEVICE_REMOTE_WAKEUP
quoted
feature to vhub devices.
I think this behavior only occurs during host is going to suspend, and
set this feature to any device which can wakeup itself before sleep.
Thanks
-Neal
Would you like to test it if you have some free time.
Please feel free for any feedback.
-Neal