forcing re driver to a card

2007-02-22 Thread bram

Hi all,

I've been having some trouble getting my nic's to work under freebsd 6.1.
it's a jetway mini-itx board with a daughterboard with 3 rtl8110S chips on.
two out of the three appear when doing pciconf -lv
[EMAIL PROTECTED]:11:0:class=0x02 card=0x10ec16f3 chip=0x816710ec 
rev=0x10 hdr=0x00

   vendor   = 'Realtek Semiconductor'
   class= network
   subclass = ethernet
[EMAIL PROTECTED]:12:0:class=0x02 card=0x10ec16f3 chip=0x816710ec 
rev=0x10 hdr=0x00

   vendor   = 'Realtek Semiconductor'
   class= network
   subclass = ethernet

I think these should be supported by the re driver, so my questions are:
-Is there a way to force the re driver to recognize these cards ?
-Can the source of the re driver be changed so it recognizes the card 
(if yes please some guidance, don't know C) ?


kind regards Bram
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: forcing re driver to a card

2007-02-22 Thread John Nielsen
On Thursday 22 February 2007 16:06, bram wrote:
 Hi all,

 I've been having some trouble getting my nic's to work under freebsd 6.1.
 it's a jetway mini-itx board with a daughterboard with 3 rtl8110S chips on.
  two out of the three appear when doing pciconf -lv
 [EMAIL PROTECTED]:11:0:class=0x02 card=0x10ec16f3 chip=0x816710ec
 rev=0x10 hdr=0x00
 vendor   = 'Realtek Semiconductor'
 class= network
 subclass = ethernet
 [EMAIL PROTECTED]:12:0:class=0x02 card=0x10ec16f3 chip=0x816710ec
 rev=0x10 hdr=0x00
 vendor   = 'Realtek Semiconductor'
 class= network
 subclass = ethernet

 I think these should be supported by the re driver, so my questions are:
 -Is there a way to force the re driver to recognize these cards ?
 -Can the source of the re driver be changed so it recognizes the card
 (if yes please some guidance, don't know C) ?

The answer to your second question is probably yes; requires someone to make a 
patch and test with relevant hardware. Glancing at the code quickly I think 
you're probably right that it should be supported by re(4).

The answer to your first question is: patch the source so it recognizes the 
card. :)

The good news is that your device already seems to be listed in 
src/sys/pci/if_rlreg.h. If that's the case then all you need is a two-line 
patch to src/sys/dev/re/if_re.c. Something like this around line 185 of the 
file (I'm looking at revision 1.46.2.20) might do the trick:

{ RT_VENDORID, RT_DEVICEID_8169SC, RL_HWREV_8169_8110SB,
RealTek 8169SC/8110SC Single-chip Gigabit Ethernet },

Drop that in the file and rebuild and reinstall your kernel and modules. If 
you can confirm that that works then I'd be happy to send in a PR to get it 
included.

Solaris has an /etc/driver_aliases file that lets you do things like this 
without recompiling anything, but recompiling isn't really too bad once you 
get the hang of it. (Especially if you can get away with using modules.)

JN
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]