Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/usb/usb_hub.c
Show First 20 Lines • Show All 1,082 Lines • ▼ Show 20 Lines | if (sc->sc_st.port_change & UPS_C_CONNECT_STATUS) { | ||||
retval = err; | retval = err; | ||||
} | } | ||||
if (sc->sc_st.port_change & (UPS_C_SUSPEND | | if (sc->sc_st.port_change & (UPS_C_SUSPEND | | ||||
UPS_C_PORT_LINK_STATE)) { | UPS_C_PORT_LINK_STATE)) { | ||||
err = uhub_suspend_resume_port(sc, portno); | err = uhub_suspend_resume_port(sc, portno); | ||||
if (err != USB_ERR_NORMAL_COMPLETION) | if (err != USB_ERR_NORMAL_COMPLETION) | ||||
retval = err; | retval = err; | ||||
} | } | ||||
if (udev->speed == USB_SPEED_SUPER && | |||||
hselasky: You might want to check if the device is super-speed before doing this. | |||||
Done Inline Actionsmight -> must, because this bit has different meaning for USB 2.0 ! hselasky: might -> must, because this bit has different meaning for USB 2.0 ! | |||||
Done Inline Actionsif (udev->speed == USB_SPEED_SUPER) { ,... } hselasky: ```
if (udev->speed == USB_SPEED_SUPER) {
,...
}
``` | |||||
(sc->sc_st.port_change & UPS_C_BH_PORT_RESET) != 0) { | |||||
DPRINTF("Warm reset finished on port %u.\n", portno); | |||||
err = usbd_req_clear_port_feature( | |||||
udev, NULL, portno, UHF_C_BH_PORT_RESET); | |||||
Done Inline ActionsUpdate this to: hselasky: Update this to:
if (err != USB_ERR_NORMAL_COMPLETION)
retval = err; | |||||
if (err != USB_ERR_NORMAL_COMPLETION) | |||||
retval = err; | |||||
} | |||||
if (sc->sc_st.port_change & UPS_C_PORT_RESET) { | |||||
DPRINTF("Port reset finished on port %u.\n", portno); | |||||
err = usbd_req_clear_port_feature( | |||||
udev, NULL, portno, UHF_C_PORT_RESET); | |||||
if (err != USB_ERR_NORMAL_COMPLETION) | |||||
retval = err; | |||||
Done Inline Actionsditto hselasky: ditto | |||||
} | |||||
if (uhub_explore_sub(sc, up) == USB_ERR_NORMAL_COMPLETION) { | if (uhub_explore_sub(sc, up) == USB_ERR_NORMAL_COMPLETION) { | ||||
/* explore succeeded - reset restart counter */ | /* explore succeeded - reset restart counter */ | ||||
up->restartcnt = 0; | up->restartcnt = 0; | ||||
} | } | ||||
} | } | ||||
if (do_unlock) | if (do_unlock) | ||||
▲ Show 20 Lines • Show All 1,881 Lines • Show Last 20 Lines |
You might want to check if the device is super-speed before doing this.