Skip to content

Commit

Permalink
PCI / PM: Use the NEVER_SKIP driver flag
Browse files Browse the repository at this point in the history
Replace the PCI-specific flag PCI_DEV_FLAGS_NEEDS_RESUME with the
PM core's DPM_FLAG_NEVER_SKIP one everywhere and drop it.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
Rafael J. Wysocki committed Nov 6, 2017
1 parent 08810a4 commit c2eac4d
Showing 5 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/i915_drv.c
Original file line number Diff line number Diff line change
@@ -1304,7 +1304,7 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)
* becaue the HDA driver may require us to enable the audio power
* domain during system suspend.
*/
pdev->dev_flags |= PCI_DEV_FLAGS_NEEDS_RESUME;
dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NEVER_SKIP);

ret = i915_driver_init_early(dev_priv, ent);
if (ret < 0)
2 changes: 1 addition & 1 deletion drivers/misc/mei/pci-me.c
Original file line number Diff line number Diff line change
@@ -223,7 +223,7 @@ static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
* MEI requires to resume from runtime suspend mode
* in order to perform link reset flow upon system suspend.
*/
pdev->dev_flags |= PCI_DEV_FLAGS_NEEDS_RESUME;
dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NEVER_SKIP);

/*
* For not wake-able HW runtime pm framework
2 changes: 1 addition & 1 deletion drivers/misc/mei/pci-txe.c
Original file line number Diff line number Diff line change
@@ -141,7 +141,7 @@ static int mei_txe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
* MEI requires to resume from runtime suspend mode
* in order to perform link reset flow upon system suspend.
*/
pdev->dev_flags |= PCI_DEV_FLAGS_NEEDS_RESUME;
dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NEVER_SKIP);

/*
* For not wake-able HW runtime pm framework
3 changes: 1 addition & 2 deletions drivers/pci/pci.c
Original file line number Diff line number Diff line change
@@ -2166,8 +2166,7 @@ bool pci_dev_keep_suspended(struct pci_dev *pci_dev)

if (!pm_runtime_suspended(dev)
|| pci_target_state(pci_dev, wakeup) != pci_dev->current_state
|| platform_pci_need_resume(pci_dev)
|| (pci_dev->dev_flags & PCI_DEV_FLAGS_NEEDS_RESUME))
|| platform_pci_need_resume(pci_dev))
return false;

/*
7 changes: 1 addition & 6 deletions include/linux/pci.h
Original file line number Diff line number Diff line change
@@ -205,13 +205,8 @@ enum pci_dev_flags {
PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT = (__force pci_dev_flags_t) (1 << 9),
/* Do not use FLR even if device advertises PCI_AF_CAP */
PCI_DEV_FLAGS_NO_FLR_RESET = (__force pci_dev_flags_t) (1 << 10),
/*
* Resume before calling the driver's system suspend hooks, disabling
* the direct_complete optimization.
*/
PCI_DEV_FLAGS_NEEDS_RESUME = (__force pci_dev_flags_t) (1 << 11),
/* Don't use Relaxed Ordering for TLPs directed at this device */
PCI_DEV_FLAGS_NO_RELAXED_ORDERING = (__force pci_dev_flags_t) (1 << 12),
PCI_DEV_FLAGS_NO_RELAXED_ORDERING = (__force pci_dev_flags_t) (1 << 11),
};

enum pci_irq_reroute_variant {

0 comments on commit c2eac4d

Please sign in to comment.