lkml.org 
[lkml]   [2020]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 2/2] PCI: Reduce warnings on possible RW1C corruption
Date
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.


\
 
 \ /
  Last update: 2020-08-03 05:43    [W:0.032 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site