Changeset 7d1dd2b in mainline
- Timestamp:
- 2018-01-16T13:36:30Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 47e9494
- Parents:
- c952abc4
- git-author:
- Ondřej Hlavatý <aearsis@…> (2018-01-16 13:36:28)
- git-committer:
- Ondřej Hlavatý <aearsis@…> (2018-01-16 13:36:30)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhub/port.c
rc952abc4 r7d1dd2b 153 153 { 154 154 assert(port); 155 155 156 fibril_mutex_lock(&port->guard); 156 port_make_disabled(port); 157 switch (port->state) { 158 case PORT_ENABLED: 159 /* 160 * We shall inform the HC that the device is gone. 161 * However, we can't wait for it, because if the device is hub, 162 * it would have to use the same IPC handling fibril as we do. 163 * But we cannot even defer it to another fibril, because then 164 * the HC would assume our driver didn't cleanup properly, and 165 * will remove those devices by himself. 166 * 167 * So the solutions seems to behave like a bad driver and leave 168 * the work for HC. 169 */ 170 port_change_state(port, PORT_DISABLED); 171 break; 172 173 case PORT_CONNECTED: 174 case PORT_IN_RESET: 175 port_change_state(port, PORT_ERROR); 176 /* fallthrough */ 177 case PORT_ERROR: 178 port_wait_state(port, PORT_DISABLED); 179 /* fallthrough */ 180 case PORT_DISABLED: 181 break; 182 } 157 183 port_log(debug, port, "Finalized."); 158 184 fibril_mutex_unlock(&port->guard);
Note:
See TracChangeset
for help on using the changeset viewer.