summaryrefslogtreecommitdiffstats
path: root/sys/dev/cp
Commit message (Collapse)AuthorAgeFilesLines
* Fxi a bunch of typos.eadler2013-05-101-1/+1
| | | | | PR: misc/174625 Submitted by: Jeremy Chadwick <jdc@koitsu.org>
* Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on ↵sbz2013-01-301-1/+1
| | | | | | | device_method_t arrays Reviewed by: cognet Approved by: cognet
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-041-2/+2
| | | | malloc(9) flags in sys/dev.
* Fix clang warnings in sys/dev/ce/if_ce.c and sys/dev/cp/if_cp.c,dim2011-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
* Revert r213793.rpaulo2010-10-131-1/+1
|
* Don't do a logical AND of the result of strcmp() with a constant.rpaulo2010-10-131-1/+1
| | | | Found with: clang
* Add new tunable 'net.link.ifqmaxlen' to set default send interfacesobomax2010-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
* Always use a private timer instead of if_watchdog and if_timer to drivejhb2009-11-171-44/+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.
* Use new spelling of the NG_*LEN constants.imp2009-06-091-2/+2
|
* Remove debug.cp.mpsafenet: we no longer support running the networkrwatson2009-02-151-30/+7
| | | | | stack with conditional Giant acquisition, and IFF_NEEDSGIANT will be removed in the near future.
* Replace all calls to minor() with dev2unit().ed2008-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
* Do not set IFF_DEBUG directly from the driver.rik2008-06-302-7/+13
| | | | MFC after: 1 month.
* First in a series of changes to remove the now-unused Giant compatibilityrwatson2007-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)
* Don't call bus_deactivate_resource() explicitly before callingnyan2007-03-211-1/+0
| | | | | bus_release_resource(). This is needed for pc98 by upcoming nexus related change.
* o break newbus api: add a new argument of type driver_filter_t topiso2007-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@
* Various bpf(4) related fixes to catch places up to the new bpf(4)jhb2006-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)
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningrwatson2006-11-061-27/+28
| | | | | | | | | | | | | 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>
* trim trailing ^Iobrien2005-12-171-17/+17
|
* Restore if_cp.c 1.27rik2005-09-271-2/+3
| | | | | | | | | | | | | | | | ---------------------------- 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. In fact, this change do nothing for this driver. It is protected from this by cp_destroy variable. This variable also protects driver from initiation of any activity from network stack with disabled intr handler with this change applied.
* Backout if_cp 1.26, if_ct 1.27, if_cx 1.47 by obrien:rik2005-09-271-809/+810
| | | | | | | | | | | | | | | | | | | | | | | | ---------------------------- 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.
* Make sure that we call if_free(ifp) after bus_teardown_intr. Since weimp2005-09-191-2/+3
| | | | | | | 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.
* Reorder code to not depend on an ISO-C illegal forward extern declaration.obrien2005-09-071-800/+799
|
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-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
* Use m_length (m, NULL) instead of m->m_pkthdr.len.rik2005-07-091-1/+1
| | | | | Problems reported by: strijar at urai dot ru Approved by: re (scottl)
* Protect from partially initialized channels.rik2005-07-091-0/+2
| | | | Approved by: re (scottl)
* Space & alignment nits.rik2005-07-091-5/+4
| | | | Approved by: re (scottl)
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-101-65/+73
| | | | | | | | | | | | | | | | | | | | 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
* Use BUS_PROBE_DEFAULT for pci probe return valueimp2005-03-051-1/+1
|
* Use dynamic major number allocation.phk2005-02-271-2/+0
|
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-064-4/+4
|
* Bring back ability to use FR support with sppp from Cronyx.rik2004-12-141-1/+1
|
* Make code MPSAFE.rik2004-12-131-68/+259
| | | | | | | | 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
* Add support for Tau-PCI-L model - one V.35/RS-232 orrik2004-12-112-717/+719
| | | | RS-530(449)/X.21 interface.
* Clean up from '#if __FreeBSD_version'.rik2004-12-111-357/+5
|
* Don not call pp_down()/pp_up() form XX_tlf()/XX_tls() in non PPP moderik2004-12-031-2/+4
| | | | | | to privent running of PPP's state machine in non PPP mode. MFC: after 3 days.
* Remove bogus cdevsw frobbing code which tries to prevent doublephk2004-09-231-13/+0
| | | | | | loading of modules. MODULE_VERSION() should be used for this I belive.
* Fix low level code for Tau-PCI/2E1 and Tau-PCI/4E1 that was broken by previousrik2004-08-161-364/+364
| | | | | commit. Pointy hat: rik
* Update low level code for Cronyx Tau-PCI:rik2004-08-162-743/+1180
| | | | | 1. Add support for Cronyx Tau-PCI/E3 rev.B. 2. Improve model identification and firmware load procedure.
* Since if_cp doesn't contain locking or run with INTR_MPSAFE, markrwatson2004-08-131-1/+2
| | | | the interface as IFF_NEEDSGIANT so if_start is run holding Giant.
* White space cleanup.rik2004-08-131-369/+369
|
* Slight cosmetic changes.julian2004-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.
* Convert Netgraph to use mbuf tags to pass its meta information around.julian2004-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.
* Use bus_dma* instead of contigmalloc()+vtophys() for RELENG_5.rik2004-06-231-48/+125
|
* Make code more clean: backout support for 3.x branch.rik2004-06-231-397/+36
|
* Second half of the dev_t cleanup.phk2004-06-171-2/+2
| | | | | | | | | | | The big lines are: NODEV -> NULL NOUDEV -> NODEV udev_t -> dev_t udev2dev() -> findcdev() Various minor adjustments including handling of userland access to kernel space struct cdev etc.
* Do the dreaded s/dev_t/struct cdev */phk2004-06-161-5/+5
| | | | Bump __FreeBSD_version accordingly.
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* Switch to using C99 sparse initialisers for the type methods array.rik2004-05-291-23/+9
| | | | | | Requested by: harti MFC after: 1 week
* Use PCI_BAR() rather than PCIR_MAPS.jhb2004-05-241-5/+5
| | | | Noticed by: phk
* Add support for Cronyx Tau-PCI adapters.rik2004-05-054-0/+9000
Note: cpddk.c is in obfuscated form (discussed with core@). As always, driver will be connected to the build a bit later after some extra testings.
OpenPOWER on IntegriCloud