Changeset 0c00dac in mainline
- Timestamp:
- 2011-02-18T13:36:52Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 026d6e2, 50ba203, b6c7da6
- Parents:
- ec59693 (diff), 6427cf67 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/iface.c
rec59693 r0c00dac 54 54 } 55 55 /*----------------------------------------------------------------------------*/ 56 static int reserve_default_address(device_t *dev )56 static int reserve_default_address(device_t *dev, bool full_speed) 57 57 { 58 58 assert(dev); … … 72 72 } 73 73 /*----------------------------------------------------------------------------*/ 74 static int request_address(device_t *dev, usb_address_t *address) 74 static int request_address(device_t *dev, bool full_speed, 75 usb_address_t *address) 75 76 { 76 77 assert(dev); -
uspace/drv/uhci-rhd/port.c
rec59693 r0c00dac 140 140 141 141 /* get address of the future device */ 142 const usb_address_t usb_address = usb_hc_request_address(&port->hc_connection); 142 const usb_address_t usb_address = usb_hc_request_address( 143 &port->hc_connection, true); 143 144 144 145 if (usb_address <= 0) { … … 150 151 151 152 /* get default address */ 152 int ret = usb_hc_reserve_default_address(&port->hc_connection );153 int ret = usb_hc_reserve_default_address(&port->hc_connection, true); 153 154 if (ret != EOK) { 154 155 usb_log_error("Failed to reserve default address on port %d.\n", -
uspace/drv/vhc/connhost.c
rec59693 r0c00dac 390 390 391 391 392 static int reserve_default_address(device_t *dev )392 static int reserve_default_address(device_t *dev, bool ignored) 393 393 { 394 394 usb_address_keeping_reserve_default(&addresses); … … 402 402 } 403 403 404 static int request_address(device_t *dev, usb_address_t *address)404 static int request_address(device_t *dev, bool ignored, usb_address_t *address) 405 405 { 406 406 usb_address_t addr = usb_address_keeping_request(&addresses); -
uspace/lib/drv/generic/remote_usbhc.c
rec59693 r0c00dac 165 165 return; 166 166 } 167 168 int rc = usb_iface->reserve_default_address(device); 167 168 bool full_speed = DEV_IPC_GET_ARG1(*call); 169 170 int rc = usb_iface->reserve_default_address(device, full_speed); 169 171 170 172 async_answer_0(callid, rc); … … 195 197 return; 196 198 } 199 200 bool full_speed = DEV_IPC_GET_ARG1(*call); 197 201 198 202 usb_address_t address; 199 int rc = usb_iface->request_address(device, &address);203 int rc = usb_iface->request_address(device, full_speed, &address); 200 204 if (rc != EOK) { 201 205 async_answer_0(callid, rc); -
uspace/lib/drv/include/usbhc_iface.h
rec59693 r0c00dac 40 40 #include "driver.h" 41 41 #include <usb/usb.h> 42 #include <bool.h> 42 43 43 44 … … 231 232 int (*tell_address)(device_t *, devman_handle_t, usb_address_t *); 232 233 233 int (*reserve_default_address)(device_t * );234 int (*reserve_default_address)(device_t *, bool); 234 235 int (*release_default_address)(device_t *); 235 int (*request_address)(device_t *, usb_address_t *);236 int (*request_address)(device_t *, bool, usb_address_t *); 236 237 int (*bind_address)(device_t *, usb_address_t, devman_handle_t); 237 238 int (*release_address)(device_t *, usb_address_t); -
uspace/lib/usb/include/usb/hub.h
rec59693 r0c00dac 52 52 } usb_hc_attached_device_t; 53 53 54 int usb_hc_reserve_default_address(usb_hc_connection_t * );54 int usb_hc_reserve_default_address(usb_hc_connection_t *, bool); 55 55 int usb_hc_release_default_address(usb_hc_connection_t *); 56 56 57 usb_address_t usb_hc_request_address(usb_hc_connection_t * );57 usb_address_t usb_hc_request_address(usb_hc_connection_t *, bool); 58 58 int usb_hc_register_device(usb_hc_connection_t *, 59 59 const usb_hc_attached_device_t *); -
uspace/lib/usb/src/hub.c
rec59693 r0c00dac 55 55 * @return Error code. 56 56 */ 57 int usb_hc_reserve_default_address(usb_hc_connection_t *connection) 57 int usb_hc_reserve_default_address(usb_hc_connection_t *connection, 58 bool full_speed) 58 59 { 59 60 CHECK_CONNECTION(connection); 60 61 61 return async_req_ 1_0(connection->hc_phone,62 return async_req_2_0(connection->hc_phone, 62 63 DEV_IFACE_ID(USBHC_DEV_IFACE), 63 IPC_M_USBHC_RESERVE_DEFAULT_ADDRESS );64 IPC_M_USBHC_RESERVE_DEFAULT_ADDRESS, full_speed); 64 65 } 65 66 … … 83 84 * @return Assigned USB address or negative error code. 84 85 */ 85 usb_address_t usb_hc_request_address(usb_hc_connection_t *connection) 86 usb_address_t usb_hc_request_address(usb_hc_connection_t *connection, 87 bool full_speed) 86 88 { 87 89 CHECK_CONNECTION(connection); 88 90 89 91 sysarg_t address; 90 int rc = async_req_ 1_1(connection->hc_phone,92 int rc = async_req_2_1(connection->hc_phone, 91 93 DEV_IFACE_ID(USBHC_DEV_IFACE), 92 IPC_M_USBHC_REQUEST_ADDRESS, &address); 94 IPC_M_USBHC_REQUEST_ADDRESS, full_speed, 95 &address); 93 96 if (rc != EOK) { 94 97 return (usb_address_t) rc;
Note:
See TracChangeset
for help on using the changeset viewer.