summaryrefslogtreecommitdiffstats
path: root/sys/dev/ie
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup unnecessary semicolons from the kernel.pfg2016-04-101-1/+1
| | | | Found with devel/coccinelle.
* In order to reduce use of M_EXT outside of the mbuf allocator andrwatson2015-01-061-2/+1
| | | | | | | | | | | | | | | | | | | | | 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
* Convert most BPF_TAP users to BPF_MTAP.melifaro2014-09-281-7/+2
| | | | MFC after: 2 weeks
* - Mechanically convert to if_inc_counter().glebius2014-09-181-18/+14
| | | | - Cut code that runs a counter backwards.
* Bite the bullet and start removing the first compile time warningsbz2013-12-251-101/+0
| | | | | | | | 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.
* - Provide necessary includes.glebius2013-10-291-1/+3
| | | | | | | - Remove unnecessary includes. Sponsored by: Netflix Sponsored by: Nginx, Inc.
* The r48589 promised to remove implicit inclusion of if_var.h soon. Prepareglebius2013-10-261-0/+1
| | | | | | | | 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.
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-041-3/+3
| | | | malloc(9) flags in sys/dev.
* Free result of device_get_children(9).kevlo2012-09-301-0/+1
|
* Isolate v_caddr_t in the ie driver.pluknet2012-01-311-0/+3
| | | | Submitted by: Bruce Evans on net@
* ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it againkevlo2012-01-071-1/+0
| | | | Reviewed by: yongari
* Add new tunable 'net.link.ifqmaxlen' to set default send interfacesobomax2010-05-031-1/+1
| | | | | | | | | | 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
* Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/rwatson2009-06-261-2/+2
| | | | | | | | | | | | | 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
* Use the new bus device_shutdown hook for performing the shutdown actionjhb2008-08-013-9/+19
| | | | | on the ee16 parts rather than explicitly registering an event handler that wasn't being torn down on detach.
* Rename the ie_EE16 module to just 'ie' so that at least one of the modulesjhb2008-06-051-1/+7
| | | | | | | | 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
* - Fix two calls to ieinit() in ieioctl() to call ieinit_locked() instead tojhb2008-06-051-3/+3
| | | | | avoid recursing on the lock. - Use IFQ_SET_MAXLEN().
* Make ie(4) MPSAFE:jhb2008-06-023-81/+75
| | | | | | | | | | | | | | | | | | | - 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
* Fix build with DEBUG defined.jhb2008-05-301-4/+4
| | | | Reported by: tinderbox
* Use if_printf() and if_xname and retire 'unit' from the softc.jhb2008-05-292-48/+48
|
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-231-3/+3
| | | | | | | | | | | | | 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@
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-161-1/+0
| | | | unnecessary.
* Fix -Wundef warnings found when compiling i386 LINT, GENERIC andru2005-12-051-2/+2
| | | | custom kernels.
* - Store pointer to the link-level address right in "struct ifnet"ru2005-11-111-2/+2
| | | | | | | | | | 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.
* Fix "struct ifnet" leaks when attach() fails in the middle.ru2005-09-161-1/+2
|
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-091-10/+10
| | | | | | | | | | | | | | 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-0/+2
| | | | | | | | 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
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-103-45/+53
| | | | | | | | | | | | | | | | | | | | 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
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386nyan2005-05-292-2/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* Since if_ie doesn't contain locking or run with INTR_MPSAFE, markrwatson2004-08-131-1/+2
| | | | the interface as IFF_NEEDSGIANT so if_start is run holding Giant.
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-6/+6
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Announce ethernet MAC addresss in ether_ifattach().mdodd2004-03-141-3/+0
|
* 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)
* Use __FBSDID().obrien2003-08-242-4/+6
| | | | Also some minor style cleanups.
* Don't use pessimal (u_short) types for i/o ports. This is mainly forbde2003-08-061-1/+1
| | | | | | | | | | 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
* Move inlined function ie_ack() up to before first use.phk2003-07-221-8/+8
|
* - Move driver to newbus.mdodd2003-03-294-531/+1115
| | | | | | - Provide identify methods for EtherExpress and 3c507 cards; this means these cards no longer need wired configs. - Provide a detach method.
* Clear the IFF_OACTIVE flag at the end of ieinit(). This preventsmdodd2003-03-291-0/+2
| | | | | | | | 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.
* Adjust shared memory allocation to work on cards with only 8 KB of RAM.mdodd2003-03-291-6/+6
|
* Text formatting changes.mdodd2003-03-292-65/+68
|
* - Clean up function calling conventions.mdodd2003-03-283-439/+523
| | | | | | - Be consistent about what we call our softc. - Minor formatting. - Add some register definitions gleaned from NetBSD/Linux.
* - Rely on ether_ifattach() to initialize part of our struct ifnetmdodd2003-03-271-23/+17
| | | | | | | rather than doing it ourself. - Set ifq_maxlen. - Include the size of the ethernet header when we allocate our mbuf chain in ieget().
* Add missing COMPAT_ISA_DRIVER().mdodd2003-03-271-0/+1
| | | | Oops.
* Back out M_* changes, per decision of the TRB.imp2003-02-191-3/+3
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-3/+3
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* network interface driver changes:sam2002-11-141-39/+42
| | | | | | | | | | | | | | 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
* Be consistent about "static" functions: if the function is markedphk2002-09-281-14/+14
| | | | | | static in its prototype, mark it static at the definition too. Inspired by: FlexeLint warning #512
* Repo copy i82586.h to dev/ic/i82586.h.imp2001-07-021-1/+1
| | | | | This file currently is very ie specific, but I have plans to change that...
* Convert if_multiaddrs from LIST to TAILQ so that it can be traversedphk2001-02-061-1/+1
| | | | | | backwards in the three drivers which want to do that. Reviewed by: mikeh
* Another round of the <sys/queue.h> FOREACH transmogriffer.phk2001-02-041-2/+1
| | | | | Created with: sed(1) Reviewed by: md5(1)
OpenPOWER on IntegriCloud