diff options
-rw-r--r-- | etc/defaults/pccard.conf | 56 | ||||
-rw-r--r-- | sys/dev/ed/if_ed.c | 38 | ||||
-rw-r--r-- | sys/dev/ed/if_ed_pccard.c | 44 | ||||
-rw-r--r-- | sys/dev/ed/if_edreg.h | 1 |
4 files changed, 75 insertions, 64 deletions
diff --git a/etc/defaults/pccard.conf b/etc/defaults/pccard.conf index 73b4a32..9b61ba5 100644 --- a/etc/defaults/pccard.conf +++ b/etc/defaults/pccard.conf @@ -331,7 +331,7 @@ card "ACCTON" "EN2216-PCMCIA-ETHERNET" # Allied Telesis CentreCOM LA100-PCM-T V2 card "Allied Telesis, K.K" "CentreCOM LA100-PCM-T V2 100/10M LAN PC Card" - config auto "ed" ? + config auto "ed" ? 0x80000 insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop @@ -351,7 +351,7 @@ card "Allied Telesis, K.K." "CentreCOM LA-PCM_V2" # Allied Telesis CentreCOM LA100-PCM-T V2 card "Allied Telesis, K.K." "CentreCOM LA100-PCM-T V2 100/10M LAN PC Card" - config auto "ed" ? + config auto "ed" ? 0x80000 insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop @@ -387,7 +387,7 @@ card "CNet" "CN40BC Ethernet" # COREGA FEther PCC-TXF card "corega" "FEther PCC-TXF" - config auto "ed" ? + config auto "ed" ? 0x80000 insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop @@ -405,7 +405,7 @@ card "corega K.K." "corega EtherII PCC-T" # COREGA FastEther PCC-TX card "corega K.K." "corega FastEther PCC-TX" - config auto "ed" ? + config auto "ed" ? 0x80000 insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop @@ -424,13 +424,13 @@ card "CyQ've" "ELA-010" # CyQ've ELA-110 card "CyQ've" "ELA-110 10/100M LAN Card" - config auto "ed" ? + config auto "ed" ? 0x80000 insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop # CyQ've ELA-110E card "CyQ've" "ELA-110E 10/100M LAN Card" - config auto "ed" ? + config auto "ed" ? 0x80000 insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop @@ -448,9 +448,9 @@ card "D-Link" "DE-660" # insert /etc/pccard_ether $device start link0 -link1 remove /etc/pccard_ether $device stop -# D-Link DFE-650 NE2000 clone +# D-Link DFE-650 Ethernet Card card "D-Link" "DFE-650" - config 0x20 "ed" ? 0x10 + config 0x20 "ed" ? 0x80010 insert /etc/pccard_ether $device start # insert /etc/pccard_ether $device start link0 -link1 remove /etc/pccard_ether $device stop @@ -485,13 +485,13 @@ card "DIGITAL" "DEPCM-XX" # Planex FNW-3600-T card "Dual Speed" "10/100 PC Card" - config auto "ed" ? + config auto "ed" ? 0x80000 insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop # Planex FNW-3600-TX 16bit FastEthernet DirectDock card "Dual Speed" "10/100 Port Attached PC Card" - config auto "ed" ? + config auto "ed" ? 0x80000 insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop @@ -573,13 +573,13 @@ card "EP-210 PCMCIA LAN CARD." "/.*/" # PLANEX (PLANET) FNW-3700-T card "Fast Ethernet" "16-bit PC Card" config auto "ed" ? 0x30000 + logstr "Planex FNW-3700-T" insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop # Planex FNW-3600-T 16bit FastEthernet card "Fast Ethernet" "Adapter" - config 0x7 "ed" ? - iosize 32 + config auto "ed" ? 0x80000 logstr "Planex FNW-3600-T" insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop @@ -640,7 +640,7 @@ card "IO DATA" "PCLATE" # I-O DATA PCETTX card "IO DATA" "PCETTX" - config 0x20 "ed" ? + config 0x20 "ed" ? 0x80000 insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop @@ -665,7 +665,7 @@ card "Kingston Technology Corp." "/EtheRx PC Card Ethernet.*/" # ELECOM Laneed LD-10/100CD card "Laneed" "LD-10/100CD" - config auto "ed" ? + config auto "ed" ? 0x80000 insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop @@ -695,26 +695,26 @@ card "LINKSYS" "E-CARD" # Linksys EtherFast 10/100 Intergrated PC Card (PCM100) card "Linksys" "EtherFast 10/100 Integrated PC Card (PCM100)" - config auto "ed" ? + config auto "ed" ? 0x80000 insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop # Linksys EtherFast 10/100 PC Card (PCMPC100) card "Linksys" "EtherFast 10/100 PC Card (PCMPC100)" - config 0x3 "ed" ? + config 0x3 "ed" ? 0x80000 # config auto "ed" ? insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop # Linksys EtherFast 10/100 PC Card (PCMPC100 V2) card "Linksys" "Etherfast 10/100 PC Card (PCMPC100 V2)" - config auto "ed" ? + config auto "ed" ? 0x80000 insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop # Logitec LPM-LN100TX 100BASE-TX Ethernet LAN CARD card "Logitec" "LPM-LN100TX" - config auto "ed" ? + config auto "ed" ? 0x80000 insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop @@ -754,7 +754,7 @@ card "MELCO" "LPC2-T" # MELCO LPC2-TX card "MELCO" "LPC2-TX" - config auto "ed" ? + config auto "ed" ? 0x80000 insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop @@ -795,7 +795,7 @@ card "NEC" "PC-9801N-J12" # BayNetworks NETGEAR FA410TXC Fast Ethernet card "NETGEAR" "FA410TX" - config auto "ed" ? + config auto "ed" ? 0x80000 insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop @@ -807,13 +807,13 @@ card "Network Everywhere" "Ethernet 10BaseT PC Card" # Network Everywhere Ethernet Fast Ethernet 10/100 PC Card card "Network Everywhere" "Fast Ethernet 10/100 PC Card" - config 0x5 "ed" 10 + config 0x5 "ed" 10 0x80000 insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop # New Media Corporation LiveWire 10/100 card "New Media Corporation" "LiveWire 10/100" - config auto "ed" ? + config auto "ed" ? 0x80000 insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop @@ -936,7 +936,7 @@ card "Seiko Epson Corp." "Ethernet" # 3way 3WL-847-TX card "SUN WAY" "3WL-847-TX 100BASE-TX" - config auto "ed" ? + config auto "ed" ? 0x80000 insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop @@ -952,12 +952,18 @@ card "TDK" "/LAK-CD031.*/" insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop -# Telecom Device SuperSocket RE450T and RE550T -card "Telecom Device K.K." "/SuperSocket RE[45]50T/" +# Telecom Device SuperSocket RE450T +card "Telecom Device K.K." "SuperSocket RE450T" config auto "ed" ? insert /etc/pccard_ether $device start remove /etc/pccard_ether $device stop +# Telecom Device SuperSocket RE550T +card "Telecom Device K.K." "SuperSocket RE550T" + config auto "ed" ? 0x80000 + insert /etc/pccard_ether $device start + remove /etc/pccard_ether $device stop + # Toshiba Joho System PTJ-LAN/T card "TJ" "Ethernet" config auto "ed" ? 0x10 diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c index a7ca8db..f978954 100644 --- a/sys/dev/ed/if_ed.c +++ b/sys/dev/ed/if_ed.c @@ -902,44 +902,6 @@ ed_probe_3Com(dev, port_rid, flags) } /* - * Probe the Ethernet MAC addrees for PCMCIA Linksys EtherFast 10/100 - * and compatible cards (DL10019C Ethernet controller). - * - * Note: The PAO patches try to use more memory for the card, but that - * seems to fail for my card. A future optimization would add this back - * conditionally. - */ -int -ed_get_Linksys(dev) - device_t dev; -{ - struct ed_softc *sc = device_get_softc(dev); - u_char sum; - int i; - - /* - * Linksys registers(offset from ASIC base) - * - * 0x04-0x09 : Physical Address Register 0-5 (PAR0-PAR5) - * 0x0A : Card ID Register (CIR) - * 0x0B : Check Sum Register (SR) - */ - for (sum = 0, i = 0x04; i < 0x0c; i++) - sum += ed_asic_inb(sc, i); - if (sum != 0xff) - return (0); /* invalid DL10019C */ - for (i = 0; i < ETHER_ADDR_LEN; i++) { - sc->arpcom.ac_enaddr[i] = ed_asic_inb(sc, 0x04 + i); - } - - ed_nic_outb(sc, ED_P0_DCR, ED_DCR_WTS | ED_DCR_FT1 | ED_DCR_LS); - sc->isa16bit = 1; - sc->type = ED_TYPE_NE2000; - sc->type_str = "Linksys"; - return (1); -} - -/* * Probe and vendor-specific initialization routine for NE1000/2000 boards */ int diff --git a/sys/dev/ed/if_ed_pccard.c b/sys/dev/ed/if_ed_pccard.c index e9a6629..14848fa 100644 --- a/sys/dev/ed/if_ed_pccard.c +++ b/sys/dev/ed/if_ed_pccard.c @@ -63,6 +63,7 @@ static int ed_pccard_detach(device_t); static void ax88190_geteprom(struct ed_softc *); static int ed_pccard_memwrite(device_t dev, off_t offset, u_char byte); +static int ed_pccard_Linksys(device_t dev); static int linksys; static device_method_t ed_pccard_methods[] = { @@ -187,7 +188,11 @@ ed_pccard_probe(device_t dev) goto end2; end: - linksys = ed_get_Linksys(dev); + if (ED_FLAGS_GETTYPE(flags) & ED_FLAGS_LINKSYS) { + linksys = ed_pccard_Linksys(dev); + } else { + linksys = 0; + } end2: if (error == 0) error = ed_alloc_irq(dev, 0, 0); @@ -301,3 +306,40 @@ ed_pccard_memwrite(device_t dev, off_t offset, u_char byte) return (0); } + +/* + * Probe the Ethernet MAC addrees for PCMCIA Linksys EtherFast 10/100 + * and compatible cards (DL10019C Ethernet controller). + * + * Note: The PAO patches try to use more memory for the card, but that + * seems to fail for my card. A future optimization would add this back + * conditionally. + */ +static int +ed_pccard_Linksys(device_t dev) +{ + struct ed_softc *sc = device_get_softc(dev); + u_char sum; + int i; + + /* + * Linksys registers(offset from ASIC base) + * + * 0x04-0x09 : Physical Address Register 0-5 (PAR0-PAR5) + * 0x0A : Card ID Register (CIR) + * 0x0B : Check Sum Register (SR) + */ + for (sum = 0, i = 0x04; i < 0x0c; i++) + sum += ed_asic_inb(sc, i); + if (sum != 0xff) + return (0); /* invalid DL10019C */ + for (i = 0; i < ETHER_ADDR_LEN; i++) { + sc->arpcom.ac_enaddr[i] = ed_asic_inb(sc, 0x04 + i); + } + + ed_nic_outb(sc, ED_P0_DCR, ED_DCR_WTS | ED_DCR_FT1 | ED_DCR_LS); + sc->isa16bit = 1; + sc->type = ED_TYPE_NE2000; + sc->type_str = "Linksys"; + return (1); +} diff --git a/sys/dev/ed/if_edreg.h b/sys/dev/ed/if_edreg.h index c3b38cf..e42ef42d2 100644 --- a/sys/dev/ed/if_edreg.h +++ b/sys/dev/ed/if_edreg.h @@ -610,6 +610,7 @@ struct ed_ring { #define ED_FLAGS_TOSH_ETHER 0x10000 #define ED_FLAGS_GWETHER 0x20000 #define ED_FLAGS_AX88190 0x30000 +#define ED_FLAGS_LINKSYS 0x80000 #define ED_FLAGS_GETTYPE(flg) ((flg) & 0xff0000) |