Skip to contentSkip to conversation

Bad PCI IDs-Names table in 3c59x.c

PATCH J.A. Magallon 3 participants 6 messages Mar 29, 2003 – Mar 31, 2003 Network drivers

lore
Share & tools
lore
#0 lore raw

Hi al...

I have a 3c980-TX (at least that is what is printed in the card), that is recognized as this by the kernel pci subsystem:

werewolf:/usr/src/linux/drivers/net# cat /proc/pci
...
  Bus  0, device  18, function  0:
    Ethernet controller: 3Com Corporation 3c980-TX 10/100baseTX NIC [Python-T] (rev 120).
..

by lspci:
00:12.0 Ethernet controller: 3Com Corporation 3c980-TX 10/100baseTX NIC [Python-T] (rev 78)
Subsystem: 3Com Corporation: Unknown device 1000

but not by 3c59x.c (version 1.1.8-ac):
3c59x: Donald Becker and others. www.scyld.com/network/vortex.html See Documentation/networking/vortex.txt
00:12.0: 3Com PCI 3c982 Dual Port Server Cyclone at 0xec00. Vers LK1.1.18-ac

Possible patch below, if I have not a bad understanding of drivers/pci/pci.ids.

Two questions remaining:
- rev 120 vs. rev 78 ???
- Unknown device 1000 ?? (that's userspace, so I understand it does not matter in this list...)

TIA

drivers/net/3c59x.c renamed from drivers/net/3c59x.c.orig +9 -1
@@ -432,6 +432,8 @@
 	CH_3C905C2,
 	CH_3C980,
 	CH_3C9805,
+	CH_3C982A,
+	CH_3C982B,
 
 	CH_3CSOHO100_TX,
 	CH_3C555,
@@ -505,7 +507,11 @@
 	 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, },
 	{"3c980 Cyclone",
 	 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, },
-	{"3c982 Dual Port Server Cyclone",
+	{"3c980 Python-T",
+	 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, },
+	{"3c982 Hydra Dual Port A",
+	 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, },
+	{"3c982 Hydra Dual Port B",
 	 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, },
 
 	{"3cSOHO100-TX Hurricane",
@@ -572,6 +578,8 @@
 	{ 0x10B7, 0x9201, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C905C2 },
 	{ 0x10B7, 0x9800, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C980 },
 	{ 0x10B7, 0x9805, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C9805 },
+	{ 0x10B7, 0x1201, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C982A },
+	{ 0x10B7, 0x1202, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C982B },
 
 	{ 0x10B7, 0x7646, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3CSOHO100_TX },
 	{ 0x10B7, 0x5055, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C555 },
Signature · 4 lines
J.A. Magallon <[email protected]>      \                 Software is like sex:
werewolf.able.es                         \           It's better when it's free
Mandrake Linux release 9.1 (Bamboo) for i586
Linux 2.4.21-pre6-jam1 (gcc 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk))
#1 lore raw

Review

Quoted 3 lines · J.A. Magallon
(quoted diff) +2 -0
+	{ 0x10B7, 0x1201, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C982A },
+	{ 0x10B7, 0x1202, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C982B },

OK. I'm a bit mystified as to how these ID's got lost. They do not appear in Donald's latest driver, so I assume the catchall PCI ID match picked them up.

The mainstream PCI code does not have the catchall capability.

Keeping that big device table in sync is a real pain, which is why it has been kept grouped into batches of five entries.

Donald's driver describes 0x9805 as a "3c982 Server Tornado". What makes you think it is a "3c980 Python-T"?

Can you please retest with this (against 2.4.20-pre5). I didn't change 0x9805. Probably Donald's driver is right, but I'd like some confirmation.

drivers/net/3c59x.c renamed from drivers/net/3c59x.c~3c59x-980-support +9 -0
diff -puN drivers/net/3c59x.c~3c59x-980-support drivers/net/3c59x.c
@@ -442,6 +442,8 @@ enum vortex_chips {
 	CH_3CCFEM656_1,
 	CH_3C450,
 	CH_3C920,
+	CH_3C982A,
+	CH_3C982B,
 };
 
 
@@ -535,6 +537,11 @@ static struct vortex_chip_info {
 	 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, },
 	{"3c920 Tornado",
 	 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, },
+	{"3c982 Hydra Dual Port A",
+	 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, },
+	{"3c982 Hydra Dual Port B",
+	 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, },
+
 	{0,}, /* 0 terminated list. */
 };
 
@@ -579,6 +586,8 @@ static struct pci_device_id vortex_pci_t
 	{ 0x10B7, 0x6564, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3CCFEM656_1 },
 	{ 0x10B7, 0x4500, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C450 },
 	{ 0x10B7, 0x9201, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C920 },
+	{ 0x10B7, 0x1201, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C982A },
+	{ 0x10B7, 0x1202, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C982B },
 	{0,}						/* 0 terminated list. */
 };
 MODULE_DEVICE_TABLE(pci, vortex_pci_tbl);

_

#2 lore raw
Quoted 9 lines · Andrew Morton

drivers/net/3c59x.c static struct pci_device_id vortex_pci_t · line 590

Quoted 3 lines · J.A. Magallon
drivers/net/3c59x.c renamed from drivers/net/3c59x.c~3c59x-980-support +2 -0
+	{ 0x10B7, 0x1201, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C982A },
+	{ 0x10B7, 0x1202, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C982B },

OK. I'm a bit mystified as to how these ID's got lost. They do not appear in Donald's latest driver, so I assume the catchall PCI ID match picked them up.

Quoted 8 lines

The mainstream PCI code does not have the catchall capability.

Keeping that big device table in sync is a real pain, which is why it has been kept grouped into batches of five entries.

Donald's driver describes 0x9805 as a "3c982 Server Tornado". What makes you think it is a "3c980 Python-T"?

That is what is labeled in the card, and as I said before, that it has _only_ one RJ45 connector, so it hardly can be a "Dual Port" card ;).

pci.ids has this:

10b7 3Com Corporation

    ...
    9805  3c980-TX 10/100baseTX NIC [Python-T]
        10b7 1201  3c982-TXM 10/100baseTX Dual Port A [Hydra]
        10b7 1202  3c982-TXM 10/100baseTX Dual Port B [Hydra]
        10b7 9805  3c980 10/100baseTX NIC [Python-T]

and my card gives:

(lspci -n)
00:12.0 Class 0200: 10b7:9805 (rev 78)
(lspci -v)
00:12.0 Ethernet controller: 3Com Corporation 3c980-TX 10/100baseTX NIC [Python-T] (rev 78)
Subsystem: 3Com Corporation: Unknown device 1000

Donald's driver has:

    { 0x10B7, 0x9800, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C980 },
    { 0x10B7, 0x9805, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C9805 },
...
    {"3c980 Cyclone",
     PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, },
    {"3c982 Dual Port Server Cyclone",
     PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, },

ie, associates 0x10B7, 0x9805 with "3c982 Dual Port Server Cyclone".

Signature · 4 lines
J.A. Magallon <[email protected]>      \                 Software is like sex:
werewolf.able.es                         \           It's better when it's free
Mandrake Linux release 9.1 (Bamboo) for i586
Linux 2.4.21-pre6-jam1 (gcc 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk))
#3 lore raw
Quoted 10 lines · J.A. Magallon

pci.ids has this:

10b7 3Com Corporation

    ...
    9805  3c980-TX 10/100baseTX NIC [Python-T]
        10b7 1201  3c982-TXM 10/100baseTX Dual Port A [Hydra]
        10b7 1202  3c982-TXM 10/100baseTX Dual Port B [Hydra]
        10b7 9805  3c980 10/100baseTX NIC [Python-T]

That's hardly authoritative.

Quoted 7 lines

and my card gives:

(lspci -n)
00:12.0 Class 0200: 10b7:9805 (rev 78)
(lspci -v)
00:12.0 Ethernet controller: 3Com Corporation 3c980-TX 10/100baseTX NIC [Python-T] (rev 78)
Subsystem: 3Com Corporation: Unknown device 1000

Nor is that.

Quoted 8 lines

Donald's driver has:

    { 0x10B7, 0x9800, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C980 },
    { 0x10B7, 0x9805, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C9805 },
...
    {"3c980 Cyclone",
     PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, },
    {"3c982 Dual Port Server Cyclone",
     PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, },

Nope, Donald's latest driver has

{"3c982 Server Tornado",{ 0x980510B7, 0xffffffff },
PCI_IOTYPE, CYCLONE_SIZE, FEATURE_TORNADO, },

(Note: no HAS_NWAY either)

But if you have a 10b7/9805 with a "3c980 Python-T" sticker on it I guess that will do.

Not sure about NWAY though.

hm, the 2.5 kernel has

    {"3c980C Python-T",
     PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, },

for 10b7/9805, which looks much more healthy.

#4 lore raw
Quoted 4 lines · Andrew Morton

Nope, Donald's latest driver has
{"3c982 Server Tornado",{ 0x980510B7, 0xffffffff },
PCI_IOTYPE, CYCLONE_SIZE, FEATURE_TORNADO, },
(Note: no HAS_NWAY either)

You missed something above that:

#define FEATURE_TORNADO (IS_TORNADO|HAS_NWAY|HAS_V2_TX) /* 905C */

Quoted 4 lines

hm, the 2.5 kernel has

    {"3c980C Python-T",
     PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, },

for 10b7/9805, which looks much more healthy.

But I would argue that this should have IS_CYCLONE replaced by IS_TORNADO. Not that it makes much difference though, as they are not used much in the code ;-)

Signature · 6 lines
Bogdan Costescu

IWR - Interdisziplinaeres Zentrum fuer Wissenschaftliches Rechnen
Universitaet Heidelberg, INF 368, D-69120 Heidelberg, GERMANY
Telephone: +49 6221 54 8869, Telefax: +49 6221 54 8868
E-mail: [email protected]
#5 lore raw
In reply to Andrew Morton

Review

Quoted 2 lines · Andrew Morton
(quoted diff) +2 -0
+	{"3c982 Hydra Dual Port A",
+	 PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, },

Is there any reason for dropping the HAS_NWAY flag for these cards ? From what I know they have the same internal architecture as 905C (Tornado) which means that they have NWAY capabilities on-chip.

Signature · 6 lines
Bogdan Costescu

IWR - Interdisziplinaeres Zentrum fuer Wissenschaftliches Rechnen
Universitaet Heidelberg, INF 368, D-69120 Heidelberg, GERMANY
Telephone: +49 6221 54 8869, Telefax: +49 6221 54 8868
E-mail: [email protected]