linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Tomlinson <Mark.Tomlinson@alliedtelesis.co.nz>
To: "robh@kernel.org" <robh@kernel.org>
Cc: "ray.jui@broadcom.com" <ray.jui@broadcom.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"lorenzo.pieralisi@arm.com" <lorenzo.pieralisi@arm.com>,
	"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"sbranden@broadcom.com" <sbranden@broadcom.com>,
	"helgaas@kernel.org" <helgaas@kernel.org>
Subject: Re: [PATCH v2 2/2] PCI: Reduce warnings on possible RW1C corruption
Date: Mon, 3 Aug 2020 03:42:44 +0000	[thread overview]
Message-ID: <3dd532237ef5e332fc87d60c3a680e1c085f622e.camel@alliedtelesis.co.nz> (raw)
In-Reply-To: <CAL_JsqJgD_Ys3xjoJYuQ3R9bL7gUC+NKwkq71eTngj5uvcpk6Q@mail.gmail.com>

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.



      reply	other threads:[~2020-08-03  3:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-31  3:39 [PATCH v2 1/2] PCI: iproc: Set affinity mask on MSI interrupts Mark Tomlinson
2020-07-31  3:39 ` [PATCH v2 2/2] PCI: Reduce warnings on possible RW1C corruption Mark Tomlinson
2020-07-31 15:32   ` Rob Herring
2020-08-03  3:42     ` Mark Tomlinson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3dd532237ef5e332fc87d60c3a680e1c085f622e.camel@alliedtelesis.co.nz \
    --to=mark.tomlinson@alliedtelesis.co.nz \
    --cc=f.fainelli@gmail.com \
    --cc=helgaas@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=ray.jui@broadcom.com \
    --cc=robh@kernel.org \
    --cc=sbranden@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).