* PATCH - via_agp.c: VP3 souldn't work / "Detected VIA %s chipset" fails (kernel 2.6.7)
@ 2004-06-16 15:32 Carsten Rietzschel
2004-06-16 16:34 ` Dave Jones
0 siblings, 1 reply; 2+ messages in thread
From: Carsten Rietzschel @ 2004-06-16 15:32 UTC (permalink / raw)
To: davej; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 788 bytes --]
Hello,
the AGP-driver should not work for Apollo VP3, cause it's not listed in
struct pci_device_id list in the fresh kernel 2.6.7.
So it also displays "Detected VIA %s chipset" wrong for every VIA chipset.
The reason for both is, in
static struct pci_device_id agp_via_pci_table[]
the line
ID(PCI_DEVICE_ID_VIA_82C597_0),
is missing.
The source code has an comment:
/* must be the same order as name table above */
but it doesn't match.
The attached patch:
- adds ID(PCI_DEVICE_ID_VIA_82C597_0) to pci_device_id agp_via_pci_table[]
- it compares the correct number of entries in both tables in init-function
(agp_via_pci_table vs. via_agp_device_ids), if it doesn't match in prints a
warning
<--- this is not neccessary, but just to be sure :)
Regards,
Carsten
[-- Attachment #2: via-agp-verbose.patch --]
[-- Type: text/x-diff, Size: 1414 bytes --]
diff -uprN linux-2.6.7-org/drivers/char/agp/via-agp.c linux-2.6.7/drivers/char/agp/via-agp.c
--- linux-2.6.7-org/drivers/char/agp/via-agp.c 2004-06-16 13:26:03.000000000 +0200
+++ linux-2.6.7/drivers/char/agp/via-agp.c 2004-06-16 17:10:47.000000000 +0200
@@ -351,6 +351,7 @@ static struct agp_device_ids via_agp_dev
{ }, /* dummy final entry, always present */
};
+#define AGP_VIA_DEVICE_ELEMENTS (sizeof(via_agp_device_ids)/sizeof(via_agp_device_ids[0]))
/*
@@ -434,6 +435,7 @@ static struct pci_device_id agp_via_pci_
.subvendor = PCI_ANY_ID, \
.subdevice = PCI_ANY_ID, \
}
+ ID(PCI_DEVICE_ID_VIA_82C597_0),
ID(PCI_DEVICE_ID_VIA_82C598_0),
ID(PCI_DEVICE_ID_VIA_8501_0),
ID(PCI_DEVICE_ID_VIA_8601_0),
@@ -459,10 +461,12 @@ static struct pci_device_id agp_via_pci_
ID(PCI_DEVICE_ID_VIA_PX8X0_0),
{ }
};
+#define AGP_VIA_PCI_ELEMENTS (sizeof(agp_via_pci_table)/sizeof(agp_via_pci_table[0]))
MODULE_DEVICE_TABLE(pci, agp_via_pci_table);
+
static struct pci_driver agp_via_pci_driver = {
.name = "agpgart-via",
.id_table = agp_via_pci_table,
@@ -473,6 +477,8 @@ static struct pci_driver agp_via_pci_dri
static int __init agp_via_init(void)
{
+ if(AGP_VIA_DEVICE_ELEMENTS != AGP_VIA_PCI_ELEMENTS)
+ printk (KERN_INFO PFX "Warning: sizeof device and pci elements don't match. Please send a bug report.\n");
return pci_module_init(&agp_via_pci_driver);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PATCH - via_agp.c: VP3 souldn't work / "Detected VIA %s chipset" fails (kernel 2.6.7)
2004-06-16 15:32 PATCH - via_agp.c: VP3 souldn't work / "Detected VIA %s chipset" fails (kernel 2.6.7) Carsten Rietzschel
@ 2004-06-16 16:34 ` Dave Jones
0 siblings, 0 replies; 2+ messages in thread
From: Dave Jones @ 2004-06-16 16:34 UTC (permalink / raw)
To: Carsten Rietzschel; +Cc: linux-kernel
On Wed, Jun 16, 2004 at 05:32:23PM +0200, Carsten Rietzschel wrote:
> The attached patch:
> - adds ID(PCI_DEVICE_ID_VIA_82C597_0) to pci_device_id agp_via_pci_table[]
Applied, thanks.
> - it compares the correct number of entries in both tables in init-function
> (agp_via_pci_table vs. via_agp_device_ids), if it doesn't match in prints a
> warning
> <--- this is not neccessary, but just to be sure :)
I didn't like this bit, so dropped.
Thanks again.
Dave
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-06-16 16:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-16 15:32 PATCH - via_agp.c: VP3 souldn't work / "Detected VIA %s chipset" fails (kernel 2.6.7) Carsten Rietzschel
2004-06-16 16:34 ` Dave Jones
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.