usbip: vhci-hcd: Add USB3 SuperSpeed support [Linux 3.18.95]

This Linux kernel change "usbip: vhci-hcd: Add USB3 SuperSpeed support" is included in the Linux 3.18.95 release. This change is authored by Yuyang Du <yuyang.du [at] intel.com> on Thu Jun 8 13:04:10 2017 +0800. The commit for this change in Linux stable tree is a7db857 (patch) which is from upstream commit 1c9de5b. The same Linux upstream change may have been applied to various maintained Linux releases and you can find all Linux releases containing changes from upstream 1c9de5b.

usbip: vhci-hcd: Add USB3 SuperSpeed support

commit 1c9de5bf428612458427943b724bea51abde520a upstream.

This patch adds a USB3 HCD to an existing USB2 HCD and provides
the support of SuperSpeed, in case the device can only be enumerated
with SuperSpeed.

The bulk of the added code in usb3_bos_desc and hub_control to support
SuperSpeed is borrowed from the commit 1cd8fd2887e162ad ("usb: gadget:
dummy_hcd: add SuperSpeed support").

With this patch, each vhci will have VHCI_HC_PORTS HighSpeed ports
and VHCI_HC_PORTS SuperSpeed ports.

Suggested-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Yuyang Du <yuyang.du@intel.com>
Acked-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/usb/usbip/vhci_hcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/usbip/vhci_hcd.c b/drivers/usb/usbip/vhci_hcd.c
index 2c7bed7..e480b92 100644
--- a/drivers/usb/usbip/vhci_hcd.c
+++ b/drivers/usb/usbip/vhci_hcd.c
@@ -279,7 +279,7 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
        case USB_PORT_FEAT_POWER:
            usbip_dbg_vhci_rh(
                " ClearPortFeature: USB_PORT_FEAT_POWER\n");
-           dum->port_status[rhport] = 0;
+           dum->port_status[rhport] &= ~USB_PORT_STAT_POWER;
            dum->resuming = 0;
            break;
        case USB_PORT_FEAT_C_RESET:

Leave a Reply

Your email address will not be published. Required fields are marked *