[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3dd532237ef5e332fc87d60c3a680e1c085f622e.camel@alliedtelesis.co.nz>
Date: Mon, 3 Aug 2020 03:42:44 +0000
From: Mark Tomlinson <Mark.Tomlinson@...iedtelesis.co.nz>
To: "robh@...nel.org" <robh@...nel.org>
CC: "ray.jui@...adcom.com" <ray.jui@...adcom.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"lorenzo.pieralisi@....com" <lorenzo.pieralisi@....com>,
"f.fainelli@...il.com" <f.fainelli@...il.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"sbranden@...adcom.com" <sbranden@...adcom.com>,
"helgaas@...nel.org" <helgaas@...nel.org>
Subject: Re: [PATCH v2 2/2] PCI: Reduce warnings on possible RW1C corruption
On Fri, 2020-07-31 at 09:32 -0600, Rob Herring wrote:
>
> If we don't want to just warn when a 8 or 16 bit access occurs (I'm
> not sure if 32-bit only accesses is possible or common. Seems like
> PCI_COMMAND would always get written?), then a simple way to do this
> is just move this out of line and do something like this where the bus
> or device is created/registered:
>
> if (bus->ops->write == pci_generic_config_write32)
> warn()
>
This doesn't work for many of the PCI drivers, since they wrap the call
to pci_generic_config_write32() in their own function.
> >
> > diff --git a/include/linux/pci.h b/include/linux/pci.h
> > index 34c1c4f45288..5b6ab593ae09 100644
> > --- a/include/linux/pci.h
> > +++ b/include/linux/pci.h
> > @@ -613,6 +613,7 @@ struct pci_bus {
> > unsigned char primary; /* Number of primary bridge */
> > unsigned char max_bus_speed; /* enum pci_bus_speed */
> > unsigned char cur_bus_speed; /* enum pci_bus_speed */
> > + bool unsafe_warn; /* warned about RW1C config write */
>
> Make this a bitfield next to 'is_added'.
Will do, thanks.
Powered by blists - more mailing lists