aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ce
Commit message (Collapse)AuthorAgeFilesLines
* ce: clean up empty lines in .c and .h filesMateusz Guzik2020-09-013-44/+43
| | | | Notes: svn path=/head/; revision=365214
* Use a separate copy of machdep.h in cp and ce driversEd Maste2020-03-203-2/+99
| | | | | | | | | | Previously they included sys/dev/cx/machdep.h, but the cx driver was retired in r359178. These drivers haven't had real development for a decade or more so there's no real benefit in sharing this file; just copy it to the ce and cp subdirs. Notes: svn path=/head/; revision=359181
* dev/ce: double assignment.Pedro F. Giffuni2017-02-231-6/+6
| | | | | | | | | | The code is not operational right now so just comment away an obviously useless assignment. Fix some typos while here. Found with: coccinelle (da.cocci) Notes: svn path=/head/; revision=314142
* sys/dev: Replace zero with NULL for pointers.Pedro F. Giffuni2017-02-201-2/+2
| | | | | | | | | | | 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
* sys/dev: minor spelling fixes.Pedro F. Giffuni2016-05-032-2/+2
| | | | | | | Most affect comments, very few have user-visible effects. Notes: svn path=/head/; revision=298955
* As <machine/pmap.h> is included from <vm/pmap.h>, there is no need toSvatopluk Kraus2016-02-221-1/+0
| | | | | | | | | | include it explicitly when <vm/pmap.h> is already included. Reviewed by: alc, kib Differential Revision: https://reviews.freebsd.org/D5373 Notes: svn path=/head/; revision=295880
* CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than tenJung-uk Kim2015-05-221-7/+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
* Convert most BPF_TAP users to BPF_MTAP.Alexander V. Chernikov2014-09-281-6/+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
* Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on ↵Sofian Brabez2013-01-301-1/+1
| | | | | | | | | | 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 clang warnings in sys/dev/ce/if_ce.c and sys/dev/cp/if_cp.c,Dimitry Andric2011-12-291-1/+3
| | | | | | | | | | | using jkim's last patch (reviewed by bde) from here: http://docs.freebsd.org/cgi/mid.cgi?201010141558.03154.jkim MFC after: 1 week Notes: svn path=/head/; revision=228963
* Revert r213793.Rui Paulo2010-10-131-1/+1
| | | | Notes: svn path=/head/; revision=213795
* Don't do a logical AND of the result of strcmp() with a constant.Rui Paulo2010-10-131-1/+1
| | | | | | | Found with: clang Notes: svn path=/head/; revision=213793
* Add new tunable 'net.link.ifqmaxlen' to set default send interfaceMaxim Sobolev2010-05-031-4/+4
| | | | | | | | | | | | | 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.ce.mpsafenet: we no longer support running the networkRobert Watson2009-02-151-41/+7
| | | | | | | | stack with conditional Giant acquisition, and IFF_NEEDSGIANT will be removed in the near future. Notes: svn path=/head/; revision=188663
* Retire the MALLOC and FREE macros. They are an abomination unto style(9).Dag-Erling Smørgrav2008-10-231-3/+2
| | | | | | | MFC after: 3 months Notes: svn path=/head/; revision=184205
* 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
* Fix instances of bogus #elsif directive.Diomidis Spinellis2008-07-011-21/+21
| | | | | | | | Found by: CScout MFC after: 2 weeks Notes: svn path=/head/; revision=180147
* 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
* First in a series of changes to remove the now-unused Giant compatibilityRobert Watson2007-07-271-7/+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
* Remove ancient preprocessor code. Fix module compilation.Roman Kurakin2007-03-251-9/+1
| | | | | | | Requested by: n_hibma Notes: svn path=/head/; revision=167882
* Don't call bus_deactivate_resource() explicitly before callingYoshihiro Takahashi2007-03-211-1/+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/+4
| | | | | | | | | | | | | | | | 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-22/+65
| | | | | | | | | | | | | | | | 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
* Update low-level code. (to version 1.4)Roman Kurakin2006-03-012-4229/+4247
| | | | | | | | Obtained from: Cronyx Engineering MFC after: 3 days Notes: svn path=/head/; revision=156143
* Fix compilation with -Wundef (NBPF is undefined on FreeBSD >4).Ruslan Ermilov2006-02-031-1/+4
| | | | Notes: svn path=/head/; revision=155265
* Fix forward variable declaration.Roman Kurakin2006-01-301-61/+68
| | | | Notes: svn path=/head/; revision=155065
* Initial import of ce(4) driver for Cronyx Tau-PCI/32 adapters.Roman Kurakin2006-01-276-0/+9271
Not yet connected to the build. Notes: svn path=/head/; revision=154899