Changeset 426d31a in mainline
- Timestamp:
- 2011-05-07T11:14:30Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 192ba25
- Parents:
- abfd36b
- Location:
- uspace/drv
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ohci/root_hub.c
rabfd36b r426d31a 275 275 void rh_interrupt(rh_t *instance) { 276 276 if (!instance->unfinished_interrupt_transfer) { 277 278 277 return; 279 278 } -
uspace/drv/usbhub/ports.c
rabfd36b r426d31a 53 53 size_t port; 54 54 usb_speed_t speed; 55 }; 56 57 /** 58 * count of port status changes that are not explicitly handled by 59 * any function here and must be cleared by hand 60 */ 61 static const unsigned int non_handled_changes_count = 2; 62 63 /** 64 * port status changes that are not explicitly handled by 65 * any function here and must be cleared by hand 66 */ 67 static const int non_handled_changes[] = { 68 USB_HUB_FEATURE_C_PORT_ENABLE, 69 USB_HUB_FEATURE_C_PORT_SUSPEND 55 70 }; 56 71 … … 131 146 &status, USB_HUB_FEATURE_C_PORT_CONNECTION,false); 132 147 usb_port_status_set_bit( 133 &status, USB_HUB_FEATURE_PORT_RESET,false);134 usb_port_status_set_bit(135 148 &status, USB_HUB_FEATURE_C_PORT_RESET,false); 136 149 usb_port_status_set_bit( 137 150 &status, USB_HUB_FEATURE_C_PORT_OVER_CURRENT,false); 138 /// \TODO what about port power change? 139 unsigned int bit_idx; 140 for(bit_idx = 16;bit_idx<32;++bit_idx){ 151 152 //clearing not yet handled changes 153 unsigned int feature_idx; 154 for(feature_idx = 0;feature_idx<non_handled_changes_count; 155 ++feature_idx){ 156 unsigned int bit_idx = non_handled_changes[feature_idx]; 141 157 if(status & (1<<bit_idx)){ 142 158 usb_log_info( … … 157 173 } 158 174 } 159 if (status >> 16) {160 usb_log_info("there was a mistake on port %d "161 "(not cleared status change): %X\n",162 port, status);163 }164 175 } 165 176
Note:
See TracChangeset
for help on using the changeset viewer.