Lines Matching refs:port_dev

455 	struct usb_port *port_dev = hub->ports[port1 - 1];  in set_port_led()  local
460 dev_dbg(&port_dev->dev, "indicator %s status %d\n", in set_port_led()
689 struct usb_port *port_dev; in usb_wakeup_notification() local
696 port_dev = hub->ports[portnum - 1]; in usb_wakeup_notification()
697 if (port_dev && port_dev->child) in usb_wakeup_notification()
698 pm_wakeup_event(&port_dev->child->dev, 0); in usb_wakeup_notification()
1106 struct usb_port *port_dev = hub->ports[port1 - 1]; in hub_activate() local
1107 struct usb_device *udev = port_dev->child; in hub_activate()
1116 dev_dbg(&port_dev->dev, "status %04x change %04x\n", in hub_activate()
1648 struct usb_port *port_dev = hub->ports[i]; in hub_configure() local
1650 pm_runtime_put(&port_dev->dev); in hub_configure()
2171 struct usb_port *port_dev = NULL; in usb_disconnect() local
2205 port_dev = hub->ports[port1 - 1]; in usb_disconnect()
2208 sysfs_remove_link(&port_dev->dev.kobj, "device"); in usb_disconnect()
2215 pm_runtime_get_sync(&port_dev->dev); in usb_disconnect()
2237 if (port_dev && test_and_clear_bit(port1, hub->child_usage_bits)) in usb_disconnect()
2238 pm_runtime_put(&port_dev->dev); in usb_disconnect()
2546 struct usb_port *port_dev = hub->ports[port1 - 1]; in usb_new_device() local
2549 &port_dev->dev.kobj, "port"); in usb_new_device()
2553 err = sysfs_create_link(&port_dev->dev.kobj, in usb_new_device()
2561 pm_runtime_get_sync(&port_dev->dev); in usb_new_device()
2710 struct usb_port *port_dev) in use_new_scheme() argument
2713 port_dev->quirks & USB_PORT_QUIRK_OLD_SCHEME; in use_new_scheme()
2846 struct usb_port *port_dev = hub->ports[port1 - 1]; in hub_port_reset() local
2879 dev_err(&port_dev->dev, in hub_port_reset()
2925 dev_dbg(&port_dev->dev, in hub_port_reset()
2931 dev_dbg(&port_dev->dev, in hub_port_reset()
2937 dev_err(&port_dev->dev, "Cannot enable. Maybe the USB cable is bad?\n"); in hub_port_reset()
2941 if (port_dev->quirks & USB_PORT_QUIRK_FAST_ENUM) in hub_port_reset()
2993 static void usb_lock_port(struct usb_port *port_dev) in usb_lock_port() argument
2994 __acquires(&port_dev->status_lock) in usb_lock_port()
2996 mutex_lock(&port_dev->status_lock); in usb_lock_port()
2997 __acquire(&port_dev->status_lock); in usb_lock_port()
3000 static void usb_unlock_port(struct usb_port *port_dev) in usb_unlock_port() argument
3001 __releases(&port_dev->status_lock) in usb_unlock_port()
3003 mutex_unlock(&port_dev->status_lock); in usb_unlock_port()
3004 __release(&port_dev->status_lock); in usb_unlock_port()
3033 struct usb_port *port_dev = hub->ports[port1 - 1]; in check_port_resume_type() local
3068 dev_dbg(&port_dev->dev, "status %04x.%04x after resume, %d\n", in check_port_resume_type()
3239 struct usb_port *port_dev = hub->ports[udev->portnum - 1]; in usb_port_suspend() local
3244 usb_lock_port(port_dev); in usb_port_suspend()
3296 dev_dbg(&port_dev->dev, "can't suspend, status %d\n", status); in usb_port_suspend()
3326 pm_runtime_put_sync(&port_dev->dev); in usb_port_suspend()
3330 usb_unlock_port(port_dev); in usb_port_suspend()
3510 struct usb_port *port_dev = hub->ports[udev->portnum - 1]; in usb_port_resume() local
3516 status = pm_runtime_get_sync(&port_dev->dev); in usb_port_resume()
3524 usb_lock_port(port_dev); in usb_port_resume()
3541 dev_dbg(&port_dev->dev, "can't resume, status %d\n", status); in usb_port_resume()
3591 usb_unlock_port(port_dev); in usb_port_resume()
3616 __must_hold(&port_dev->status_lock) in hub_handle_remote_wakeup()
3618 struct usb_port *port_dev = hub->ports[port - 1]; in hub_handle_remote_wakeup() local
3626 udev = port_dev->child; in hub_handle_remote_wakeup()
3644 usb_unlock_port(port_dev); in hub_handle_remote_wakeup()
3646 usb_lock_port(port_dev); in hub_handle_remote_wakeup()
3653 dev_dbg(&port_dev->dev, "resume, status %d\n", ret); in hub_handle_remote_wakeup()
3684 struct usb_port *port_dev = hub->ports[port1 - 1]; in hub_suspend() local
3685 struct usb_device *udev = port_dev->child; in hub_suspend()
3688 dev_warn(&port_dev->dev, "device %s not suspended yet\n", in hub_suspend()
4205 struct usb_port *port_dev; in usb_enable_lpm() local
4229 port_dev = hub->ports[udev->portnum - 1]; in usb_enable_lpm()
4231 if (port_dev->usb3_lpm_u1_permit) in usb_enable_lpm()
4234 if (port_dev->usb3_lpm_u2_permit) in usb_enable_lpm()
4255 struct usb_port *port_dev) in hub_usb3_port_prepare_disable() argument
4257 struct usb_device *udev = port_dev->child; in hub_usb3_port_prepare_disable()
4261 ret = hub_set_port_link_state(hub, port_dev->portnum, in hub_usb3_port_prepare_disable()
4281 struct usb_port *port_dev) { } in hub_usb3_port_prepare_disable() argument
4325 struct usb_port *port_dev = hub->ports[port1 - 1]; in hub_port_disable() local
4331 hub_usb3_port_prepare_disable(hub, port_dev); in hub_port_disable()
4332 ret = hub_set_port_link_state(hub, port_dev->portnum, in hub_port_disable()
4339 if (port_dev->child && set_state) in hub_port_disable()
4340 usb_set_device_state(port_dev->child, USB_STATE_NOTATTACHED); in hub_port_disable()
4342 dev_err(&port_dev->dev, "cannot disable (err = %d)\n", ret); in hub_port_disable()
4381 struct usb_port *port_dev = hub->ports[port1 - 1]; in hub_port_debounce() local
4410 dev_dbg(&port_dev->dev, "debounce total %dms stable %dms status 0x%x\n", in hub_port_debounce()
4516 struct usb_port *port_dev = hub->ports[port1 - 1]; in hub_port_init() local
4638 if (use_new_scheme(udev, retry_counter, port_dev)) { in hub_port_init()
4898 struct usb_port *port_dev = hub->ports[port1 - 1]; in hub_power_remaining() local
4899 struct usb_device *udev = port_dev->child; in hub_power_remaining()
4921 dev_warn(&port_dev->dev, "%dmA is over %umA budget!\n", in hub_power_remaining()
4941 struct usb_port *port_dev = hub->ports[port1 - 1]; in hub_port_connect() local
4942 struct usb_device *udev = port_dev->child; in hub_port_connect()
4949 usb_disconnect(&port_dev->child); in hub_port_connect()
4966 dev_err(&port_dev->dev, "connect-debounce failed\n"); in hub_port_connect()
4986 && !port_dev->port_owner) in hub_port_connect()
5006 dev_err(&port_dev->dev, in hub_port_connect()
5029 usb_lock_port(port_dev); in hub_port_connect()
5031 usb_unlock_port(port_dev); in hub_port_connect()
5092 port_dev->child = udev; in hub_port_connect()
5102 port_dev->child = NULL; in hub_port_connect()
5133 dev_info(&port_dev->dev, "attempt power cycle\n"); in hub_port_connect()
5144 dev_err(&port_dev->dev, in hub_port_connect()
5166 __must_hold(&port_dev->status_lock) in hub_port_connect_change()
5168 struct usb_port *port_dev = hub->ports[port1 - 1]; in hub_port_connect_change() local
5169 struct usb_device *udev = port_dev->child; in hub_port_connect_change()
5172 dev_dbg(&port_dev->dev, "status %04x, change %04x, %s\n", portstatus, in hub_port_connect_change()
5198 usb_unlock_port(port_dev); in hub_port_connect_change()
5200 usb_lock_port(port_dev); in hub_port_connect_change()
5212 usb_unlock_port(port_dev); in hub_port_connect_change()
5214 usb_lock_port(port_dev); in hub_port_connect_change()
5218 static void port_over_current_notify(struct usb_port *port_dev) in port_over_current_notify() argument
5224 sysfs_notify(&port_dev->dev.kobj, NULL, "over_current_count"); in port_over_current_notify()
5226 hub_dev = port_dev->dev.parent; in port_over_current_notify()
5231 port_dev_path = kobject_get_path(&port_dev->dev.kobj, GFP_KERNEL); in port_over_current_notify()
5240 port_dev->over_current_count); in port_over_current_notify()
5255 __must_hold(&port_dev->status_lock) in port_event()
5258 struct usb_port *port_dev = hub->ports[port1 - 1]; in port_event() local
5259 struct usb_device *udev = port_dev->child; in port_event()
5277 dev_dbg(&port_dev->dev, "enable change, status %08x\n", in port_event()
5288 dev_err(&port_dev->dev, "disabled by hub (EMI?), re-enabling...\n"); in port_event()
5295 port_dev->over_current_count++; in port_event()
5296 port_over_current_notify(port_dev); in port_event()
5298 dev_dbg(&port_dev->dev, "over-current change #%u\n", in port_event()
5299 port_dev->over_current_count); in port_event()
5306 dev_err(&port_dev->dev, "over-current condition\n"); in port_event()
5310 dev_dbg(&port_dev->dev, "reset change\n"); in port_event()
5315 dev_dbg(&port_dev->dev, "warm reset change\n"); in port_event()
5320 dev_dbg(&port_dev->dev, "link state change\n"); in port_event()
5325 dev_warn(&port_dev->dev, "config error\n"); in port_event()
5331 if (!pm_runtime_active(&port_dev->dev)) in port_event()
5342 dev_dbg(&port_dev->dev, "do warm reset\n"); in port_event()
5349 usb_unlock_port(port_dev); in port_event()
5353 usb_lock_port(port_dev); in port_event()
5422 struct usb_port *port_dev = hub->ports[i - 1]; in hub_event() local
5436 pm_runtime_get_noresume(&port_dev->dev); in hub_event()
5437 pm_runtime_barrier(&port_dev->dev); in hub_event()
5438 usb_lock_port(port_dev); in hub_event()
5440 usb_unlock_port(port_dev); in hub_event()
5441 pm_runtime_put_sync(&port_dev->dev); in hub_event()
5841 struct usb_port *port_dev; in usb_reset_device() local
5858 port_dev = hub->ports[udev->portnum - 1]; in usb_reset_device()
5893 usb_lock_port(port_dev); in usb_reset_device()
5895 usb_unlock_port(port_dev); in usb_reset_device()
5998 struct usb_port *port_dev = hub->ports[i - 1]; in usb_hub_adjust_deviceremovable() local
6000 connect_type = port_dev->connect_type; in usb_hub_adjust_deviceremovable()
6005 … dev_dbg(&port_dev->dev, "DeviceRemovable is changed to 1 according to platform information.\n"); in usb_hub_adjust_deviceremovable()
6014 struct usb_port *port_dev = hub->ports[i - 1]; in usb_hub_adjust_deviceremovable() local
6016 connect_type = port_dev->connect_type; in usb_hub_adjust_deviceremovable()
6021 … dev_dbg(&port_dev->dev, "DeviceRemovable is changed to 1 according to platform information.\n"); in usb_hub_adjust_deviceremovable()