lkml.org 
[lkml]   [2020]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] PCI: iproc: Stop using generic config read/write functions
Date
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@alliedtelesis.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
\
 
 \ /
  Last update: 2020-07-30 05:39    [W:0.076 / U:8.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site