Changeset 95d5dca in mainline
- Timestamp:
- 2014-01-22T18:38:53Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 82a639cd
- Parents:
- b300d2b
- Location:
- uspace/drv/bus/usb/ehci
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/ehci_rh.c
rb300d2b r95d5dca 114 114 } 115 115 116 for (unsigned i = 0; i < EHCI_MAX_PORTS; ++i) { 117 instance->reset_flag[i] = false; 118 instance->resume_flag[i] = false; 119 } 120 116 121 ehci_rh_hub_desc_init(instance, EHCI_RD(caps->hcsparams)); 117 122 instance->unfinished_interrupt_transfer = NULL; … … 269 274 (reg & USB_PORTSC_PORT_OWNER_FLAG) ? (1 << 10) : 0 | 270 275 (reg & USB_PORTSC_PORT_TEST_MASK) ? (1 << 11) : 0 | 271 (reg & USB_PORTSC_INDICATOR_MASK) ? (1 << 12) : 0) 272 ; 276 (reg & USB_PORTSC_INDICATOR_MASK) ? (1 << 12) : 0 | 277 (reg & USB_PORTSC_CONNECT_CH_FLAG) ? (1 << 16) : 0 | 278 (reg & USB_PORTSC_EN_CHANGE_FLAG) ? (1 << 17) : 0 | 279 hub->resume_flag[port] ? (1 << 18) : 0 | 280 (reg & USB_PORTSC_OC_CHANGE_FLAG) ? (1 << 19) : 0 | 281 hub->reset_flag[port] ? (1 << 20): 0 282 ); 273 283 //TODO: use hub status flags here 274 284 memcpy(data, &status, sizeof(status)); … … 317 327 EHCI_CLR(hub->registers->portsc[port], 318 328 USB_PORTSC_RESUME_FLAG); 329 hub->resume_flag[port] = true; 319 330 return EOK; 320 331 … … 332 343 return EOK; 333 344 case USB_HUB_FEATURE_C_PORT_SUSPEND: /*18*/ 345 hub->resume_flag[port] = false; 346 return EOK; 334 347 case USB_HUB_FEATURE_C_PORT_RESET: /*20*/ 335 //TODO these are not represented in hw, think of something348 hub->reset_flag[port] = false; 336 349 return EOK; 337 350 … … 378 391 * after reset it's a full speed device */ 379 392 if (!(EHCI_RD(hub->registers->portsc[port]) & 380 USB_PORTSC_ENABLED_FLAG)) 393 USB_PORTSC_ENABLED_FLAG)) { 381 394 EHCI_CLR(hub->registers->portsc[port], 382 395 USB_PORTSC_PORT_OWNER_FLAG); 396 } else { 397 hub->reset_flag[port] = true; 398 } 383 399 384 400 return EOK; -
uspace/drv/bus/usb/ehci/ehci_rh.h
rb300d2b r95d5dca 63 63 /** interrupt transfer waiting for an actual interrupt to occur */ 64 64 usb_transfer_batch_t *unfinished_interrupt_transfer; 65 bool reset_flag[EHCI_MAX_PORTS]; 66 bool resume_flag[EHCI_MAX_PORTS]; 65 67 } ehci_rh_t; 66 68
Note:
See TracChangeset
for help on using the changeset viewer.