Changeset 3bacee1 in mainline for uspace/drv/bus/usb/usbhub/port.c
- Timestamp:
- 2018-04-12T16:27:17Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3cf22f9
- Parents:
- 76d0981d
- git-author:
- Jiri Svoboda <jiri@…> (2018-04-11 19:25:33)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-04-12 16:27:17)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/usbhub/port.c
r76d0981d r3bacee1 126 126 port_log(debug, port, "Resetting port."); 127 127 if ((err = usb_hub_set_port_feature(port->hub, port->port_number, 128 128 USB_HUB_FEATURE_PORT_RESET))) { 129 129 port_log(warning, port, "Port reset request failed: %s", 130 130 str_error(err)); … … 140 140 port_log(debug, port, "Enumerating device."); 141 141 if ((err = usbhc_device_enumerate(exch, port->port_number, 142 142 port->speed))) { 143 143 port_log(error, port, "Failed to enumerate device: %s", 144 144 str_error(err)); … … 165 165 port_log(debug, port, "Issuing a warm reset."); 166 166 if ((err = usb_hub_set_port_feature(port->hub, port->port_number, 167 167 USB3_HUB_FEATURE_BH_PORT_RESET))) { 168 168 port_log(warning, port, "Port reset request failed: %s", 169 169 str_error(err)); … … 179 179 port_log(debug, port, "Enumerating device."); 180 180 if ((err = usbhc_device_enumerate(exch, port->port_number, 181 181 port->speed))) { 182 182 port_log(error, port, "Failed to enumerate device: %s", 183 183 str_error(err)); … … 200 200 } 201 201 202 const errno_t err = port->hub->speed == USB_SPEED_SUPER 203 ? enumerate_device_usb3(port, exch)204 :enumerate_device_usb2(port, exch);202 const errno_t err = port->hub->speed == USB_SPEED_SUPER ? 203 enumerate_device_usb3(port, exch) : 204 enumerate_device_usb2(port, exch); 205 205 206 206 usb_device_bus_exchange_end(exch); … … 211 211 { 212 212 const bool connected = !!(status & USB_HUB_PORT_STATUS_CONNECTION); 213 port_log(debug, port, "Connection change: device %s.", connected 214 ?"attached" : "removed");213 port_log(debug, port, "Connection change: device %s.", connected ? 214 "attached" : "removed"); 215 215 216 216 if (connected) {
Note:
See TracChangeset
for help on using the changeset viewer.