347962 |
18-May-2019 |
brooks |
MFC r339703, r347365, r347703, r347940
r339703: Deprecate a number of less used 10 and 10/100 Ethernet devices.
The current deprecated list is: ae, bm, cs, de, dme, ed, ep, ex, fe, pcn, sf, sn, tl, tx, txp, vx, wb, xe
The list as refined as part of FCP-0101. Per the FCP, devices may be removed from the deprecation list if enough users are found or they are converted to iflib.
FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md
r347365: Update dme(4) to reflect that it will not be removed due to FCP-101.
dme(4) is the built-in NIC on a couple non-expandable mips platforms and thus should remain. The FCP has been updated to reflect this fact.
Discussed with: imp
r347703: FCP-101: ae(4) is sufficently popular to be moved to the keep list.
r347940: Remove the notice that ae(4) will be removed in FreeBSD 13.
MFC requested by: rgrimes Approved by: re (kib) |
297000 |
18-Mar-2016 |
jhibbits |
Use uintmax_t (typedef'd to rman_res_t type) for rman ranges.
On some architectures, u_long isn't large enough for resource definitions. Particularly, powerpc and arm allow 36-bit (or larger) physical addresses, but type `long' is only 32-bit. This extends rman's resources to uintmax_t. With this change, any resource can feasibly be placed anywhere in physical memory (within the constraints of the driver).
Why uintmax_t and not something machine dependent, or uint64_t? Though it's possible for uintmax_t to grow, it's highly unlikely it will become 128-bit on 32-bit architectures. 64-bit architectures should have plenty of RAM to absorb the increase on resource sizes if and when this occurs, and the number of resources on memory-constrained systems should be sufficiently small as to not pose a drastic overhead. That being said, uintmax_t was chosen for source clarity. If it's specified as uint64_t, all printf()-like calls would either need casts to uintmax_t, or be littered with PRI*64 macros. Casts to uintmax_t aren't horrible, but it would also bake into the API for resource_list_print_type() either a hidden assumption that entries get cast to uintmax_t for printing, or these calls would need the PRI*64 macros. Since source code is meant to be read more often than written, I chose the clearest path of simply using uintmax_t.
Tested on a PowerPC p5020-based board, which places all device resources in 0xfxxxxxxxx, and has 8GB RAM. Regression tested on qemu-system-i386 Regression tested on qemu-system-mips (malta profile)
Tested PAE and devinfo on virtualbox (live CD)
Special thanks to bz for his testing on ARM.
Reviewed By: bz, jhb (previous) Relnotes: Yes Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D4544
|
276750 |
06-Jan-2015 |
rwatson |
In order to reduce use of M_EXT outside of the mbuf allocator and 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
|
257176 |
26-Oct-2013 |
glebius |
The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare 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.
|
207554 |
03-May-2010 |
sobomax |
Add new tunable 'net.link.ifqmaxlen' to set default send interface 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
|
195049 |
26-Jun-2009 |
rwatson |
Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/ 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
|
152315 |
11-Nov-2005 |
ru |
- Store pointer to the link-level address right in "struct ifnet" 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.
|
150989 |
06-Oct-2005 |
pjd |
Fix a nasty typo. Change: if (foo); bar(); to: if (foo) bar(); Really, really nasty bug and a very nice catch of mine.
Unfortunately, I'll not become a hero of the day, because the code is commented out.
|
150306 |
19-Sep-2005 |
imp |
Make sure that we call if_free(ifp) after bus_teardown_intr. Since we could get an interrupt after we free the ifp, and the interrupt handler depended on the ifp being still alive, this could, in theory, cause a crash. Eliminate this possibility by moving the if_free to after the bus_teardown_intr() call.
|
148887 |
09-Aug-2005 |
rwatson |
Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 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
|
147961 |
13-Jul-2005 |
imp |
Stop using OLDCARD shims. rename xe_pccard_match to xe_pccard_probe and combine the old xe_pccard_{probe,attach} into one routine _attach. Create a lookup function to lookup items in the table. Eliminate the check for network cards, since many modems were eliminated by it. Tweak a few printfs as well.
This gets many of my older cards working again CEM2, CEM28, CEM36, etc.
|
147256 |
10-Jun-2005 |
brooks |
Stop embedding struct ifnet at the top of driver softcs. Instead the 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
|
121816 |
31-Oct-2003 |
brooks |
Replace the if_name and if_unit members of struct ifnet with new members 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)
|
121099 |
14-Oct-2003 |
rsm |
Major update to xe driver:
- Make multicast work - Fix (some of) the watchdog timeouts after card reset - Add support for CE2, CEM28 and CEM33 cards - General code cleanup
Any card that worked previously should still work, as well as a lot that didn't.
The driver is not yet style(9) compliant; those changes are forthcoming, once the functional changes are done.
PR: kern/50644 Reviewed by: imp Approved by: imp
|
106937 |
14-Nov-2002 |
sam |
network interface driver changes:
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
|
63090 |
13-Jul-2000 |
archie |
Make all Ethernet drivers attach using ether_ifattach() and detach using 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
|
60536 |
14-May-2000 |
archie |
Move code to handle BPF and bridging for incoming Ethernet packets out 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
|
55723 |
10-Jan-2000 |
imp |
Move xe driver from dev/pccard to dev/xe. Convert driver to newbus. Driver is not functional yet, but does compile. Tests with xe cards indicates that it doesn't panic the machine when they are present, but fail to probe. Interface help in the pcic/pccard layers are needed to complete this driver.
|
51646 |
25-Sep-1999 |
phk |
Remove NBPF conditionality of bpf calls in most of our network drivers.
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.
|
48114 |
22-Jun-1999 |
obrien |
Virgin import of Xircom PCCARD driver v1.20 (1999/06/13):
* Conformance with Dingo specification. This includes: Collision/error statistics gathering. Multicast address filtering, eg. the hash filter. Initialisation and interrupt handling sequences. Note that I've started on some of this already in v1.20.
* The probe routine needs some more work, to identify oddities such as the REM10.
* There are still problems with the autonegotiation code; specifically, it won't autonegotiate with some 10/100 hubs. This might simply be the hardware not getting along, in which case there's nothing we can do, but it's still worth investigating
* CEM28/CEM33 support. Should be able to integrate this directly from the Linux code.
* Performance enhancements: Full-duplex on 10Mbit networks. Virtual shared-memory mode. Early send and receive modes.
Developed by: Scott Mitchell <scott@uk.freebsd.org> Obtained from: http://www.freebsd-uk.eu.org/~scott/xe_drv/
|
47640 |
31-May-1999 |
phk |
Simplify cdevsw registration.
The cdevsw_add() function now finds the major number(s) in the struct cdevsw passed to it. cdevsw_add_generic() is no longer needed, cdevsw_add() does the same thing.
cdevsw_add() will print an message if the d_maj field looks bogus.
Remove nblkdev and nchrdev variables. Most places they were used bogusly. Instead check a dev_t for validity by seeing if devsw() or bdevsw() returns NULL.
Move bdevsw() and devsw() functions to kern/kern_conf.c
Bump __FreeBSD_version to 400006
This commit removes: 72 bogus makedev() calls 26 bogus SYSINIT functions
if_xe.c bogusly accessed cdevsw[], author/maintainer please fix.
I4b and vinum not changed. Patches emailed to authors. LINT probably broken until they catch up.
|
47145 |
14-May-1999 |
obrien |
Virgin import of Xircom PCCARD driver v1.17
v1.17 (1999/03/28) has xperimental fixes to 10Mbit autonegotiation and CE2 input lockup.
KNOWN BUGS ==========
* Media auto-negotiation is definitely not right. It will work in most circumstances and seems to connect OK to most 100Mbit networks, however some pathological combinations of hubs/networks/peers seem to confuse it.
* CE2 support is somewhat flakey (ranging from 'works perfectly' to 'hangs the machine' so far). I've fixed the probe routine and a potential lockup in the output routine, but a lot of people still report that they can't receive or transmit.
* You won't be able to use the modem and Ethenet parts of a multifunction card simultaneously. This is limitation the current FreeBSD PCMCIA support. Likewise, there is no support for CardBus devices.
Developed by: Scott Mitchell <scott@uk.freebsd.org> Obtained from: http://www.freebsd-uk.eu.org/~scott/xe_drv/
|
47136 |
14-May-1999 |
obrien |
Virgin import of Xircom PCCARD driver v1.14
This driver is mostly based on the `xirc2ps' driver for Linux by Werner Koch. Werner has even allowed his code to be distributed under a BSD licence, making our life considerably easier -- thanks Werner!
This driver supports: * Intel EtherExpress(TM) PRO/100 PCCARD (16-bit version) * Xircom CreditCard CE2 / CEM28 / CEM33 / CE3 / CEM56 Ethernet adapters. * Toshiba Advanced Network 10/100 PCCARD * Certain Compaq Netelligent 10/100 branded cards
v1.14 has major changes to media selection code, and bugfixes in the probe routine.
Developed by: Scott Mitchell <scott@uk.freebsd.org> Obtained from: http://www.freebsd-uk.eu.org/~scott/xe_drv/
|