summaryrefslogtreecommitdiff
path: root/sys/dev/ic/re.c
AgeCommit message (Collapse)Author
2010-11-12revert MCLGETI for re(4) for now, it is causing hangs (in some casesStuart Henderson
temporary, in others apparently permanent) with high rates of input packets. ok deraadt@
2010-10-05add missing splx in the debug codepath. nevertheless thatMike Belopuhov
doesn't mean it should be wrong. ok blambert, jsg
2010-08-27remove the unused if_init callback in struct ifnetJonathan Gray
ok deraadt@ henning@ claudio@
2010-08-08Fix re_stop() invocation (normally #ifdef'd out) to use new parameterKenneth R Westerback
list. ok deraadt@
2010-08-07Revert 1.123. Hangs RTL8168C/8111C (0x3c00) afterChristian Weisgerber
ifconfig re0 up ifconfig re0 down dhclient re0 ok krw@, deraadt@
2010-08-07No "\n" needed at the end of panic() strings.Kenneth R Westerback
Bogus chunks pointed out by matthew@ and miod@. No cookies for marco@ and jasper@. ok deraadt@ miod@ matthew@ jasper@ macro@
2010-07-27Make sure we stop DMA before we suspend. Remove unused argument to re_stop()Mark Kettenis
to avoid the dilemma what meaningless value to pass. ok deraadt@
2010-07-14Newer 8168x and 810x chipsets have a different way of stopping the chipset.Christian Weisgerber
From FreeBSD via Brad.
2010-07-10Reduce the delays a bit in the miibus read/write routines.Christian Weisgerber
Although with aditional 20us delays added just before returning from miibus read/writes as required by the hardware. Based on the Linux r8169 driver; from Brad.
2010-06-28fix typo; from BradChristian Weisgerber
2010-06-28Add initial support for RTL8168E, brokenness reported by Joe Gidi.Stuart Henderson
With help from Brad, ok jsg@, closes system/6402
2010-05-19BUS_DMA_ZERO instead of alloc, map, bzero.Owain Ainsworth
ok krw@
2010-04-03Set the RL_FLAG_MACSLEEP flag for the RTL8103E chipset.Stuart Henderson
Currently a noop as the code for RL_FLAG_MACSLEEP hasn't been added yet. From FreeBSD via Brad.
2010-02-17Make sure we claim the interrupt as ours if the time out bit is set in theMark Kettenis
interrupt status register. Fixes a problem with spurious interrupts on the fuloong. ok miod@
2009-11-24Reset the chip an re-initialise the interface after reset. Resetting theMark Kettenis
PHY doesn't seem to be necessary on re(4) so don't descend further for now. Based on a diff from mlarkin@ ok deraadt@
2009-11-13Remove an unnecessary assignment. From NetBSD via Brad.Stuart Henderson
2009-08-09MCLGETI() will now allocate a mbuf header if it is not provided, thusTheo de Raadt
reducing the amount of splnet/splx dancing required.. especially in the worst case (of m_cldrop) ok dlg kettenis damien
2009-07-23Switch re(4) over to MCLGETI.Mark Kettenis
ok deraadt@
2009-07-18reorder a switch block, no functional change but reduces the diffStuart Henderson
with FreeBSD. From Brad.
2009-07-15Removes the magic bit from re_init() and moves the commonChristian Weisgerber
flag to the top. No change with the actual cplus mode register setting being used with the controllers. From brad@
2009-07-11- Add some new feature flagsStuart Henderson
- Add defines for newer chipsets From FreeBSD via Brad. No functional change, needed for future work. ok naddy@.
2009-07-10RL_HWREV_8168DP can be either RTL8168DP or RTL8111DP, so print both,Stuart Henderson
as done for other RTL8168 HWREVs. From Brad.
2009-07-03Support RTL8103E and RTL8168DP which are starting to show up, from brad.Theo de Raadt
OK from kettenis and sthen after the diff was minimized to have no potential impact on other chips.
2009-06-04Fix IPv4 rx checksumming for the non-TCP/UDP case. DESCV2 chipsChristian Weisgerber
don't set RL_RDESC_STAT_PROTOID for non-TCP/UDP IP packets, only RL_RDESC_IPV[46]. Also check RL_RDESC_IPV[46] before inspecting the TCP/UDP checksum bits to make IPv6 TCP/UDP checksum offload work intentionally. Gleaned from NetBSD.
2009-06-03from Brad; I've read and tested it, also reads ok to dlg@.Stuart Henderson
- Further simplify the re(4) receive filter handling and have everything taken care of in re_iff(), eliminating a bit of code from re_init(). - Remove unused if_flags field.
2009-05-23FALL THROUGH -> FALLTHROUGH to appease lintJonathan Gray
2009-02-12don't access undocumented register 0x82 for <= MAC06, since newerMartynas Venckus
realteks start to behave badly if we do. this should fix the widely reported re(4) issue. makes my RTL8101E usable, fixes Thomas' RTL8168C, and PR6023. tested by many this is a more conservative version of my diff from kettenis@ (does not clear PHY register 0x0b) ok kettenis@
2008-11-30Add initial 8168D/8111D support.Brad Smith
2008-11-28Eliminate the redundant bits of code for MTU and multicast handlingBrad Smith
from the individual drivers now that ether_ioctl() handles this. Shrinks the i386 kernels by.. RAMDISK - 2176 bytes RAMDISKB - 1504 bytes RAMDISKC - 736 bytes Tested by naddy@/okan@/sthen@/brad@/todd@/jmc@ and lots of users. Build tested on almost all archs by todd@/brad@ ok naddy@
2008-11-17Sprinkle a few more tabs.Brad Smith
2008-11-14Revert the reduction in the delays in the miibus read/write routines,Christian Weisgerber
which broke on-board RTL8111C adapters.
2008-11-09Introduce bpf_mtap_ether(), which for the benefit of bpf listenersChristian Weisgerber
creates the VLAN encapsulation from the tag stored in the mbuf header. Idea from FreeBSD, input from claudio@ and canacar@. Switch all hardware VLAN enabled drivers to the new function. ok claudio@
2008-11-08Reduce the delay's a bit in the miibus read/write routines.Brad Smith
Based on the Linux r8169 driver. Tested on PCI/CardBus and PCIe adapters.
2008-11-07Try recollecting RX/TX descriptors if we are going to switch back to TX/RXBrad Smith
interrupts. There seems to be a race between turning on TX/RX interrupt and asserting TX/RX interrupt by the hardware. From Sephe@DragonFly
2008-10-16Switch the existing TX VLAN hardware support over to having theChristian Weisgerber
tag in the header. Convert TX tagging in the drivers. Help and ok brad@
2008-10-16Convert RX tag stripping to storing the tag in the mbuf header andChristian Weisgerber
enable RX tag stripping for re(4). ok brad@
2008-10-11Use hardware timer to simulate interrupt moderation. Old devices will noBrad Smith
longer be livelocked when they are receiving on GigE line. Newer devices also gain well controlled interrupt rate. If hardware supports interrupt moderation (e.g. 8168B, 8168C), you could also use hardware based interrupt moderation, however, due to lack of necessary information it does not work as reliably as simulated interrupt moderation. It is _not_ recommended currently. By default, PCIe devices' simulated interrupt moderation timer is set to 75us, while PCI devices' is set to 125us. From sephe@DragonFly
2008-10-09Set hardware timer according to bus clock speed.Brad Smith
From sephe@DragonFly
2008-10-06Detect and store the PCI/PCIe bus speed.Brad Smith
From DragonFly
2008-10-02First step towards cleaning up the Ethernet driver ioctl handling.Brad Smith
Move calling ether_ioctl() from the top of the ioctl function, which at the moment does absolutely nothing, to the default switch case. Thus allowing drivers to define their own ioctl handlers and then falling back on ether_ioctl(). The only functional change this results in at the moment is having all Ethernet drivers returning the proper errno of ENOTTY instead of EINVAL/ENXIO when encountering unknown ioctl's. Shrinks the i386 kernels by.. RAMDISK - 1024 bytes RAMDISKB - 1120 bytes RAMDISKC - 832 bytes Tested by martin@/jsing@/todd@/brad@ Build tested on almost all archs by todd@/brad@ ok jsing@
2008-09-10Convert timeout_add() calls using multiples of hz to timeout_add_sec()Bret Lambert
Really just the low-hanging fruit of (hopefully) forthcoming timeout conversions. ok art@, krw@
2008-08-29Take the PHY out of power down while attaching just before probing forBrad Smith
PHY. This helps with systems dual booting Windows XP/Vista where the Windows drivers will put the PHY in power down mode when rebooting. From FreeBSD
2008-08-28Rewrite the multicast/promiscuous handling and in the process merge intoBrad Smith
one function. Also fix reception of multicast packets when in promisuous mode. The Realtek chips are a little different than most others in that they will not receive multicast packets by enabling promiscuous mode alone. Tested by naddy@ and sthen@ ok naddy@
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@