Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RE: [2.6.13-rc3-git4] VIA686A polymorphs into VIA586!

2 views
Skip to first unread message

Aleksey Gorelov

unread,
Jul 25, 2005, 1:10:13 PM7/25/05
to
>-----Original Message-----
>From: Giancarlo Formicuccia [mailto:giancarlo....@gmail.com]
>Sent: Saturday, July 23, 2005 3:20 AM
>To: linux-...@vger.kernel.org
>Cc: Aleksey Gorelov
>Subject: [2.6.13-rc3-git4] VIA686A polymorphs into VIA586!
>
>[Please CC me in any reply]
>
>Hi *,
>
>I'm getting many "irq routing conflict" with kernel 2.6.13-rc3-git4.
>I have a quite old k7m with a VIA vt82c686a south
>bridge; no apic, no acpi.
>
>After some digging, I found the culprit in this - apparently
>unrelated - patch:
>
>http://marc.theaimsgroup.com/?l=bk-commits-head&m=111955644929114&w=2
>
>On my system, the function via_router_probe is called
>with device==0x586 (PCI_DEVICE_ID_VIA_82C586_0).
>
>Then, I looked at these lines in function pirq_find_router:
>
> for( h = pirq_routers; h->vendor; h++) {
> /* First look for a router match */
> if (rt->rtr_vendor == h->vendor && h->probe(r,
>pirq_router_dev, rt->rtr_device))
> break;
> /* Fall back to a device match */
> if (pirq_router_dev->vendor == h->vendor &&
>h->probe(r, pirq_router_dev, pirq_router_dev->device))
> break;
> }
>
>Here, rt->rtr_device==0x586 and pirq_router_dev->device==0x686!
>There is _no_ device 0x586 on my board:
>
>00:00.0 Class 0600: 1022:7006 (rev 25)
>00:01.0 Class 0604: 1022:7007 (rev 01)
>00:04.0 Class 0601: 1106:0686 (rev 1b) <<<
>00:04.1 Class 0101: 1106:0571 (rev 06)
>00:04.2 Class 0c03: 1106:3038 (rev 0e)
>00:04.3 Class 0c03: 1106:3038 (rev 0e)
>00:04.4 Class 0c05: 1106:3057 (rev 20)
>00:04.5 Class 0401: 1106:3058 (rev 21)
>00:0f.0 Class 0200: 10ec:8029
>00:10.0 Class 0400: 109e:036e (rev 02)
>00:10.1 Class 0480: 109e:0878 (rev 02)
>01:05.0 Class 0300: 121a:0005 (rev 01)

Be irq routing table definition, rtr_vendor:rtr_device should contain
COMPATIBLE pci Interrupt Router, and rtr_bus & rtr_devfn - location of
the actual device (pirq_router_dev). So,
1. Apparently, there is a bug in the BIOS - 586 & 686 are not compatible
(different mapping)
2. Does anybody know why compatible device is probed first, and actual
one afterwards ? In other words, is swapping probes in the code above
would give more correct behavior ?

>
>
>This patch brings my board back to the correct behaviour
>[Aleksey Gorelov CC'd for review/comments/suggestions]:
>
>--- linux-2.6.13-git4/arch/i386/pci/irq.c.org 2005-07-23
>11:15:12.000000000 +0200
>+++ linux-2.6.13-git4/arch/i386/pci/irq.c 2005-07-23
>11:55:50.000000000 +0200
>@@ -553,10 +553,12 @@
> switch(device)
> {
> case PCI_DEVICE_ID_VIA_82C586_0:
>- r->name = "VIA";
>- r->get = pirq_via586_get;
>- r->set = pirq_via586_set;
>- return 1;
>+ if
>(router->device==PCI_DEVICE_ID_VIA_82C586_0) {
>+ r->name = "VIA";
>+ r->get = pirq_via586_get;
>+ r->set = pirq_via586_set;
>+ return 1;
>+ }
> case PCI_DEVICE_ID_VIA_82C596:
> case PCI_DEVICE_ID_VIA_82C686:
> case PCI_DEVICE_ID_VIA_8231:
>
Probably, comments on buggy BIOS would be nice here..

Aleks.

>
>Can someone explain me what's going on and maybe cook a better fix?
>
>Thanks,
>
>Giancarlo
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Giancarlo Formicuccia

unread,
Jul 25, 2005, 4:00:14 PM7/25/05
to
Aleksey Gorelov wrote:
> Be irq routing table definition, rtr_vendor:rtr_device should contain
> COMPATIBLE pci Interrupt Router, and rtr_bus & rtr_devfn - location of
> the actual device (pirq_router_dev). So,
> 1. Apparently, there is a bug in the BIOS - 586 & 686 are not compatible
> (different mapping)

Most likely. Unfortunately, this is the last released BIOS for this old board AFAIK.

> 2. Does anybody know why compatible device is probed first, and actual
> one afterwards ? In other words, is swapping probes in the code above
> would give more correct behavior ?
>

This of course would fix my issue too...

> >This patch brings my board back to the correct behaviour
> >[Aleksey Gorelov CC'd for review/comments/suggestions]:
> >
> >--- linux-2.6.13-git4/arch/i386/pci/irq.c.org 2005-07-23
> >11:15:12.000000000 +0200
> >+++ linux-2.6.13-git4/arch/i386/pci/irq.c 2005-07-23
> >11:55:50.000000000 +0200
> >@@ -553,10 +553,12 @@
> > switch(device)
> > {
> > case PCI_DEVICE_ID_VIA_82C586_0:
> >- r->name = "VIA";
> >- r->get = pirq_via586_get;
> >- r->set = pirq_via586_set;
> >- return 1;
> >+ if (router->device==PCI_DEVICE_ID_VIA_82C586_0) {
> >+ r->name = "VIA";
> >+ r->get = pirq_via586_get;
> >+ r->set = pirq_via586_set;
> >+ return 1;
> >+ }
> > case PCI_DEVICE_ID_VIA_82C596:
> > case PCI_DEVICE_ID_VIA_82C686:
> > case PCI_DEVICE_ID_VIA_8231:
>
> Probably, comments on buggy BIOS would be nice here..
>
> Aleks.
>

Thanks,

Giancarlo Formicuccia

unread,
Jul 26, 2005, 6:10:12 PM7/26/05
to
Aleksey Gorelov wrote:
> >This patch brings my board back to the correct behaviour
> >[Aleksey Gorelov CC'd for review/comments/suggestions]:
> >
> >--- linux-2.6.13-git4/arch/i386/pci/irq.c.org 2005-07-23
> >11:15:12.000000000 +0200
> >+++ linux-2.6.13-git4/arch/i386/pci/irq.c 2005-07-23
> >11:55:50.000000000 +0200
> >@@ -553,10 +553,12 @@
> > switch(device)
> > {
> > case PCI_DEVICE_ID_VIA_82C586_0:
> >- r->name = "VIA";
> >- r->get = pirq_via586_get;
> >- r->set = pirq_via586_set;
> >- return 1;
> >+ if (router->device==PCI_DEVICE_ID_VIA_82C586_0) {
> >+ r->name = "VIA";
> >+ r->get = pirq_via586_get;
> >+ r->set = pirq_via586_set;
> >+ return 1;
> >+ }
> > case PCI_DEVICE_ID_VIA_82C596:
> > case PCI_DEVICE_ID_VIA_82C686:
> > case PCI_DEVICE_ID_VIA_8231:
>
> Probably, comments on buggy BIOS would be nice here..
>

Does this patch look good for you?
Who's the right developer to ask for inclusion? I'd like to see this problem addressed before 2.6.13...

Thanks,
Giancarlo


--- linux-2.6.13-git4/arch/i386/pci/irq.c.org 2005-07-23 11:15:12.000000000 +0200

+++ linux-2.6.13-git4/arch/i386/pci/irq.c 2005-07-26 20:53:11.000000000 +0200
@@ -550,6 +550,13 @@
static __init int via_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
{
/* FIXME: We should move some of the quirk fixup stuff here */
+
+ if (router->device == PCI_DEVICE_ID_VIA_82C686 &&
+ device == PCI_DEVICE_ID_VIA_82C586_0) {
+ /* Asus k7m bios wrongly reports 82C686A as 586-compatible */
+ device = PCI_DEVICE_ID_VIA_82C686;
+ }
+
switch(device)
{
case PCI_DEVICE_ID_VIA_82C586_0:

Aleksey Gorelov

unread,
Jul 26, 2005, 8:50:04 PM7/26/05
to

>-----Original Message-----
>From: linux-ker...@vger.kernel.org
>[mailto:linux-ker...@vger.kernel.org] On Behalf Of
>Giancarlo Formicuccia
>Sent: Tuesday, July 26, 2005 2:09 PM
>To: Aleksey Gorelov
>Cc: linux-...@vger.kernel.org
>Subject: Re: [2.6.13-rc3-git4] VIA686A polymorphs into VIA586!
>
>Does this patch look good for you?
>Who's the right developer to ask for inclusion? I'd like to
>see this problem addressed before 2.6.13...

Yep, this is better. Please add appropriate patch description &
Signed-off-by and resend it to Greg and Andrew.

Aleks.

0 new messages