summaryrefslogtreecommitdiffstats
path: root/sys/dev/ex/if_ex.c
Commit message (Collapse)AuthorAgeFilesLines
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-041-3/+3
| | | | malloc(9) flags in sys/dev.
* Convert files to UTF-8uqs2012-01-151-1/+1
|
* 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
* Replace several instances of 'if (!a & b)' with 'if (!(a &b))' in ordertrasz2010-01-081-1/+1
| | | | to silence newer GCC versions.
* Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/rwatson2009-06-261-4/+4
| | | | | | | | | | | | | 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
* Some PC Card variants of the 82365 don't seem to like setting the IRQimp2008-08-241-6/+12
| | | | | | | | | | | number in the irq register. While there are other issues with these variants, avoiding writing to it helps interrupt generation on at least one card, and doesn't hurt on the others. Flag ISA attachment as needing INT_NO_REG written, and don't update the PC Card attachment (which will have the effect of not touching it for PC Cards). Document this in a comment, and tweak one or two formatting nits while I'm here.
* Make ex(4) MPSAFE:jhb2008-06-131-47/+77
| | | | | | | | | | - Add a mutex to the softc to protect the softc and device hardware. - Use a private watchdog timer. - Setup interrupt handler after ether_ifattach(). - Use bus_foo() rather than bus_space_foo() and remove bus space tag and handle from softc. Tested by: imp
* Remove ifdef notyet SIOCGHWADDR vestige.imp2006-02-041-7/+0
|
* - 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.
* Catch up with IFP2ENADDR() type change (array -> pointer).ru2005-11-111-1/+1
|
* Fix "struct ifnet" leaks when attach() fails in the middle.ru2005-09-161-1/+3
|
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-091-9/+9
| | | | | | | | | | | | | | 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/+5
| | | | | | | | 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-101-11/+18
| | | | | | | | | | | | | | | | | | | | 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
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* Use cluster if data >= MINCLSIZE.glebius2004-10-171-1/+1
| | | | | | Reviewed by: mdodd Approved by: julian (mentor) MFC after: 1 month
* Since if_ex 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. Note: there are locking macros in if_exreg.h, but they appear to be unused.
* MFp4:imp2004-06-271-194/+162
| | | | | | Use bus space rather than direct inb/outb. Minor style changes while I'm here. Extremely preliminary support for siliconix ethernet cards (but more work is required).
* We don't need to initialize if_output, ether_ifattach() does itmux2004-05-231-1/+0
| | | | for us.
* Remove improper use of if_addrhead in device drivers to checkluigi2004-04-151-3/+0
| | | | | | | | | | | | if the link-level address has been initialized already. The majority of modern drivers never does this and works fine, which makes me think that the check is totally unnecessary and a residue of cut&paste from other drivers. This change is done to simplify locking because now almost none of the drivers uses this field. The exceptions are "ct" "ctau" and "cx" where i am not sure if i can remove that part.
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-4/+4
| | | | | 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-9/+7
| | | | | | | | | | | | | 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-241-1/+3
| | | | Also some minor style cleanups.
* - Declare ex_devclass in if_ex.cmdodd2003-03-291-0/+2
| | | | - Rename module datastructures in if_ex_isa.c to be more standard.
* - Move ex_pccard_detach() to if_ex.c and rename it to ex_detach().mdodd2003-03-291-0/+19
| | | | - Add detach method to ISA front end.
* Don't panic if we aren't plugged into a hub.mdodd2003-03-291-5/+18
|
* Multicast support, gleaned from NetBSD's if_iy driver.mdodd2003-03-281-5/+101
| | | | Submitted by: Craig Boston <craig@xfoil.gank.org>
* 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-6/+3
| | | | | | | | | | | | | | 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
* Remove __P.alfred2002-03-201-10/+10
|
* Mechanical change to use <sys/queue.h> macro API instead ofphk2001-02-041-1/+1
| | | | | | | fondling implementation details. Created with: sed(1) Reviewed by: md5(1)
* Warning police:jhb2001-01-191-2/+0
| | | | | - Share the ex_stop() prototype in if_exvar.h - Remove an unused local variable.
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* Add support for pccard attachments of the ex driver. It supports theimp2000-09-291-2/+2
| | | | | | | Olicom OC-2220 card, and maybe others. Submitted by: iwasaki Reviewed by: mdodd
* Make all Ethernet drivers attach using ether_ifattach() and detach usingarchie2000-07-131-6/+1
| | | | | | | | | ether_ifdetach(). The former consolidates the operations of if_attach(), ng_ether_attach(), and bpfattach(). The latter consolidates the corresponding detach operations. Reviewed by: julian, freebsd-net
* Unused include: #include "ex.h"peter2000-06-101-2/+0
|
* Move code to handle BPF and bridging for incoming Ethernet packets outarchie2000-05-141-17/+0
| | | | | | | | | | | | | | | of the individual drivers and into the common routine ether_input(). Also, remove the (incomplete) hack for matching ethernet headers in the ip_fw code. The good news: net result of 1016 lines removed, and this should make bridging now work with *all* Ethernet drivers. The bad news: it's nearly impossible to test every driver, especially for bridging, and I was unable to get much testing help on the mailing lists. Reviewed by: freebsd-net
* Split out the ISA bus front end code into its own file. PCCARD attachmentmdodd2000-05-011-297/+71
| | | | | | coming later this week. Mitsuru IWASAKI provided a patch to -mobile which I used to make sure I was doing the right thing but only a small part of the actual patch was used.
* Remove ~25 unneeded #include <sys/conf.h>phk2000-04-191-1/+0
| | | | Remove ~60 unneeded #include <sys/malloc.h>
* Add 'bootverbose' debug messages to assist with tracking down problemsmdodd2000-03-131-5/+27
| | | | some users have encountered.
* Initial ifmedia support. Once I figure out autoselection I'll put themdodd2000-03-131-15/+65
| | | | | | | | | rest of the code in (so changing media actually works.) Add a few more register definitions for use with this and other new code. Print a few details in the probe message; this should be useful in bug reports and such but should not add to the clutter.
* Pre 4.0 tidy up.peter2000-01-141-1/+1
| | | | | | | | | | | | Collect together the components of several drivers and export eisa from the i386-only area (It's not, it's on some alphas too). The code hasn't been updated to work on the Alpha yet, but that can come later. Repository copies were done a while ago. Moving these now keeps them in consistant place across the 4.x series as the newbusification progresses. Submitted by: mdodd
* Cosmetic cleanups.mdodd2000-01-131-34/+23
|
* Implement a DEVICE_IDENTIFY method. I want to revisit some of this latermdodd2000-01-131-22/+59
| | | | but this is enough to get us going.
* When I converted this driver to newbus I also cleaned up the codemdodd2000-01-131-50/+51
| | | | | | | | | | | | | | layout. It seems that I cleaned it up a bit too much and confused a few if () { if () { } else { } } statements in the obvious manner. This allows the driver to transmit packets again. *sigh*
* Fix bus_setup_intr(); I changed exintr() to take a pointer to ex_softcmdodd1999-11-031-1/+1
| | | | | | but didn't change bus_setup_intr() to pass the softc in. Submitted by: Warner Losh <imp@village.org>
* - Convert this driver to newbus.mdodd1999-10-161-516/+754
| | | | | | | | | | | | | | - Generally clean things up. - PnP now supported. Will convert to bus_space, ifmedia and add a DEVICE_IDENTIFY() method for autodetection. As it stands device ex0 at isa0 should find a card if one is present. I feel less dirty now.
OpenPOWER on IntegriCloud