Changeset 05770666 in mainline for uspace/drv/bus/usb/xhci/rh.c
- Timestamp:
- 2018-01-18T14:40:20Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e7f21884
- Parents:
- 2c0564c
- git-author:
- Ondřej Hlavatý <aearsis@…> (2018-01-18 14:30:02)
- git-committer:
- Ondřej Hlavatý <aearsis@…> (2018-01-18 14:40:20)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/rh.c
r2c0564c r05770666 224 224 status &= ~XHCI_REG_MASK(XHCI_PORT_CSC); 225 225 226 bool connected = !!(status & XHCI_REG_MASK(XHCI_PORT_CCS));226 const bool connected = !!(status & XHCI_REG_MASK(XHCI_PORT_CCS)); 227 227 if (connected) { 228 228 usb_port_connected(&port->base, &rh_enumerate_device); … … 234 234 if (status & XHCI_REG_MASK(XHCI_PORT_PRC)) { 235 235 status &= ~XHCI_REG_MASK(XHCI_PORT_PRC); 236 bool enabled = !!(status & XHCI_REG_MASK(XHCI_PORT_PED)); 237 236 237 const bool enabled = !!(status & XHCI_REG_MASK(XHCI_PORT_PED)); 238 238 if (enabled) { 239 239 usb_port_enabled(&port->base); … … 258 258 } 259 259 260 void xhci_rh_startup(xhci_rh_t *rh) 261 { 262 /* The reset changed status of all ports, and SW originated reason does 263 * not cause an interrupt. 264 */ 265 for (uint8_t i = 1; i < rh->max_ports; ++i) { 266 xhci_rh_handle_port_change(rh, i + 1); 267 268 rh_port_t * const port = &rh->ports[i]; 269 270 /* 271 * When xHCI starts, for some reasons USB 3 ports do not have 272 * the CSC bit, even though they are connected. Try to find 273 * such ports. 274 */ 275 if (XHCI_REG_RD(port->regs, XHCI_PORT_CCS) && port->base.state == PORT_DISABLED) 276 usb_port_connected(&port->base, &rh_enumerate_device); 277 } 278 } 279 260 280 /** 261 281 * @}
Note:
See TracChangeset
for help on using the changeset viewer.