Changes in uspace/drv/usbhub/usbhub.c [0f21c0c:6bb83c7] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhub/usbhub.c
r0f21c0c r6bb83c7 39 39 40 40 #include <usb_iface.h> 41 #include <usb/ ddfiface.h>41 #include <usb/usbdrv.h> 42 42 #include <usb/descriptor.h> 43 43 #include <usb/recognise.h> 44 #include <usb/devreq.h> 44 45 #include <usb/request.h> 45 46 #include <usb/classes/hub.h> … … 51 52 #include "usb/pipes.h" 52 53 54 static usb_iface_t hub_usb_iface = { 55 .get_hc_handle = usb_drv_find_hc 56 }; 57 53 58 static device_ops_t hub_device_ops = { 54 .interfaces[USB_DEV_IFACE] = & usb_iface_hub_impl59 .interfaces[USB_DEV_IFACE] = &hub_usb_iface 55 60 }; 56 61 … … 230 235 231 236 /** 237 * Convenience function for releasing default address and writing debug info 238 * (these few lines are used too often to be written again and again). 239 * @param hc 240 * @return 241 */ 242 inline static int usb_hub_release_default_address(int hc){ 243 int opResult; 244 dprintf(USB_LOG_LEVEL_INFO, "releasing default address"); 245 opResult = usb_drv_release_default_address(hc); 246 if (opResult != EOK) { 247 dprintf(USB_LOG_LEVEL_WARNING, "failed to release default address"); 248 } 249 return opResult; 250 } 251 252 /** 232 253 * Reset the port with new device and reserve the default address. 233 254 * @param hc … … 242 263 //get default address 243 264 //opResult = usb_drv_reserve_default_address(hc); 244 opResult = usb_hc_reserve_default_address(&hub->connection, USB_SPEED_LOW); 245 265 opResult = usb_hc_reserve_default_address(&hub->connection, false); 246 266 if (opResult != EOK) { 247 267 dprintf(USB_LOG_LEVEL_WARNING, "cannot assign default address, it is probably used"); … … 300 320 usb_address_t new_device_address = usb_hc_request_address( 301 321 &hub->connection, 302 USB_SPEED_LOW/// \TODO fullspeed??322 false/// \TODO fullspeed?? 303 323 ); 304 324 if (new_device_address < 0) {
Note:
See TracChangeset
for help on using the changeset viewer.