* [PATCH 2.6.11-rc3-bk4] arch/i386/kernel/pci/irq.c: Wrong message output
@ 2005-02-08 5:06 Mark F. Haigh
2005-02-08 5:34 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Mark F. Haigh @ 2005-02-08 5:06 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 725 bytes --]
(Same basic problem I just reported in a seperate thread against 2.4.29-bk8)
The following has been reported in the wild for kernel 2.6.8-24:
PCI: Enabling device 0000:00:05.0 (0000 -> 0002)
PCI: No IRQ known for interrupt pin @ of device 0000:00:05.0. Probably
buggy MP table.
It should read "No IRQ known for interrupt pin A", but the 'pin'
variable has already been decremented (from 1 to 0), so the line:
printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of device
%s.%s\n", 'A' + pin - 1, dev->slot_name, msg);
causes "pin @" to be output, because 'A' + 0 - 1 == '@'.
The supplied patch should fix it. It also removes a redundant check for
a nonzero pin.
Mark F. Haigh
Mark.Haigh@spirentcom.com
[-- Attachment #2: pci-irq-patch --]
[-- Type: text/plain, Size: 3338 bytes --]
--- arch/i386/pci/irq.c.orig 2005-02-07 20:40:58.140856536 -0800
+++ arch/i386/pci/irq.c 2005-02-07 20:46:06.713946296 -0800
@@ -1031,56 +1031,55 @@
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
if (pin && !pcibios_lookup_irq(dev, 1) && !dev->irq) {
- char *msg;
- msg = "";
+ char *msg = "";
+
+ pin--; /* interrupt pins are numbered starting from 1 */
+
if (io_apic_assign_pci_irqs) {
int irq;
- if (pin) {
- pin--; /* interrupt pins are numbered starting from 1 */
- irq = IO_APIC_get_PCI_irq_vector(dev->bus->number, PCI_SLOT(dev->devfn), pin);
- /*
- * Busses behind bridges are typically not listed in the MP-table.
- * In this case we have to look up the IRQ based on the parent bus,
- * parent slot, and pin number. The SMP code detects such bridged
- * busses itself so we should get into this branch reliably.
- */
- temp_dev = dev;
- while (irq < 0 && dev->bus->parent) { /* go back to the bridge */
- struct pci_dev * bridge = dev->bus->self;
-
- pin = (pin + PCI_SLOT(dev->devfn)) % 4;
- irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number,
- PCI_SLOT(bridge->devfn), pin);
- if (irq >= 0)
- printk(KERN_WARNING "PCI: using PPB %s[%c] to get irq %d\n",
- pci_name(bridge), 'A' + pin, irq);
- dev = bridge;
- }
- dev = temp_dev;
- if (irq >= 0) {
+ irq = IO_APIC_get_PCI_irq_vector(dev->bus->number, PCI_SLOT(dev->devfn), pin);
+ /*
+ * Busses behind bridges are typically not listed in the MP-table.
+ * In this case we have to look up the IRQ based on the parent bus,
+ * parent slot, and pin number. The SMP code detects such bridged
+ * busses itself so we should get into this branch reliably.
+ */
+ temp_dev = dev;
+ while (irq < 0 && dev->bus->parent) { /* go back to the bridge */
+ struct pci_dev * bridge = dev->bus->self;
+
+ pin = (pin + PCI_SLOT(dev->devfn)) % 4;
+ irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number,
+ PCI_SLOT(bridge->devfn), pin);
+ if (irq >= 0)
+ printk(KERN_WARNING "PCI: using PPB %s[%c] to get irq %d\n",
+ pci_name(bridge), 'A' + pin, irq);
+ dev = bridge;
+ }
+ dev = temp_dev;
+ if (irq >= 0) {
#ifdef CONFIG_PCI_MSI
- if (!platform_legacy_irq(irq))
- irq = IO_APIC_VECTOR(irq);
+ if (!platform_legacy_irq(irq))
+ irq = IO_APIC_VECTOR(irq);
#endif
- printk(KERN_INFO "PCI->APIC IRQ transform: %s[%c] -> IRQ %d\n",
- pci_name(dev), 'A' + pin, irq);
- dev->irq = irq;
- return 0;
- } else
- msg = " Probably buggy MP table.";
- }
+ printk(KERN_INFO "PCI->APIC IRQ transform: %s[%c] -> IRQ %d\n",
+ pci_name(dev), 'A' + pin, irq);
+ dev->irq = irq;
+ return 0;
+ } else
+ msg = " Probably buggy MP table.";
} else if (pci_probe & PCI_BIOS_IRQ_SCAN)
msg = "";
else
msg = " Please try using pci=biosirq.";
-
+
/* With IDE legacy devices the IRQ lookup failure is not a problem.. */
if (dev->class >> 8 == PCI_CLASS_STORAGE_IDE && !(dev->class & 0x5))
return 0;
-
+
printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of device %s.%s\n",
- 'A' + pin - 1, pci_name(dev), msg);
+ 'A' + pin, pci_name(dev), msg);
}
/* VIA bridges use interrupt line for apic/pci steering across
the V-Link */
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2.6.11-rc3-bk4] arch/i386/kernel/pci/irq.c: Wrong message output
2005-02-08 5:06 [PATCH 2.6.11-rc3-bk4] arch/i386/kernel/pci/irq.c: Wrong message output Mark F. Haigh
@ 2005-02-08 5:34 ` Greg KH
2005-02-08 5:42 ` Mark F. Haigh
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2005-02-08 5:34 UTC (permalink / raw)
To: Mark F. Haigh; +Cc: linux-kernel
On Mon, Feb 07, 2005 at 09:06:18PM -0800, Mark F. Haigh wrote:
>
> (Same basic problem I just reported in a seperate thread against 2.4.29-bk8)
>
> The following has been reported in the wild for kernel 2.6.8-24:
>
> PCI: Enabling device 0000:00:05.0 (0000 -> 0002)
> PCI: No IRQ known for interrupt pin @ of device 0000:00:05.0. Probably
> buggy MP table.
>
> It should read "No IRQ known for interrupt pin A", but the 'pin'
> variable has already been decremented (from 1 to 0), so the line:
>
> printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of device
> %s.%s\n", 'A' + pin - 1, dev->slot_name, msg);
>
> causes "pin @" to be output, because 'A' + 0 - 1 == '@'.
>
> The supplied patch should fix it. It also removes a redundant check for
> a nonzero pin.
>
>
> Mark F. Haigh
> Mark.Haigh@spirentcom.com
>
> --- arch/i386/pci/irq.c.orig 2005-02-07 20:40:58.140856536 -0800
> +++ arch/i386/pci/irq.c 2005-02-07 20:46:06.713946296 -0800
Can you resend this so it can be applied with -p1 to patch, and a
Signed-off-by: line?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2.6.11-rc3-bk4] arch/i386/kernel/pci/irq.c: Wrong message output
2005-02-08 5:34 ` Greg KH
@ 2005-02-08 5:42 ` Mark F. Haigh
2005-02-08 5:52 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Mark F. Haigh @ 2005-02-08 5:42 UTC (permalink / raw)
To: Greg KH; +Cc: Haigh, Mark, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 444 bytes --]
Greg KH wrote:
> On Mon, Feb 07, 2005 at 09:06:18PM -0800, Mark F. Haigh wrote:
<snip>
> > --- arch/i386/pci/irq.c.orig 2005-02-07 20:40:58.140856536 -0800
> > +++ arch/i386/pci/irq.c 2005-02-07 20:46:06.713946296 -0800
>
> Can you resend this so it can be applied with -p1 to patch, and a
> Signed-off-by: line?
>
Ack, my fault.
Mark F. Haigh
Mark.Haigh@spirentcom.com
Signed-off-by: Mark F. Haigh <Mark.Haigh@spirentcom.com>
[-- Attachment #2: pci-irq-patch2 --]
[-- Type: text/plain, Size: 3380 bytes --]
--- linux-2.6.11-rc3-bk4/arch/i386/pci/irq.c.orig 2005-02-07 20:40:58.000000000 -0800
+++ linux-2.6.11-rc3-bk4/arch/i386/pci/irq.c 2005-02-07 20:46:06.000000000 -0800
@@ -1031,56 +1031,55 @@
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
if (pin && !pcibios_lookup_irq(dev, 1) && !dev->irq) {
- char *msg;
- msg = "";
+ char *msg = "";
+
+ pin--; /* interrupt pins are numbered starting from 1 */
+
if (io_apic_assign_pci_irqs) {
int irq;
- if (pin) {
- pin--; /* interrupt pins are numbered starting from 1 */
- irq = IO_APIC_get_PCI_irq_vector(dev->bus->number, PCI_SLOT(dev->devfn), pin);
- /*
- * Busses behind bridges are typically not listed in the MP-table.
- * In this case we have to look up the IRQ based on the parent bus,
- * parent slot, and pin number. The SMP code detects such bridged
- * busses itself so we should get into this branch reliably.
- */
- temp_dev = dev;
- while (irq < 0 && dev->bus->parent) { /* go back to the bridge */
- struct pci_dev * bridge = dev->bus->self;
-
- pin = (pin + PCI_SLOT(dev->devfn)) % 4;
- irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number,
- PCI_SLOT(bridge->devfn), pin);
- if (irq >= 0)
- printk(KERN_WARNING "PCI: using PPB %s[%c] to get irq %d\n",
- pci_name(bridge), 'A' + pin, irq);
- dev = bridge;
- }
- dev = temp_dev;
- if (irq >= 0) {
+ irq = IO_APIC_get_PCI_irq_vector(dev->bus->number, PCI_SLOT(dev->devfn), pin);
+ /*
+ * Busses behind bridges are typically not listed in the MP-table.
+ * In this case we have to look up the IRQ based on the parent bus,
+ * parent slot, and pin number. The SMP code detects such bridged
+ * busses itself so we should get into this branch reliably.
+ */
+ temp_dev = dev;
+ while (irq < 0 && dev->bus->parent) { /* go back to the bridge */
+ struct pci_dev * bridge = dev->bus->self;
+
+ pin = (pin + PCI_SLOT(dev->devfn)) % 4;
+ irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number,
+ PCI_SLOT(bridge->devfn), pin);
+ if (irq >= 0)
+ printk(KERN_WARNING "PCI: using PPB %s[%c] to get irq %d\n",
+ pci_name(bridge), 'A' + pin, irq);
+ dev = bridge;
+ }
+ dev = temp_dev;
+ if (irq >= 0) {
#ifdef CONFIG_PCI_MSI
- if (!platform_legacy_irq(irq))
- irq = IO_APIC_VECTOR(irq);
+ if (!platform_legacy_irq(irq))
+ irq = IO_APIC_VECTOR(irq);
#endif
- printk(KERN_INFO "PCI->APIC IRQ transform: %s[%c] -> IRQ %d\n",
- pci_name(dev), 'A' + pin, irq);
- dev->irq = irq;
- return 0;
- } else
- msg = " Probably buggy MP table.";
- }
+ printk(KERN_INFO "PCI->APIC IRQ transform: %s[%c] -> IRQ %d\n",
+ pci_name(dev), 'A' + pin, irq);
+ dev->irq = irq;
+ return 0;
+ } else
+ msg = " Probably buggy MP table.";
} else if (pci_probe & PCI_BIOS_IRQ_SCAN)
msg = "";
else
msg = " Please try using pci=biosirq.";
-
+
/* With IDE legacy devices the IRQ lookup failure is not a problem.. */
if (dev->class >> 8 == PCI_CLASS_STORAGE_IDE && !(dev->class & 0x5))
return 0;
-
+
printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of device %s.%s\n",
- 'A' + pin - 1, pci_name(dev), msg);
+ 'A' + pin, pci_name(dev), msg);
}
/* VIA bridges use interrupt line for apic/pci steering across
the V-Link */
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2.6.11-rc3-bk4] arch/i386/kernel/pci/irq.c: Wrong message output
2005-02-08 5:42 ` Mark F. Haigh
@ 2005-02-08 5:52 ` Greg KH
2005-02-08 6:07 ` Mark F. Haigh
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2005-02-08 5:52 UTC (permalink / raw)
To: Mark F. Haigh; +Cc: Haigh, Mark, linux-kernel
On Mon, Feb 07, 2005 at 09:42:02PM -0800, Mark F. Haigh wrote:
> Greg KH wrote:
> >On Mon, Feb 07, 2005 at 09:06:18PM -0800, Mark F. Haigh wrote:
> <snip>
> > > --- arch/i386/pci/irq.c.orig 2005-02-07 20:40:58.140856536 -0800
> > > +++ arch/i386/pci/irq.c 2005-02-07 20:46:06.713946296 -0800
> >
> >Can you resend this so it can be applied with -p1 to patch, and a
> >Signed-off-by: line?
> >
>
> Ack, my fault.
>
> Mark F. Haigh
> Mark.Haigh@spirentcom.com
>
>
> Signed-off-by: Mark F. Haigh <Mark.Haigh@spirentcom.com>
Oops, this time you forgot the whole description of the patch :(
Third time's the charm...
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2.6.11-rc3-bk4] arch/i386/kernel/pci/irq.c: Wrong message output
2005-02-08 5:52 ` Greg KH
@ 2005-02-08 6:07 ` Mark F. Haigh
0 siblings, 0 replies; 5+ messages in thread
From: Mark F. Haigh @ 2005-02-08 6:07 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 829 bytes --]
Greg KH wrote:
<snip>
>
> Oops, this time you forgot the whole description of the patch :(
>
> Third time's the charm...
The following has been reported in the wild for kernel 2.6.8-24:
PCI: Enabling device 0000:00:05.0 (0000 -> 0002)
PCI: No IRQ known for interrupt pin @ of device 0000:00:05.0. Probably
buggy MP table.
It should read "No IRQ known for interrupt pin A", but the 'pin'
variable has already been decremented (from 1 to 0), so the line:
printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of device
%s.%s\n", 'A' + pin - 1, dev->slot_name, msg);
causes "pin @" to be output, because 'A' + 0 - 1 == '@'.
The supplied patch should fix it. It also removes a redundant check for
a nonzero pin.
Mark F. Haigh
Mark.Haigh@spirentcom.com
Signed-off-by: Mark F. Haigh <Mark.Haigh@spirentcom.com>
[-- Attachment #2: pci-irq-patch3 --]
[-- Type: text/plain, Size: 3380 bytes --]
--- linux-2.6.11-rc3-bk4/arch/i386/pci/irq.c.orig 2005-02-07 20:40:58.000000000 -0800
+++ linux-2.6.11-rc3-bk4/arch/i386/pci/irq.c 2005-02-07 21:39:15.091239272 -0800
@@ -1031,56 +1031,55 @@
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
if (pin && !pcibios_lookup_irq(dev, 1) && !dev->irq) {
- char *msg;
- msg = "";
+ char *msg = "";
+
+ pin--; /* interrupt pins are numbered starting from 1 */
+
if (io_apic_assign_pci_irqs) {
int irq;
- if (pin) {
- pin--; /* interrupt pins are numbered starting from 1 */
- irq = IO_APIC_get_PCI_irq_vector(dev->bus->number, PCI_SLOT(dev->devfn), pin);
- /*
- * Busses behind bridges are typically not listed in the MP-table.
- * In this case we have to look up the IRQ based on the parent bus,
- * parent slot, and pin number. The SMP code detects such bridged
- * busses itself so we should get into this branch reliably.
- */
- temp_dev = dev;
- while (irq < 0 && dev->bus->parent) { /* go back to the bridge */
- struct pci_dev * bridge = dev->bus->self;
-
- pin = (pin + PCI_SLOT(dev->devfn)) % 4;
- irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number,
- PCI_SLOT(bridge->devfn), pin);
- if (irq >= 0)
- printk(KERN_WARNING "PCI: using PPB %s[%c] to get irq %d\n",
- pci_name(bridge), 'A' + pin, irq);
- dev = bridge;
- }
- dev = temp_dev;
- if (irq >= 0) {
+ irq = IO_APIC_get_PCI_irq_vector(dev->bus->number, PCI_SLOT(dev->devfn), pin);
+ /*
+ * Busses behind bridges are typically not listed in the MP-table.
+ * In this case we have to look up the IRQ based on the parent bus,
+ * parent slot, and pin number. The SMP code detects such bridged
+ * busses itself so we should get into this branch reliably.
+ */
+ temp_dev = dev;
+ while (irq < 0 && dev->bus->parent) { /* go back to the bridge */
+ struct pci_dev * bridge = dev->bus->self;
+
+ pin = (pin + PCI_SLOT(dev->devfn)) % 4;
+ irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number,
+ PCI_SLOT(bridge->devfn), pin);
+ if (irq >= 0)
+ printk(KERN_WARNING "PCI: using PPB %s[%c] to get irq %d\n",
+ pci_name(bridge), 'A' + pin, irq);
+ dev = bridge;
+ }
+ dev = temp_dev;
+ if (irq >= 0) {
#ifdef CONFIG_PCI_MSI
- if (!platform_legacy_irq(irq))
- irq = IO_APIC_VECTOR(irq);
+ if (!platform_legacy_irq(irq))
+ irq = IO_APIC_VECTOR(irq);
#endif
- printk(KERN_INFO "PCI->APIC IRQ transform: %s[%c] -> IRQ %d\n",
- pci_name(dev), 'A' + pin, irq);
- dev->irq = irq;
- return 0;
- } else
- msg = " Probably buggy MP table.";
- }
+ printk(KERN_INFO "PCI->APIC IRQ transform: %s[%c] -> IRQ %d\n",
+ pci_name(dev), 'A' + pin, irq);
+ dev->irq = irq;
+ return 0;
+ } else
+ msg = " Probably buggy MP table.";
} else if (pci_probe & PCI_BIOS_IRQ_SCAN)
msg = "";
else
msg = " Please try using pci=biosirq.";
-
+
/* With IDE legacy devices the IRQ lookup failure is not a problem.. */
if (dev->class >> 8 == PCI_CLASS_STORAGE_IDE && !(dev->class & 0x5))
return 0;
-
+
printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of device %s.%s\n",
- 'A' + pin - 1, pci_name(dev), msg);
+ 'A' + pin, pci_name(dev), msg);
}
/* VIA bridges use interrupt line for apic/pci steering across
the V-Link */
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-02-08 6:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-08 5:06 [PATCH 2.6.11-rc3-bk4] arch/i386/kernel/pci/irq.c: Wrong message output Mark F. Haigh
2005-02-08 5:34 ` Greg KH
2005-02-08 5:42 ` Mark F. Haigh
2005-02-08 5:52 ` Greg KH
2005-02-08 6:07 ` Mark F. Haigh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox