[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200730033747.18931-2-mark.tomlinson@alliedtelesis.co.nz>
Date: Thu, 30 Jul 2020 15:37:46 +1200
From: Mark Tomlinson <mark.tomlinson@...iedtelesis.co.nz>
To: bhelgaas@...gle.com, rjui@...adcom.com, sbranden@...adcom.com,
f.fainelli@...il.com
Cc: linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
Mark Tomlinson <mark.tomlinson@...iedtelesis.co.nz>
Subject: [PATCH 2/3] PCI: iproc: Stop using generic config read/write functions
The pci_generic_config_write32() function will give warning messages
whenever writing less than 4 bytes at a time. As there is nothing we can
do about this without changing the hardware, the message is just a
nuisance. So instead of using the generic functions, use the functions
that have already been written for reading/writing the config registers.
Signed-off-by: Mark Tomlinson <mark.tomlinson@...iedtelesis.co.nz>
---
drivers/pci/controller/pcie-iproc.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/controller/pcie-iproc.c b/drivers/pci/controller/pcie-iproc.c
index 2c836eede42c..68ecd3050529 100644
--- a/drivers/pci/controller/pcie-iproc.c
+++ b/drivers/pci/controller/pcie-iproc.c
@@ -709,12 +709,13 @@ static int iproc_pcie_config_read32(struct pci_bus *bus, unsigned int devfn,
{
int ret;
struct iproc_pcie *pcie = iproc_data(bus);
+ int busno = bus->number;
iproc_pcie_apb_err_disable(bus, true);
if (pcie->iproc_cfg_read)
ret = iproc_pcie_config_read(bus, devfn, where, size, val);
else
- ret = pci_generic_config_read32(bus, devfn, where, size, val);
+ ret = iproc_pci_raw_config_read32(pcie, busno, devfn, where, size, val);
iproc_pcie_apb_err_disable(bus, false);
return ret;
@@ -724,9 +725,11 @@ static int iproc_pcie_config_write32(struct pci_bus *bus, unsigned int devfn,
int where, int size, u32 val)
{
int ret;
+ struct iproc_pcie *pcie = iproc_data(bus);
+ int busno = bus->number;
iproc_pcie_apb_err_disable(bus, true);
- ret = pci_generic_config_write32(bus, devfn, where, size, val);
+ ret = iproc_pci_raw_config_write32(pcie, busno, devfn, where, size, val);
iproc_pcie_apb_err_disable(bus, false);
return ret;
--
2.28.0
Powered by blists - more mailing lists