Lines Matching +full:needs +full:- +full:reset +full:- +full:on +full:- +full:resume

1 // SPDX-License-Identifier: GPL-2.0
5 * Extracted from uhci-hcd.c:
9 * (C) Copyright 1999-2002 Johannes Erdfelt, johannes@erdfelt.com
16 * support from usb-ohci.c by Adam Richter, adam@yggdrasil.com).
17 * (C) Copyright 1999 Gregory P. Smith (from usb-ohci.c)
18 * (C) Copyright 2004-2007 Alan Stern, stern@rowland.harvard.edu
21 #include "pci-quirks.h"
29 uhci_reset_hc(to_pci_dev(uhci_dev(uhci)), uhci->io_addr); in uhci_pci_reset_hc()
36 * Returns: 1 if the controller was reset, 0 otherwise.
41 uhci->io_addr); in uhci_pci_check_and_reset_hc()
46 * This function is called at the end of configure_hc in uhci-hcd.c.
55 /* Disable platform-specific non-PME# wakeup */ in uhci_pci_configure_hc()
56 if (pdev->vendor == PCI_VENDOR_ID_INTEL) in uhci_pci_configure_hc()
64 switch (to_pci_dev(uhci_dev(uhci))->vendor) { in uhci_pci_resume_detect_interrupts_are_broken()
70 * resume-detect interrupts. in uhci_pci_resume_detect_interrupts_are_broken()
76 * resume-detect interrupts if any port has an over-current in uhci_pci_resume_detect_interrupts_are_broken()
78 * hardwire unused USB ports' over-current inputs active! in uhci_pci_resume_detect_interrupts_are_broken()
79 * To prevent problems, we will not enable resume-detect in uhci_pci_resume_detect_interrupts_are_broken()
82 for (port = 0; port < uhci->rh_numports; ++port) { in uhci_pci_resume_detect_interrupts_are_broken()
83 if (inw(uhci->io_addr + USBPORTSC1 + port * 2) & in uhci_pci_resume_detect_interrupts_are_broken()
99 * wake up immediately from suspend-to-RAM if any of the ports in uhci_pci_global_suspend_mode_is_broken()
104 for (port = 0; port < uhci->rh_numports; ++port) { in uhci_pci_global_suspend_mode_is_broken()
105 if (inw(uhci->io_addr + USBPORTSC1 + port * 2) & in uhci_pci_global_suspend_mode_is_broken()
118 uhci->io_addr = (unsigned long) hcd->rsrc_start; in uhci_pci_init()
120 uhci->rh_numports = uhci_count_ports(hcd); in uhci_pci_init()
123 * Intel controllers report the OverCurrent bit active on. VIA in uhci_pci_init()
127 if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_VIA || in uhci_pci_init()
128 to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_ZHAOXIN) in uhci_pci_init()
129 uhci->oc_low = 1; in uhci_pci_init()
131 /* HP's server management chip requires a longer port reset delay. */ in uhci_pci_init()
132 if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_HP) in uhci_pci_init()
133 uhci->wait_for_hp = 1; in uhci_pci_init()
135 /* Intel controllers use non-PME wakeup signalling */ in uhci_pci_init()
136 if (to_pci_dev(uhci_dev(uhci))->vendor == PCI_VENDOR_ID_INTEL) in uhci_pci_init()
139 /* Set up pointers to PCI-specific functions */ in uhci_pci_init()
140 uhci->reset_hc = uhci_pci_reset_hc; in uhci_pci_init()
141 uhci->check_and_reset_hc = uhci_pci_check_and_reset_hc; in uhci_pci_init()
142 uhci->configure_hc = uhci_pci_configure_hc; in uhci_pci_init()
143 uhci->resume_detect_interrupts_are_broken = in uhci_pci_init()
145 uhci->global_suspend_mode_is_broken = in uhci_pci_init()
149 /* Kick BIOS off this hardware and reset if the controller in uhci_pci_init()
182 spin_lock_irq(&uhci->lock); in uhci_pci_suspend()
183 if (!HCD_HW_ACCESSIBLE(hcd) || uhci->dead) in uhci_pci_suspend()
190 clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); in uhci_pci_suspend()
192 /* Enable platform-specific non-PME# wakeup */ in uhci_pci_suspend()
194 if (pdev->vendor == PCI_VENDOR_ID_INTEL) in uhci_pci_suspend()
200 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); in uhci_pci_suspend()
201 spin_unlock_irq(&uhci->lock); in uhci_pci_suspend()
203 synchronize_irq(hcd->irq); in uhci_pci_suspend()
208 rc = -EBUSY; in uhci_pci_suspend()
223 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); in uhci_pci_resume()
225 spin_lock_irq(&uhci->lock); in uhci_pci_resume()
227 /* Make sure resume from hibernation re-enumerates everything */ in uhci_pci_resume()
229 uhci->reset_hc(uhci); in uhci_pci_resume()
241 /* Tell the core if the controller had to be reset */ in uhci_pci_resume()
242 if (uhci->rh_state == UHCI_RH_RESET) in uhci_pci_resume()
243 usb_root_hub_lost_power(hcd->self.root_hub); in uhci_pci_resume()
245 spin_unlock_irq(&uhci->lock); in uhci_pci_resume()
248 * the suspended root hub needs to be polled. in uhci_pci_resume()
250 if (!uhci->RD_enable && hcd->self.root_hub->do_remote_wakeup) in uhci_pci_resume()
251 set_bit(HCD_FLAG_POLL_RH, &hcd->flags); in uhci_pci_resume()
270 .reset = uhci_pci_init,