Changes in uspace/drv/ohci/root_hub.c [60b3bea:7d521e24] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ohci/root_hub.c
r60b3bea r7d521e24 39 39 40 40 #include "root_hub.h" 41 #include "usb/classes/classes.h" 42 #include "usb/devdrv.h" 43 #include <usb/request.h> 41 #include <usb/classes/classes.h> 42 #include <usb/dev/driver.h> 43 #include "ohci_regs.h" 44 45 #include <usb/dev/request.h> 44 46 #include <usb/classes/hub.h> 45 47 … … 109 111 */ 110 112 static const uint32_t hub_clear_feature_valid_mask = 111 (1 << USB_HUB_FEATURE_C_HUB_LOCAL_POWER)|112 (1 << USB_HUB_FEATURE_C_HUB_OVER_CURRENT);113 RHS_OCIC_FLAG | 114 RHS_CLEAR_PORT_POWER; 113 115 114 116 /** … … 116 118 */ 117 119 static const uint32_t hub_clear_feature_by_writing_one_mask = 118 1 << USB_HUB_FEATURE_C_HUB_LOCAL_POWER; 120 RHS_CLEAR_PORT_POWER; 121 // 1 << USB_HUB_FEATURE_C_HUB_LOCAL_POWER; 119 122 120 123 /** … … 122 125 */ 123 126 static const uint32_t hub_set_feature_valid_mask = 124 (1 << USB_HUB_FEATURE_C_HUB_OVER_CURRENT) | 125 (1 << USB_HUB_FEATURE_C_HUB_LOCAL_POWER); 127 RHS_LPSC_FLAG | 128 RHS_OCIC_FLAG; 129 //(1 << USB_HUB_FEATURE_C_HUB_OVER_CURRENT) | 130 //(1 << USB_HUB_FEATURE_C_HUB_LOCAL_POWER); 126 131 127 132 /** … … 129 134 */ 130 135 static const uint32_t hub_set_feature_direct_mask = 131 (1 << USB_HUB_FEATURE_C_HUB_OVER_CURRENT); 136 RHS_SET_PORT_POWER; 137 //(1 << USB_HUB_FEATURE_C_HUB_OVER_CURRENT); 132 138 133 139 /** … … 135 141 */ 136 142 static const uint32_t port_set_feature_valid_mask = 137 (1 << USB_HUB_FEATURE_PORT_ENABLE)|138 (1 << USB_HUB_FEATURE_PORT_SUSPEND)|139 (1 << USB_HUB_FEATURE_PORT_RESET)|140 (1 << USB_HUB_FEATURE_PORT_POWER);143 RHPS_SET_PORT_ENABLE | 144 RHPS_SET_PORT_SUSPEND | 145 RHPS_SET_PORT_RESET | 146 RHPS_SET_PORT_POWER; 141 147 142 148 /** … … 144 150 */ 145 151 static const uint32_t port_clear_feature_valid_mask = 152 RHPS_CCS_FLAG | 153 RHPS_SET_PORT_SUSPEND | 154 RHPS_POCI_FLAG | 155 RHPS_SET_PORT_POWER | 156 RHPS_CSC_FLAG | 157 RHPS_PESC_FLAG | 158 RHPS_PSSC_FLAG | 159 RHPS_OCIC_FLAG | 160 RHPS_PRSC_FLAG; 161 162 /* 163 146 164 (1 << USB_HUB_FEATURE_PORT_CONNECTION) | 147 (1 << USB_HUB_FEATURE_PORT_SUSPEND) | 148 (1 << USB_HUB_FEATURE_PORT_OVER_CURRENT) | 149 (1 << USB_HUB_FEATURE_PORT_POWER) | 150 (1 << USB_HUB_FEATURE_C_PORT_CONNECTION) | 151 (1 << USB_HUB_FEATURE_C_PORT_ENABLE) | 152 (1 << USB_HUB_FEATURE_C_PORT_SUSPEND) | 153 (1 << USB_HUB_FEATURE_C_PORT_OVER_CURRENT) | 154 (1 << USB_HUB_FEATURE_C_PORT_RESET); 165 (1 << USB_HUB_FEATURE_PORT_SUSPEND) | 166 (1 << USB_HUB_FEATURE_PORT_OVER_CURRENT) | 167 (1 << USB_HUB_FEATURE_PORT_POWER) | 168 (1 << USB_HUB_FEATURE_C_PORT_CONNECTION) | 169 (1 << USB_HUB_FEATURE_C_PORT_ENABLE) | 170 (1 << USB_HUB_FEATURE_C_PORT_SUSPEND) | 171 (1 << USB_HUB_FEATURE_C_PORT_OVER_CURRENT) | 172 (1 << USB_HUB_FEATURE_C_PORT_RESET); 173 */ 155 174 //note that USB_HUB_FEATURE_PORT_POWER bit is translated into 156 //USB_HUB_FEATURE_PORT_LOW_SPEED 175 //USB_HUB_FEATURE_PORT_LOW_SPEED for port set feature request 157 176 158 177 /** 159 178 * bitmask with port status changes 160 179 */ 161 static const uint32_t port_status_change_mask = 162 (1 << USB_HUB_FEATURE_C_PORT_CONNECTION) |163 (1 << USB_HUB_FEATURE_C_PORT_ENABLE) |164 (1 << USB_HUB_FEATURE_C_PORT_OVER_CURRENT) |165 (1 << USB_HUB_FEATURE_C_PORT_RESET) |166 (1 << USB_HUB_FEATURE_C_PORT_SUSPEND);167 180 static const uint32_t port_status_change_mask = RHPS_CHANGE_WC_MASK; 181 /* (1 << USB_HUB_FEATURE_C_PORT_CONNECTION) | 182 (1 << USB_HUB_FEATURE_C_PORT_ENABLE) | 183 (1 << USB_HUB_FEATURE_C_PORT_OVER_CURRENT) | 184 (1 << USB_HUB_FEATURE_C_PORT_RESET) | 185 (1 << USB_HUB_FEATURE_C_PORT_SUSPEND); 186 */ 168 187 169 188 static int create_serialized_hub_descriptor(rh_t *instance);
Note:
See TracChangeset
for help on using the changeset viewer.