summaryrefslogtreecommitdiff
path: root/sys/dev/em
Commit message (Collapse)AuthorAgeFilesLines
* MFC: Don't call em_stop() when the watchdog expires. This preventsDaniel Eischen2003-12-071-1/+0
| | | | | | | | | a panic caused by a mutex assertion. Approved by: re@(scottl) Notes: svn path=/releng/5.2/; revision=123241
* Use if_flags to check for IFF_POLLING instead of if_ipending.Prafulla Deuskar2003-12-021-3/+3
| | | | | | | | Submitted by: jroberson (Jeff Roberson) Approved by: re (scottl) Notes: svn path=/head/; revision=123115
* - Code cleanupPrafulla Deuskar2003-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 Notes: svn path=/head/; revision=122681
* Replace the if_name and if_unit members of struct ifnet with new membersBrooks Davis2003-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) Notes: svn path=/head/; revision=121816
* Add a wrapper for a function that takes and releases the adapterDaniel Eischen2003-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 Notes: svn path=/head/; revision=121106
* locking fixups:Sam Leffler2003-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> Notes: svn path=/head/; revision=120989
* add lockingSam Leffler2003-09-232-65/+104
| | | | | | | | Reviewed by: Prafulla Deuskar <pdeuskar@FreeBSD.ORG> Sponsored by: FreeBSD Foundation Notes: svn path=/head/; revision=120364
* Add support for new devices.Prafulla Deuskar2003-08-275-956/+1870
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=119509
* Use __FBSDID().David E. O'Brien2003-08-241-1/+3
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119418
* Prefer new location of pci include files (which have only been in theWarner Losh2003-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. Notes: svn path=/head/; revision=119277
* Add facilities for tuning the "em" driver's interrupt delays withoutJohn Polstra2003-08-013-39/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=118314
* Correct comments to indicate that the EM_RADV and EM_TADV parametersJohn Polstra2003-07-171-2/+2
| | | | | | | are not applicable to the 82544. Notes: svn path=/head/; revision=117697
* The em(4) driver has been converted to busdma and doesn't useMaxime Henrion2003-07-041-5/+0
| | | | | | | | vtophys() anymore, so remove the alpha hack which defines vtophys() to alpha_XXX_dmamap(). Notes: svn path=/head/; revision=117218
* Mega busdma API commit.Scott Long2003-07-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg. Lockfunc allows a driver to provide a function for managing its locking semantics while using busdma. At the moment, this is used for the asynchronous busdma_swi and callback mechanism. Two lockfunc implementations are provided: busdma_lock_mutex() performs standard mutex operations on the mutex that is specified from lockfuncarg. dftl_lock() is a panic implementation and is defaulted to when NULL, NULL are passed to bus_dma_tag_create(). The only time that NULL, NULL should ever be used is when the driver ensures that bus_dmamap_load() will not be deferred. Drivers that do not provide their own locking can pass busdma_lock_mutex,&Giant args in order to preserve the former behaviour. sparc64 and powerpc do not provide real busdma_swi functions, so this is largely a noop on those platforms. The busdma_swi on is64 is not properly locked yet, so warnings will be emitted on this platform when busdma callback deferrals happen. If anyone gets panics or warnings from dflt_lock() being called, please let me know right away. Reviewed by: tmm, gibbs Notes: svn path=/head/; revision=117126
* Add support for Quad port adapterPrafulla Deuskar2003-06-055-369/+483
| | | | | | | | | | | Add sysctl's to display statistics/debug_info Set WAIT_FOR_AUTONEG_DEFAULT to zero by default Increment packet in/out statistics inline instead of every two seconds. MFC after: 3 days Notes: svn path=/head/; revision=115878
* Fix a printf() format error which broke the ia64 GENERIC build.Dag-Erling Smørgrav2003-05-061-1/+2
| | | | Notes: svn path=/head/; revision=114776
* - Fix breakage on PAE enabled kernelPrafulla Deuskar2003-05-032-8/+10
| | | | | | | | | - Don't use vtophys when you can get physical address using bus_dma API Submitted by: jake (Jake Burkholder) Notes: svn path=/head/; revision=114567
* - Bus DMA'fy the driverPrafulla Deuskar2003-05-022-235/+457
| | | | | | | | | - Use htole* macros where appropriate so that the driver could work on non-x86 architectures - Use m_getcl() instead of MGETHDR/MCLGET macros Submitted by: sam (Sam Leffler) Notes: svn path=/head/; revision=114554
* Tell the upper layer(s) that we support long frames.Prafulla Deuskar2003-04-181-0/+4
| | | | | | | | | | Not doing this caused the vlan mtu to be reduced by 4 bytes. Submitted by: Doug Ambrisko (ambrisko) MFC after: 1 day Notes: svn path=/head/; revision=113673
* - Express hard dependencies on bus (pci, isa, pccard) andMatthew N. Dodd2003-04-151-1/+3
| | | | | | | | | | | network layer (ether). - Don't abuse module names to facilitate ifconfig module loading; such abuse isn't really needed. (And if we do need type information associated with a module then we should make it explicit and not use hacks.) Notes: svn path=/head/; revision=113506
* Added support for 82541 and 82547 based adapters.Prafulla Deuskar2003-03-217-621/+1972
| | | | | | | | | | - These have Intel gigabit PHY - 82547 uses CSA interface MFC after: 1 week Notes: svn path=/head/; revision=112472
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-191-2/+2
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-211-2/+2
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* The README refers to a LICENSE file, so add that file too.Prafulla Deuskar2003-01-071-0/+29
| | | | | | | | | BTW the license is also embedded in the source files. MFC after: 1 day Notes: svn path=/head/; revision=108894
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,Jens Schweikhardt2003-01-011-1/+1
| | | | | | | especially in troff files. Notes: svn path=/head/; revision=108533
* - Move to array based indexing for TX/RX descriptor/buffer managementPrafulla Deuskar2002-12-233-532/+513
| | | | | | | | | | | | - Added support for ITR (interrupt throttle register). This feature is available on adapters based on 82545 and above - Fixed problem with vlan support when traffic has priority bits set. (kern/45907) PR: kern/45907 MFC after: 1 week Notes: svn path=/head/; revision=108229
* Fix IFF_ALLMULTI handling.Luigi Rizzo2002-11-251-7/+7
| | | | | | | | Reviewed by: pdeuskar (maintainer) Approved by: re Notes: svn path=/head/; revision=107243
* Add polling support to the "em" driver.Luigi Rizzo2002-11-251-4/+59
| | | | | | | | Reviewed by: pdeuskar (maintainer) Approved by: re Notes: svn path=/head/; revision=107242
* network interface driver changes:Sam Leffler2002-11-142-22/+15
| | | | | | | | | | | | | | | | | o don't strip the Ethernet header from inbound packets; pass packets up the stack intact (required significant changes to some drivers) o reference common definitions in net/ethernet.h (e.g. ETHER_ALIGN) o track ether_ifattach/ether_ifdetach API changes o track bpf changes (use BPF_TAP and BPF_MTAP) o track vlan changes (ifnet capabilities, revised processing scheme, etc.) o use if_input to pass packets "up" o call ether_ioctl for default handling of ioctls Reviewed by: many Approved by: re Notes: svn path=/head/; revision=106937
* - Set RS (Report Status) bit on all descriptors of a packet instead of just ↵Prafulla Deuskar2002-11-086-515/+763
| | | | | | | | | | | | | | the last one. - Set RDTR to zero by default instead of 28. - Fixed a problem with TX hangs with jumbo frames when number of fragments in the mbuf chain is large. - Added support for 82540EP based cards. MFC after: 3 days Notes: svn path=/head/; revision=106649
* Corrected license in the source files. It should say "MUST" instead of "MAY".Prafulla Deuskar2002-09-245-104/+94
| | | | | | | MFC after: 2 days Notes: svn path=/head/; revision=103895
* Back out TX/RX descriptor/buffer management changes from earier commit.Prafulla Deuskar2002-08-262-208/+304
| | | | | | | | | We are having panics with the driver under stress with jumbo frames. Unfortunately we didnot catch it during our regular test cycle. I am going to MFC the backout immediately. Notes: svn path=/head/; revision=102452
* TX/RX descriptor/buffer management changes.Prafulla Deuskar2002-08-212-304/+208
| | | | | | | | | | Use array based scheme instead of queueing macros. Submitted by: Luigi Rizzo (rizzo@icir.org) MFC after: 3 days Notes: svn path=/head/; revision=102242
* - Use IO mode to reset the controller (82544 and beyond)Prafulla Deuskar2002-07-166-103/+429
| | | | | | | | | | - Read the Mac address only once during attach. (This fixes the failover issue observed using the bonding driver) MFC after: 3 days Notes: svn path=/head/; revision=100184
* Removed unneeded files.Prafulla Deuskar2002-06-184-5322/+0
| | | | | | | | | | if_em_fxhw.[c,h] and if_em_phy.[c,h] have been merged into one [c,h] file. MFC after: 3 days Notes: svn path=/head/; revision=98404
* Added support for 82545EM and 82546EB based adapters.Prafulla Deuskar2002-06-036-1531/+6978
| | | | | | | | | Added Vlan support. MFC after: 1 week Notes: svn path=/head/; revision=97785
* Fix new gcc-3.1 warnings. I think this gets GENERIC compiling cleanlyPeter Wemm2002-05-241-1/+1
| | | | | | | again. Notes: svn path=/head/; revision=97208
* Make em driver compilable on IA64/alpha.Prafulla Deuskar2002-05-021-4/+4
| | | | | | | | Submitted by: peter MFC after: 3 days Notes: svn path=/head/; revision=95962
* Follow NetBSD and s/IFM_1000_TX/IFM_1000_T/Poul-Henning Kamp2002-04-281-4/+4
| | | | Notes: svn path=/head/; revision=95673
* Added support for 82540EM based cards.Prafulla Deuskar2002-04-067-1002/+1098
| | | | | | | | | Cosmetic changes to make code more unix-like. MFC after: 1 week Notes: svn path=/head/; revision=93914
* Remove __P.Alfred Perlstein2002-03-201-43/+42
| | | | Notes: svn path=/head/; revision=92739
* - Added support for receive in multiplePrafulla Deuskar2002-02-137-4555/+4838
| | | | | | | | | | | | descriptors. This simplifies code for jumbo frames. - Cleaned up coding conventions to make code more unix-like. - Cleaned up code in if_em_fxhw.c and if_em_phy.c. Added relevant comments. MFC after: 1 week Notes: svn path=/head/; revision=90628
* -Remove unneeded include stddef.hPrafulla Deuskar2001-12-201-1/+0
| | | | | | | | | | | -Modify modules Makefile so that em driver compiles only on i386 platform. (Alpha not supported yet) PR: kern/32993 MFC after: 1 Notes: svn path=/head/; revision=88308
* Fixed two problems:Prafulla Deuskar2001-12-062-9/+5
| | | | | | | | | | | | | 1. Changed incorrect conditional in fxhw.c which would never evaluate to true. Thanks to John Polstra for pointing that out. 2. Write to PCI config space by default, enabling memory access and bus master enable. Submitted by:Prafulla Deuskar MFC after:3 days Notes: svn path=/head/; revision=87450
* This is the first commit of the Intel gigabit driver forPrafulla Deuskar2001-12-027-0/+7573
PRO/1000 cards. Submitted by:Prafulla Deuskar Reviewed by: Paul Saab MFC after:1 week Notes: svn path=/head/; revision=87189