summaryrefslogtreecommitdiffstats
path: root/sys/dev/em
Commit message (Collapse)AuthorAgeFilesLines
* Fix "Memory modified after free" panic on detach, caused by accessingru2005-09-141-3/+0
| | | | already freed struct ifnet.
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-091-17/+19
| | | | | | | | | | | | | | IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field. Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so. Reviewed by: pjd, bz MFC after: 7 days
* Modify device drivers supporting multicast addresses to lock if_addr_mtxrwatson2005-08-031-1/+3
| | | | | | | | over iteration of their multicast address lists when synchronizing the hardware address filter with the network stack-maintained list. Problem reported by: Ed Maste (emaste at phaedrus dot sandvine dot ca> MFC after: 1 week
* Add missing ether_poll_deregister(). This is still not enough toru2005-08-021-0/+3
| | | | | kldunload/kldload without a panic. The same (but worse) problem is also present in ixgb(4).
* Correct a minor typo.delphij2005-07-111-1/+1
| | | | | Pointed out by: Xuefeng DENG <dengxf at dengh com> Approved by: re (scottl)
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-102-24/+24
| | | | | | | | | | | | | | | | | | | | struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com. This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go. Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr. Reviewed by: sobomax, sam
* Latest README to correspond to latest Intel version 2.1.7tackerman2005-05-261-143/+124
|
* Changes to update driver with latest Intel driver version 2.1.7tackerman2005-05-265-529/+2504
| | | | | | | | | | | - Changed from using explicit devices id to using descriptive labels. - Added support for 82573 and 82546 Quad adapters. - Corrected support for 82547EI and 82541ER (mac_type was not assigned) - Removed #ifdef DBG_STATS and extraneous code. if_em_hw.c/if_em_hw.h - Added support for 82573 and 82546 Quad adapters. - Brought forward Intel's most current mac and phy changes.
* Run em_local_timer() once per second instead of running it once per 2 seconds.glebius2005-04-051-4/+4
| | | | | | | This makes gathering of error stats more precise, and netstat(1) output look right. Reviewed by: tackerman
* Use BUS_PROBE_DEFAULT for pci probe return valueimp2005-03-051-2/+2
|
* Call if_link_state_change() when link status changes.glebius2005-02-041-0/+4
| | | | | PR: kern/76890 Reviewed by: rwatson, sam
* Respect the current setting of IFCAP_VLAN_HWTAGGING onyar2005-01-261-5/+18
| | | | | | | | | | | | | | | | | | | | | | | | the interface when going to toggle VLAN support for internal reasons. If the IFCAP_VLAN_HWTAGGING bit is cleared, we should rely on the (re)init routine to turn VLAN support off and never touch the relevant hardware bits. This applies to other capability bits, too. The user obviously has a reason for clearing a capability bit, e.g., if his particular NIC is buggy and hangs if a certain hardware capability is turned on even for a fraction of a second. The flag adapter->em_insert_vlan_header still is set or reset irrespective of the IFCAP_VLAN_HWTAGGING setting, as before, in order to handle the case when a user sets promiscuous mode on an interface first and later turns its IFCAP_VLAN_HWTAGGING bit on. This change might look orthogonal to rev#1.85, but in fact it is not. It introduces bugfixes that hopefully will make implementing the general scheme mentioned in the commit message of rev#1.85 easier.
* Disable use of hardware VLAN tagging and stripping in if_em in the defaultrwatson2005-01-261-1/+1
| | | | | | | | | | configuration: it appears to work properly in the non-promiscuous case, but we've not yet implemented a more general solution that maintains full functionality with promiscuous mode enabled. While my hope is that we can get one implemented soon, this will improve functionality substantially in the mean time. MFC after: 3 days
* Convert if_em to the new bus_dmamap_load_sg() interface. The old callbackscottl2005-01-152-39/+22
| | | | was really just a waste of cycles, so this streamlines it considerably.
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-0/+2
|
* Corrected a workaround that should only be applied to one adapter. Workaroundtackerman2005-01-011-2/+14
| | | | | | was causing device hangs when incorrectly applied to other adapters. PR: kern/66634
* Added device id support for Intel 82541ER and 82546GB dual port PCIE adapter.tackerman2005-01-011-0/+2
| | | | PR: None
* Further refine the if_em vlan fix in if_em.c:1.53:rwatson2004-11-141-4/+19
| | | | | | | | | | | | | - Because em_encap() can now fail in a way that leaves us without an mbuf chain, potentially set *m_headp to NULL if that happens, so that the caller can do the right thing. This case can occur when we try to prepend the vlan header mbuf but can't allocate additional memory. - Modify the caller of em_encap() to detect a NULL m_head and not try to queue the mbuf if that happens. - When em_encap() fails, make sure to call bus_dmamap_destroy() to clean up.
* Correct a bug in the if_em driver relating to the use of vlans withrwatson2004-11-122-6/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | promiscuous mode introduced in 1.45, which programs the em card not to strip or prepend tags when in promiscuous mode without also modifying behavior to manually prepend a vlan header in the event that the card isn't doing it on transmit. Due to a feature of card operation, if the global VLAN prepend/strip register isn't set, setting the VLAN tag flag on individual packet descriptors will cause the packet to be transmitted using ISL encapsulation rather than 802.1Q VLAN encapsulation. This fix causes em_encap() to prepend the header by tracking whether the card is configured to temporarily disable prepending/stripping due to promiscuous mode. As a result, entering promiscuous mode on the parent em interface no longer causes vlans to appear to "wedge" or transmit ISL-encapsulated frames, which typically will not be configured/spoken by the other endpoints on the VLAN trunk. This bug may also exist in other drivers, and the additional vlan encapsulation logic should be abstracted and centralized in if_vlan.c if so. RELENG_5_3 candidate. MFC after: 1 week Tested by: pjd, rwatson Reported by: astesin at ukrtelecom dot net Reported by: Mike Tancsa <mike at sentex dot net> Reported by: Iasen Kostov <tbyte at OTEL dot net>
* Unbreak the build.des2004-11-111-0/+1
| | | | Pointy hat to: bms
* Remove now-unused sysctl members.bms2004-11-111-4/+0
|
* Move per-instance sysctls under the per-device-instance tree.bms2004-11-111-23/+6
| | | | | Reviewed by: mux Prodded by: rwatson
* Put the "Link is up/down" printfs behind bootverbose. gigE is not so uncommonphk2004-11-031-6/+8
| | | | | that we need to tell people about every cable in the network anymore. It can be enabled for debugging purposes with "boot -v".
* Add missing bus_dmamap_sync() calls. If you are using an architecturemux2004-10-191-2/+12
| | | | | | | | | | | with a weak memory model or x86 + PAE (or more specifically, your driver is using bounce pages) and you have had problems with em(4), this may fix it. At least this is needed to have em(4) work properly on FreeBSD/arm. Original version by: cognet Reviewed by: tackerman Tested by: cognet
* Use an alignment of 1 instead of PAGE_SIZE for the rx and tx buffer tags.scottl2004-10-191-12/+2
| | | | | | | | | | Since the e1000 DMA engines hava no constraints on the alignment of buffer transfers, there is no reason to tell busdma that there is. This save a minimum of 1 malloc call per packet, which translates to eliminating 4 locks. It also means that buffers are not needlessly bounced when transfered. The end result is a 38% improvement in pps in a 4 way bridging environment. Obtained from: Sandvine, Inc.
* Don't count RNBC (internal buffer full) towards the RX error count since it'sscottl2004-10-091-1/+1
| | | | | | not really an error. Submitted by: Gerrit Nagelhout
* Fix typeo. Should read ***!***IFQ_DRV_IS_EMPTY.mlaier2004-09-291-1/+1
| | | | | | | | This might fix some of the trouble around em(4) filling up its buffers. Submitted by: mtm Pointy hat to: mlaier MFC after: 2 days
* Do not use the IO-mapping to issue the reset on the 82546 on arm. For somecognet2004-09-231-0/+2
| | | | reason, it results in corrupted descriptors.
* Added support for Intel PRO/1000 GT Desktop Adapter(Device ID 8086 107C)pdeuskar2004-09-014-242/+448
| | | | | | | | | | | Removed support for Intel 82541ER Added fix for 82547 which corrects an issue with Jumbo frames larger than 10k. Added fix for vlan tagged frames not being properly bridged. Corrected TBI workaround. Corrected incorrect LED operation issues Submitted by: tackerman (Tony Ackerman) MFC after: 2 weeks
* Bring in the first chunk of altq driver modifications. This covers themlaier2004-07-021-6/+8
| | | | | | | | | | | following drivers: bfe(4), em(4), fxp(4), lnc(4), tun(4), de(4) rl(4), sis(4) and xl(4) More patches are pending on: http://peoples.freebsd.org/~mlaier/ Please take a look and tell me if "your" driver is missing, so I can fix this. Tested-by: many No-objection: -current, -net
* Implement support for controlling VLAN_HWTAGGING through ioctl(SIOCSIFCAP).yar2004-06-041-5/+13
| | | | | | | This includes not only toggling the flag in if_capenable, but also really reconfiguring the hardware. Approved by: tackerman (as the em(4) maintainer)
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* We don't need to initialize if_output, ether_ifattach() does itmux2004-05-231-1/+0
| | | | for us.
* Stylistic changes around the previous commit:yar2004-05-201-3/+5
| | | | | | | - since the number of supported capabilities is growing, set bits in if_cap* in a consistent way; - unexpand(1) leading SPACE characters.
* Set the VLAN bits in if_capenable as well as in if_capabilitiesyar2004-05-201-0/+1
| | | | | | | | | because VLAN hardware features are enabled in em(4) by default. Note: Currently vlan(4) has a bug that it consults if_capabilities, not if_capenable. This will be fixed after all the network drivers set VLAN bits in if_capenable properly.
* Implemented per-interface polling(4) control.ru2004-04-111-5/+13
|
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-9/+9
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Only reset the phy when it is absolutely required.pdeuskar2004-02-103-59/+113
| | | | | | | This should fix the issues with long *init* times when you do ifconfig em0 alias. MFC after: 3 days
* Don't call em_stop() from the watchdog since it requires the controllerdeischen2003-12-071-1/+0
| | | | | | | | | | mutex to be locked. It is redundant since em_init() is called and this correctly locks the mutex and calls em_stop(). 5.2 release candidate since this can cause a panic if the watchdog expires. Tested by: kuriyama
* Use if_flags to check for IFF_POLLING instead of if_ipending.pdeuskar2003-12-021-3/+3
| | | | | Submitted by: jroberson (Jeff Roberson) Approved by: re (scottl)
* - Code cleanuppdeuskar2003-11-144-105/+48
| | | | | | | | - In the receive routine handle the case where last descriptor could have less than 4 bytes of data. - Handle race between detach/ioctl routine. MFC after: 3 days
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-311-2/+1
| | | | | | | | | | | | | if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname)
* Add a wrapper for a function that takes and releases the adapterdeischen2003-10-151-3/+13
| | | | | | | | | lock around a call to the original function. Make the timeout function in callout_reset() use the wrapped function to avoid a lock assertion panic. Reviewed by: sam Reported by: cgiordano@ids.net
* locking fixups:sam2003-10-102-9/+14
| | | | | | | | o correct recursive locking when polling and in em_82547_move_tail o destroy mutex on detach o add EM_LOCK_ASSERT and similar macros for creating+deleteing the mtx Submitted by: Daniel Eischen <eischen@vigrid.com>
* add lockingsam2003-09-232-65/+104
| | | | | Reviewed by: Prafulla Deuskar <pdeuskar@FreeBSD.ORG> Sponsored by: FreeBSD Foundation
* Add support for new devices.pdeuskar2003-08-275-957/+1871
| | | | | | | | | | Bug Fixes: - Allow users to use LAA - Remember promiscuous mode settings while bridging - Allow gratuitous arp's to be sent PR: 52966/54488 MFC after: 1 week
* Use __FBSDID().obrien2003-08-241-1/+3
| | | | Also some minor style cleanups.
* Prefer new location of pci include files (which have only been in theimp2003-08-222-4/+4
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* Add facilities for tuning the "em" driver's interrupt delays withoutjdp2003-08-013-44/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | recompiling the driver. See the comments near the top of "if_em.h" for descriptions of these delays. Four new loader tunables control the system-wide default values: hw.em.tx_int_delay hw.em.rx_int_delay hw.em.tx_abs_int_delay hw.em.rx_abs_int_delay The tunables are specified in microseconds. The valid range is 0-67108 usec., and 0 means that the timer is disabled. There are also four new sysctls (actually, a set of four for each "em" device in the system) to query and change the interrupt delays after the system is up: hw.em0.tx_int_delay hw.em0.rx_int_delay hw.em0.tx_abs_int_delay (not present for 82542/3/4 adapters) hw.em0.rx_abs_int_delay (not present for 82542/3/4 adapters) It seems to be OK to change these values even while the adapter is passing traffic. Approved by: Prafulla Deuskar <pdeuskar@FreeBSD.ORG> MFC after: 4 weeks
* Correct comments to indicate that the EM_RADV and EM_TADV parametersjdp2003-07-171-2/+2
| | | | are not applicable to the 82544.
OpenPOWER on IntegriCloud