Lines Matching +full:pm +full:- +full:bus
1 // SPDX-License-Identifier: GPL-2.0
3 * (C) Copyright 2002-2004, 2007 Greg Kroah-Hartman <greg@kroah.com>
22 #include <linux/dma-map-ops.h>
33 * pci_add_dynid - add a new PCI device ID to this driver and re-probe devices
51 * 0 on success, -errno on failure.
63 return -ENOMEM; in pci_add_dynid()
65 dynid->id.vendor = vendor; in pci_add_dynid()
66 dynid->id.device = device; in pci_add_dynid()
67 dynid->id.subvendor = subvendor; in pci_add_dynid()
68 dynid->id.subdevice = subdevice; in pci_add_dynid()
69 dynid->id.class = class; in pci_add_dynid()
70 dynid->id.class_mask = class_mask; in pci_add_dynid()
71 dynid->id.driver_data = driver_data; in pci_add_dynid()
73 spin_lock(&drv->dynids.lock); in pci_add_dynid()
74 list_add_tail(&dynid->node, &drv->dynids.list); in pci_add_dynid()
75 spin_unlock(&drv->dynids.lock); in pci_add_dynid()
77 return driver_attach(&drv->driver); in pci_add_dynid()
85 spin_lock(&drv->dynids.lock); in pci_free_dynids()
86 list_for_each_entry_safe(dynid, n, &drv->dynids.list, node) { in pci_free_dynids()
87 list_del(&dynid->node); in pci_free_dynids()
90 spin_unlock(&drv->dynids.lock); in pci_free_dynids()
94 * pci_match_id - See if a PCI device matches a given pci_id table
109 while (ids->vendor || ids->subvendor || ids->class_mask) { in pci_match_id()
127 * pci_match_device - See if a device matches a driver's list of IDs
143 if (dev->driver_override && strcmp(dev->driver_override, drv->name)) in pci_match_device()
147 spin_lock(&drv->dynids.lock); in pci_match_device()
148 list_for_each_entry(dynid, &drv->dynids.list, node) { in pci_match_device()
149 if (pci_match_one_device(&dynid->id, dev)) { in pci_match_device()
150 found_id = &dynid->id; in pci_match_device()
154 spin_unlock(&drv->dynids.lock); in pci_match_device()
159 for (ids = drv->id_table; (found_id = pci_match_id(ids, dev)); in pci_match_device()
166 if (found_id->override_only) { in pci_match_device()
167 if (dev->driver_override) in pci_match_device()
175 if (dev->driver_override) in pci_match_device()
181 * new_id_store - sysfs frontend to pci_add_dynid()
192 const struct pci_device_id *ids = pdrv->id_table; in new_id_store()
203 return -EINVAL; in new_id_store()
208 return -ENOMEM; in new_id_store()
210 pdev->vendor = vendor; in new_id_store()
211 pdev->device = device; in new_id_store()
212 pdev->subsystem_vendor = subvendor; in new_id_store()
213 pdev->subsystem_device = subdevice; in new_id_store()
214 pdev->class = class; in new_id_store()
217 retval = -EEXIST; in new_id_store()
228 retval = -EINVAL; in new_id_store()
229 while (ids->vendor || ids->subvendor || ids->class_mask) { in new_id_store()
230 if (driver_data == ids->driver_data) { in new_id_store()
249 * remove_id_store - remove a PCI device ID from this driver
264 size_t retval = -ENODEV; in remove_id_store()
270 return -EINVAL; in remove_id_store()
272 spin_lock(&pdrv->dynids.lock); in remove_id_store()
273 list_for_each_entry_safe(dynid, n, &pdrv->dynids.list, node) { in remove_id_store()
274 struct pci_device_id *id = &dynid->id; in remove_id_store()
275 if ((id->vendor == vendor) && in remove_id_store()
276 (id->device == device) && in remove_id_store()
277 (subvendor == PCI_ANY_ID || id->subvendor == subvendor) && in remove_id_store()
278 (subdevice == PCI_ANY_ID || id->subdevice == subdevice) && in remove_id_store()
279 !((id->class ^ class) & class_mask)) { in remove_id_store()
280 list_del(&dynid->node); in remove_id_store()
286 spin_unlock(&pdrv->dynids.lock); in remove_id_store()
308 struct pci_dev *pci_dev = ddi->dev; in local_pci_probe()
309 struct pci_driver *pci_drv = ddi->drv; in local_pci_probe()
310 struct device *dev = &pci_dev->dev; in local_pci_probe()
315 * runtime PM status. During probe, the device is set to in local_pci_probe()
317 * supports runtime PM, it should call pm_runtime_put_noidle(), in local_pci_probe()
318 * or any other runtime PM helper function decrementing the usage in local_pci_probe()
323 pci_dev->driver = pci_drv; in local_pci_probe()
324 rc = pci_drv->probe(pci_dev, ddi->id); in local_pci_probe()
328 pci_dev->driver = NULL; in local_pci_probe()
344 return dev->is_virtfn && dev->physfn->is_probed; in pci_physfn_is_probed()
361 node = dev_to_node(&dev->dev); in pci_call_probe()
362 dev->is_probed = 1; in pci_call_probe()
377 error = -ENOMEM; in pci_call_probe()
394 dev->is_probed = 0; in pci_call_probe()
400 * __pci_device_probe - check if a driver wants to claim a specific PCI device
405 * side-effect: pci_dev->driver is set to drv when drv claims pci_dev.
412 if (drv->probe) { in __pci_device_probe()
413 error = -ENODEV; in __pci_device_probe()
425 return (!pdev->is_virtfn || pdev->physfn->sriov->drivers_autoprobe || in pci_device_can_probe()
426 pdev->driver_override); in pci_device_can_probe()
439 struct pci_driver *drv = to_pci_driver(dev->driver); in pci_device_probe()
442 return -ENODEV; in pci_device_probe()
463 struct pci_driver *drv = pci_dev->driver; in pci_device_remove()
465 if (drv->remove) { in pci_device_remove()
470 * with the code below, so wait until all of the runtime PM in pci_device_remove()
474 drv->remove(pci_dev); in pci_device_remove()
478 pci_dev->driver = NULL; in pci_device_remove()
481 /* Undo the runtime PM settings in local_pci_probe() */ in pci_device_remove()
488 if (pci_dev->current_state == PCI_D0) in pci_device_remove()
489 pci_dev->current_state = PCI_UNKNOWN; in pci_device_remove()
492 * We would love to complain here if pci_dev->is_enabled is set, that in pci_device_remove()
506 struct pci_driver *drv = pci_dev->driver; in pci_device_shutdown()
510 if (drv && drv->shutdown) in pci_device_shutdown()
511 drv->shutdown(pci_dev); in pci_device_shutdown()
514 * If this is a kexec reboot, turn off Bus Master bit on the in pci_device_shutdown()
520 if (kexec_in_progress && (pci_dev->current_state <= PCI_D3hot)) in pci_device_shutdown()
529 * pci_restore_standard_config - restore standard config registers of PCI device
536 if (pci_dev->current_state != PCI_D0) { in pci_restore_standard_config()
550 /* Auxiliary functions used for system resume and run-time resume */
582 pci_walk_bus(pci_dev->subordinate, pci_dev_set_disconnected, in pci_pm_bridge_power_up_actions()
592 pci_resume_bus(pci_dev->subordinate); in pci_pm_bridge_power_up_actions()
609 if (pci_dev->current_state == PCI_D0) in pci_pm_set_unknown_state()
610 pci_dev->current_state = PCI_UNKNOWN; in pci_pm_set_unknown_state()
621 /* if the device was enabled before suspend, re-enable */ in pci_pm_reenable_device()
627 if (pci_dev->is_busmaster) in pci_pm_reenable_device()
636 struct pci_driver *drv = pci_dev->driver; in pci_legacy_suspend()
638 if (drv && drv->suspend) { in pci_legacy_suspend()
639 pci_power_t prev = pci_dev->current_state; in pci_legacy_suspend()
642 error = drv->suspend(pci_dev, state); in pci_legacy_suspend()
643 suspend_report_result(dev, drv->suspend, error); in pci_legacy_suspend()
647 if (!pci_dev->state_saved && pci_dev->current_state != PCI_D0 in pci_legacy_suspend()
648 && pci_dev->current_state != PCI_UNKNOWN) { in pci_legacy_suspend()
649 pci_WARN_ONCE(pci_dev, pci_dev->current_state != prev, in pci_legacy_suspend()
650 "PCI PM: Device state not saved by %pS\n", in pci_legacy_suspend()
651 drv->suspend); in pci_legacy_suspend()
664 if (!pci_dev->state_saved) in pci_legacy_suspend_late()
677 struct pci_driver *drv = pci_dev->driver; in pci_legacy_resume()
681 return drv && drv->resume ? in pci_legacy_resume()
682 drv->resume(pci_dev) : pci_pm_reenable_device(pci_dev); in pci_legacy_resume()
689 /* Disable non-bridge devices without PM support */ in pci_pm_default_suspend()
696 struct pci_driver *drv = pci_dev->driver; in pci_has_legacy_pm_support()
697 bool ret = drv && (drv->suspend || drv->resume); in pci_has_legacy_pm_support()
700 * Legacy PM support is used by default, so warn if the new framework is in pci_has_legacy_pm_support()
704 pci_WARN(pci_dev, ret && drv->driver.pm, "device %04x:%04x\n", in pci_has_legacy_pm_support()
705 pci_dev->vendor, pci_dev->device); in pci_has_legacy_pm_support()
715 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; in pci_pm_prepare() local
717 if (pm && pm->prepare) { in pci_pm_prepare()
718 int error = pm->prepare(dev); in pci_pm_prepare()
729 * The PME setting needs to be adjusted here in case the direct-complete in pci_pm_prepare()
743 /* Resume device if platform firmware has put it in reset-power-on */ in pci_pm_complete()
745 pci_power_t pre_sleep_state = pci_dev->current_state; in pci_pm_complete()
755 if (pci_dev->current_state < pre_sleep_state) in pci_pm_complete()
772 * wakeup, which breaks ACPI-based runtime wakeup on PCI Express. in pcie_pme_root_status_cleanup()
784 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; in pci_pm_suspend() local
786 pci_dev->skip_bus_pm = false; in pci_pm_suspend()
790 * since Coffee Lake, to enter a lower-power PM state. in pci_pm_suspend()
797 if (!pm) { in pci_pm_suspend()
812 * suspend callbacks can cope with runtime-suspended devices, it is in pci_pm_suspend()
818 pci_dev->state_saved = false; in pci_pm_suspend()
823 if (pm->suspend) { in pci_pm_suspend()
824 pci_power_t prev = pci_dev->current_state; in pci_pm_suspend()
827 error = pm->suspend(dev); in pci_pm_suspend()
828 suspend_report_result(dev, pm->suspend, error); in pci_pm_suspend()
832 if (!pci_dev->state_saved && pci_dev->current_state != PCI_D0 in pci_pm_suspend()
833 && pci_dev->current_state != PCI_UNKNOWN) { in pci_pm_suspend()
834 pci_WARN_ONCE(pci_dev, pci_dev->current_state != prev, in pci_pm_suspend()
835 "PCI PM: State of device not saved by %pS\n", in pci_pm_suspend()
836 pm->suspend); in pci_pm_suspend()
856 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; in pci_pm_suspend_noirq() local
864 if (!pm) { in pci_pm_suspend_noirq()
869 if (pm->suspend_noirq) { in pci_pm_suspend_noirq()
870 pci_power_t prev = pci_dev->current_state; in pci_pm_suspend_noirq()
873 error = pm->suspend_noirq(dev); in pci_pm_suspend_noirq()
874 suspend_report_result(dev, pm->suspend_noirq, error); in pci_pm_suspend_noirq()
878 if (!pci_dev->state_saved && pci_dev->current_state != PCI_D0 in pci_pm_suspend_noirq()
879 && pci_dev->current_state != PCI_UNKNOWN) { in pci_pm_suspend_noirq()
880 pci_WARN_ONCE(pci_dev, pci_dev->current_state != prev, in pci_pm_suspend_noirq()
881 "PCI PM: State of device not saved by %pS\n", in pci_pm_suspend_noirq()
882 pm->suspend_noirq); in pci_pm_suspend_noirq()
887 if (!pci_dev->state_saved) { in pci_pm_suspend_noirq()
893 * putting it into a low-power state in that case. in pci_pm_suspend_noirq()
895 if (!pci_dev->skip_bus_pm && pci_power_manageable(pci_dev)) in pci_pm_suspend_noirq()
899 pci_dbg(pci_dev, "PCI PM: Suspend power state: %s\n", in pci_pm_suspend_noirq()
900 pci_power_name(pci_dev->current_state)); in pci_pm_suspend_noirq()
902 if (pci_dev->current_state == PCI_D0) { in pci_pm_suspend_noirq()
903 pci_dev->skip_bus_pm = true; in pci_pm_suspend_noirq()
905 * Per PCI PM r1.2, table 6-1, a bridge must be in D0 if any in pci_pm_suspend_noirq()
909 if (pci_dev->bus->self) in pci_pm_suspend_noirq()
910 pci_dev->bus->self->skip_bus_pm = true; in pci_pm_suspend_noirq()
913 if (pci_dev->skip_bus_pm && pm_suspend_no_platform()) { in pci_pm_suspend_noirq()
914 pci_dbg(pci_dev, "PCI PM: Skipped\n"); in pci_pm_suspend_noirq()
929 if (pci_dev->class == PCI_CLASS_SERIAL_USB_EHCI) in pci_pm_suspend_noirq()
936 * If the target system sleep state is suspend-to-idle, it is sufficient in pci_pm_suspend_noirq()
938 * runtime PM. Otherwise, the pm_resume_via_firmware() check will cause in pci_pm_suspend_noirq()
943 dev->power.may_skip_resume = false; in pci_pm_suspend_noirq()
951 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; in pci_pm_resume_noirq() local
952 pci_power_t prev_state = pci_dev->current_state; in pci_pm_resume_noirq()
953 bool skip_bus_pm = pci_dev->skip_bus_pm; in pci_pm_resume_noirq()
959 * In the suspend-to-idle case, devices left in D0 during suspend will in pci_pm_resume_noirq()
976 if (pm && pm->resume_noirq) in pci_pm_resume_noirq()
977 return pm->resume_noirq(dev); in pci_pm_resume_noirq()
993 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; in pci_pm_resume() local
999 if (pci_dev->state_saved) in pci_pm_resume()
1009 if (pm) { in pci_pm_resume()
1010 if (pm->resume) in pci_pm_resume()
1011 return pm->resume(dev); in pci_pm_resume()
1035 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; in pci_pm_freeze() local
1040 if (!pm) { in pci_pm_freeze()
1046 * Resume all runtime-suspended devices before creating a snapshot in pci_pm_freeze()
1049 * put into the runtime-active metastate during system resume anyway, in pci_pm_freeze()
1054 pci_dev->state_saved = false; in pci_pm_freeze()
1056 if (pm->freeze) { in pci_pm_freeze()
1059 error = pm->freeze(dev); in pci_pm_freeze()
1060 suspend_report_result(dev, pm->freeze, error); in pci_pm_freeze()
1071 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; in pci_pm_freeze_noirq() local
1076 if (pm && pm->freeze_noirq) { in pci_pm_freeze_noirq()
1079 error = pm->freeze_noirq(dev); in pci_pm_freeze_noirq()
1080 suspend_report_result(dev, pm->freeze_noirq, error); in pci_pm_freeze_noirq()
1085 if (!pci_dev->state_saved) in pci_pm_freeze_noirq()
1096 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; in pci_pm_thaw_noirq() local
1099 * The pm->thaw_noirq() callback assumes the device has been in pci_pm_thaw_noirq()
1102 * In addition, pci_restore_state() restores MSI-X state in MMIO in pci_pm_thaw_noirq()
1104 * in case the driver's "freeze" callbacks put it into a low-power in pci_pm_thaw_noirq()
1113 if (pm && pm->thaw_noirq) in pci_pm_thaw_noirq()
1114 return pm->thaw_noirq(dev); in pci_pm_thaw_noirq()
1122 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; in pci_pm_thaw() local
1128 if (pm) { in pci_pm_thaw()
1129 if (pm->thaw) in pci_pm_thaw()
1130 error = pm->thaw(dev); in pci_pm_thaw()
1135 pci_dev->state_saved = false; in pci_pm_thaw()
1143 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; in pci_pm_poweroff() local
1148 if (!pm) { in pci_pm_poweroff()
1157 pci_dev->state_saved = false; in pci_pm_poweroff()
1162 if (pm->poweroff) { in pci_pm_poweroff()
1165 error = pm->poweroff(dev); in pci_pm_poweroff()
1166 suspend_report_result(dev, pm->poweroff, error); in pci_pm_poweroff()
1187 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; in pci_pm_poweroff_noirq() local
1195 if (!pm) { in pci_pm_poweroff_noirq()
1200 if (pm->poweroff_noirq) { in pci_pm_poweroff_noirq()
1203 error = pm->poweroff_noirq(dev); in pci_pm_poweroff_noirq()
1204 suspend_report_result(dev, pm->poweroff_noirq, error); in pci_pm_poweroff_noirq()
1209 if (!pci_dev->state_saved && !pci_has_subordinate(pci_dev)) in pci_pm_poweroff_noirq()
1216 if (pci_dev->class == PCI_CLASS_SERIAL_USB_EHCI) in pci_pm_poweroff_noirq()
1227 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; in pci_pm_restore_noirq() local
1235 if (pm && pm->restore_noirq) in pci_pm_restore_noirq()
1236 return pm->restore_noirq(dev); in pci_pm_restore_noirq()
1244 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; in pci_pm_restore() local
1250 if (pci_dev->state_saved) in pci_pm_restore()
1258 if (pm) { in pci_pm_restore()
1259 if (pm->restore) in pci_pm_restore()
1260 return pm->restore(dev); in pci_pm_restore()
1287 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; in pci_pm_runtime_suspend() local
1288 pci_power_t prev = pci_dev->current_state; in pci_pm_runtime_suspend()
1294 * If pci_dev->driver is not set (unbound), we leave the device in D0, in pci_pm_runtime_suspend()
1298 if (!pci_dev->driver) { in pci_pm_runtime_suspend()
1303 pci_dev->state_saved = false; in pci_pm_runtime_suspend()
1304 if (pm && pm->runtime_suspend) { in pci_pm_runtime_suspend()
1305 error = pm->runtime_suspend(dev); in pci_pm_runtime_suspend()
1307 * -EBUSY and -EAGAIN is used to request the runtime PM core in pci_pm_runtime_suspend()
1311 if (error == -EBUSY || error == -EAGAIN) { in pci_pm_runtime_suspend()
1313 pm->runtime_suspend, error); in pci_pm_runtime_suspend()
1317 pm->runtime_suspend, error); in pci_pm_runtime_suspend()
1324 if (pm && pm->runtime_suspend in pci_pm_runtime_suspend()
1325 && !pci_dev->state_saved && pci_dev->current_state != PCI_D0 in pci_pm_runtime_suspend()
1326 && pci_dev->current_state != PCI_UNKNOWN) { in pci_pm_runtime_suspend()
1327 pci_WARN_ONCE(pci_dev, pci_dev->current_state != prev, in pci_pm_runtime_suspend()
1328 "PCI PM: State of device not saved by %pS\n", in pci_pm_runtime_suspend()
1329 pm->runtime_suspend); in pci_pm_runtime_suspend()
1333 if (!pci_dev->state_saved) { in pci_pm_runtime_suspend()
1344 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; in pci_pm_runtime_resume() local
1345 pci_power_t prev_state = pci_dev->current_state; in pci_pm_runtime_resume()
1356 if (!pci_dev->driver) in pci_pm_runtime_resume()
1365 if (pm && pm->runtime_resume) in pci_pm_runtime_resume()
1366 error = pm->runtime_resume(dev); in pci_pm_runtime_resume()
1374 const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; in pci_pm_runtime_idle() local
1377 * If pci_dev->driver is not set (unbound), the device should in pci_pm_runtime_idle()
1378 * always remain in D0 regardless of the runtime PM status in pci_pm_runtime_idle()
1380 if (!pci_dev->driver) in pci_pm_runtime_idle()
1383 if (pm && pm->runtime_idle) in pci_pm_runtime_idle()
1384 return pm->runtime_idle(dev); in pci_pm_runtime_idle()
1425 * __pci_register_driver - register a new pci driver
1439 drv->driver.name = drv->name; in __pci_register_driver()
1440 drv->driver.bus = &pci_bus_type; in __pci_register_driver()
1441 drv->driver.owner = owner; in __pci_register_driver()
1442 drv->driver.mod_name = mod_name; in __pci_register_driver()
1443 drv->driver.groups = drv->groups; in __pci_register_driver()
1444 drv->driver.dev_groups = drv->dev_groups; in __pci_register_driver()
1446 spin_lock_init(&drv->dynids.lock); in __pci_register_driver()
1447 INIT_LIST_HEAD(&drv->dynids.list); in __pci_register_driver()
1450 return driver_register(&drv->driver); in __pci_register_driver()
1455 * pci_unregister_driver - unregister a pci driver
1466 driver_unregister(&drv->driver); in pci_unregister_driver()
1476 * pci_dev_driver - get the pci_driver of a device
1486 if (dev->driver) in pci_dev_driver()
1487 return dev->driver; in pci_dev_driver()
1490 if (dev->resource[i].flags & IORESOURCE_BUSY) in pci_dev_driver()
1498 * pci_bus_match - Tell if a PCI device structure has a matching PCI device id structure
1512 if (!pci_dev->match_driver) in pci_bus_match()
1524 * pci_dev_get - increments the reference count of the pci device structure
1538 get_device(&dev->dev); in pci_dev_get()
1544 * pci_dev_put - release a use of the pci device structure
1553 put_device(&dev->dev); in pci_dev_put()
1562 return -ENODEV; in pci_uevent()
1566 if (add_uevent_var(env, "PCI_CLASS=%04X", pdev->class)) in pci_uevent()
1567 return -ENOMEM; in pci_uevent()
1569 if (add_uevent_var(env, "PCI_ID=%04X:%04X", pdev->vendor, pdev->device)) in pci_uevent()
1570 return -ENOMEM; in pci_uevent()
1572 if (add_uevent_var(env, "PCI_SUBSYS_ID=%04X:%04X", pdev->subsystem_vendor, in pci_uevent()
1573 pdev->subsystem_device)) in pci_uevent()
1574 return -ENOMEM; in pci_uevent()
1577 return -ENOMEM; in pci_uevent()
1580 pdev->vendor, pdev->device, in pci_uevent()
1581 pdev->subsystem_vendor, pdev->subsystem_device, in pci_uevent()
1582 (u8)(pdev->class >> 16), (u8)(pdev->class >> 8), in pci_uevent()
1583 (u8)(pdev->class))) in pci_uevent()
1584 return -ENOMEM; in pci_uevent()
1591 * pci_uevent_ers - emit a uevent during recovery path of PCI device
1620 kobject_uevent_env(&pdev->dev.kobj, KOBJ_CHANGE, envp); in pci_uevent_ers()
1631 * pci_dma_configure - Setup DMA configuration
1639 struct pci_driver *driver = to_pci_driver(dev->driver); in pci_dma_configure()
1645 if (IS_ENABLED(CONFIG_OF) && bridge->parent && in pci_dma_configure()
1646 bridge->parent->of_node) { in pci_dma_configure()
1647 ret = of_dma_configure(dev, bridge->parent->of_node, true); in pci_dma_configure()
1649 struct acpi_device *adev = to_acpi_device_node(bridge->fwnode); in pci_dma_configure()
1656 if (!ret && !driver->driver_managed_dma) { in pci_dma_configure()
1667 struct pci_driver *driver = to_pci_driver(dev->driver); in pci_dma_cleanup()
1669 if (!driver->driver_managed_dma) in pci_dma_cleanup()
1683 .pm = PCI_PM_OPS_PTR,
1696 if (drv->bus != &pcie_port_bus_type || dev->bus != &pcie_port_bus_type) in pcie_port_bus_match()
1702 if (driver->service != pciedev->service) in pcie_port_bus_match()
1705 if (driver->port_type != PCIE_ANY_PORT && in pcie_port_bus_match()
1706 driver->port_type != pci_pcie_type(pciedev->port)) in pcie_port_bus_match()