Subject: Re: Cardbus support for Realtek 8139C/8169?
To: matthew green <mrg@eterna.com.au>
From: Jonathan Stone <jonathan@dsg.stanford.edu>
List: tech-kern
Date: 10/28/2004 18:20:20
In message <28270.1097278109@splode.eterna.com.au>matthew green writes
> [...] Any objections to splitting sys/dev/pci/if_re.c
> into two (chipset, and pci-attachment), so I can try kluding up a
> cardbus attachment? (has anyone tried that already?)
>
>
>it needs splitting up, just do it.
OK, I have a split driver. The Netgear GA-511 (cardbus rtk8169S)
works, at least in 10/100 mode. I don't have a PCI 8169 to test
I'm currently using the following file names:
sys/dev/ic/rtl8169plus.c -- chipset driver
sys/dev/ic/rtl8169plusvar.h -- functions exported to front-end attachments
sys/dev/pci/if_re_pci.c -- PCI front-end
sys/dev/cardbus/if_re_cardbus.c -- Cardbus front-end
sys/mii/rtlgphy.c -- RTK 8169S/8110S internal 1000baseT phy
There's currently two glitches.:
#1: if the cardbus attachment puts the card to sleep during attach,
the card never gets woken up properly. For now, for debugging, I just
don't put the card to sleep.
#2: with cardbus (at least), the card interrupts in re_attach()
immediatley after writing the CPlus command register. There may we
some way to avoid this by reordering chip-register initialization.
But for now, I modified re_intr() to handle and dismiss interrupts
even if the interface is not IFF_UP: exactly like the rtk(4) backend
driver.
I can email diffs to anyone who wants, but I propose to commit the
split driver as-is. Fixing the above items will probably require some
reverse-engineering based on realtek-supplied Linux/FreeBSD drivers.
PS if anyone has better suggestions for better filenames, this is the
time to make them.
PPS: anyone know why "rtl..." instead of "rtk..."?