aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ctau
Commit message (Collapse)AuthorAgeFilesLines
* retire cx,ctau driversEd Maste2020-03-2014-12494/+0
| | | | | | | | | | The devices supported by these drivers are obsolete ISA cards, and the sync serial protocols they supported are essentially obsolete too. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=359178
* Add deprecation notices to ctau and cx driversEd Maste2020-03-021-0/+1
| | | | | | | | | | | | | | | | These support outdated or obsolete ISA WAN (T1/E1) sync serial cards, and these drivers haven't really been touched (other than in tree-wide sweeps to keep them building) for 15+ years. Related PCI devices ce and cp are still in the tree, with deprecation proposed in D23928. MFC after: 1 week Relnotes: Yes Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=358554
* ctau.c: convert from KOI8-R to UTF-8 encodingEd Maste2019-12-031-3/+3
| | | | | | | | AFAICT this is the last source file (excluding contrib) that was not ASCII or UTF-8. Notes: svn path=/head/; revision=355340
* Fix two errors reported by PVS Studio: V646 Consider inspecting theAlexey Dokuchaev2019-05-261-1/+1
| | | | | | | | | | | application's logic. It's possible that 'else' keyword is missing. Reviewed by: gallatin, np, pfg Approved by: pfg Differential Revision: https://reviews.freebsd.org/D20396 Notes: svn path=/head/; revision=348286
* sys/dev: Replace zero with NULL for pointers.Pedro F. Giffuni2017-02-202-3/+3
| | | | | | | | | | | 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
* Use uintmax_t (typedef'd to rman_res_t type) for rman ranges.Justin Hibbits2016-03-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=297000
* Convert rman to use rman_res_t instead of u_longJustin Hibbits2016-01-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | Summary: Migrate to using the semi-opaque type rman_res_t to specify rman resources. For now, this is still compatible with u_long. This is step one in migrating rman to use uintmax_t for resources instead of u_long. Going forward, this could feasibly be used to specify architecture-specific definitions of resource ranges, rather than baking a specific integer type into the API. This change has been broken out to facilitate MFC'ing drivers back to 10 without breaking ABI. Reviewed By: jhb Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5075 Notes: svn path=/head/; revision=294883
* CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than tenJung-uk Kim2015-05-221-3/+3
| | | | | | | | | | | | | years for head. However, it is continuously misused as the mpsafe argument for callout_init(9). Deprecate the flag and clean up callout_init() calls to make them more consistent. Differential Revision: https://reviews.freebsd.org/D2613 Reviewed by: jhb MFC after: 2 weeks Notes: svn path=/head/; revision=283291
* In order to reduce use of M_EXT outside of the mbuf allocator andRobert Watson2015-01-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Don't pass RF_ALLOCATED to bus_alloc_resource().John Baldwin2014-10-101-2/+1
| | | | Notes: svn path=/head/; revision=272904
* Convert most BPF_TAP users to BPF_MTAP.Alexander V. Chernikov2014-09-281-1/+1
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=272266
* Remove ifq_drops from struct ifqueue. Now queue drops are accounted inGleb Smirnoff2014-09-191-1/+0
| | | | | | | | | | | | | struct ifnet if_oqdrops. Some netgraph modules used ifqueue w/o ifnet. Accounting of queue drops is simply removed from them. There were no API to read this statistic. Sponsored by: Netflix Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=271856
* Mechanically convert to if_inc_counter().Gleb Smirnoff2014-09-191-9/+9
| | | | Notes: svn path=/head/; revision=271849
* Replace local copy-and-paste implementations of printmbuf() in severalRobert Watson2014-09-101-17/+1
| | | | | | | | | | | | | | | | | | | | | device drivers with calls to the centralised m_print() implementation. While the formatting and output details differ a little, the content is essentially the same, and it is unlikely anyone has used this debugging output in some time. This change reduces awareness of mbuf cluster allocation (and, especially, the M_EXT flag) outside of the mbuf allocator, which will make it easier to refine the external storage mechanism without disrupting drivers in the future. Style bugs are preserved. Reviewed by: bz, glebius MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=271373
* The r48589 promised to remove implicit inclusion of if_var.h soon. PrepareGleb Smirnoff2013-10-261-0/+1
| | | | | | | | | | | 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
* Fxi a bunch of typos.Eitan Adler2013-05-101-1/+1
| | | | | | | | PR: misc/174625 Submitted by: Jeremy Chadwick <jdc@koitsu.org> Notes: svn path=/head/; revision=250460
* Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on ↵Sofian Brabez2013-01-301-1/+2
| | | | | | | | | | device_method_t arrays Reviewed by: cognet Approved by: cognet Notes: svn path=/head/; revision=246128
* Mechanically substitute flags from historic mbuf allocator withGleb Smirnoff2012-12-041-2/+2
| | | | | | | malloc(9) flags in sys/dev. Notes: svn path=/head/; revision=243857
* Fix typos - remove duplicate "the".Rebecca Cran2011-02-212-2/+2
| | | | | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days Notes: svn path=/head/; revision=218909
* Add new tunable 'net.link.ifqmaxlen' to set default send interfaceMaxim Sobolev2010-05-031-2/+2
| | | | | | | | | | | | | 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
* Always use a private timer instead of if_watchdog and if_timer to driveJohn Baldwin2009-11-171-45/+25
| | | | | | | | | | the transmit watchdog. These drivers already used a private timer when compiled to use Netgraph. This change just makes them always use the private timer. Note that these drivers do not compile and are disconnected from the build due to TTY changes. Notes: svn path=/head/; revision=199407
* Use new spelling of the NG_*LEN constants.Warner Losh2009-06-091-2/+2
| | | | Notes: svn path=/head/; revision=193813
* Remove debug.ctau.mpsafenet: we no longer support running the networkRobert Watson2009-02-151-29/+7
| | | | | | | | stack with conditional Giant acquisition, and IFF_NEEDSGIANT will be removed in the near future. Notes: svn path=/head/; revision=188662
* Replace all calls to minor() with dev2unit().Ed Schouten2008-09-271-3/+3
| | | | | | | | | | | | | | | | | | After I removed all the unit2minor()/minor2unit() calls from the kernel yesterday, I realised calling minor() everywhere is quite confusing. Character devices now only have the ability to store a unit number, not a minor number. Remove the confusion by using dev2unit() everywhere. This commit could also be considered as a bug fix. A lot of drivers call minor(), while they should actually be calling dev2unit(). In -CURRENT this isn't a problem, but it turns out we never had any problem reports related to that issue in the past. I suspect not many people connect more than 256 pieces of the same hardware. Reviewed by: kib Notes: svn path=/head/; revision=183397
* Do not set IFF_DEBUG directly from the driver.Roman Kurakin2008-06-302-7/+13
| | | | | | | MFC after: 1 month. Notes: svn path=/head/; revision=180132
* Spelling fix for interupt -> interruptKevin Lo2007-10-121-1/+1
| | | | Notes: svn path=/head/; revision=172568
* First in a series of changes to remove the now-unused Giant compatibilityRobert Watson2007-07-271-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | framework for non-MPSAFE network protocols: - Remove debug_mpsafenet variable, sysctl, and tunable. - Remove NET_NEEDS_GIANT() and associate SYSINITSs used by it to force debug.mpsafenet=0 if non-MPSAFE protocols are compiled into the kernel. - Remove logic to automatically flag interrupt handlers as non-MPSAFE if debug.mpsafenet is set for an INTR_TYPE_NET handler. - Remove logic to automatically flag netisr handlers as non-MPSAFE if debug.mpsafenet is set. - Remove references in a few subsystems, including NFS and Cronyx drivers, which keyed off debug_mpsafenet to determine various aspects of their own locking behavior. - Convert NET_LOCK_GIANT(), NET_UNLOCK_GIANT(), and NET_ASSERT_GIANT into no-op's, as their entire behavior was determined by the value in debug_mpsafenet. - Alias NET_CALLOUT_MPSAFE to CALLOUT_MPSAFE. Many remaining references to NET_.*_GIANT() and NET_CALLOUT_MPSAFE are still present in subsystems, and will be removed in followup commits. Reviewed by: bz, jhb Approved by: re (kensmith) Notes: svn path=/head/; revision=171613
* Don't call bus_deactivate_resource() explicitly before callingYoshihiro Takahashi2007-03-211-3/+0
| | | | | | | | bus_release_resource(). This is needed for pc98 by upcoming nexus related change. Notes: svn path=/head/; revision=167753
* o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati2007-02-231-1/+1
| | | | | | | | | | | | | | | | 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
* Various bpf(4) related fixes to catch places up to the new bpf(4)John Baldwin2006-12-291-4/+2
| | | | | | | | | | | | | | | | semantics. - Stop testing bpf pointers for NULL. In some cases use bpf_peers_present() and then call the function directly inside the conditional block instead of the macro. - For places where the entire conditional block is the macro, remove the test and make the macro unconditional. - Use BPF_MTAP() in if_pfsync on FreeBSD instead of an expanded version of the old semantics. Reviewed by: csjp (older version) Notes: svn path=/head/; revision=165632
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningRobert Watson2006-11-061-16/+17
| | | | | | | | | | | | | | | | specific privilege names to a broad range of privileges. These may require some future tweaking. Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net> Notes: svn path=/head/; revision=164033
* Since DELAY() was moved, most <machine/clock.h> #includes have beenPoul-Henning Kamp2006-05-161-1/+0
| | | | | | | unnecessary. Notes: svn path=/head/; revision=158651
* Backout if_cp 1.26, if_ct 1.27, if_cx 1.47 by obrien:Roman Kurakin2005-09-271-532/+534
| | | | | | | | | | | | | | | | | | | | | | | | | | | ---------------------------- revision 1.26 date: 2005/09/07 09:53:35; author: obrien; state: Exp; lines: +1452 -1453 Reorder code to not depend on an ISO-C illegal forward extern declaration. ---------------------------- Reason: do not move large functions location without serious reason. The same could be done by forward function declaration. Please do not enlarge diff without a reason any more. Backout if_cp 1.27 ---------------------------- revision 1.27 date: 2005/09/19 03:10:16; author: imp; state: Exp; lines: +3 -2 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. Reason: bad previous commit. Would be restored by next commit. Notes: svn path=/head/; revision=150622
* Reorder code to not depend on an ISO-C illegal forward extern declaration.David E. O'Brien2005-09-071-542/+541
| | | | Notes: svn path=/head/; revision=149847
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andRobert Watson2005-08-091-6/+6
| | | | | | | | | | | | | | | | | 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
* Use m_length (m, NULL) instead of m->m_pkthdr.len.Roman Kurakin2005-07-091-1/+1
| | | | | | | | Problems reported by: strijar at urai dot ru Approved by: re (scottl) Notes: svn path=/head/; revision=147862
* Protect from partially initialized channels.Roman Kurakin2005-07-091-0/+2
| | | | | | | Approved by: re (scottl) Notes: svn path=/head/; revision=147858
* Space & alignment nits.Roman Kurakin2005-07-091-5/+5
| | | | | | | Approved by: re (scottl) Notes: svn path=/head/; revision=147856
* Stop embedding struct ifnet at the top of driver softcs. Instead theBrooks Davis2005-06-101-64/+74
| | | | | | | | | | | | | | | | | | | | | | | 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
* Use dynamic major number allocation.Poul-Henning Kamp2005-02-271-3/+0
| | | | Notes: svn path=/head/; revision=142717
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-0610-10/+10
| | | | Notes: svn path=/head/; revision=139749
* Make code MPSAFE.Roman Kurakin2004-12-131-47/+213
| | | | | | | | | | | You could turn this off by debug.mpsafenet=0 for full network stack or via debug.{cp|cx|ctau}.mpsafenet for cp(4), cx(4) and ctau(4) accordingly. MFC after: 10 days Notes: svn path=/head/; revision=138823
* Clean up from '#if __FreeBSD_version'.Roman Kurakin2004-12-101-320/+5
| | | | Notes: svn path=/head/; revision=138651
* Don not call pp_down()/pp_up() form XX_tlf()/XX_tls() in non PPP modeRoman Kurakin2004-12-031-2/+4
| | | | | | | | | to privent running of PPP's state machine in non PPP mode. MFC: after 3 days. Notes: svn path=/head/; revision=138352
* Remove bogus cdevsw frobbing code which tries to prevent doublePoul-Henning Kamp2004-09-231-13/+0
| | | | | | | | | loading of modules. MODULE_VERSION() should be used for this I belive. Notes: svn path=/head/; revision=135614
* Make code ready to switch debug.mpsafenet to 1 since I've not able toRoman Kurakin2004-08-271-1/+2
| | | | | | | commit MPSAFE code for now it is just IFF_NEEDSGIANT. Notes: svn path=/head/; revision=134412
* Fix resource check while autodetection.Roman Kurakin2004-08-131-6/+6
| | | | Notes: svn path=/head/; revision=133647
* White space cleanup.Roman Kurakin2004-08-131-225/+225
| | | | Notes: svn path=/head/; revision=133645
* Slight cosmetic changes.Julian Elischer2004-07-201-2/+2
| | | | | | | | | | | | Also introduce a macro to be called by persistent nodes to signal their persistence during shutdown to hide this mechanism from the node author. Make node flags have a consistent style in naming. Document the change. Notes: svn path=/head/; revision=132464
* Convert Netgraph to use mbuf tags to pass its meta information around.Julian Elischer2004-06-251-5/+9
| | | | | | | | | | | Thanks to Sam for importing tags in a way that allowed this to be done. Submitted by: Gleb Smirnoff <glebius@cell.sick.ru> Also allow the sr and ar drivers to create netgraph versions of their modules. Document the change to the ksocket node. Notes: svn path=/head/; revision=131108