summaryrefslogtreecommitdiff
path: root/sys/dev/ic/re.c
AgeCommit message (Collapse)Author
2008-08-13Replace the use of a separate softc field to track the linkBrad Smith
state with the newly minted link flag in the softc's rl_flags field. Tested by fkr@
2008-08-11Add support for TX/RX checksum offload for newer re(4) chipsets.Brad Smith
Tested by naddy@ From FreeBSD
2008-08-05Add support for reading the MAC address for newer re(4) chipsets.Brad Smith
The current method results in a MAC address of all zeros. Tested by bernd@/jcs@ with 8102E and fkr@ with 8168C. From FreeBSD ok jsg@
2008-07-15Adapt some code from the FreeBSD driver required to makeJonathan Gray
newer PCI Express adapters (ie 8168C*/8102*) work. V2 Checksum offload format in RTL8102 devices not yet supported. No objections from brad@. Thanks to everyone who tested.
2008-07-13Add some additional hardware revisions from FreeBSD needed forJonathan Gray
upcoming changes and sort list.
2008-04-20Move the threshold fix from the re(4) code back into the header asBrad Smith
it was going to be before the release. No functional change. prodded by kettenis@ ok dlg@
2008-04-20- Recognize the 8168C chipset.Brad Smith
- Add some more defines for the 8168C chipset. From NetBSD ok dlg@
2008-04-20Remove redundant checks for the 8139C+ chipset, this code can onlyBrad Smith
be reached if using the 8139C+ chipset. ok dlg@
2008-04-20- Add some more defines.Brad Smith
- Use one of the new defines in the re(4) code to remove a magic number. - Correct a comment. - Fix a typo. Most of this is from NetBSD. ok dlg@
2008-03-20VLAN tag info must be inserted into all descriptors of a multi-descriptorBrad Smith
packet transmission. From NetBSD Fixes PR 5655. Tested by Panagiotis Efstratiou <slasher at ee dot auth dot gr>, brad@ and sthen@
2008-03-12Set the RX FIFO threshold to no RX threshold for re(4) adapters.Brad Smith
This resolves a number of various bad symptoms experienced by numerous users especially with the adapters at Gig speed. Tested by quite a few users. From FreeBSD/NetBSD ok deraadt@
2008-02-17Simplify the hw revision handling by removing the use of theBrad Smith
rl_type softc field and only relying on the sc_hwrev softc field thoughout the driver. Tested by a number of users from tech@ ok dlg@
2008-01-16- Store the hw revision into a new softc field in re_attach() and referenceBrad Smith
the softc field wherever it is necessary. - Use a switch case in re_setmulti() to make things a bit easier to read. ok henning@ dlg@
2007-07-16The logic determining the value of rl_eewidth for the 9346 and 9356Todd C. Miller
eeproms was backwards. This resulted in a bogus MAC address being read from the eeprom on certain cards. From FreeBSD. OK pvalchev@
2007-06-06add another revision "RTL8168 3"; from NetBSD via BradPeter Valchev
2007-06-06- Recognize the 8110SCe 8169 revision in re(4)Peter Valchev
- Rename the existing 8110SC revision to 8110SCd to be consistent info from the linux driver via Brad
2007-05-08non-static inline functions waste spaceTheo de Raadt
2007-05-05Properly ifdef debug bits to save a bit of space.Jonathan Gray
ok reyk@
2007-03-02Fix and enable HW VLAN tagging.Kenneth R Westerback
From brad@, tested by brad on i386/amd64/sparc64 and by maja@ and ian@ on i386.
2007-02-25dmesg should look like devN at busN locators: device infoTheo de Raadt
the locators are printed by the bus drivers, rest by the device's driver.
2007-02-15from linux->freebsd->brad->me, tested by matthieu, brad, kettenis, others...Jason Wright
looks like realtek reversed the order of multicast stuff on the PCI-E cards
2007-02-08Don't clear IFF_OACTIVE in re_txeof() unless there are at least 4 freeMark Kettenis
TX descriptors. Further down the road re_encap() will bail if there aren't at least 4 free TX descriptors, causing re_start() to abort and set IFF_OACTIVE again. From marius@FreeBSD Tested by me, brad@, otto@ and Emilio Parea.
2007-02-03Don't set the RL_CFG1_FULLDUPLEX bit. The RL_CFG1_FULLDUPLEX bit inKenneth R Westerback
config register 1 is only valid with the 8129 chipset. The rtl81x9reg.h header has this bit marked with a comment indicating it is for the 8129 chipset and the 8168/8169 datasheets confirm that this bit is not valid for the newer chipsets. From yongari@FreeBSD via brad. Tested by brad, kettenis and otto.
2007-01-27When flooding dmesg with ``can't read/write phy register'', be nice enough toMiod Vallat
print the register number, so that someone gets a chance to investigate the problem.
2007-01-26remove duplicate test; from bradJason Wright
2007-01-23adjust m_data and m_len directly rather than calling m_adj().Marcus Glocker
From tsutsui@NetBSD over brad, some corrections by claudio@, tested by brad on sparc64 and otto@ on landisk. OK claudio@
2006-12-30Add flow control support.Mark Kettenis
ok brad@
2006-12-21re_fixup_rx() is a no-op function, other than copying data to the same ↵Dale Rahn
address, thus slowing down the driver on __STRICT_ALIGN archs, remove. ok deraadt@
2006-12-20remove debug message inserted in last commitTheo de Raadt
2006-12-12add a workaround for hardware ip4csum-tx bug on re(4) chips. theReyk Floeter
hardware checksum could be mangled with 28 byte or less IP packets. >From tsutsui@NetBSD Tested by otto@ brad@ and Han Boetes <han at mijncomputer dot nl> Tested by maja@ with the 8139C+ chipset Tested on amd64/i386/sparc64 ok mglocker@ brad@ otto@
2006-12-01rename 8100E id to spin 1 and add the 8100E second spin chip idTodd T. Fries
chip id from Linux r8169 driver from brad@
2006-11-28identify the chipset.Brad Smith
2006-11-28move printing of the interrupt string into re_attach().Brad Smith
2006-11-24replace a magic number (reserved TX descs?) with macroBrad Smith
From tsutsui@NetBSD
2006-11-18- set descriptor DMA addresses before enabling TX and RXBrad Smith
- set RL_EARLY_TX_THRESH before starting TX and RX - clear a TX timeout only if all queued packets are handled - declare struct rl_txq separately - minor style tweaks in re_txeof() From tsutsui@NetBSD Tested by brad@, maja@ and kettenis@ Tested on amd64/armish/i386/sparc64
2006-11-01Put common data for each RX DMA descriptor into a new rxsoft structure.Brad Smith
From tsutsui@NetBSD Tested by brad@ otto@ Tested on amd64/i386/sparc64
2006-10-31- Rename a variable to clarify meaning of index.Brad Smith
- Rename RL_[TR]X_DESC_INC() macro to RL_NEXT_[TR]X_DESC() and change them to return rvalues to avoid possible side effects. - Also define RL_NEXT_TXQ() for rl_txq index and use it as well. From tsutsui@NetBSD
2006-10-31- Make DMA descripter members volatileBrad Smith
- Remove usage of BUS_DMA_ALLOCNOW with bus_dmamap_create - Use BUS_DMA_COHERENT on mapping DMA memory for TX/RX descriptors - Adjust m_data and m_len directly rather than calling m_adj - Proper use of bus_dmamap_sync against DMA descriptors From tsutsui@NetBSD Tested by kettenis@ brad@ otto@ Tested on armish/amd64/i386/sparc64
2006-10-22DMA memory for the TX ring should be aligned at RL_RING_ALIGN,Brad Smith
not RE_ETHER_ALIGN. From tsutsui@NetBSD Tested on alpha/amd64/armish/i386/sparc64
2006-10-16Fix for watchdog timeouts experienced with some Realtek adapters.Brad Smith
From wpaul@FreeBSD ok kettenis@
2006-09-29Only run the hardware diagnostic function re_diag() on adapters withBrad Smith
the 8169 chipset, it is disabled by default anyway. Reset the TX interrupt mitigation counter in re_start() if no packets were queued and there are still TX descriptors in use. Write to the ISR and clear the link state in re_init(). From wpaul@FreeBSD
2006-09-18Fix for re_stop() being called from re_cardbus_shutdown() with theDimitry Andric
wrong arguments, causing uvm_fault on halt/reboot, with a cardbus re inserted. While here, cleanup prototypes and use revar.h everywhere. ok brad@
2006-09-17Re-add the link state check to re_start(), which was added in rev 1.31 andBrad Smith
removed in rev 1.43 just before release, as a workaround for a link state issue found with the 8139C+ chips. Due to the different bit layout used by the 8139C+ chips rlphy(4) was not reporting the correct link status. Fix from yongary@FreeBSD Tested by maja@
2006-09-15Kettenis's polished version of diff to preserve the mac address on thecus,Dale Rahn
if the hardware mac is a specific number (hardware doesn't provide unique mac addresses except in redboot fconfig data). yes deraadt@
2006-08-17Remove the link state check from re_start() for now. Allows the 8139C+Brad Smith
based adapters to work again. Issue reported by and workaround tested by maja@
2006-08-06fix swapping of the station address for big-endian archs.Brad Smith
From yongari@FreeBSD
2006-08-06fix the config space macro used with the TX start command.Brad Smith
From wpaul@FreeBSD
2006-08-06With the PCIe devices, it looks as if issuing a TX command whileBrad Smith
there is already a transmission in progress has no effect. In other words, if you send two packets in rapid succession, the second one may end up sitting in the TX DMA ring until another transmit command is issued later in the future. Basically, if re_txeof() sees that there are still descriptors outstanding, it needs to manually resume the TX DMA channel by issuing another TX command to make sure all transmissions are flushed out. (The PCI devices seem to keep the TX channel moving until all descriptors have been consumed. I'm not sure why the PCIe devices behave differently.) From wpaul@FreeBSD
2006-08-05- move the promiscuous mode handling code into re_setpromisc().Brad Smith
- have the NIC track the state and only set the promisc filter if IFF_PROMISC is adjusted, otherwise only init the NIC if it is not already running.
2006-08-05- restructure the TX descriptor handling code to decouple theBrad Smith
number of TX descriptors, the number of RX descriptors, and the number of mbufs. - bump the number of TX descriptors for the rtl8169 chipset. From yamt@NetBSD