From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Chunhe Lan <Chunhe.Lan@freescale.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Paul Mackerras <paulus@samba.org>,
Minghuan Lian <Minghuan.Lian@freescale.com>,
Kumar Gala <galak@kernel.crashing.org>,
Anton Vorontsov <avorontsov@ru.mvista.com>
Subject: Re: [PATCH] PCI: Add quirk for setting valid class for FSL PCI host bridge
Date: Sat, 27 Jul 2013 00:01:28 +1000 [thread overview]
Message-ID: <1374847288.9200.8.camel@pasglop> (raw)
In-Reply-To: <CAErSpo4xftQjwKHsenuKuEvT10iOa+DuiYfSyJYLhp=ObcDZsQ@mail.gmail.com>
On Fri, 2013-07-26 at 07:07 -0600, Bjorn Helgaas wrote:
>
> 1. This looks an awful lot like quirk_fsl_pcie_head().
> quirk_fsl_pcie_head() is currently a HEADER quirk, but that runs
> *after* pci_setup_device(), where dev->class is used. I suspect this
> should be an EARLY quirk instead. But this quirk has a long history
> as a HEADER quirk, and I'm sure many people have tested it, so I don't
> know what's going on.
>
> 2. I assume the Freescale vendor ID might be used for devices other
> than bridges, so I doubt it would be correct to overwrite the class
> for *every* Freescale device as you're doing here.
That wouldn't be the first time we need a quirk like that, it looks like
HW folks love playing with the class codes in stupid ways.
I remember once trying to change the FSP header quirk to an early quirk
and breaking something else doing so ... At some point I ran out of time
debugging that stuff and put it on my TODO list ... you know the file
you open in O_APPEND mode :-) That was a year ago or so...
So yes, something is fishy here and in need of a better fix, and at this
stage I'd say FSL folks should sort it out. These things need to be
early quirks and if that breaks something we need to know what and why.
Also we tend to have them in arch/powerpc next to the relevant driver
code... that quirks.c file is just a mess and certainly not the right
place for something like that.
Cheers,
Ben.
prev parent reply other threads:[~2013-07-26 14:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-26 7:23 [PATCH] PCI: Add quirk for setting valid class for FSL PCI host bridge Chunhe Lan
2013-07-26 13:07 ` Bjorn Helgaas
2013-07-26 13:09 ` Bjorn Helgaas
2013-07-26 14:01 ` Benjamin Herrenschmidt [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=1374847288.9200.8.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=Chunhe.Lan@freescale.com \
--cc=Minghuan.Lian@freescale.com \
--cc=avorontsov@ru.mvista.com \
--cc=bhelgaas@google.com \
--cc=galak@kernel.crashing.org \
--cc=linux-pci@vger.kernel.org \
--cc=paulus@samba.org \
/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