[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250610103205.6750-3-ilpo.jarvinen@linux.intel.com>
Date: Tue, 10 Jun 2025 13:32:05 +0300
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: linux-pci@...r.kernel.org,
Potnuri Bharat Teja <bharat@...lsio.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Subject: [PATCH 3/3] cxgb3: Split complex PCI write statement into logic + write
Instead of trying to complex logic within the PCI capability write
statement, split the logic onto separate lines for better readability.
Also, don't pretend just clearing the fields, but set the fields to
what 0 means (128 bytes).
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
---
drivers/net/ethernet/chelsio/cxgb3/t3_hw.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb3/t3_hw.c b/drivers/net/ethernet/chelsio/cxgb3/t3_hw.c
index 171bf6cf1abf..b9327d8c6893 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/t3_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb3/t3_hw.c
@@ -3267,9 +3267,9 @@ static void config_pcie(struct adapter *adap)
pci_read_config_word(adap->pdev, PCI_DEVICE_ID, &devid);
if (devid == 0x37) {
- pcie_capability_write_word(adap->pdev, PCI_EXP_DEVCTL,
- val & ~PCI_EXP_DEVCTL_READRQ &
- ~PCI_EXP_DEVCTL_PAYLOAD);
+ val &= ~(PCI_EXP_DEVCTL_PAYLOAD|PCI_EXP_DEVCTL_READRQ);
+ val |= PCI_EXP_DEVCTL_PAYLOAD_128B|PCI_EXP_DEVCTL_READRQ_128B;
+ pcie_capability_write_word(adap->pdev, PCI_EXP_DEVCTL, val);
pldsize = 0;
}
--
2.39.5
Powered by blists - more mailing lists