All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bjorn Helgaas <bhelgaas@google.com>
Subject: [PATCH 1/2] mtip32xx: use PCI #defines instead of numbers
Date: Tue, 26 Jan 2021 14:04:32 -0600	[thread overview]
Message-ID: <20210126200433.2911982-2-helgaas@kernel.org> (raw)
In-Reply-To: <20210126200433.2911982-1-helgaas@kernel.org>

From: Bjorn Helgaas <bhelgaas@google.com>

Use PCI #defines for PCIe Device Control register values instead of
hard-coding bit positions.  No functional change intended.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
 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 53ac59d19ae5..543eb30a3bc0 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -3932,8 +3932,8 @@ static void mtip_disable_link_opts(struct driver_data *dd, struct pci_dev *pdev)
 		pci_read_config_word(pdev,
 			pos + 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.25.1


  reply	other threads:[~2021-01-26 22:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-26 20:04 [PATCH 0/2] mtip32xx: minor PCI cleanups Bjorn Helgaas
2021-01-26 20:04 ` Bjorn Helgaas [this message]
2021-01-26 23:32   ` [PATCH 1/2] mtip32xx: use PCI #defines instead of numbers Chaitanya Kulkarni
2021-01-27  7:58     ` Chaitanya Kulkarni
2021-01-27 15:18       ` Bjorn Helgaas
2021-01-26 20:04 ` [PATCH 2/2] mtip32xx: prefer pcie_capability_read_word() Bjorn Helgaas
2021-01-26 20:09 ` [PATCH 0/2] mtip32xx: minor PCI cleanups Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210126200433.2911982-2-helgaas@kernel.org \
    --to=helgaas@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=bhelgaas@google.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.