Lines Matching +full:report +full:- +full:speed +full:- +full:hz
1 // SPDX-License-Identifier: GPL-2.0
8 * (C) Copyright 1999-2002 Johannes Erdfelt, johannes@erdfelt.com
19 USB_DT_HUB, /* __u8 bDescriptorType; Hub-descriptor */
22 HUB_CHAR_INDV_PORT_OCPM, /* (per-port OC, no power switching) */
41 /* A port that either is connected or has a changed-bit set will prevent
48 for (port = 0; port < uhci->rh_numports; ++port) { in any_ports_active()
51 test_bit(port, &uhci->port_c_suspend)) in any_ports_active()
62 /* Some boards (both VIA and Intel apparently) report bogus in get_hub_status_data()
72 for (port = 0; port < uhci->rh_numports; ++port) { in get_hub_status_data()
74 test_bit(port, &uhci->port_c_suspend)) in get_hub_status_data()
104 if (test_bit(port, &uhci->resuming_ports)) in uhci_finish_suspend()
105 set_bit(port, &uhci->port_c_suspend); in uhci_finish_suspend()
108 * it has had a chance to send a low-speed EOP sequence, in uhci_finish_suspend()
118 clear_bit(port, &uhci->resuming_ports); in uhci_finish_suspend()
119 usb_hcd_end_port_resume(&uhci_to_hcd(uhci)->self, port); in uhci_finish_suspend()
143 for (port = 0; port < uhci->rh_numports; ++port) { in uhci_check_ports()
147 if (time_after_eq(jiffies, uhci->ports_timeout)) { in uhci_check_ports()
153 if (uhci->wait_for_hp) in uhci_check_ports()
165 if (!test_bit(port, &uhci->resuming_ports)) { in uhci_check_ports()
168 set_bit(port, &uhci->resuming_ports); in uhci_check_ports()
169 uhci->ports_timeout = jiffies + in uhci_check_ports()
172 &uhci_to_hcd(uhci)->self, port); in uhci_check_ports()
176 mod_timer(&uhci_to_hcd(uhci)->rh_timer, in uhci_check_ports()
177 uhci->ports_timeout); in uhci_check_ports()
179 uhci->ports_timeout)) { in uhci_check_ports()
192 spin_lock_irqsave(&uhci->lock, flags); in uhci_hub_status_data()
195 if (!HCD_HW_ACCESSIBLE(hcd) || uhci->dead) in uhci_hub_status_data()
201 switch (uhci->rh_state) { in uhci_hub_status_data()
204 if (status || uhci->resuming_ports) { in uhci_hub_status_data()
219 uhci->rh_state = UHCI_RH_RUNNING_NODEVS; in uhci_hub_status_data()
220 uhci->auto_stop_time = jiffies + HZ; in uhci_hub_status_data()
225 /* auto-stop if nothing connected for 1 second */ in uhci_hub_status_data()
227 uhci->rh_state = UHCI_RH_RUNNING; in uhci_hub_status_data()
228 else if (time_after_eq(jiffies, uhci->auto_stop_time) && in uhci_hub_status_data()
229 !uhci->wait_for_hp) in uhci_hub_status_data()
238 spin_unlock_irqrestore(&uhci->lock, flags); in uhci_hub_status_data()
248 unsigned int port = wIndex - 1; in uhci_hub_control()
253 if (!HCD_HW_ACCESSIBLE(hcd) || uhci->dead) in uhci_hub_control()
254 return -ETIMEDOUT; in uhci_hub_control()
256 spin_lock_irqsave(&uhci->lock, flags); in uhci_hub_control()
264 if (port >= uhci->rh_numports) in uhci_hub_control()
270 /* Intel controllers report the OverCurrent bit active on. in uhci_hub_control()
271 * VIA controllers report it active off, so we'll adjust the in uhci_hub_control()
274 if (uhci->oc_low) in uhci_hub_control()
286 if (test_bit(port, &uhci->port_c_suspend)) { in uhci_hub_control()
290 if (test_bit(port, &uhci->resuming_ports)) in uhci_hub_control()
328 if (port >= uhci->rh_numports) in uhci_hub_control()
342 uhci->ports_timeout = jiffies + in uhci_hub_control()
353 if (port >= uhci->rh_numports) in uhci_hub_control()
372 &uhci->resuming_ports)) { in uhci_hub_control()
385 uhci->ports_timeout = jiffies + in uhci_hub_control()
390 clear_bit(port, &uhci->port_c_suspend); in uhci_hub_control()
402 /* this driver won't report these */ in uhci_hub_control()
412 buf[2] = uhci->rh_numports; in uhci_hub_control()
416 retval = -EPIPE; in uhci_hub_control()
418 spin_unlock_irqrestore(&uhci->lock, flags); in uhci_hub_control()