2.6 driver for Silan SC92031
Subsystems (2)
PATCH 1/1 2.6 driver for Silan SC92031
From: Cesar Eduardo Barros <[email protected]>
This is a driver for the Silan SC92031/Rsltek 8139D NIC chip. It's a rewrite of the vendor 2.4 driver for 2.6, and has been lightly tested on a 2.6.17 x86-64 kernel with the Ubuntu patches (as a out-of-tree module only).
This chip is found on at least one counterfeit Encore ENL832-TX-RENT NIC [1], which came with a mini-CD with the 2.4 driver. A slightly older version of the driver was found at [2]. The main difference between them is that the newer one has a small bugfix in the RX path, a lot of gratuitous renaming of functions, all the printable strings changed to show as a "Rsltek 8139D" [sic], and a PCI ID of 8139 instead of 2031.
This patch has been modified to apply cleanly on 2.6.19; to run on 2.6.17, just add back the struct pt_regs* argument to the interrupt handler and to its call at poll_controller(). It compiles on 2.6.19 for x86-64 as a module.
[1] See http://www.encore-usa.com/faq.php under ENL832-TX-RENT for more information
[2] Look for SL_LINUX.ZIP (which is really a .tar.gz) at
http://broadbandforum.in/dataone_Intex_LAN_cardlinux-t4207-s15.html
---
That said, I'm mostly sending this to get comments on any mistakes I might have made (I have this nagging feeling I must have made at least one), and most importantly to make it available for adventurous folks who are stuck with boards with that chip; I do not expect it to be considered ready for inclusion yet, and it also needs more testing.
drivers/net/Kconfig +12 -0
@@ -1777,6 +1777,18 @@ config LAN_SAA9730 workstations. See <http://www.semiconductors.philips.com/pip/SAA9730_flyer_1>. +config SC92031 + tristate "Silan SC92031 PCI Fast Ethernet Adapter driver (EXPERIMENTAL)" + depends on NET_PCI && PCI && EXPERIMENTAL + select CRC32 + ---help--- + This is a driver for the Fast Ethernet PCI network cards based on + the Silan SC92031 chip (sometimes also called Rsltek 8139D). If you + have one of these, say Y here. + + To compile this driver as a module, choose M here: the module + will be called sc92031. This is recommended. + config NET_POCKET bool "Pocket and portable adapters" depends on NET_ETHERNET && PARPORT
drivers/net/Makefile +1 -0
@@ -160,6 +160,7 @@ obj-$(CONFIG_APRICOT) += 82596.o obj-$(CONFIG_LASI_82596) += lasi_82596.o obj-$(CONFIG_MVME16x_NET) += 82596.o obj-$(CONFIG_BVME6000_NET) += 82596.o +obj-$(CONFIG_SC92031) += sc92031.o # This is also a 82596 and should probably be merged obj-$(CONFIG_LP486E) += lp486e.o
drivers/net/sc92031.c +1617 -0
1,617 lines not on this page · raw message
Signature · 3 lines
Cesar Eduardo Barros [email protected] [email protected]
Quoted 20 lines · Cesar Eduardo Barros
From: Cesar Eduardo Barros <[email protected]>
This is a driver for the Silan SC92031/Rsltek 8139D NIC chip. It's a rewrite of the vendor 2.4 driver for 2.6, and has been lightly tested on a 2.6.17 x86-64 kernel with the Ubuntu patches (as a out-of-tree module only).
This chip is found on at least one counterfeit Encore ENL832-TX-RENT NIC [1], which came with a mini-CD with the 2.4 driver. A slightly older version of the driver was found at [2]. The main difference between them is that the newer one has a small bugfix in the RX path, a lot of gratuitous renaming of functions, all the printable strings changed to show as a "Rsltek 8139D" [sic], and a PCI ID of 8139 instead of 2031.
This patch has been modified to apply cleanly on 2.6.19; to run on 2.6.17, just add back the struct pt_regs* argument to the interrupt handler and to its call at
poll_controller(). It compiles on 2.6.19 for x86-64 as a module.
Quoted 6 lines
[1] See http://www.encore-usa.com/faq.php under ENL832-TX-RENT for more information
[2] Look for SL_LINUX.ZIP (which is really a .tar.gz) athttp://broadbandforum.in/dataone_Intex_LAN_cardlinux-t4207-s15.htmlSigned-off-by Cesar Eduardo Barros <[email protected]>
Seems like it would be best to modify the existing 8139 driver...
Jeff
Jeff Garzik escreveu:
Quoted 10 lines
Quoted 7 lines · Cesar Eduardo Barros
From: Cesar Eduardo Barros <[email protected]>
This is a driver for the Silan SC92031/Rsltek 8139D NIC chip. It's a rewrite of the vendor 2.4 driver for 2.6, and has been lightly tested on a 2.6.17 x86-64 kernel with the Ubuntu patches (as a out-of-tree module only).
Seems like it would be best to modify the existing 8139 driver...
I'm not sure it would help. Either the hardware differences are too large (for instance, the MII/link part, where the way the vendor driver did things implies the MII has only the two basic registers plus two vendor registers, meaning I simply cannot use the generic mii code) or the code is already modified from the 8139 driver (the vendor driver seems to be based on an old version of either pci-skeleton.c or 8139too.c, and I based my rewrite on the vendor driver).
Of course, one thing I probably will copy from 8139too.c later is the NAPI code; I wanted to avoid the extra locking complexity in this first version (the fact that the interrupt status register is cleared on reading only makes things more complex). If you can suggest other things to copy, it would be good, since the copied code is less likely to be wrong.
Signature · 3 lines
Cesar Eduardo Barros [email protected] [email protected]