Changeset 32ec5671 in mainline
- Timestamp:
- 2011-10-12T20:31:29Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0d103aef
- Parents:
- 013517b
- Location:
- uspace
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhcirh/port.c
r013517b r32ec5671 45 45 46 46 static int uhci_port_check(void *port); 47 static int uhci_port_reset_enable( int portno,void *arg);47 static int uhci_port_reset_enable(void *arg); 48 48 static int uhci_port_new_device(uhci_port_t *port, usb_speed_t speed); 49 49 static int uhci_port_remove_device(uhci_port_t *port); … … 213 213 * Resets and enables the ub port. 214 214 */ 215 int uhci_port_reset_enable( int portno,void *arg)215 int uhci_port_reset_enable(void *arg) 216 216 { 217 217 uhci_port_t *port = arg; … … 260 260 do { 261 261 ret = usb_hc_new_device_wrapper(port->rh, &port->hc_connection, 262 speed, uhci_port_reset_enable, port ->number, port,262 speed, uhci_port_reset_enable, port, 263 263 &port->attached_device.address, NULL, NULL, 264 264 &port->attached_device.fun); -
uspace/drv/bus/usb/usbhub/port.c
r013517b r32ec5671 60 60 usb_port_status_t status); 61 61 static int get_port_status(usb_hub_port_t *port, usb_port_status_t *status); 62 static int enable_port_callback( int port_no,void *arg);62 static int enable_port_callback(void *arg); 63 63 static int add_device_phase1_worker_fibril(void *arg); 64 64 static int create_add_device_fibril(usb_hub_port_t *port, usb_hub_dev_t *hub, … … 378 378 * @return Error code. 379 379 */ 380 static int enable_port_callback( int port_no,void *arg)380 static int enable_port_callback(void *arg) 381 381 { 382 382 usb_hub_port_t *port = arg; … … 421 421 422 422 const int rc = usb_hc_new_device_wrapper(data->hub->usb_device->ddf_dev, 423 &data->hub->connection, data->speed, 424 enable_port_callback, (int) data->port->port_number, 423 &data->hub->connection, data->speed, enable_port_callback, 425 424 data->port, &new_address, NULL, NULL, &child_fun); 426 425 -
uspace/drv/bus/usb/vhc/hub.c
r013517b r32ec5671 81 81 } 82 82 83 static int pretend_port_rest( int unused,void *unused2)83 static int pretend_port_rest(void *unused2) 84 84 { 85 85 return EOK; … … 115 115 ddf_fun_t *hub_dev; 116 116 rc = usb_hc_new_device_wrapper(hc_dev->dev, &hc_conn, USB_SPEED_FULL, 117 pretend_port_rest, 0,NULL, NULL, &rh_ops, hc_dev, &hub_dev);117 pretend_port_rest, NULL, NULL, &rh_ops, hc_dev, &hub_dev); 118 118 if (rc != EOK) { 119 119 usb_log_fatal("Failed to create root hub: %s.\n", -
uspace/lib/usbdev/include/usb/dev/hub.h
r013517b r32ec5671 43 43 44 44 int usb_hc_new_device_wrapper(ddf_dev_t *, usb_hc_connection_t *, usb_speed_t, 45 int (*)( int, void *), int, void *,46 usb_address_t *, ddf_dev_ops_t *, void *,ddf_fun_t **);45 int (*)(void *), void *, usb_address_t *, ddf_dev_ops_t *, void *, 46 ddf_fun_t **); 47 47 48 48 /** Info about device attached to host controller. -
uspace/lib/usbdev/src/hub.c
r013517b r32ec5671 155 155 * The @p enable_port function is expected to enable signaling on given 156 156 * port. 157 * The two arguments to it can have arbitrary meaning 158 * (the @p port_no is only a suggestion) 159 * and are not touched at all by this function 160 * (they are passed as is to the @p enable_port function). 157 * The argument can have arbitrary meaning and it is not touched at all 158 * by this function (it is passed as is to the @p enable_port function). 161 159 * 162 160 * If the @p enable_port fails (i.e. does not return EOK), the device … … 175 173 * @param[in] enable_port Function for enabling signaling through the port the 176 174 * device is attached to. 177 * @param[in] port_no Port number (passed through to @p enable_port).178 175 * @param[in] arg Any data argument to @p enable_port. 179 176 * @param[out] assigned_address USB address of the device. … … 193 190 int usb_hc_new_device_wrapper(ddf_dev_t *parent, usb_hc_connection_t *connection, 194 191 usb_speed_t dev_speed, 195 int (*enable_port)(int port_no, void *arg), int port_no, void *arg, 196 usb_address_t *assigned_address, 192 int (*enable_port)(void *arg), void *arg, usb_address_t *assigned_address, 197 193 ddf_dev_ops_t *dev_ops, void *new_dev_data, ddf_fun_t **new_fun) 198 194 { … … 278 274 * device address. 279 275 */ 280 rc = enable_port( port_no,arg);276 rc = enable_port(arg); 281 277 if (rc != EOK) { 282 278 goto leave_release_default_address;
Note:
See TracChangeset
for help on using the changeset viewer.