summaryrefslogtreecommitdiffstats
path: root/sys/dev/cx
Commit message (Collapse)AuthorAgeFilesLines
* 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-10/+11
| | | | | | | | | | | | | 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>
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-161-1/+0
| | | | unnecessary.
* - Use swi_remove() to teardown swi handlers rather thanjhb2005-10-261-1/+1
| | | | | intr_event_remove_handler(). - Remove tty: prefix from a couple of swi handler names.
* Catch up with new interrupt handling code.ru2005-10-261-2/+2
|
* Eliminate two unused arguments to ttycreate().phk2005-10-161-2/+1
|
* Backout if_cp 1.26, if_ct 1.27, if_cx 1.47 by obrien:rik2005-09-271-446/+449
| | | | | | | | | | | | | | | | | | | | | | | | ---------------------------- 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.
* Reorder code to not depend on an ISO-C illegal forward extern declaration.obrien2005-09-071-454/+453
|
* 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)
* Lost cx_mpsafenet check.rik2005-07-091-2/+3
| | | | | Pointy hat: me Approved by: re (scottl)
* Lost t_oproc() callback assignment.rik2005-07-091-0/+1
| | | | | Pointyhats: phk (who lost it), me (who didn't notice that) Approved by: re (scottl)
* Lost CX_UNLOCK().rik2005-07-091-0/+4
| | | | | Pointy hat: me Approved by: re (scottl)
* Protect from partially initialized channels.rik2005-07-091-0/+2
| | | | Approved by: re (scottl)
* Space & alignment nits.rik2005-07-091-11/+11
| | | | Approved by: re (scottl)
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-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
* netchild's mega-patch to isolate compiler dependencies into a centraljoerg2005-03-021-1/+5
| | | | | | | | | | | | | | | | place. This moves the dependency on GCC's and other compiler's features into the central sys/cdefs.h file, while the individual source files can then refer to #ifdef __COMPILER_FEATURE_FOO where they by now used to refer to #if __GNUC__ > 3.1415 && __BARC__ <= 42. By now, GCC and ICC (the Intel compiler) have been actively tested on IA32 platforms by netchild. Extension to other compilers is supposed to be possible, of course. Submitted by: netchild Reviewed by: various developers on arch@, some time ago
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-068-8/+8
|
* Make code MPSAFE.rik2004-12-131-66/+296
| | | | | | | | 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
* Partially backout 1.34. These ioctls and function cx_modem_status () arerik2004-12-091-0/+65
| | | | used by sync part of driver, so put them back.
* 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.
* Use generic tty code instead of local copy.phk2004-10-131-277/+80
|
* First half of tty code rework: unifdef -D__FreeBSD_Version=600000phk2004-10-132-404/+5
| | | | | | | | The changes in the next commit would make the code totally unreadable if the #ifdef'ing were maintained. It might make a lot of sense to split if_cx.c in a netgraph related and in a tty related file but I will not attempt that without hardware.
* 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.
* Make code ready to switch debug.mpsafenet to 1 since I've not able torik2004-08-271-1/+2
| | | | commit MPSAFE code for now it is just IFF_NEEDSGIANT.
* Fix resource check while autodetection.rik2004-08-131-6/+6
|
* White space cleanup.rik2004-08-131-219/+219
|
* 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.
* Preparation commit for the tty cleanups that will follow in the nearphk2004-07-151-1/+1
| | | | | | | | | future: rename ttyopen() -> tty_open() and ttyclose() -> tty_close(). We need the ttyopen() and ttyclose() for the new generic cdevsw functions for tty devices in order to have consistent naming.
* Introduce ttygone() which indicates that the hardware is detached.phk2004-07-111-60/+5
| | | | Move dtrwait logic to the generic TTY level.
* - Shorten the names for the TTY related swi interrupt handlers as thejhb2004-06-281-1/+1
| | | | | | | | 'tty:' prefix is largely redundant. - Fix the priority of the low-priority TTY SWIs that are hung off of the softclock thread. Submitted by: bde (2)
* 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-31/+123
|
* Make code more clean: backout support for 3.x branch.rik2004-06-231-502/+30
|
* 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-7/+7
| | | | Bump __FreeBSD_version accordingly.
* Free tty at detach().rik2004-06-101-1/+15
| | | | | Tested by: `pstat -t` Requested by: phk
* Check if we control device. Else we will go to panic cause we don't haverik2004-06-091-1/+1
| | | | properly initialized dev_t structure at open.
* 1. struct tty => struct tty *tty.rik2004-06-081-95/+110
| | | | Requested by: phk
* Make linesw[] an array of pointers to linedesc instead of an array ofphk2004-06-071-1/+1
| | | | linedisc.
* Centralize the line discipline optimization determination in a functionphk2004-06-041-9/+15
| | | | | | | | | called ttyldoptim(). Use this function from all the relevant drivers. I belive no drivers finger linesw[] directly anymore, paving the way for locking and refcounting.
* Manual edits to change linesw[]-frobbing to ttyld_*() calls.phk2004-06-041-10/+19
|
* Make the remaining serial drivers call ttyioctl() rather than callingphk2004-06-041-0/+10
| | | | the linedisc directly.
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* Switch to using C99 sparse initialisers for the type methods array.rik2004-05-291-22/+9
| | | | | | Requested by: harti MFC after: 1 week
* Use better way of closing fr support before current sppp doesn't have it.rik2004-05-071-8/+13
|
* Sync with RELENG_4.rik2004-05-071-3/+3
|
* Delete unused cx_slow_ih.rik2004-05-071-4/+0
| | | | Pointed by: jhb
* These are changes to allow to use the Intel C/C++ compiler (lang/icc)trhodes2004-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to build the kernel. It doesn't affect the operation if gcc. Most of the changes are just adding __INTEL_COMPILER to #ifdef's, as icc v8 may define __GNUC__ some parts may look strange but are necessary. Additional changes: - in_cksum.[ch]: * use a generic C version instead of the assembly version in the !gcc case (ASM code breaks with the optimizations icc does) -> no bad checksums with an icc compiled kernel Help from: andre, grehan, das Stolen from: alpha version via ppc version The entire checksum code should IMHO be replaced with the DragonFly version (because it isn't guaranteed future revisions of gcc will include similar optimizations) as in: ---snip--- Revision Changes Path 1.12 +1 -0 src/sys/conf/files.i386 1.4 +142 -558 src/sys/i386/i386/in_cksum.c 1.5 +33 -69 src/sys/i386/include/in_cksum.h 1.5 +2 -0 src/sys/netinet/igmp.c 1.6 +0 -1 src/sys/netinet/in.h 1.6 +2 -0 src/sys/netinet/ip_icmp.c 1.4 +3 -4 src/contrib/ipfilter/ip_compat.h 1.3 +1 -2 src/sbin/natd/icmp.c 1.4 +0 -1 src/sbin/natd/natd.c 1.48 +1 -0 src/sys/conf/files 1.2 +0 -1 src/sys/conf/files.amd64 1.13 +0 -1 src/sys/conf/files.i386 1.5 +0 -1 src/sys/conf/files.pc98 1.7 +1 -1 src/sys/contrib/ipfilter/netinet/fil.c 1.10 +2 -3 src/sys/contrib/ipfilter/netinet/ip_compat.h 1.10 +1 -1 src/sys/contrib/ipfilter/netinet/ip_fil.c 1.7 +1 -1 src/sys/dev/netif/txp/if_txp.c 1.7 +1 -1 src/sys/net/ip_mroute/ip_mroute.c 1.7 +1 -2 src/sys/net/ipfw/ip_fw2.c 1.6 +1 -2 src/sys/netinet/igmp.c 1.4 +158 -116 src/sys/netinet/in_cksum.c 1.6 +1 -1 src/sys/netinet/ip_gre.c 1.7 +1 -2 src/sys/netinet/ip_icmp.c 1.10 +1 -1 src/sys/netinet/ip_input.c 1.10 +1 -2 src/sys/netinet/ip_output.c 1.13 +1 -2 src/sys/netinet/tcp_input.c 1.9 +1 -2 src/sys/netinet/tcp_output.c 1.10 +1 -1 src/sys/netinet/tcp_subr.c 1.10 +1 -1 src/sys/netinet/tcp_syncache.c 1.9 +1 -2 src/sys/netinet/udp_usrreq.c 1.5 +1 -2 src/sys/netinet6/ipsec.c 1.5 +1 -2 src/sys/netproto/ipsec/ipsec.c 1.5 +1 -1 src/sys/netproto/ipsec/ipsec_input.c 1.4 +1 -2 src/sys/netproto/ipsec/ipsec_output.c and finally remove sys/i386/i386 in_cksum.c sys/i386/include in_cksum.h ---snip--- - endian.h: * DTRT in C++ mode - quad.h: * we don't use gcc v1 anymore, remove support for it Suggested by: bde (long ago) - assym.h: * avoid zero-length arrays (remove dependency on a gcc specific feature) This change changes the contents of the object file, but as it's only used to generate some values for a header, and the generator knows how to handle this, there's no impact in the gcc case. Explained by: bde Submitted by: Marius Strobl <marius@alchemy.franken.de> - aicasm.c: * minor change to teach it about the way icc spells "-nostdinc" Not approved by: gibbs (no reply to my mail) - bump __FreeBSD_version (lang/icc needs to know about the changes) Incarnations of this patch survive gcc compiles since a loooong time, I use it on my desktop. An icc compiled kernel works since Nov. 2003 (exceptions: snd_* if used as modules), it survives a build of the entire ports collection with icc. Parts of this commit contains suggestions or submissions from Marius Strobl <marius@alchemy.franken.de>. Reviewed by: -arch Submitted by: netchild
* 1. Fix compilation and panic while system boot problem after makedev wasrik2004-03-021-4/+22
| | | | | | changed to unde2dev. Approved by: imp (mentor)
OpenPOWER on IntegriCloud