summaryrefslogtreecommitdiffstats
path: root/sys/dev/fe/if_fe.c
Commit message (Collapse)AuthorAgeFilesLines
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-101-75/+87
| | | | | | | | | | | | | | | | | | | | 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
* Forced commit after moving mb86960.h from i386/isa/ic to dev/fe. Itimp2005-02-201-2/+6
| | | | is only used by the fe driver, and isn't MD.
* don't pollute global namespace with valid_Ether_p, instead, prependimp2005-01-101-1/+1
| | | | fe_ to it.
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* Style. Use ETHER_IS_MULTICAST() appropriately instead of masking off the bit.bms2004-10-071-1/+1
| | | | Reviewed by: jmallett
* Since if_fe 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.
* Replace handrolled CRC calculation with ether_crc32_[lb]e().naddy2004-06-091-24/+2
|
* 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-8/+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-2/+1
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Announce ethernet MAC addresss in ether_ifattach().mdodd2004-03-141-2/+1
|
* Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones.obrien2003-12-081-4/+4
| | | | Requested by: bde,imp
* Try to create some sort of consistency in how the routings to find theobrien2003-11-131-18/+16
| | | | | | | multicast hash are written. There are still two distinct algorithms used, and there actually isn't any reason each driver should have its own copy of this function as they could all share one copy of it (if it grew an additional argument).
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-311-29/+28
| | | | | | | | | | | | | 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.
* Back out M_* changes, per decision of the TRB.imp2003-02-191-2/+2
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-2/+2
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* network interface driver changes:sam2002-11-141-19/+7
| | | | | | | | | | | | | | 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
* Use if_printf(ifp, "blah") instead of printf("fe%d: blah", ifp->if_unit).brooks2002-10-011-7/+7
| | | | | | | A number of functions in this driver still use the unit number in their printouts because they pass the unit directly as a function argument instead of passing a softc or struct ifnet pointer. This should be resolved at a future date.
* Be consistent about "static" functions: if the function is markedphk2002-09-281-1/+1
| | | | | | static in its prototype, mark it static at the definition too. Inspired by: FlexeLint warning #512
* Always turned on 8bit access card support for the fe drivershiba2001-09-021-25/+0
| | | | | | both i386/pc98, so options FE_8BIT_SUPPORT was deleted. Reviewed by: nyan
* Update the fe driver to probe and attach under a NEWCARD kernel.shiba2001-09-021-4/+0
| | | | | Reviewed by: imp Obtained from: NetBSD
* 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)
* Mechanical change to use <sys/queue.h> macro API instead ofphk2001-02-041-2/+2
| | | | | | | fondling implementation details. Created with: sed(1) Reviewed by: md5(1)
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* Removed unneeded include files.nyan2000-09-221-3/+0
| | | | Submitted by: phk
* Use driver_intr_t instead of the now defunct inthand2_t.jhb2000-09-151-1/+1
|
* - Newbus'ify and bus_space'ify.nyan2000-09-141-2433/+453
| | | | | | | | | - Separate bus dependent part and independent part. - Moved source files to sys/dev/fe (repo copied). - Fixed some comments by chi@bd.mbn.or.jp (Chiharu Shibata) Tested by: bsd-nomads@clave.gr.jp and FreeBSD98-testers@jp.freebsd.org
* Make all Ethernet drivers attach using ether_ifattach() and detach usingarchie2000-07-131-5/+2
| | | | | | | | | 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
* Mass update of isa drivers using compatability shims to usepeter2000-05-281-0/+8
| | | | COMPAT_ISA_DRIVER() so that we can get rid of the evil isa_compat.h table.
* Move code to handle BPF and bridging for incoming Ethernet packets outarchie2000-05-141-61/+1
| | | | | | | | | | | | | | | 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
* Ratoc REX-9880/83 support (PC-98 only). This commit added functionskato2000-03-291-0/+129
| | | | | | | | | fe_read_eeprom_rex() and fe_init_rex(). These functions should be useful for REX-5580 series (for PC-AT). But they are included in `#ifdef PC98' to avoid warnings by unused static functions. If you try to support REX-5580, please be aware of these functions. Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata)
* Make release is now falling over in if_fe.c due to Warner's pccard changes:wpaul1999-10-251-0/+3
| | | | | | | | | if_fe.c uses PCCARD_MODULE() and is part of GENERIC. I've #ifdef'ed out the #include of "card.h" to hopefully disable pccard support in this driver until it can be converted. I'm not positive this will fix make release, but it can't possibly make it any worse than it is now. I hope this stuff settles down soon.
* Remove NBPF conditionality of bpf calls in most of our network drivers.phk1999-09-251-9/+0
| | | | | | | | | | | | This means that we will not have to have a bpf and a non-bpf version of our driver modules. This does not open any security hole, because the bpf core isn't loadable The drivers left unchanged are the "cross platform" drivers where the respective maintainers are urged to DTRT, whatever that may be. Add a couple of missing FreeBSD tags.
* C-NET(9N)C support (PC-98 only).nyan1999-08-311-13/+42
| | | | Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata)
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* - Make binary size smaller.kato1999-08-231-6/+6
| | | | | | - Fix typo in TDK/LANX stuff. Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata)
* Make these actually compile. I got a little delete happy pruning includesmdodd1999-08-181-1/+5
| | | | | | | and used 'command' instead of 'cmd' in a few cases. Also clear up some unused variables. Pointed out by: phk
* SIOCSIFADDR, SIOCGIFADDR, and SIOCSIFMTU are implemented inmdodd1999-08-181-24/+1
| | | | | | | | sys/net/if_ethersubr.c:ether_ioctl(). Drivers need not implement generic behavior. PR: kern/12126 Submitted by: in part by Boris Popov <bp@butya.kz>
* Rename bpfilter to bpf.des1999-07-061-6/+6
|
* Replace misused FE_D6_BBW with FE_D6_SBW.kato1999-05-041-11/+11
| | | | | Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata) Reminded by: Takahashi Yoshihiro <nyan@dd.catv.ne.jp>
* Added FE_8BIT_SUPPORT into the list. The fe driver includes opt_fe.h.kato1999-03-031-1/+2
| | | | Submitted by: Takahashi Yoshihiro <nyan@dd.catv.ne.jp>
* Update the pccard hooks to use a module style declaration instead.peter1999-01-191-11/+3
|
* Silence warnings.eivind1999-01-121-1/+3
|
* Another(better) way to support Access/NOTE N98(PC-98) without any effectskato1998-12-311-6/+7
| | | | | | for other Access/PC series. Submitted by: Chiharu Shibata <chi@bd.mbn.or.jp>
* PC/AT(ISA) version and PC-98(NEC) version of if_fe drivers are merged,kato1998-12-151-1282/+2341
| | | | | | | | | | | | | | | | | | | | | | | | | | | | as well as several functional additions. (1) dot3 MIB support. (2) if_media selection method support. (3) bridge support. (4) new boards support. Supported boards are as follows. [PC/AT] * Fujitsu FMV-180 series * Allied-Telesis RE2000 series * Allied-Telesyn AT1700 series * Gateway Communications G/Ether series * UB networks Access/PC ISA series * TDK/LANX LAC-AX series * ICL EtherTeam16i series * RATOC REX-5586/5587 [PC-98] * Allied-Telesis RE1000 series * Allied-Telesis RE1000Plus/ME1500 series * Contec C-NET(9N)E series * Contec C-NET(98)P2 series * UB networks Access/PC N98C+ series * TDK/LANX LAC-98 series(not tested) Submitted by: seki@sysrap.cs.fujitsu.co.jp (Masahiro Sekiguchi) and chi@bd.mbn.or.jp (Chiharu Shibata)
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticarchie1998-12-071-3/+2
| | | | and local variables, goto labels, and functions declared but not defined.
* Initialize isa_devtab entries for interrupt handlers in individualbde1998-10-221-2/+5
| | | | | | | device drivers, not in ioconf.c. Use a different hack in isa_device.h so that a new config(8) is not required yet. pc98 parts approved by: kato
* Removed unused includes.bde1998-06-211-10/+6
| | | | | Ifdefed conditionally used includes. Finished rev.1.39. (I only submitted the request.)
OpenPOWER on IntegriCloud