Subject: Re: help on cloning an ethernet driver for a compact flash card
To: None <port-hpcmips@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: port-hpcmips
Date: 04/01/2003 22:42:02
In article <1049220507.3310.33.camel@localhost>,
Michael Francini <francini@mindspring.com> wrote:
>Hi,
>
>First off, I'm new to NetBSD and am a novice *NIX hacker so chances are
>that I've yet to find the right information on the new to answer this
>question; hence the post.
>
>I bought off ebay a compact flash Ethernet adapter that I've since
>learned is made by Billionton Taiwan. It's their model CFLT-10N. (FYI,
>this praticular nic has a picture of a person flying a hanglider on
>it). It uses the TAMARAK TC3299CE chipset which is register compatible
>with the National Semiconductor NE8390 chipset. I was able to verify
>this by configuring my PCMCIA config options file on my linux box to use
>the 8390 module on this NIC and VIOLA, IT WORKED!! The problem is: the
>manufacturer and product CIS codes aren't in the card so when I plug the
>nic into my IBM Z50 CE laptop running NetBSD, it doesn't work, showing
>the dreaded 0xfff... id for both product and manufacturer codes. What I
>am able to obtain from my linux box cardctl info is the following:
>
>PRODID_1="CF"
>PRODID_2="10Base-Ethernet"
>PRODID_3="1.0"
>PRODID_4=""
>MANFID=0000,0000
>FUNCID=6
>
>Browsing the directories and postings I've found the "if_ne_pcmcia.c"
>driver code that would seem to be appropriate for running this NIC and I
>also saw the "pcmcia_cis_quirks.c" program which seems to allow for
>static entries of NICs displaying rude behavior similar to this one.
>Unfortunately, I'm not hack enough to understand the code to even try to
>patch it to try to run this nic and I was hoping that some person out
>there could give me guidance on documentation that can help me or on
>work already done on this particular nic. Any references to docs or
>postings would be appreciated and I promise to post a resolution is
>there is one.
Try this patch and [make -f Makefile.pcmciadevs there]
christos
Index: if_ne_pcmcia.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pcmcia/if_ne_pcmcia.c,v
retrieving revision 1.100
diff -u -u -r1.100 if_ne_pcmcia.c
--- if_ne_pcmcia.c 2003/01/16 15:21:20 1.100
+++ if_ne_pcmcia.c 2003/04/01 22:40:33
@@ -475,6 +475,11 @@
PCMCIA_CIS_DYNALINK_L10C,
0, -1, { 0x00, 0x00, 0x00 } },
+ { PCMCIA_STR_TAMARAK_TC3299CE,
+ PCMCIA_VENDOR_TAMARAK, PCMCIA_PRODUCT_TAMARAK_TC3299CE,
+ PCMCIA_CIS_TAMARAK_TC3299CE,
+ 0, -1, { 0x00, 0x00, 0x00 } },
+
#if 0
/* the rest of these are stolen from the linux pcnet pcmcia device
driver. Since I don't know the manfid or cis info strings for
Index: pcmciadevs
===================================================================
RCS file: /cvsroot/src/sys/dev/pcmcia/pcmciadevs,v
retrieving revision 1.179
diff -u -u -r1.179 pcmciadevs
--- pcmciadevs 2003/01/16 15:18:44 1.179
+++ pcmciadevs 2003/04/01 22:40:33
@@ -401,6 +401,7 @@
vendor RPTI -1 RPTI
vendor SVEC -1 SVEC/Hawking Technology
vendor SYNERGY21 -1 Synergy 21
+vendor TAMARAK -1 Tamarak
vendor TEAC -1 TEAC
vendor YEDATA -1 Y-E DATA
@@ -472,6 +473,7 @@
*/
product SVEC PN650TX -1 SVEC PN650TX 10/100 Dual Speed Fast Ethernet PC Card
product SYNERGY21 S21810 { "PCMCIA", "Ethernet", "A", "004743118001" } Synergy 21 S21810+ NE2000 Compatible Card
+product TAMARAK TC3299CE { "CF", "10Base-Ethernet", "1.0", NULL } Tamarak CFLT-10N Ethernet
product TEAC IDECARDII { NULL, "NinjaATA-", NULL, NULL } TEAC IDE Card/II
product XIRCOM CFE_10 { "Xircom", "CompactCard&spEthernet", "CFE-10", "1.00" } Xircom CompactCard CFE-10
product YEDATA EXTERNAL_FDD { "Y-E&spDATA", "External&spFDD", NULL, NULL } Y-E DATA External FDD