Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jul 2005 18:10:36 +0800
From:      jackqq <jackqqpro@gmail.com>
To:        "Gary W. Swearingen" <garys@opusnet.com>
Cc:        freebsd-questions <questions@freebsd.org>
Subject:   Re: Holtek HT80232 NIC unrecognized on FreeBSD 5.4-RELEASE
Message-ID:  <890a507f0507240310cfd8c38@mail.gmail.com>
In-Reply-To: <elhdelzc5v.del@mail.opusnet.com>
References:  <890a507f050723004844ce572b@mail.gmail.com> <elhdelzc5v.del@mail.opusnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Thank you!

I tried setting flags and/or removing hints for ed(4) but it didn't
work. I get the idea from /boot/device.hints that, perhaps not quite
accurately, hints work more with ISA. But my NIC actually belongs to
the PCI family.

The last thing I tried before going mad saved me. :)

I took a peek into the source of the NIC drivers. In
/usr/src/sys/dev/ed/, there was a file named 'if_ed_pci.c', where I
found a table to edit. The table was just located in the middle of the
file. It read

static struct _pcsid
{
        uint32_t        type;
        const char      *desc;
} pci_ids[] =3D
{
        { 0x802910ec,   "NE2000 PCI Ethernet (RealTek 8029)"    },
        { 0x50004a14,   "NE2000 PCI Ethernet (NetVin 5000)"     },
        { 0x09401050,   "NE2000 PCI Ethernet (ProLAN)"          },
        { 0x140111f6,   "NE2000 PCI Ethernet (Compex)"          },
        { 0x30008e2e,   "NE2000 PCI Ethernet (KTI)"             },
        { 0x19808c4a,   "NE2000 PCI Ethernet (Winbond W89C940)" },
        { 0x0e3410bd,   "NE2000 PCI Ethernet (Surecom NE-34)"   },
        { 0x09261106,   "NE2000 PCI Ethernet (VIA VT86C926)"    },
        { 0x00000000,   NULL                                    }
};

With every product name preceded by its product ID and vendor ID, it
was self-explanatory enough. So I inserted a line for my card, which
read

        { 0x005812c3,   "NE2000 PCI Ethernet (Holtek HT80232)"  },

Finally, I rebuilt the kernel with a dynamic loaded ed(4) driver
(if_ed.ko), which SUCCESSFULLY recognized my NIC.

Hooray!

Though without trial, I believe a kernel statically including the
modified ed(4) would also work. However, I still wonder if there is
some other way by which I don't have to edit the source.


On 7/24/05, Gary W. Swearingen <garys@opusnet.com> wrote:
> jackqq <jackqqpro@gmail.com> writes:
>=20
> > My ethernet adapter's chip is Holtek's HT80232. It seems to be not
> > recognized by the GENERIC kernel or any if_*.ko module.
>=20
> The ed(4) manpage has a "diagnostics" section and also mentions the
> setting of "flags" (one of the hints) that "may be needed for some
> clones".  I might also try removing the "ed" hints altogether.
>=20
> You DO have "device miibus" in the KERNCONF file, I hope.
>=20


--=20
jackqq :-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?890a507f0507240310cfd8c38>