Commit Graph

45 Commits

Author SHA1 Message Date
jakllsch 2b8a2516f8 Put previous (RTK_HWREV_8168F) in numeric sort order like its neighbors. 2013-12-13 20:52:48 +00:00
khorben 27bee29666 Added support for the Realtek 8168F variant in re(4).
From FreeBSD; not tested on real hardware unfortunately. The manual page was adjusted as well.

No objection from current-users@, "commit it" gdt@
2013-04-06 01:53:13 +00:00
nonaka 445b1d5899 Added RTL8168E/8111E-VL support. 2012-03-02 16:23:40 +00:00
garbled 0f8d4dff8d Add support to recognize the 8168E model of this chip. Taken from FreeBSD 2011-11-22 18:42:56 +00:00
nonaka a314257ee8 Added 8110SBL support. 2010-04-09 10:40:59 +00:00
tsutsui 97dbe6076b Remove unnecessary whitespace. 2009-09-05 03:50:49 +00:00
tsutsui aac17e82ae - rename RTK_HWREV_8102EL_SPIN2 -> RTK_HWREV_8103E
- add a HWREV value for 8168DP
Per Realtek's Linux drivers.
2009-05-11 15:42:33 +00:00
tsutsui f6e36a0172 Pull some changes for newer chips from FreeBSD:
- pull MACSTAT and CMDSTOP quirks for 8168/8111 chips
- always set CPLUSCMD_PCI_MRW on reset
- set VLANSTRIP and RXCSUM_ENB bits on CPLUS register per if_capenable

Tested on 8111C and 8111D by several users, and
no bad side effect on my old 8169S.
2009-04-29 15:10:57 +00:00
tsutsui b684e4d8b1 Add HWREV of RTL8102EL variant. From FUKAUMI Naoki. 2009-04-13 12:33:05 +00:00
tsutsui f231bee40e Add HWREV values of RTL8168CP and RTL8168D. From FreeBSD.
XXX: needs more quirk handling after wakeup for newer chips.
2009-04-13 12:28:46 +00:00
tsutsui 030266c11f Check a correct bit for ip4csum-rx. Reported privately on PR kern/40955. 2009-03-27 12:19:17 +00:00
tsutsui 200d1adc6c Add hardware checksum support for newer PCIe 8168/8111/8102 chips,
per device info taken from FreeBSD driver.  Tested by snj@ on 8111C.

Should closes PR kern/40955.

Note on old 8169 chips IP hw csum must be enabled to use TCP/UDP hw csums,
but I'm not sure if these newer chips still have the same restriction.
2009-03-21 07:58:30 +00:00
alc 8c6c22b7f1 Add support for a 8168C/8111C revision
- also disable jumbo frame on this adapter following the FreeBSD driver
 - merge redundant call to aprint_error_dev
2008-12-08 03:24:08 +00:00
tnn 7ebba3a956 Add support for the Realtek 8102E/8102EL PCIe 10/100 Ethernet devices.
From FreeBSD.
2008-08-23 14:27:45 +00:00
tsutsui 2925cedf26 - use RTK_IDR[0-5] registers to get MAC address on RTL8168C
- change sc_rev numbers to match quirk numbers used in Realtek's driver
- tweak some register definitions
Taken from Realtek's FreeBSD driver.

Untested yet on 8168C, but no bad sideeffect on older chips.
2008-05-06 11:45:00 +00:00
tsutsui aadb5be453 Add some register definitions for RTL8168C. 2008-04-05 18:26:39 +00:00
dyoung f89026db01 Make some RE_* constants aliases for their generic ethernet
counterparts, whose values are the same.
2008-02-06 22:51:02 +00:00
tsutsui e09797feab FreeBSD says "16 bits" comment about RTK_GTXSTART was incorrect.
Use CSR_WRITE_1() for it. (though the previous code also worked)
2008-02-04 15:16:49 +00:00
tsutsui 19daf5ad0b Cleanup handling of quikrs on each RealTek chip:
- replace rtk_type member in rtk_softc which has chip types
  with new rtk_quirk that represents quirks on each chip:
  - RTKQ_8129           doesn't have internal MII (used in rtk(4))
  - RTKQ_8139CPLUS      has different register layout (for re(4))
  - RTKQ_8169NONS       (original 8169) requires some settings on init
  - RTKQ_PCIE           requires different settings in setmulti
  so that we don't have to check each hwrev values or types everywhere
  and newer variants will also work without changes if they don't
  have other quirks
  (sc_rev is unchenged for now for reference to the Realtek's driver)
- don't check hwrev register in re_pci_match() but check
  only PCI_VENDER(), PCI_PRODUCT() and PCI_REVISION()
  so that we no longer have to map pci space there
- add a new HWREV value for another 8168 variant
- try to map PCI mem space more properly
- remove (probably unneeded) ifp->if_baudrate initialization

Tested on a newer 8168 variant by Dennis den Brok on tech-kern,
and also tested on 8139 and 8169C on macppc, and 8139C+ on landisk
by me.
2007-03-21 12:17:31 +00:00
tsutsui 15a85916ca Add another 8100E HWREV number. From Realtek driver and Plan9 driver. 2007-02-04 04:41:43 +00:00
tsutsui 47af0126d5 Change RXFIFO, RXDMA and TXDMA configrations to values taken from
the Reaktek's driver, which are also used in FreeBSD.
Fixes RX FIFO overrun errors on my Duron 1300MHz PC.
(Note the configuration values for rtk(4) are not changed)

Also add some debug printf's in RX error case (disabled by default).
2006-11-24 16:30:45 +00:00
tsutsui d56fc00c0d - sync HWREV definitions with FreeBSD
- recognize 8169SC/8100E/8101E (untested, but won't hurt working devices)
  XXX: 8100E/8101E don't support 1000M; need some flag to set if_baudrate
2006-11-18 07:22:06 +00:00
tsutsui 654712938e - add some more register definitions from Realtek driver
- sort
2006-11-17 23:41:42 +00:00
tsutsui a6058d8988 Rename prefixes of re(4) specific macro and structure members
from RTK_ or rtk_ to RE_ or re_ for maintainability of these sources.
Eventually we should split these files (and struct rtk_softc) into
three elements, rtk(4) specific one, re(4) specific one, and a common
(register definitions, eeprom and multicast functions etc) part.

While here, add a couple of comments around weird definitions.
2006-11-05 16:52:10 +00:00
tsutsui 7274f167d2 - make TX threshold macro more generic
- no need to bother to initialize sc_txthresh in rtk_attach()
  since it's done in rtk_init()
2006-11-05 15:49:41 +00:00
tsutsui 304b305c9e Minor cleanups:
- move some driver specific definitions from rtl81x9reg.h to rtl81x9var.h
- move several macro where related structures are declared
- remove unused macro
- fix some comments
- unwrap some lines
2006-11-03 17:01:54 +00:00
tsutsui a8d1516f11 Use #define<space>, which seems consistent in these files. 2006-11-03 14:41:40 +00:00
christos f26b055a0e PR/34933: Sami Kantoluoto: RealTek 8168B found from Asus P5B motherboard
is not recognized
2006-10-28 23:18:34 +00:00
tsutsui 572ce0789f u_intNN_t -> uintNN_t 2006-10-20 16:31:08 +00:00
tsutsui e9a7d245ed - call bus_dmamap_sync(9) against DMA descriptors more properly
- make DMA descripter members volatile
Now re(4) works on sgimips O2.

XXX: Still re(4) sometimes stalls on NFS load on sgimips,
XXX: but I'm not sure it's sgimips specific or not.
2006-10-20 11:30:54 +00:00
christos 8b28dc1494 PR/33761: dieter roelants: NetBSD doesn't recognize a RealTek 8168B nic 2006-06-18 21:32:24 +00:00
rpaulo 333596ccdb PR/32386: Dawid Szymanski (arhea). Add support for the 8169SB chipset. 2005-12-25 19:55:40 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
yamt e012617b1e - restructure tx descriptor handling code to decouple
number of tx descriptors, number of rx descriptors, and number of mbufs.
- bump number of tx descriptors for rtl8169.  64 doesn't seem to be sufficient
  when doing TSO.
2005-03-23 20:23:08 +00:00
yamt 5ef6b21b78 re(4) driver:
- TSO support.
- fix some error handling.
- remove mysterious RTK_NTXSEGS and use more appropriate values
  for bus_dmamap_create.
- if we need more than all of our tx descriptors in order to transmit a packet,
  just drop it rather than retrying infinitely.
2005-03-12 08:01:51 +00:00
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
kanaoka dcccc9d794 sys/dev/ic/rtl8169.c:
- re_attach(): Use bus_dma* directly instead of calling re_alloc().
 - re_attach(): Free bus_dma* resources if attach fails.
 - re_detach(): Free bus_dma* resources.
 - re_newbuf(): Remove unnecessary error check.

sys/dev/ic/rtl81x9reg.h:
 - Define RTK_NTXSEGS.

sys/dev/ic/rtl81x9var.h:
 - Add new members to struct rtk_list_data for bus_dma*.
2005-01-09 12:25:25 +00:00
wiz c5670263e0 Fix some typos. From Tom Cosgrove via jmc@openbsd. 2003-11-02 11:07:44 +00:00
fvdl e645b8b032 Add definitions for 8139C+ and 8169 chips. Not used yet. From FreeBSD. 2003-10-25 23:48:45 +00:00
thorpej 3c0c1146ac Use a 16K receive buffer on the SEGA Dreamcast (XXX should be
done differently than it is).
2001-01-31 07:44:51 +00:00
tsutsui f2973e2fb8 - Change RL_* -> RTK_*
- Free bus_dma resources if attach fails
- Add detach and power management code

Patch from Masanori Kanaoka <kanaoka@ann.hi-ho.ne.jp> in kern/10156.
2000-05-19 13:42:29 +00:00
tsutsui 439b360ab9 Modify EEPROM read functions and handle also 9356 EEPROM.
Fixes kern/9861.
2000-04-30 12:00:40 +00:00
tsutsui b4f524c223 - Allocate mbuf dynamically on Tx and use bus_dmamap_load_mbuf(9).
- Call bus_dmamap_sync(9) as appropriate.
- Leave only register declarations in rtl81x9reg.h and
  split other stuff into rtl81x9var.h.

bus_dma(9) code mostly taken from thorpej's if_rtp.c.
2000-04-26 14:02:34 +00:00
tsutsui 6f9392b42a Merge changes of sys/pci/if_rl.c rev. 1.8->1.10. (from kern/9870)
Also remove unused pbase, vbase and PCI_CAP_PWRMGMT declarations.
2000-04-24 15:25:00 +00:00
haya e49807d100 Incorporate the changes of RL81x9 driver provided by M. Kanaoka
<kanaoka@ann.hi-ho.ne.jp>.  He separated the driver into IC specific
portion and bus attachment portion and added cardbus attachent.
2000-04-10 07:42:55 +00:00