]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
Revert "SAUCE: nvme: add quirk to not call disable function when suspending"
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Mon, 10 Jun 2019 04:51:29 +0000 (12:51 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 2 Jul 2019 12:18:49 +0000 (14:18 +0200)
BugLink: https://bugs.launchpad.net/bugs/1808957
This reverts commit 1a862bc878ee4b3d2d211d7ecb34839c30b9cd28.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Acked-by: Timo Aaltonen <tjaalton@ubuntu.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c

index ec3107aea678331e390c4fbc57ced10de69c67a2..70d8c1d6182604314ff11a46b5c5f3294c45f922 100644 (file)
@@ -91,11 +91,6 @@ enum nvme_quirks {
         * Ignore device provided subnqn.
         */
        NVME_QUIRK_IGNORE_DEV_SUBNQN            = (1 << 8),
-
-       /*
-        * Do not disable nvme when suspending(s2idle)
-        */
-       NVME_QUIRK_NO_DISABLE                   = (1 << 15),
 };
 
 /*
index 266cda83844a7af30087460878dab12325c4037a..fed64c35814de6ea1672ee18f7c0e4924594f9bf 100644 (file)
@@ -29,7 +29,6 @@
 #include <linux/types.h>
 #include <linux/io-64-nonatomic-lo-hi.h>
 #include <linux/sed-opal.h>
-#include <linux/suspend.h>
 
 #include "nvme.h"
 
@@ -2619,11 +2618,8 @@ static int nvme_suspend(struct device *dev)
 {
        struct pci_dev *pdev = to_pci_dev(dev);
        struct nvme_dev *ndev = pci_get_drvdata(pdev);
-       struct nvme_ctrl *ctrl = &ndev->ctrl;
-
-       if (!(pm_suspend_via_s2idle() && (ctrl->quirks & NVME_QUIRK_NO_DISABLE)))
-               nvme_dev_disable(ndev, true);
 
+       nvme_dev_disable(ndev, true);
        return 0;
 }
 
@@ -2727,8 +2723,6 @@ static const struct pci_device_id nvme_id_table[] = {
                .driver_data = NVME_QUIRK_LIGHTNVM, },
        { PCI_DEVICE(0x1d1d, 0x2601),   /* CNEX Granby */
                .driver_data = NVME_QUIRK_LIGHTNVM, },
-       { PCI_VDEVICE(SK_HYNIX, 0x1527),        /* Sk Hynix */
-               .driver_data = NVME_QUIRK_NO_DISABLE, },
        { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
        { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001) },
        { PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2003) },