Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright David Brownell 2000-2002 |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 3 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | * This program is free software; you can redistribute it and/or modify it |
| 5 | * under the terms of the GNU General Public License as published by the |
| 6 | * Free Software Foundation; either version 2 of the License, or (at your |
| 7 | * option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, but |
| 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
| 11 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 12 | * for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software Foundation, |
| 16 | * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 17 | */ |
| 18 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | #include <linux/kernel.h> |
| 20 | #include <linux/module.h> |
| 21 | #include <linux/pci.h> |
David Brownell | 21b1861 | 2005-11-23 15:45:42 -0800 | [diff] [blame] | 22 | #include <linux/usb.h> |
| 23 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | #include <asm/io.h> |
| 25 | #include <asm/irq.h> |
David Brownell | 21b1861 | 2005-11-23 15:45:42 -0800 | [diff] [blame] | 26 | |
| 27 | #ifdef CONFIG_PPC_PMAC |
| 28 | #include <asm/machdep.h> |
| 29 | #include <asm/pmac_feature.h> |
| 30 | #include <asm/pci-bridge.h> |
| 31 | #include <asm/prom.h> |
| 32 | #endif |
David Brownell | 5f827ea | 2005-09-22 22:38:16 -0700 | [diff] [blame] | 33 | |
| 34 | #include "usb.h" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | #include "hcd.h" |
| 36 | |
| 37 | |
David Brownell | c6053ec | 2005-04-18 17:39:22 -0700 | [diff] [blame] | 38 | /* PCI-based HCs are common, but plenty of non-PCI HCs are used too */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | |
| 40 | |
| 41 | /*-------------------------------------------------------------------------*/ |
| 42 | |
| 43 | /* configure so an HC device and id are always provided */ |
| 44 | /* always called with process context; sleeping is OK */ |
| 45 | |
| 46 | /** |
| 47 | * usb_hcd_pci_probe - initialize PCI-based HCDs |
| 48 | * @dev: USB Host Controller being probed |
| 49 | * @id: pci hotplug id connecting controller to HCD framework |
| 50 | * Context: !in_interrupt() |
| 51 | * |
| 52 | * Allocates basic PCI resources for this USB host controller, and |
| 53 | * then invokes the start() method for the HCD associated with it |
| 54 | * through the hotplug entry's driver_data. |
| 55 | * |
| 56 | * Store this function in the HCD's struct pci_driver as probe(). |
| 57 | */ |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 58 | int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 59 | { |
| 60 | struct hc_driver *driver; |
| 61 | struct usb_hcd *hcd; |
| 62 | int retval; |
| 63 | |
| 64 | if (usb_disabled()) |
| 65 | return -ENODEV; |
| 66 | |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 67 | if (!id) |
| 68 | return -EINVAL; |
| 69 | driver = (struct hc_driver *)id->driver_data; |
| 70 | if (!driver) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 71 | return -EINVAL; |
| 72 | |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 73 | if (pci_enable_device(dev) < 0) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 74 | return -ENODEV; |
David Brownell | c6053ec | 2005-04-18 17:39:22 -0700 | [diff] [blame] | 75 | dev->current_state = PCI_D0; |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 76 | |
| 77 | if (!dev->irq) { |
| 78 | dev_err(&dev->dev, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 79 | "Found HC with no IRQ. Check BIOS/PCI %s setup!\n", |
| 80 | pci_name(dev)); |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 81 | retval = -ENODEV; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 82 | goto err1; |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 83 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 84 | |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 85 | hcd = usb_create_hcd(driver, &dev->dev, pci_name(dev)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 86 | if (!hcd) { |
| 87 | retval = -ENOMEM; |
| 88 | goto err1; |
| 89 | } |
| 90 | |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 91 | if (driver->flags & HCD_MEMORY) { |
| 92 | /* EHCI, OHCI */ |
| 93 | hcd->rsrc_start = pci_resource_start(dev, 0); |
| 94 | hcd->rsrc_len = pci_resource_len(dev, 0); |
| 95 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 96 | driver->description)) { |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 97 | dev_dbg(&dev->dev, "controller already in use\n"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 98 | retval = -EBUSY; |
| 99 | goto err2; |
| 100 | } |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 101 | hcd->regs = ioremap_nocache(hcd->rsrc_start, hcd->rsrc_len); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 102 | if (hcd->regs == NULL) { |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 103 | dev_dbg(&dev->dev, "error mapping memory\n"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 104 | retval = -EFAULT; |
| 105 | goto err3; |
| 106 | } |
| 107 | |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 108 | } else { |
| 109 | /* UHCI */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 110 | int region; |
| 111 | |
| 112 | for (region = 0; region < PCI_ROM_RESOURCE; region++) { |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 113 | if (!(pci_resource_flags(dev, region) & |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 114 | IORESOURCE_IO)) |
| 115 | continue; |
| 116 | |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 117 | hcd->rsrc_start = pci_resource_start(dev, region); |
| 118 | hcd->rsrc_len = pci_resource_len(dev, region); |
| 119 | if (request_region(hcd->rsrc_start, hcd->rsrc_len, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 120 | driver->description)) |
| 121 | break; |
| 122 | } |
| 123 | if (region == PCI_ROM_RESOURCE) { |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 124 | dev_dbg(&dev->dev, "no i/o regions available\n"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 125 | retval = -EBUSY; |
| 126 | goto err1; |
| 127 | } |
| 128 | } |
| 129 | |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 130 | pci_set_master(dev); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 131 | |
Alan Stern | 442258e | 2007-12-06 14:47:08 -0500 | [diff] [blame] | 132 | retval = usb_add_hcd(hcd, dev->irq, IRQF_DISABLED | IRQF_SHARED); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 133 | if (retval != 0) |
| 134 | goto err4; |
| 135 | return retval; |
| 136 | |
| 137 | err4: |
| 138 | if (driver->flags & HCD_MEMORY) { |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 139 | iounmap(hcd->regs); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 140 | err3: |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 141 | release_mem_region(hcd->rsrc_start, hcd->rsrc_len); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 142 | } else |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 143 | release_region(hcd->rsrc_start, hcd->rsrc_len); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 144 | err2: |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 145 | usb_put_hcd(hcd); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 146 | err1: |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 147 | pci_disable_device(dev); |
| 148 | dev_err(&dev->dev, "init %s fail, %d\n", pci_name(dev), retval); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 149 | return retval; |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 150 | } |
Greg Kroah-Hartman | 782e70c | 2008-01-25 11:12:21 -0600 | [diff] [blame] | 151 | EXPORT_SYMBOL_GPL(usb_hcd_pci_probe); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 152 | |
| 153 | |
| 154 | /* may be called without controller electrically present */ |
| 155 | /* may be called with controller, bus, and devices active */ |
| 156 | |
| 157 | /** |
| 158 | * usb_hcd_pci_remove - shutdown processing for PCI-based HCDs |
| 159 | * @dev: USB Host Controller being removed |
| 160 | * Context: !in_interrupt() |
| 161 | * |
| 162 | * Reverses the effect of usb_hcd_pci_probe(), first invoking |
| 163 | * the HCD's stop() method. It is always called from a thread |
| 164 | * context, normally "rmmod", "apmd", or something similar. |
| 165 | * |
| 166 | * Store this function in the HCD's struct pci_driver as remove(). |
| 167 | */ |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 168 | void usb_hcd_pci_remove(struct pci_dev *dev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 169 | { |
| 170 | struct usb_hcd *hcd; |
| 171 | |
| 172 | hcd = pci_get_drvdata(dev); |
| 173 | if (!hcd) |
| 174 | return; |
| 175 | |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 176 | usb_remove_hcd(hcd); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 177 | if (hcd->driver->flags & HCD_MEMORY) { |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 178 | iounmap(hcd->regs); |
| 179 | release_mem_region(hcd->rsrc_start, hcd->rsrc_len); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 180 | } else { |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 181 | release_region(hcd->rsrc_start, hcd->rsrc_len); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 182 | } |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 183 | usb_put_hcd(hcd); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 184 | pci_disable_device(dev); |
| 185 | } |
Greg Kroah-Hartman | 782e70c | 2008-01-25 11:12:21 -0600 | [diff] [blame] | 186 | EXPORT_SYMBOL_GPL(usb_hcd_pci_remove); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 187 | |
Aleksey Gorelov | 64a21d0 | 2006-08-08 17:24:08 -0700 | [diff] [blame] | 188 | /** |
| 189 | * usb_hcd_pci_shutdown - shutdown host controller |
| 190 | * @dev: USB Host Controller being shutdown |
| 191 | */ |
Greg Kroah-Hartman | 34bbe4c | 2008-01-30 15:21:33 -0800 | [diff] [blame] | 192 | void usb_hcd_pci_shutdown(struct pci_dev *dev) |
Aleksey Gorelov | 64a21d0 | 2006-08-08 17:24:08 -0700 | [diff] [blame] | 193 | { |
| 194 | struct usb_hcd *hcd; |
| 195 | |
| 196 | hcd = pci_get_drvdata(dev); |
| 197 | if (!hcd) |
| 198 | return; |
| 199 | |
| 200 | if (hcd->driver->shutdown) |
| 201 | hcd->driver->shutdown(hcd); |
| 202 | } |
Greg Kroah-Hartman | 782e70c | 2008-01-25 11:12:21 -0600 | [diff] [blame] | 203 | EXPORT_SYMBOL_GPL(usb_hcd_pci_shutdown); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 204 | |
Alan Stern | abb3064 | 2009-04-27 13:33:24 -0400 | [diff] [blame^] | 205 | #ifdef CONFIG_PM_SLEEP |
| 206 | |
| 207 | static int check_root_hub_suspended(struct device *dev) |
| 208 | { |
| 209 | struct pci_dev *pci_dev = to_pci_dev(dev); |
| 210 | struct usb_hcd *hcd = pci_get_drvdata(pci_dev); |
| 211 | |
| 212 | if (!(hcd->state == HC_STATE_SUSPENDED || |
| 213 | hcd->state == HC_STATE_HALT)) { |
| 214 | dev_warn(dev, "Root hub is not suspended\n"); |
| 215 | return -EBUSY; |
| 216 | } |
| 217 | return 0; |
| 218 | } |
| 219 | |
| 220 | static int hcd_pci_suspend(struct device *dev) |
| 221 | { |
| 222 | struct pci_dev *pci_dev = to_pci_dev(dev); |
| 223 | struct usb_hcd *hcd = pci_get_drvdata(pci_dev); |
| 224 | int retval; |
| 225 | |
| 226 | /* Root hub suspend should have stopped all downstream traffic, |
| 227 | * and all bus master traffic. And done so for both the interface |
| 228 | * and the stub usb_device (which we check here). But maybe it |
| 229 | * didn't; writing sysfs power/state files ignores such rules... |
| 230 | */ |
| 231 | retval = check_root_hub_suspended(dev); |
| 232 | if (retval) |
| 233 | return retval; |
| 234 | |
| 235 | /* We might already be suspended (runtime PM -- not yet written) */ |
| 236 | if (pci_dev->current_state != PCI_D0) |
| 237 | return retval; |
| 238 | |
| 239 | if (hcd->driver->pci_suspend) { |
| 240 | retval = hcd->driver->pci_suspend(hcd, PMSG_SUSPEND); |
| 241 | suspend_report_result(hcd->driver->pci_suspend, retval); |
| 242 | if (retval) |
| 243 | return retval; |
| 244 | } |
| 245 | |
| 246 | synchronize_irq(pci_dev->irq); |
| 247 | |
| 248 | /* Downstream ports from this root hub should already be quiesced, so |
| 249 | * there will be no DMA activity. Now we can shut down the upstream |
| 250 | * link (except maybe for PME# resume signaling). We'll enter a |
| 251 | * low power state during suspend_noirq, if the hardware allows. |
| 252 | */ |
| 253 | pci_disable_device(pci_dev); |
| 254 | return retval; |
| 255 | } |
| 256 | |
| 257 | static int hcd_pci_suspend_noirq(struct device *dev) |
| 258 | { |
| 259 | struct pci_dev *pci_dev = to_pci_dev(dev); |
| 260 | struct usb_hcd *hcd = pci_get_drvdata(pci_dev); |
| 261 | int retval; |
| 262 | |
| 263 | retval = check_root_hub_suspended(dev); |
| 264 | if (retval) |
| 265 | return retval; |
| 266 | |
| 267 | pci_save_state(pci_dev); |
| 268 | |
| 269 | /* If the root hub is HALTed rather than SUSPENDed, |
| 270 | * disallow remote wakeup. |
| 271 | */ |
| 272 | if (hcd->state == HC_STATE_HALT) |
| 273 | device_set_wakeup_enable(dev, 0); |
| 274 | dev_dbg(dev, "wakeup: %d\n", device_may_wakeup(dev)); |
| 275 | |
| 276 | /* Possibly enable remote wakeup, |
| 277 | * choose the appropriate low-power state, and go to that state. |
| 278 | */ |
| 279 | retval = pci_prepare_to_sleep(pci_dev); |
| 280 | if (retval == -EIO) { /* Low-power not supported */ |
| 281 | dev_dbg(dev, "--> PCI D0 legacy\n"); |
| 282 | retval = 0; |
| 283 | } else if (retval == 0) { |
| 284 | dev_dbg(dev, "--> PCI %s\n", |
| 285 | pci_power_name(pci_dev->current_state)); |
| 286 | } else { |
| 287 | suspend_report_result(pci_prepare_to_sleep, retval); |
| 288 | return retval; |
| 289 | } |
| 290 | |
| 291 | #ifdef CONFIG_PPC_PMAC |
| 292 | /* Disable ASIC clocks for USB */ |
| 293 | if (machine_is(powermac)) { |
| 294 | struct device_node *of_node; |
| 295 | |
| 296 | of_node = pci_device_to_OF_node(pci_dev); |
| 297 | if (of_node) |
| 298 | pmac_call_feature(PMAC_FTR_USB_ENABLE, of_node, 0, 0); |
| 299 | } |
| 300 | #endif |
| 301 | return retval; |
| 302 | } |
| 303 | |
| 304 | static int hcd_pci_resume_noirq(struct device *dev) |
| 305 | { |
| 306 | struct pci_dev *pci_dev = to_pci_dev(dev); |
| 307 | |
| 308 | #ifdef CONFIG_PPC_PMAC |
| 309 | /* Reenable ASIC clocks for USB */ |
| 310 | if (machine_is(powermac)) { |
| 311 | struct device_node *of_node; |
| 312 | |
| 313 | of_node = pci_device_to_OF_node(pci_dev); |
| 314 | if (of_node) |
| 315 | pmac_call_feature(PMAC_FTR_USB_ENABLE, |
| 316 | of_node, 0, 1); |
| 317 | } |
| 318 | #endif |
| 319 | |
| 320 | /* Go back to D0 and disable remote wakeup */ |
| 321 | pci_back_from_sleep(pci_dev); |
| 322 | return 0; |
| 323 | } |
| 324 | |
| 325 | static int resume_common(struct device *dev, bool hibernated) |
| 326 | { |
| 327 | struct pci_dev *pci_dev = to_pci_dev(dev); |
| 328 | struct usb_hcd *hcd = pci_get_drvdata(pci_dev); |
| 329 | int retval; |
| 330 | |
| 331 | if (hcd->state != HC_STATE_SUSPENDED) { |
| 332 | dev_dbg(dev, "can't resume, not suspended!\n"); |
| 333 | return 0; |
| 334 | } |
| 335 | |
| 336 | retval = pci_enable_device(pci_dev); |
| 337 | if (retval < 0) { |
| 338 | dev_err(dev, "can't re-enable after resume, %d!\n", retval); |
| 339 | return retval; |
| 340 | } |
| 341 | |
| 342 | pci_set_master(pci_dev); |
| 343 | |
| 344 | clear_bit(HCD_FLAG_SAW_IRQ, &hcd->flags); |
| 345 | |
| 346 | if (hcd->driver->pci_resume) { |
| 347 | retval = hcd->driver->pci_resume(hcd); |
| 348 | if (retval) { |
| 349 | dev_err(dev, "PCI post-resume error %d!\n", retval); |
| 350 | usb_hc_died(hcd); |
| 351 | } |
| 352 | } |
| 353 | return retval; |
| 354 | } |
| 355 | |
| 356 | static int hcd_pci_resume(struct device *dev) |
| 357 | { |
| 358 | return resume_common(dev, false); |
| 359 | } |
| 360 | |
| 361 | static int hcd_pci_restore(struct device *dev) |
| 362 | { |
| 363 | return resume_common(dev, true); |
| 364 | } |
| 365 | |
| 366 | struct dev_pm_ops usb_hcd_pci_pm_ops = { |
| 367 | .suspend = hcd_pci_suspend, |
| 368 | .suspend_noirq = hcd_pci_suspend_noirq, |
| 369 | .resume_noirq = hcd_pci_resume_noirq, |
| 370 | .resume = hcd_pci_resume, |
| 371 | .freeze = check_root_hub_suspended, |
| 372 | .freeze_noirq = check_root_hub_suspended, |
| 373 | .thaw_noirq = NULL, |
| 374 | .thaw = NULL, |
| 375 | .poweroff = hcd_pci_suspend, |
| 376 | .poweroff_noirq = hcd_pci_suspend_noirq, |
| 377 | .restore_noirq = hcd_pci_resume_noirq, |
| 378 | .restore = hcd_pci_restore, |
| 379 | }; |
| 380 | EXPORT_SYMBOL_GPL(usb_hcd_pci_pm_ops); |
| 381 | |
| 382 | #endif /* CONFIG_PM_SLEEP */ |