Lines 130-135
Link Here
|
130 |
int sc_disable_port_power; |
130 |
int sc_disable_port_power; |
131 |
#endif |
131 |
#endif |
132 |
uint8_t sc_usb_port_errors; /* error counter */ |
132 |
uint8_t sc_usb_port_errors; /* error counter */ |
|
|
133 |
uint8_t sc_usb_port_reset_errors; /* error counter to throttle "device vanished" log messages */ |
133 |
#define UHUB_USB_PORT_ERRORS_MAX 4 |
134 |
#define UHUB_USB_PORT_ERRORS_MAX 4 |
134 |
uint8_t sc_flags; |
135 |
uint8_t sc_flags; |
135 |
#define UHUB_FLAG_DID_EXPLORE 0x01 |
136 |
#define UHUB_FLAG_DID_EXPLORE 0x01 |
Lines 750-757
Link Here
|
750 |
if ((sc->sc_st.port_change & UPS_C_CONNECT_STATUS) || |
751 |
if ((sc->sc_st.port_change & UPS_C_CONNECT_STATUS) || |
751 |
(!(sc->sc_st.port_status & UPS_CURRENT_CONNECT_STATUS))) { |
752 |
(!(sc->sc_st.port_status & UPS_CURRENT_CONNECT_STATUS))) { |
752 |
if (timeout) { |
753 |
if (timeout) { |
753 |
DPRINTFN(0, "giving up port reset " |
754 |
if(sc->sc_usb_port_reset_errors < UHUB_USB_PORT_ERRORS_MAX) |
754 |
"- device vanished\n"); |
755 |
{ |
|
|
756 |
DPRINTFN(0, "giving up port reset " |
757 |
"- device vanished\n"); |
758 |
} |
759 |
++sc->sc_usb_port_reset_errors; |
755 |
goto error; |
760 |
goto error; |
756 |
} |
761 |
} |
757 |
timeout = 1; |
762 |
timeout = 1; |