vhci_hcd: Always re-enable a USB Port after reset
Subsystems (2)
PATCH 1/1 vhci_hcd: Always re-enable a USB Port after reset
A (virtual) usb port can getting stuck in a disabled state on reset Always re-enable a usb port regardless of if its addressed or not
Signed-off-by Michael Broadfoot <[email protected]>
--- drivers/usb/usbip/vhci_hcd.c | 3 --- 1 file changed, 3 deletions(-)
drivers/usb/usbip/vhci_hcd.c +0 -3
@@ -455,15 +455,12 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, vhci_hcd->port_status[rhport] &= ~(1 <<USB_PORT_FEAT_RESET ); vhci_hcd->re_timeout =0 ; -if (vhci_hcd->vdev[rhport].ud.status == -VDEV_ST_NOTASSIGNED ) {usbip_dbg_vhci_rh (" enable rhport %d (status %u)\n" , rhport, vhci_hcd->vdev[rhport].ud.status); vhci_hcd->port_status[rhport] |=USB_PORT_STAT_ENABLE ; - }if (hcd->speed <HCD_USB3 ) {switch (vhci_hcd->vdev[rhport].speed) {
Signature · 1 line
2.30.2
Greg KH
maintainerQuoted 1 line · Michael Broadfoot
A (virtual) usb port can getting stuck in a disabled state on reset
How can that happen?
Quoted 1 line
Always re-enable a usb port regardless of if its addressed or not
Are you sure? What causes this?
And what do you mean by "not" here?
Please write full sentences.
Quoted 13 lines
Signed-off-by Michael Broadfoot <[email protected]>--- drivers/usb/usbip/vhci_hcd.c | 3 --- 1 file changed, 3 deletions(-)drivers/usb/usbip/vhci_hcd.c +0
-0@@ -455,15 +455,12 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, vhci_hcd->port_status[rhport] &= ~(1 <<USB_PORT_FEAT_RESET ); vhci_hcd->re_timeout =0 ;
drivers/usb/usbip/vhci_hcd.c static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, · line 466
Quoted 10 lines
drivers/usb/usbip/vhci_hcd.c +0
-3-if (vhci_hcd->vdev[rhport].ud.status == -VDEV_ST_NOTASSIGNED ) {usbip_dbg_vhci_rh (" enable rhport %d (status %u)\n" , rhport, vhci_hcd->vdev[rhport].ud.status); vhci_hcd->port_status[rhport] |=USB_PORT_STAT_ENABLE ; - }
Coding style is now all messed up, this change isn't ok as-is, sorry.
thanks,
greg k-h