* Re: quirk_e100_interrupt() called too early
[not found] <4683A80F.5020605@semihalf.com>
@ 2007-06-28 16:01 ` Kok, Auke
2007-06-29 2:07 ` Bjorn Helgaas
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Kok, Auke @ 2007-06-28 16:01 UTC (permalink / raw)
To: Marian Balakowicz, bjorn.helgaas; +Cc: linux-pci, len.brown, NetDev
Marian Balakowicz wrote:
> I am enabling and testing PCI on tqm5200 mpc5200 based board where I
> faced the following issue.
>
> I am using EEPRO100 PCI card for which there is specific
> quirk_e100_interrupt that tries to disable interrupts if
> they were left enabled by the firmware. quirk_e100_interrupts() is
> called after PCI controller is initialized and before PCI bus
> enumeration is performed. On some powerpc platforms, like the one I am
> using, PCI controller configuration sets different MEM and IO windows
> than those set by firmware. That is why quirk_e100_interrupt() is
> causing kernel panic as it tries to read from device BAR0 offets which
> at this time point to a invalid PCI window (set by firmware).
>
> The patch below delays the quirk_100_interrupt() to pci_fixup_final
> phase, which happens after bus enumeration and before device PCI enable
> and device driver initialization - so, it seem to be still a good place
> for this quirk. It works fine for me but I only tested it on a tqm5200.
> Could someone please help and verify that on other platforms?
will try to do. This sounds indeed like the proper thing to do. Unfortunately I
don't have any NICs to repro this on (allthough I have a ppc box with said
firmware probe method).
Bjorn orignially wrote this patch, perhaps he can comment on the fixup move?
Also, please send a signed-off-by patch so I can push it forward as usual.
Cheers,
Auke
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index 01d8f8a..7194074 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -1475,7 +1475,7 @@ static void __devinit quirk_e100_interru
>
> iounmap(csr);
> }
> -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_ANY_ID,
> quirk_e100_interrupt);
> +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID,
> quirk_e100_interrupt);
>
> static void __devinit fixup_rev1_53c810(struct pci_dev* dev)
> {
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: quirk_e100_interrupt() called too early
2007-06-28 16:01 ` quirk_e100_interrupt() called too early Kok, Auke
@ 2007-06-29 2:07 ` Bjorn Helgaas
2007-07-02 8:07 ` Nils Rennebarth
2007-07-03 9:00 ` Marian Balakowicz
2007-07-03 9:03 ` [PATCH] PCI: " Marian Balakowicz
2 siblings, 1 reply; 8+ messages in thread
From: Bjorn Helgaas @ 2007-06-29 2:07 UTC (permalink / raw)
To: Kok, Auke, nils.rennebarth
Cc: Marian Balakowicz, linux-pci, len.brown, NetDev
On Thursday 28 June 2007 10:01:08 am Kok, Auke wrote:
> Marian Balakowicz wrote:
> > I am enabling and testing PCI on tqm5200 mpc5200 based board where I
> > faced the following issue.
> >
> > I am using EEPRO100 PCI card for which there is specific
> > quirk_e100_interrupt that tries to disable interrupts if
> > they were left enabled by the firmware. quirk_e100_interrupts() is
> > called after PCI controller is initialized and before PCI bus
> > enumeration is performed. On some powerpc platforms, like the one I am
> > using, PCI controller configuration sets different MEM and IO windows
> > than those set by firmware. That is why quirk_e100_interrupt() is
> > causing kernel panic as it tries to read from device BAR0 offets which
> > at this time point to a invalid PCI window (set by firmware).
> >
> > The patch below delays the quirk_100_interrupt() to pci_fixup_final
> > phase, which happens after bus enumeration and before device PCI enable
> > and device driver initialization - so, it seem to be still a good place
> > for this quirk. It works fine for me but I only tested it on a tqm5200.
> > Could someone please help and verify that on other platforms?
>
> will try to do. This sounds indeed like the proper thing to do. Unfortunately I
> don't have any NICs to repro this on (allthough I have a ppc box with said
> firmware probe method).
>
> Bjorn orignially wrote this patch, perhaps he can comment on the fixup move?
Your patch looks reasonable to me.
I don't have a machine that exhibits the original problem, so
I can't actually test this patch either. As long as the fixup
happens before any PCI drivers claim devices, I think it should
be fine.
I copied Nils Rennebarth, who originally reported the bug:
http://bugzilla.kernel.org/show_bug.cgi?id=5918
in case he can test your patch.
> > diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> > index 01d8f8a..7194074 100644
> > --- a/drivers/pci/quirks.c
> > +++ b/drivers/pci/quirks.c
> > @@ -1475,7 +1475,7 @@ static void __devinit quirk_e100_interru
> >
> > iounmap(csr);
> > }
> > -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_ANY_ID,
> > quirk_e100_interrupt);
> > +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID,
> > quirk_e100_interrupt);
> >
> > static void __devinit fixup_rev1_53c810(struct pci_dev* dev)
> > {
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: quirk_e100_interrupt() called too early
2007-06-29 2:07 ` Bjorn Helgaas
@ 2007-07-02 8:07 ` Nils Rennebarth
2007-07-02 19:03 ` Kok, Auke
0 siblings, 1 reply; 8+ messages in thread
From: Nils Rennebarth @ 2007-07-02 8:07 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Kok, Auke, Marian Balakowicz, linux-pci@atrey.karlin.mff.cuni.cz,
len.brown@intel.com, NetDev
Bjorn Helgaas wrote:
> On Thursday 28 June 2007 10:01:08 am Kok, Auke wrote:
> I copied Nils Rennebarth, who originally reported the bug:
> http://bugzilla.kernel.org/show_bug.cgi?id=5918
> in case he can test your patch.
Most of the embedded boards we now work with appear to exhibit the same
behaviour: During boot the
Firmware left 0000:01:05.0 e100 interrupts enabled, disabling
message appears for all four e100 nics. (The mainboard is a em-8510A
btw.) When I have time I could try if the quirk still works with the
mentioned patch, but I am quite busy with other things at the moment.
--
Mit freundlichen Grüßen / with kind regards
Nils Rennebarth, Software Developer
--
Funkwerk IP-Appliances GmbH
Mönchhaldenstraße 28
D-70191 Stuttgart
Tel: +49 711 900300 - 0
Fax: +49 711 900300 - 90
E-Mail: Nils.Rennebarth@funkwerk-ec.com
Location: GmbH Neu-Ulm, Local Court Memmingen, HRB 13043
Managing Directors: Michael Marsanu, Soenke Weisner
--------------------------------
The information contained in this e-mail has been carefully researched,
but the possibility of it being inapplicable in individual cases cannot
be ruled out. We therefore regret that we cannot accept responsibility
or liability of any kind whatsoever for the correctness of the
information given. Please notify us if you discover that information is
inapplicable.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: quirk_e100_interrupt() called too early
2007-07-02 8:07 ` Nils Rennebarth
@ 2007-07-02 19:03 ` Kok, Auke
0 siblings, 0 replies; 8+ messages in thread
From: Kok, Auke @ 2007-07-02 19:03 UTC (permalink / raw)
To: Nils Rennebarth
Cc: Bjorn Helgaas, Kok, Auke, Marian Balakowicz,
linux-pci@atrey.karlin.mff.cuni.cz, len.brown@intel.com, NetDev
Nils Rennebarth wrote:
> Bjorn Helgaas wrote:
>> On Thursday 28 June 2007 10:01:08 am Kok, Auke wrote:
>> I copied Nils Rennebarth, who originally reported the bug:
>> http://bugzilla.kernel.org/show_bug.cgi?id=5918
>> in case he can test your patch.
>
> Most of the embedded boards we now work with appear to exhibit the same
> behaviour: During boot the
>
> Firmware left 0000:01:05.0 e100 interrupts enabled, disabling
>
> message appears for all four e100 nics. (The mainboard is a em-8510A
> btw.) When I have time I could try if the quirk still works with the
> mentioned patch, but I am quite busy with other things at the moment.
well, we're too late for 2.6.22 I think so you have some time. However I'd like
to make sure we can get this in with 2.6.23. Alternatively, someone could always
send me one of these boards ;)
Thanks for taking the time to test
Auke
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: quirk_e100_interrupt() called too early
2007-06-28 16:01 ` quirk_e100_interrupt() called too early Kok, Auke
2007-06-29 2:07 ` Bjorn Helgaas
@ 2007-07-03 9:00 ` Marian Balakowicz
2007-07-03 9:03 ` [PATCH] PCI: " Marian Balakowicz
2 siblings, 0 replies; 8+ messages in thread
From: Marian Balakowicz @ 2007-07-03 9:00 UTC (permalink / raw)
To: Kok, Auke; +Cc: bjorn.helgaas, linux-pci, len.brown, NetDev
Kok, Auke wrote:
> Marian Balakowicz wrote:
>> The patch below delays the quirk_100_interrupt() to pci_fixup_final
>> phase, which happens after bus enumeration and before device PCI enable
>> and device driver initialization - so, it seem to be still a good place
>> for this quirk. It works fine for me but I only tested it on a tqm5200.
>> Could someone please help and verify that on other platforms?
>
> will try to do. This sounds indeed like the proper thing to do. Unfortunately I
> don't have any NICs to repro this on (allthough I have a ppc box with said
> firmware probe method).
>
> Bjorn orignially wrote this patch, perhaps he can comment on the fixup move?
>
> Also, please send a signed-off-by patch so I can push it forward as usual.
Sure, will do that, just wanted someone to have a look at it in the first place.
Best Regards,
Marian
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] PCI: quirk_e100_interrupt() called too early
2007-06-28 16:01 ` quirk_e100_interrupt() called too early Kok, Auke
2007-06-29 2:07 ` Bjorn Helgaas
2007-07-03 9:00 ` Marian Balakowicz
@ 2007-07-03 9:03 ` Marian Balakowicz
2007-07-17 17:21 ` patch pci-quirk_e100_interrupt-called-too-early.patch added to gregkh-2.6 tree gregkh
2 siblings, 1 reply; 8+ messages in thread
From: Marian Balakowicz @ 2007-07-03 9:03 UTC (permalink / raw)
To: Kok, Auke; +Cc: bjorn.helgaas, linux-pci, len.brown, NetDev
quirk_e100_interrupts() is called after PCI controller is initialized
and before PCI bus enumeration is performed. On some powerpc platforms
which modify PCI controller configuration and set different MEM and IO
windows than those set by firmware quirk_e100_interrupt() is causing
kernel panic as it tries to read from device BAR0 offets which at this
time points to a invalid PCI window (set by firmware).
This patch delays the quirk_100_interrupt() to pci_fixup_final phase,
which happens after bus enumeration and before PCI enable and
device driver initialization.
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
---
drivers/pci/quirks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 01d8f8a..7194074 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1475,7 +1475,7 @@ static void __devinit quirk_e100_interru
iounmap(csr);
}
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_e100_interrupt);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_e100_interrupt);
static void __devinit fixup_rev1_53c810(struct pci_dev* dev)
{
^ permalink raw reply related [flat|nested] 8+ messages in thread
* patch pci-quirk_e100_interrupt-called-too-early.patch added to gregkh-2.6 tree
2007-07-03 9:03 ` [PATCH] PCI: " Marian Balakowicz
@ 2007-07-17 17:21 ` gregkh
2007-07-17 17:26 ` Kok, Auke
0 siblings, 1 reply; 8+ messages in thread
From: gregkh @ 2007-07-17 17:21 UTC (permalink / raw)
To: m8, auke-jan.h.kok, gregkh, netdev
This is a note to let you know that I've just added the patch titled
Subject: [PATCH] PCI: quirk_e100_interrupt() called too early
to my gregkh-2.6 tree. Its filename is
pci-quirk_e100_interrupt-called-too-early.patch
This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/
>From owner-linux-pci@atrey.karlin.mff.cuni.cz Tue Jul 3 02:03:55 2007
From: Marian Balakowicz <m8@semihalf.com>
Date: Tue, 03 Jul 2007 11:03:18 +0200
Subject: [PATCH] PCI: quirk_e100_interrupt() called too early
To: "Kok, Auke" <auke-jan.h.kok@intel.com>
Cc: bjorn.helgaas@hp.com, linux-pci@atrey.karlin.mff.cuni.cz, len.brown@intel.com, NetDev <netdev@vger.kernel.org>
Message-ID: <468A10D6.2020900@semihalf.com>
quirk_e100_interrupts() is called after PCI controller is initialized
and before PCI bus enumeration is performed. On some powerpc platforms
which modify PCI controller configuration and set different MEM and IO
windows than those set by firmware quirk_e100_interrupt() is causing
kernel panic as it tries to read from device BAR0 offets which at this
time points to a invalid PCI window (set by firmware).
This patch delays the quirk_100_interrupt() to pci_fixup_final phase,
which happens after bus enumeration and before PCI enable and
device driver initialization.
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/pci/quirks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1485,7 +1485,7 @@ static void __devinit quirk_e100_interru
iounmap(csr);
}
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_e100_interrupt);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_e100_interrupt);
static void __devinit fixup_rev1_53c810(struct pci_dev* dev)
{
Patches currently in gregkh-2.6 which might be from m8@semihalf.com are
pci/pci-quirk_e100_interrupt-called-too-early.patch
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: patch pci-quirk_e100_interrupt-called-too-early.patch added to gregkh-2.6 tree
2007-07-17 17:21 ` patch pci-quirk_e100_interrupt-called-too-early.patch added to gregkh-2.6 tree gregkh
@ 2007-07-17 17:26 ` Kok, Auke
0 siblings, 0 replies; 8+ messages in thread
From: Kok, Auke @ 2007-07-17 17:26 UTC (permalink / raw)
To: gregkh; +Cc: m8, netdev
gregkh@suse.de wrote:
> This is a note to let you know that I've just added the patch titled
>
> Subject: [PATCH] PCI: quirk_e100_interrupt() called too early
>
> to my gregkh-2.6 tree. Its filename is
>
> pci-quirk_e100_interrupt-called-too-early.patch
>
> This tree can be found at
> http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/
>
>
> From owner-linux-pci@atrey.karlin.mff.cuni.cz Tue Jul 3 02:03:55 2007
> From: Marian Balakowicz <m8@semihalf.com>
> Date: Tue, 03 Jul 2007 11:03:18 +0200
> Subject: [PATCH] PCI: quirk_e100_interrupt() called too early
> To: "Kok, Auke" <auke-jan.h.kok@intel.com>
> Cc: bjorn.helgaas@hp.com, linux-pci@atrey.karlin.mff.cuni.cz, len.brown@intel.com, NetDev <netdev@vger.kernel.org>
> Message-ID: <468A10D6.2020900@semihalf.com>
>
>
> quirk_e100_interrupts() is called after PCI controller is initialized
> and before PCI bus enumeration is performed. On some powerpc platforms
> which modify PCI controller configuration and set different MEM and IO
> windows than those set by firmware quirk_e100_interrupt() is causing
> kernel panic as it tries to read from device BAR0 offets which at this
> time points to a invalid PCI window (set by firmware).
>
> This patch delays the quirk_100_interrupt() to pci_fixup_final phase,
> which happens after bus enumeration and before PCI enable and
> device driver initialization.
>
> Signed-off-by: Marian Balakowicz <m8@semihalf.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
>
> ---
> drivers/pci/quirks.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -1485,7 +1485,7 @@ static void __devinit quirk_e100_interru
>
> iounmap(csr);
> }
> -DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_e100_interrupt);
> +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_e100_interrupt);
>
> static void __devinit fixup_rev1_53c810(struct pci_dev* dev)
> {
>
>
> Patches currently in gregkh-2.6 which might be from m8@semihalf.com are
>
> pci/pci-quirk_e100_interrupt-called-too-early.patch
Yes, that's OK. Please note that I asked the person who originally reported the
problem to make sure that this patch doesn't break anything, but he was still
too busy to test until now.
I assume (from what I know of the PCI subsystem now) that this is a safe patch,
so feel free to add:
Acked-by: Auke Kok <auke-jan.h.kok@intel.com>
Cheers,
Auke
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-07-17 17:26 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <4683A80F.5020605@semihalf.com>
2007-06-28 16:01 ` quirk_e100_interrupt() called too early Kok, Auke
2007-06-29 2:07 ` Bjorn Helgaas
2007-07-02 8:07 ` Nils Rennebarth
2007-07-02 19:03 ` Kok, Auke
2007-07-03 9:00 ` Marian Balakowicz
2007-07-03 9:03 ` [PATCH] PCI: " Marian Balakowicz
2007-07-17 17:21 ` patch pci-quirk_e100_interrupt-called-too-early.patch added to gregkh-2.6 tree gregkh
2007-07-17 17:26 ` Kok, Auke
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).