summaryrefslogtreecommitdiffstats
path: root/sys/dev/ed/if_ed_pci.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2010-08-25 02:03:48 +0000
committerimp <imp@FreeBSD.org>2010-08-25 02:03:48 +0000
commit40ea18d2074b8e30dc7ffced471d580b21c50824 (patch)
treeb1d3f8b79bbb236de4a76bf72cc7f21eec099402 /sys/dev/ed/if_ed_pci.c
parent4d7ceccb999936caa15c9a60f3e8ae82545c5a2d (diff)
downloadFreeBSD-src-40ea18d2074b8e30dc7ffced471d580b21c50824.zip
FreeBSD-src-40ea18d2074b8e30dc7ffced471d580b21c50824.tar.gz
Prodded by Yongari, add support for Holtek HT80232. Add the device
ID, plus the ability to force '16-bit mode' which really means NE-2000 mode. Other open source drivers suggest that the Holtek misbehaves if you allow the 8-bit probe. Also, all of the PCI chips emulate NE-2000ish cards, so always force 16-bit mode for memory transfers. PR: 84202 (patch not used)
Diffstat (limited to 'sys/dev/ed/if_ed_pci.c')
-rw-r--r--sys/dev/ed/if_ed_pci.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/sys/dev/ed/if_ed_pci.c b/sys/dev/ed/if_ed_pci.c
index 21ddb74..3cf353c 100644
--- a/sys/dev/ed/if_ed_pci.c
+++ b/sys/dev/ed/if_ed_pci.c
@@ -49,18 +49,19 @@ static struct _pcsid
const char *desc;
} pci_ids[] =
{
- { ED_RTL8029_PCI_ID, "RealTek 8029" }, /* Needs realtek full duplex */
- { 0x50004a14, "NetVin NV5000SC" },
- { 0x09401050, "ProLAN" },
{ 0x140111f6, "Compex RL2000" },
+ { 0x005812c3, "Holtek HT80232" },
{ 0x30008e2e, "KTI ET32P2" },
- { 0x19808c4a, "Winbond W89C940" },
+ { 0x50004a14, "NetVin NV5000SC" },
+ { 0x09401050, "ProLAN" },
+ { ED_RTL8029_PCI_ID, "RealTek 8029" }, /* Needs realtek full duplex */
{ 0x0e3410bd, "Surecom NE-34" },
- { 0x09261106, "VIA VT86C926" }, /* only do 16-bit */
+ { 0x09261106, "VIA VT86C926" },
+ { 0x19808c4a, "Winbond W89C940" },
{ 0x5a5a1050, "Winbond W89C940F" },
#if 0
- /* Holtek needs special lovin', disabled by default */
- { 0x005812c3, "Holtek HT80232" }, /* Only 16-bit I/O, Holtek fdx */
+ /* some Holtek needs special lovin', disabled by default */
+ /* The Holtek can report/do full duplex, but that's unimplemented */
{ 0x559812c3, "Holtek HT80229" }, /* Only 32-bit I/O, Holtek fdx, STOP_PG_60? */
#endif
{ 0x00000000, NULL }
@@ -87,7 +88,6 @@ static int
ed_pci_attach(device_t dev)
{
struct ed_softc *sc = device_get_softc(dev);
- int flags = 0;
int error = ENXIO;
/*
@@ -96,9 +96,10 @@ ed_pci_attach(device_t dev)
* are areally just generic ne-2000 cards.
*/
if (pci_get_devid(dev) == ED_RTL8029_PCI_ID)
- error = ed_probe_RTL80x9(dev, PCIR_BAR(0), flags);
+ error = ed_probe_RTL80x9(dev, PCIR_BAR(0), 0);
if (error)
- error = ed_probe_Novell(dev, PCIR_BAR(0), flags);
+ error = ed_probe_Novell(dev, PCIR_BAR(0),
+ ED_FLAGS_FORCE_16BIT_MODE);
if (error) {
ed_release_resources(dev);
return (error);
OpenPOWER on IntegriCloud