[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191118002057.9596-5-fred@fredlawl.com>
Date: Sun, 17 Nov 2019 18:20:57 -0600
From: Frederick Lawler <fred@...dlawl.com>
To: axboe@...nel.dk
Cc: Frederick Lawler <fred@...dlawl.com>, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org, bhelgaas@...gle.com,
bvanassche@....org
Subject: [PATCH v2 4/4] mtip32xx: Replace magic numbers with PCI constants
Readability was improved by replacing pci_read_config_word() with
pcie_capability_read_word(). Take that a step further by replacing magic
numbers with PCI reg constants.
No functional change intended.
Signed-off-by: Frederick Lawler <fred@...dlawl.com>
---
v2:
- Added this patch
---
drivers/block/mtip32xx/mtip32xx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index 35703dc98e25..225c6ae62385 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -3942,8 +3942,8 @@ static void mtip_disable_link_opts(struct driver_data *dd, struct pci_dev *pdev)
return;
pcie_capability_read_word(pdev, PCI_EXP_DEVCTL, &pcie_dev_ctrl);
- if (pcie_dev_ctrl & (1 << 11) ||
- pcie_dev_ctrl & (1 << 4)) {
+ if (pcie_dev_ctrl & PCI_EXP_DEVCTL_NOSNOOP_EN ||
+ pcie_dev_ctrl & PCI_EXP_DEVCTL_RELAX_EN) {
dev_info(&dd->pdev->dev,
"Disabling ERO/No-Snoop on bridge device %04x:%04x\n",
pdev->vendor, pdev->device);
--
2.20.1
Powered by blists - more mailing lists