summaryrefslogtreecommitdiff
path: root/sys/dev/vx
AgeCommit message (Collapse)Author
2019-05-17FCP-101: Remove vx(4).Brooks Davis
Relnotes: yes FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md Reviewed by: jhb, imp Differential Revision: https://reviews.freebsd.org/D20230 Notes: svn path=/head/; revision=347921
2018-10-25Deprecate a number of less used 10 and 10/100 Ethernet devices.Brooks Davis
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 Notes: svn path=/head/; revision=339703
2018-10-20Remove incorrect BSD-2-Clause-FreeBSD SPDX tagsEd Maste
Notes: svn path=/head/; revision=339469
2017-11-27sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326255
2017-11-20sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni
Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326022
2017-02-20sys/dev: Replace zero with NULL for pointers.Pedro F. Giffuni
Makes things easier to read, plus architectures may set NULL to something different than zero. Found with: devel/coccinelle MFC after: 3 weeks Notes: svn path=/head/; revision=313982
2017-02-16Remove references to EISA support from the vx driver, along with EISAWarner Losh
support. Fix a comment block that's shared with both vx and ep. Remove obsolete refernce to statically compiling a kernel with a fixed number of vx devices. Have not removed EISA from the title of the document the register definitions were originally derived from (though no doubt more recent docments were also consulted). Notes: svn path=/head/; revision=313830
2016-05-03sys/dev: minor spelling fixes.Pedro F. Giffuni
Most affect comments, very few have user-visible effects. Notes: svn path=/head/; revision=298955
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-19Mechanically convert to if_inc_counter().Gleb Smirnoff
Notes: svn path=/head/; revision=271849
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
2013-01-30Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on ↵Sofian Brabez
device_method_t arrays Reviewed by: cognet Approved by: cognet Notes: svn path=/head/; revision=246128
2012-12-04Mechanically substitute flags from historic mbuf allocator withGleb Smirnoff
malloc(9) flags in sys/dev. Notes: svn path=/head/; revision=243857
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
2011-02-21Fix typos - remove duplicate "the".Rebecca Cran
PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days Notes: svn path=/head/; revision=218909
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-11-19- Add a private timer to drive the transmit watchdog instead of usingJohn Baldwin
if_watchdog and if_timer. - Fix some issues in detach for sn(4), ste(4), and ti(4). Primarily this means calling ether_ifdetach() before anything else. Notes: svn path=/head/; revision=199559
2008-08-25MFp4: Network Adapter is redundant.Warner Losh
Notes: svn path=/head/; revision=182143
2008-04-24- vx_stop() requires the driver lock to be held.Marius Strobl
- Add some missing newlines to messages printed by vx_getlink(). MFC after: 3 days Notes: svn path=/head/; revision=178469
2007-11-22Fix function prototype for device_shutdown method.Pyun YongHyeon
Notes: svn path=/head/; revision=173839
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
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-10-06Fix another edge case I just noticed when committing the previous changes:John Baldwin
If bus_setup_intr() fails, cleanup the ifnet setup in vx_attach() by calling ether_ifdetach() and if_free(). MFC after: 1 week Notes: svn path=/head/; revision=151017
2005-10-06Rototill vx(4), add locking, and mark MPSAFE:John Baldwin
- Rename vxfoo() functions to vx_foo() to improve readability and consistency with other drivers. - Prefix most the softc members with 'vx_' (the other members already had the prefix). - Switch to using callout_init_mtx() and callout_*() rather than timeout() and untimeout(). - Add some missing calls to if_free() in some failure cases in vx_attach(). - Use if_printf() and remove the unit number from the softc. - Remove uses of the 'register' keyword and spls. - Add locked variants of vx_init() and vx_start(). - Add a mutex to the softc and lock it in various appropriate places. - Setup the interrupt handler last during attach. Tested by: imp MFC after: 1 week Notes: svn path=/head/; revision=151014
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-07-22Don't drop frames if interface is in promiscuous mode.Ruslan Ermilov
PR: kern/83833 Submitted by: Eygene A. Ryabinkin MFC after: 3 days Notes: svn path=/head/; revision=148284
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-03-01Use BUS_PROBE_DEFAULT in preference to 0. Also for vx, returnWarner Losh
BUS_PROBE_LOW_PRIORITY in stead of ifdef for devices that xl and vx both support so that xl will snarf them on up. Notes: svn path=/head/; revision=142880
2005-02-03Fix up assignment of negative number to char. Char's are unsigned byPeter Grehan
default on PowerPC. Approved by: mdodd Notes: svn path=/head/; revision=141166
2005-01-06Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh
Notes: svn path=/head/; revision=139749
2004-08-18ss if_vx through indent, and use ANSI function definitions, prior to addingJustin T. Gibbs
if_media and DMA support to the driver. The previous style was inconsistent making it difficult to emulate existing style. Notes: svn path=/head/; revision=133980
2004-08-14Since if_vx 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=133702
2004-08-11Correctly export the size of our softc to newbus in our EISA attachement.Justin T. Gibbs
This avoids a panic upon first softc field reference. Notes: svn path=/head/; revision=133518
2004-05-30Add missing <sys/module.h> includesPoul-Henning Kamp
Notes: svn path=/head/; revision=129879
2004-05-23We don't need to initialize if_output, ether_ifattach() does itMaxime Henrion
for us. Notes: svn path=/head/; revision=129616
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-10-25Start to minimize diffs between vx and ep. These latter is based on aWarner Losh
more advanced version of the chips supported by the former. Matt Dodd and I are working towards merging them, and this a step on that path. Notes: svn path=/head/; revision=121491
2003-10-23more unused item cleanupWarner Losh
Notes: svn path=/head/; revision=121391
2003-10-23BASE is no longer used, and is an appendix. Remove it.Warner Losh
Notes: svn path=/head/; revision=121390
2003-09-02Use PCIR_BAR(x) instead of PCIR_MAPS.John Baldwin
Glanced over by: imp, gibbs Tested by: i386 LINT Notes: svn path=/head/; revision=119690
2003-08-24Use __FBSDID().David E. O'Brien
Also some minor style cleanups. Notes: svn path=/head/; revision=119418
2003-08-22Prefer new location of pci include files (which have only been in theWarner Losh
tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD. Notes: svn path=/head/; revision=119287
2003-06-08Revert part of rev 1.43. We want to fail gracefully if there is no packetDag-Erling Smørgrav
waiting in the interface queue. Submitted by: Yeasah Pell <yeasah@apocalypse.org> Notes: svn path=/head/; revision=116062
2003-05-31Remove break after returnPoul-Henning Kamp
Found by: FlexeLint Notes: svn path=/head/; revision=115548
2003-04-15- Express hard dependencies on bus (pci, isa, pccard) andMatthew N. Dodd
network layer (ether). - Don't abuse module names to facilitate ifconfig module loading; such abuse isn't really needed. (And if we do need type information associated with a module then we should make it explicit and not use hacks.) Notes: svn path=/head/; revision=113506
2003-04-08Introduce an M_ASSERTPKTHDR() macro which performs the very common taskDag-Erling Smørgrav
of asserting that an mbuf has a packet header. Use it instead of hand- rolled versions wherever applicable. Submitted by: Hiten Pandya <hiten@unixdaemons.com> Notes: svn path=/head/; revision=113255