From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Rob Herring <robh@kernel.org>
Cc: Ray Jui <rjui@broadcom.com>, Tanmay Inamdar <tinamdar@apm.com>,
Thierry Reding <thierry.reding@gmail.com>,
Scott Branden <sbranden@broadcom.com>,
Bjorn Helgaas <helgaas@kernel.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: pci_generic_config_write32() access size problem
Date: Tue, 29 Sep 2015 18:06:44 +0100 [thread overview]
Message-ID: <20150929170644.GM21513@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CAL_JsqLVxtcgcTK55cY32=s24Nuv378X2aKZhYKHFEKO9wh3mw@mail.gmail.com>
On Tue, Sep 29, 2015 at 11:47:57AM -0500, Rob Herring wrote:
> + several affected driver maintainers
>
> On Mon, Sep 28, 2015 at 6:05 PM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
> > On Mon, Sep 28, 2015 at 05:42:20PM -0500, Rob Herring wrote:
> >> On Mon, Sep 28, 2015 at 5:08 PM, Bjorn Helgaas <helgaas@kernel.org> wrote:
> >> > Hi Rob,
> >> >
> >> > Russell pointed out a problem with 1f94a94f67e1 ("PCI: Add generic config
> >> > accessors"). pci_generic_config_write32() does a read/modify/write if the
> >> > size is less than 32 bits, so I think we have problem if this is used with
> >> > 8- or 16-bit registers that contain RW1C bits. Any thoughts on how we can
> >> > fix this?
> >>
> >> My series didn't change access sizes unless I made a made a mistake
> >> somewhere, so the problem should have existed before.
> >>
> >> Is it known addresses we need to deal with? We could do special case
> >> handling of certain addresses to mask out RW1C bits. This could be in
> >> the generic functions or in wrappers around the generic functions.
> >> There's already some similar examples of special address handling
> >> IIRC.
> >
> > I think this originally came into being because Intel decided that their
> > IOP platforms wouldn't support anything except 32-bit accesses, and
> > cargo cult programming took over. I complained about it on the Intel IOP
> > platforms, but obviously if the hardware doesn't support anything else
> > then your stuck with it.
>
> What about SA1100 nanoengine?
No idea about that, sorry. I never had any information about what those
comprised.
I see that you've deleted a really useful comment which is relevant to
this discussion though:
- /* nanoEngine PCI bridge does not return -1 for a non-existing
- * device. We must fake the answer. We know that the only valid
- * device is device zero at bus 0, which is the network chip. */
Note "network chip" not "network card". That, coupled with:
pci 0000:00:00.0: [8086:1209] type 0 class 0x000200
...
Kernel modules: e100
in other comments tells us that it's probably not a real PCI slot, but
an e100 soldered down on the board. My guess is that the host bridge
is a custom device (FPGA?) which interfaces with the rather unique method
of gaining access to the SDRAM on SA1110. Basically, you share the SDRAM
bus, and negotiate with the SA1110 through a hand-over process to take
direct control of the SDRAM itself - no commercially produced PCI host
chip would ever support this.
Given that it's probably a custom and fixed setup, I don't think anyone
has to worry about these corner cases. I doubt that it supports any of
the SERR/PERR error reporting, and so I doubt anyone cares about the
RW1C bits in the PCI status register there. There's certainly no chance
of any PCIe stuff appearing there... if there are any of the boards still
in existence.
--
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2015-09-29 17:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-28 22:08 pci_generic_config_write32() access size problem Bjorn Helgaas
2015-09-28 22:42 ` Rob Herring
2015-09-28 23:05 ` Russell King - ARM Linux
2015-09-29 16:47 ` Rob Herring
2015-09-29 17:06 ` Russell King - ARM Linux [this message]
[not found] ` <CADaLNDndQ6qZ2yuGuff6=cTm565in5e75AjkcX8MJmH2BCwyEw@mail.gmail.com>
2015-09-30 21:30 ` Rob Herring
[not found] ` <CADaLNDmjv+SkRxtGDToUTxo4DKFF+yd2LRmte=k4-HRsGOHYVg@mail.gmail.com>
2015-09-30 21:53 ` Rob Herring
2015-10-01 7:46 ` Thierry Reding
2015-10-01 15:45 ` Ray Jui
2015-10-01 16:11 ` Russell King - ARM Linux
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=20150929170644.GM21513@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=helgaas@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=rjui@broadcom.com \
--cc=robh@kernel.org \
--cc=sbranden@broadcom.com \
--cc=thierry.reding@gmail.com \
--cc=tinamdar@apm.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).