Changeset d1582b50 in mainline for uspace/drv/bus/usb/ohci/ohci_rh.c
- Timestamp:
- 2020-12-14T20:41:53Z (4 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 02fe42e
- Parents:
- 1382446
- git-author:
- Jiri Svoboda <jiri@…> (2020-12-14 20:33:54)
- git-committer:
- Jiri Svoboda <jiri@…> (2020-12-14 20:41:53)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/ohci_rh.c
r1382446 rd1582b50 87 87 instance->hub_descriptor.header.max_current = 0; 88 88 89 /* Device Removable and some legacy 1.0 stuff */89 /* Device Removable and some legacy 1.0 stuff */ 90 90 instance->hub_descriptor.rempow[0] = 91 91 (port_desc >> RHDB_DR_SHIFT) & 0xff; … … 139 139 OHCI_CLR(regs->rh_desc_a, RHDA_PSM_FLAG); 140 140 141 /* Turn off power (hub driver will turn this back on) */141 /* Turn off power (hub driver will turn this back on) */ 142 142 OHCI_WR(regs->rh_status, RHS_CLEAR_GLOBAL_POWER); 143 143 … … 348 348 /* Enabled features to clear: see page 269 of USB specs */ 349 349 switch (feature) { 350 case USB_HUB_FEATURE_PORT_POWER: /* 8*/350 case USB_HUB_FEATURE_PORT_POWER: /* 8 */ 351 351 rhda = OHCI_RD(hub->registers->rh_desc_a); 352 352 /* No power switching */ … … 362 362 RHPS_CLEAR_PORT_POWER); 363 363 return EOK; 364 case USB2_HUB_FEATURE_PORT_ENABLE: /* 1*/364 case USB2_HUB_FEATURE_PORT_ENABLE: /* 1 */ 365 365 OHCI_WR(hub->registers->rh_port_status[port], 366 366 RHPS_CLEAR_PORT_ENABLE); 367 367 return EOK; 368 368 369 case USB2_HUB_FEATURE_PORT_SUSPEND: /* 2*/369 case USB2_HUB_FEATURE_PORT_SUSPEND: /* 2 */ 370 370 OHCI_WR(hub->registers->rh_port_status[port], 371 371 RHPS_CLEAR_PORT_SUSPEND); 372 372 return EOK; 373 373 374 case USB_HUB_FEATURE_C_PORT_CONNECTION: /* 16*/375 case USB2_HUB_FEATURE_C_PORT_ENABLE: /* 17*/376 case USB2_HUB_FEATURE_C_PORT_SUSPEND: /* 18*/377 case USB_HUB_FEATURE_C_PORT_OVER_CURRENT: /* 19*/378 case USB_HUB_FEATURE_C_PORT_RESET: /* 20*/374 case USB_HUB_FEATURE_C_PORT_CONNECTION: /* 16 */ 375 case USB2_HUB_FEATURE_C_PORT_ENABLE: /* 17 */ 376 case USB2_HUB_FEATURE_C_PORT_SUSPEND: /* 18 */ 377 case USB_HUB_FEATURE_C_PORT_OVER_CURRENT: /* 19 */ 378 case USB_HUB_FEATURE_C_PORT_RESET: /* 20 */ 379 379 usb_log_debug2("Clearing port C_CONNECTION, C_ENABLE, " 380 380 "C_SUSPEND, C_OC or C_RESET on port %u.", port); … … 408 408 409 409 switch (feature) { 410 case USB_HUB_FEATURE_PORT_POWER: /* 8*/410 case USB_HUB_FEATURE_PORT_POWER: /* 8 */ 411 411 rhda = OHCI_RD(hub->registers->rh_desc_a); 412 412 … … 422 422 /* Fall through, for per port power */ 423 423 /* Fallthrough */ 424 case USB2_HUB_FEATURE_PORT_ENABLE: /* 1*/425 case USB2_HUB_FEATURE_PORT_SUSPEND: /* 2*/426 case USB_HUB_FEATURE_PORT_RESET: /* 4*/424 case USB2_HUB_FEATURE_PORT_ENABLE: /* 1 */ 425 case USB2_HUB_FEATURE_PORT_SUSPEND: /* 2 */ 426 case USB_HUB_FEATURE_PORT_RESET: /* 4 */ 427 427 usb_log_debug2("Setting port POWER, ENABLE, SUSPEND or RESET " 428 428 "on port %u.", port);
Note:
See TracChangeset
for help on using the changeset viewer.