Changeset 3bacee1 in mainline for uspace/drv/bus/usb/ohci/ohci_rh.c
- Timestamp:
- 2018-04-12T16:27:17Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3cf22f9
- Parents:
- 76d0981d
- git-author:
- Jiri Svoboda <jiri@…> (2018-04-11 19:25:33)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-04-12 16:27:17)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/ohci_rh.c
r76d0981d r3bacee1 94 94 } else { 95 95 instance->hub_descriptor.rempow[1] = 96 96 ((port_desc >> RHDB_DR_SHIFT) >> 8) & 0xff; 97 97 } 98 98 … … 224 224 } 225 225 226 usb_transfer_batch_t * 226 usb_transfer_batch_t *const batch = ep->active_batch; 227 227 endpoint_deactivate_locked(ep); 228 228 instance->status_change_endpoint = NULL; … … 347 347 const unsigned feature = uint16_usb2host(setup_packet->value); 348 348 /* Enabled features to clear: see page 269 of USB specs */ 349 switch (feature) 350 { 349 switch (feature) { 351 350 case USB_HUB_FEATURE_PORT_POWER: /*8*/ 352 351 rhda = OHCI_RD(hub->registers->rh_desc_a); … … 418 417 /* Ganged power switching, one port powers all */ 419 418 if (!(rhda & RHDA_PSM_FLAG)) { 420 OHCI_WR(hub->registers->rh_status, RHS_SET_GLOBAL_POWER);419 OHCI_WR(hub->registers->rh_status, RHS_SET_GLOBAL_POWER); 421 420 return EOK; 422 421 } … … 467 466 for (unsigned port = 1; port <= hub->port_count; ++port) { 468 467 /* Write-clean bits are those that indicate change */ 469 if (OHCI_RD(hub->registers->rh_port_status[port - 1]) 470 &RHPS_CHANGE_WC_MASK) {468 if (OHCI_RD(hub->registers->rh_port_status[port - 1]) & 469 RHPS_CHANGE_WC_MASK) { 471 470 mask |= (1 << port); 472 471 } … … 542 541 /** Virtual OHCI root hub ops */ 543 542 static usbvirt_device_ops_t ops = { 544 545 543 .control = control_transfer_handlers, 544 .data_in[HUB_STATUS_CHANGE_PIPE] = req_status_change_handler, 546 545 };
Note:
See TracChangeset
for help on using the changeset viewer.