summaryrefslogtreecommitdiff
path: root/sys/dev/cm
AgeCommit message (Collapse)Author
2018-04-13Remove support for the Arcnet protocol.Brooks Davis
While Arcnet has some continued deployment in industrial controls, the lack of drivers for any of the PCI, USB, or PCIe NICs on the market suggests such users aren't running FreeBSD. Evidence in the PR database suggests that the cm(4) driver (our sole Arcnet NIC) was broken in 5.0 and has not worked since. PR: 182297 Reviewed by: jhibbits, vangyzen Relnotes: yes Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15057 Notes: svn path=/head/; revision=332490
2018-03-30Add deprecation notices for Arcnet and FDDI drivers.Brooks Davis
We intend to remove support before FreeBSD 12 is branched. Reviewed by: imp, emaste MFC after: 3 days Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14890 Notes: svn path=/head/; revision=331830
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-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
2016-02-27Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().Justin Hibbits
Most calls to bus_alloc_resource() use "anywhere" as the range, with a given count. Migrate these to use the new bus_alloc_resource_anywhere() API. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D5370 Notes: svn path=/head/; revision=296137
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-28Provide necessary includes that before came via if.h.Gleb Smirnoff
Notes: svn path=/head/; revision=257289
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
2012-12-04Mechanically substitute flags from historic mbuf allocator withGleb Smirnoff
malloc(9) flags in sys/dev. Notes: svn path=/head/; revision=243857
2011-12-13Replace `inline static' by `static inline'.Ed Schouten
If I interpret the C standard correctly, the storage specifier should be placed before the inline keyword. While at it, replace __inline by inline in the files affected. Notes: svn path=/head/; revision=228471
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
2010-03-01The NetBSD Foundation has granted permission to remove clause 3 and 4 fromJoel Dahl
their software. Obtained from: NetBSD Notes: svn path=/head/; revision=204520
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
2009-02-12Remove unused ifaddr and ifreq local variables.Robert Watson
MFC after: 3 days Notes: svn path=/head/; revision=188545
2007-10-12Spelling fix for interupt -> interruptKevin Lo
Notes: svn path=/head/; revision=172568
2007-03-21Don't call bus_deactivate_resource() explicitly before callingYoshihiro Takahashi
bus_release_resource(). This is needed for pc98 by upcoming nexus related change. Notes: svn path=/head/; revision=167753
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
2006-06-11Make cm(4) driver MPSAFE.Max Khon
Notes: svn path=/head/; revision=159529
2005-09-19Make sure that we call if_free(ifp) after bus_teardown_intr. Since weWarner Losh
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. Notes: svn path=/head/; revision=150306
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-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
2004-08-13Since if_cm 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=133678
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
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-30There is no way to enter the attach routine twice with the same softcBrooks Davis
without a detach call in between so don't try to deal with that possiability. This is a diff-reduction commit for the upcoming if_xname conversion. Notes: svn path=/head/; revision=121752
2003-08-24Use __FBSDID().David E. O'Brien
Also some minor style cleanups. Notes: svn path=/head/; revision=119418
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-02-19Back out M_* changes, per decision of the TRB.Warner Losh
Approved by: trb Notes: svn path=/head/; revision=111119
2003-01-30- bpf is now working (tested with tcpdump)Max Khon
- fix promiscious mode MFC after: 3 days Notes: svn path=/head/; revision=110106
2003-01-24- add support for IPX (tested with mount -t nwfs and mars_nwe),Max Khon
IP fast forwarding, SIOCGIFADDR, setting hardware address (not currently enabled in cm driver), multicasts (experimental) - add ARC_MAX_DATA, use IF_HANDOFF, remove arc_sprintf() and some unused variables - if_simloop logic is made more similar to ethernet - drop not ours packets early (if we are not in promiscous mode) Submitted by: mark tinguely (partially) Notes: svn path=/head/; revision=109771
2003-01-21Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
2002-12-30Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/Jens Schweikhardt
Add FreeBSD Id tag where missing. Notes: svn path=/head/; revision=108470
2002-11-14network interface driver changes:Sam Leffler
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 Notes: svn path=/head/; revision=106937
2002-10-01Use if_printf(ifp, "blah") instead ofBrooks Davis
printf("%s%d: blah", ifp->if_name, ifp->if_unit); Notes: svn path=/head/; revision=104251
2002-03-20Remove __P.Alfred Perlstein
Notes: svn path=/head/; revision=92739
2002-01-08- generic Arcnet frameworkMax Khon
- device driver for SMC COM90cx6 Arcnet network adapters Obtained from: NetBSD Notes: svn path=/head/; revision=89099