Changeset e141281 in mainline for uspace/drv/bus/usb/ohci/ohci_rh.c
- Timestamp:
- 2017-05-04T22:17:36Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 31a30fa
- Parents:
- dc12262
- File:
-
- 1 edited
-
uspace/drv/bus/usb/ohci/ohci_rh.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/ohci_rh.c
rdc12262 re141281 393 393 TEST_SIZE_INIT(0, port, hub); 394 394 const unsigned feature = uint16_usb2host(setup_packet->value); 395 395 396 switch (feature) { 396 397 case USB_HUB_FEATURE_PORT_POWER: /*8*/ 397 { 398 const uint32_t rhda = OHCI_RD(hub->registers->rh_desc_a); 399 /* No power switching */ 400 if (rhda & RHDA_NPS_FLAG) 401 return EOK; 402 /* Ganged power switching, one port powers all */ 403 if (!(rhda & RHDA_PSM_FLAG)) { 404 OHCI_WR(hub->registers->rh_status,RHS_SET_GLOBAL_POWER); 405 return EOK; 398 { 399 const uint32_t rhda = OHCI_RD(hub->registers->rh_desc_a); 400 401 /* No power switching */ 402 if (rhda & RHDA_NPS_FLAG) 403 return EOK; 404 405 /* Ganged power switching, one port powers all */ 406 if (!(rhda & RHDA_PSM_FLAG)) { 407 OHCI_WR(hub->registers->rh_status,RHS_SET_GLOBAL_POWER); 408 return EOK; 409 } 406 410 } 407 } 408 /* Fall through, for per port power */ 409 /* Fallthrough */ 411 /* Fall through, for per port power */ 412 /* Fallthrough */ 410 413 case USB_HUB_FEATURE_PORT_ENABLE: /*1*/ 411 414 case USB_HUB_FEATURE_PORT_SUSPEND: /*2*/
Note:
See TracChangeset
for help on using the changeset viewer.
