summaryrefslogtreecommitdiff
path: root/sys/dev/ie
AgeCommit message (Collapse)Author
2016-08-20Remove the ie(4) driver for Intel 82586 ISA Ethernet adapters.John Baldwin
This driver only supports 10Mb Ethernet using PIO (the hardware supports DMA, but the driver only does PIO). There are not any PCCard adapters supported by this driver, only ISA cards. In addition, it does not use bus_space but instead uses bcopy with volatile pointers triggering a host of warnings. (if_ie.c is one of 3 files always built with -Wno-error) Relnotes: yes Notes: svn path=/head/; revision=304513
2016-04-10Cleanup unnecessary semicolons from the kernel.Pedro F. Giffuni
Found with devel/coccinelle. Notes: svn path=/head/; revision=297793
2015-01-06In order to reduce use of M_EXT outside of the mbuf allocator andRobert Watson
socket-buffer implementations, introduce a return value for MCLGET() (and m_cljget() that underlies it) to allow the caller to avoid testing M_EXT itself. Update all callers to use the return value. With this change, very few network device drivers remain aware of M_EXT; the primary exceptions lie in mbuf-chain pretty printers for debugging, and in a few cases, custom mbuf and cluster allocation implementations. NB: This is a difficult-to-test change as it touches many drivers for which I don't have physical devices. Instead we've gone for intensive review, but further post-commit review would definitely be appreciated to spot errors where changes could not easily be made mechanically, but were largely mechanical in nature. Differential Revision: https://reviews.freebsd.org/D1440 Reviewed by: adrian, bz, gnn Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=276750
2014-09-28Convert most BPF_TAP users to BPF_MTAP.Alexander V. Chernikov
MFC after: 2 weeks Notes: svn path=/head/; revision=272266
2014-09-18- Mechanically convert to if_inc_counter().Gleb Smirnoff
- Cut code that runs a counter backwards. Notes: svn path=/head/; revision=271820
2013-12-25Bite the bullet and start removing the first compile time warningsBjoern A. Zeeb
by removing unsued file local functions and then unused callees. A lot more warnings to resolve but someone had to break the ice. MFC after: 10 days X-Comment: I am not the new maintainer; chime in, it's ours. Notes: svn path=/head/; revision=259886
2013-10-29- Provide necessary includes.Gleb Smirnoff
- Remove unnecessary includes. Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=257324
2013-10-26The r48589 promised to remove implicit inclusion of if_var.h soon. PrepareGleb Smirnoff
to this event, adding if_var.h to files that do need it. Also, include all includes that now are included due to implicit pollution via if_var.h Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=257176
2012-12-04Mechanically substitute flags from historic mbuf allocator withGleb Smirnoff
malloc(9) flags in sys/dev. Notes: svn path=/head/; revision=243857
2012-09-30Free result of device_get_children(9).Kevin Lo
Notes: svn path=/head/; revision=241066
2012-01-31Isolate v_caddr_t in the ie driver.Sergey Kandaurov
Submitted by: Bruce Evans on net@ Notes: svn path=/head/; revision=230808
2012-01-07ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it againKevin Lo
Reviewed by: yongari Notes: svn path=/head/; revision=229767
2010-05-03Add new tunable 'net.link.ifqmaxlen' to set default send interfaceMaxim Sobolev
queue length. The default value for this parameter is 50, which is quite low for many of today's uses and the only way to modify this parameter right now is to edit if_var.h file. Also add read-only sysctl with the same name, so that it's possible to retrieve the current value. MFC after: 1 month Notes: svn path=/head/; revision=207554
2009-06-26Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/Robert Watson
IF_ADDR_UNLOCK() across network device drivers when accessing the per-interface multicast address list, if_multiaddrs. This will allow us to change the locking strategy without affecting our driver programming interface or binary interface. For two wireless drivers, remove unnecessary locking, since they don't actually access the multicast address list. Approved by: re (kib) MFC after: 6 weeks Notes: svn path=/head/; revision=195049
2008-08-01Use the new bus device_shutdown hook for performing the shutdown actionJohn Baldwin
on the ee16 parts rather than explicitly registering an event handler that wasn't being torn down on detach. Notes: svn path=/head/; revision=181134
2008-06-05Rename the ie_EE16 module to just 'ie' so that at least one of the modulesJohn Baldwin
for this driver is called 'ie'. Otherwise, ifconfig(8) doesn't recognize any of the modules as being the ie(4) driver and will always try to kldload the driver even when it is already present in the kernel. Reported by: Thierry Herbelot Notes: svn path=/head/; revision=179559
2008-06-05- Fix two calls to ieinit() in ieioctl() to call ieinit_locked() instead toJohn Baldwin
avoid recursing on the lock. - Use IFQ_SET_MAXLEN(). Notes: svn path=/head/; revision=179558
2008-06-02Make ie(4) MPSAFE:John Baldwin
- Add a mutex to the softc and use it to protect the softc and device. - Setup the interrupt handler in the common code instead of in each front end and do it after ether_ifattach(). - Use ie_stop() and ieinit_locked() in iereset() rather than frobbing IFF_UP and invoking ieioctl(). - Use DELAY() to implement a spin loop on a register with a timeout rather than scheduling a timeout and then doing a tight spin on the register. In the non-MPSAFE case this would never have worked because the spinning code held Giant and the timeout routine would have been blocked on Giant forever. The same approach would not worke in the MPSAFE case either for the same reason, hence use a loop around DELAY(). - Clear IFF_DRV_(RUNNING|OACTIVE) in ie_stop() rather than in callers. - Call ieinit_locked() directly rather than ieioctl(!) from ie_mc_reset(). - Don't leak the rx frame buffer on detach. Tested by: Thierry Herbelot thierry of herbelot.com Notes: svn path=/head/; revision=179491
2008-05-30Fix build with DEBUG defined.John Baldwin
Reported by: tinderbox Notes: svn path=/head/; revision=179435
2008-05-29Use if_printf() and if_xname and retire 'unit' from the softc.John Baldwin
Notes: svn path=/head/; revision=179416
2007-02-23o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati
bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@ Notes: svn path=/head/; revision=166901
2006-05-16Since DELAY() was moved, most <machine/clock.h> #includes have beenPoul-Henning Kamp
unnecessary. Notes: svn path=/head/; revision=158651
2005-12-05Fix -Wundef warnings found when compiling i386 LINT, GENERIC andRuslan Ermilov
custom kernels. Notes: svn path=/head/; revision=153110
2005-11-11- Store pointer to the link-level address right in "struct ifnet"Ruslan Ermilov
rather than in ifindex_table[]; all (except one) accesses are through ifp anyway. IF_LLADDR() works faster, and all (except one) ifaddr_byindex() users were converted to use ifp->if_addr. - Stop storing a (pointer to) Ethernet address in "struct arpcom", and drop the IFP2ENADDR() macro; all users have been converted to use IF_LLADDR() instead. Notes: svn path=/head/; revision=152315
2005-09-16Fix "struct ifnet" leaks when attach() fails in the middle.Ruslan Ermilov
Notes: svn path=/head/; revision=150215
2005-08-09Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andRobert Watson
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 Notes: svn path=/head/; revision=148887
2005-08-03Modify device drivers supporting multicast addresses to lock if_addr_mtxRobert Watson
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 Notes: svn path=/head/; revision=148654
2005-06-10Stop embedding struct ifnet at the top of driver softcs. Instead theBrooks Davis
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 Notes: svn path=/head/; revision=147256
2005-05-29Remove bus_{mem,p}io.h and related code for a micro-optimization on i386Yoshihiro Takahashi
and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr) Notes: svn path=/head/; revision=146734
2005-01-06Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh
Notes: svn path=/head/; revision=139749
2004-08-13Since if_ie doesn't contain locking or run with INTR_MPSAFE, markRobert Watson
the interface as IFF_NEEDSGIANT so if_start is run holding Giant. Notes: svn path=/head/; revision=133689
2004-03-17Convert callers to the new bus_alloc_resource_any(9) API.Nate Lawson
Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Notes: svn path=/head/; revision=127135
2004-03-14Announce ethernet MAC addresss in ether_ifattach().Matthew N. Dodd
Notes: svn path=/head/; revision=126966
2003-10-31Replace the if_name and if_unit members of struct ifnet with new membersBrooks Davis
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
2003-08-24Use __FBSDID().David E. O'Brien
Also some minor style cleanups. Notes: svn path=/head/; revision=119418
2003-08-06Don't use pessimal (u_short) types for i/o ports. This is mainly forBruce Evans
completenss. The pessimization is tiny compared with i/o port slowness except on very old machines, but code that used signed short types for i/o ports was unpessimized long ago, and the macro that detected it recently started working for u_short types too. Use of bus space should have made this moot long ago. Not tested at runtime by: bde Notes: svn path=/head/; revision=118555
2003-07-22Move inlined function ie_ack() up to before first use.Poul-Henning Kamp
Notes: svn path=/head/; revision=117877
2003-03-29- Move driver to newbus.Matthew N. Dodd
- Provide identify methods for EtherExpress and 3c507 cards; this means these cards no longer need wired configs. - Provide a detach method. Notes: svn path=/head/; revision=112790
2003-03-29Clear the IFF_OACTIVE flag at the end of ieinit(). This preventsMatthew N. Dodd
the adapter from becoming wedged when when the interface is is brought up by ether_ioctl() (when you set an IP address for example.) Confirmed this "fix" from NetBSD's i82586 backend. It seems hackish to me but whatever. Notes: svn path=/head/; revision=112788
2003-03-29Adjust shared memory allocation to work on cards with only 8 KB of RAM.Matthew N. Dodd
Notes: svn path=/head/; revision=112783
2003-03-29Text formatting changes.Matthew N. Dodd
Notes: svn path=/head/; revision=112765
2003-03-28- Clean up function calling conventions.Matthew N. Dodd
- Be consistent about what we call our softc. - Minor formatting. - Add some register definitions gleaned from NetBSD/Linux. Notes: svn path=/head/; revision=112734
2003-03-27- Rely on ether_ifattach() to initialize part of our struct ifnetMatthew N. Dodd
rather than doing it ourself. - Set ifq_maxlen. - Include the size of the ethernet header when we allocate our mbuf chain in ieget(). Notes: svn path=/head/; revision=112720
2003-03-27Add missing COMPAT_ISA_DRIVER().Matthew N. Dodd
Oops. Notes: svn path=/head/; revision=112699
2003-02-19Back out M_* changes, per decision of the TRB.Warner Losh
Approved by: trb Notes: svn path=/head/; revision=111119
2003-01-21Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
2002-11-14network interface driver changes:Sam Leffler
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
2002-09-28Be consistent about "static" functions: if the function is markedPoul-Henning Kamp
static in its prototype, mark it static at the definition too. Inspired by: FlexeLint warning #512 Notes: svn path=/head/; revision=104094
2001-07-02Repo copy i82586.h to dev/ic/i82586.h.Warner Losh
This file currently is very ie specific, but I have plans to change that... Notes: svn path=/head/; revision=79077
2001-02-06Convert if_multiaddrs from LIST to TAILQ so that it can be traversedPoul-Henning Kamp
backwards in the three drivers which want to do that. Reviewed by: mikeh Notes: svn path=/head/; revision=72084