aboutsummaryrefslogtreecommitdiff
path: root/sys/i4b/driver
Commit message (Collapse)AuthorAgeFilesLines
* Remove ISDN4BSD (I4B) from HEAD as it is not MPSAFE andBjoern A. Zeeb2008-05-267-5700/+0
| | | | | | | | | | | | | | | | | | | | | parts relied on the now removed NET_NEEDS_GIANT. Most of I4B has been disconnected from the build since July 2007 in HEAD/RELENG_7. This is what was removed: - configuration in /etc/isdn - examples - man pages - kernel configuration - sys/i4b (drivers, layers, include files) - user space tools - i4b support from ppp - further documentation Discussed with: rwatson, re Notes: svn path=/head/; revision=179315
* I4B header files were repo-copied from sys/i386/include/ toBjoern A. Zeeb2007-07-067-16/+16
| | | | | | | | | | | | sys/i4b/include/ so they will be available to all architectures once I4B compiles on those. Adapt #include paths. Approved by: re (kensmith) Notes: svn path=/head/; revision=171270
* Temporary disconnect i4bing, i4bisppp and i4bipr from the build forBjoern A. Zeeb2007-07-043-2/+4
| | | | | | | | | | | | | the 7.0 timeframe. This is needed because I4B is not locked and NET_NEEDS_GIANT goes away. The plan is to lock I4B and bring everything back for 7.1. Approved by: re (kensmith) Notes: svn path=/head/; revision=171196
* Fix fat-fingering in previous commit.John Baldwin2006-12-291-2/+2
| | | | | | | Pointy hat to: jhb Notes: svn path=/head/; revision=165640
* 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-1/+1
| | | | | | | | | | | | | | | | 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
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andRobert Watson2005-08-092-5/+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
* Fix some long standing bugs in writing to the BPF device attached toDavid Malone2005-06-261-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | a DLT_NULL interface. In particular: 1) Consistently use type u_int32_t for the header of a DLT_NULL device - it continues to represent the address family as always. 2) In the DLT_NULL case get bpf_movein to store the u_int32_t in a sockaddr rather than in the mbuf, to be consistent with all the DLT types. 3) Consequently fix a bug in bpf_movein/bpfwrite which only permitted packets up to 4 bytes less than the MTU to be written. 4) Fix all DLT_NULL devices to have the code required to allow writing to their bpf devices. 5) Move the code to allow writing to if_lo from if_simloop to looutput, because it only applies to DLT_NULL devices but was being applied to other devices that use if_simloop possibly incorrectly. PR: 82157 Submitted by: Matthew Luckie <mjl@luckie.org.nz> Approved by: re (scottl) Notes: svn path=/head/; revision=147611
* Fix a number of now bogus casts I missed the first time around (I mustBrooks Davis2005-06-171-8/+7
| | | | | | | | | | have failed to grep this file properly). Reported by: Hans Petter Selasky <hselasky at c2i dot net> Approved by: re (ifnet blanket) Notes: svn path=/head/; revision=147472
* Refer to the correct file/function in panic messages.Brooks Davis2005-06-171-2/+2
| | | | | | | | Reported by: Hans Petter Selasky <hselasky at c2i dot net> Approved by: re (ifnet blanket) Notes: svn path=/head/; revision=147469
* Stop embedding struct ifnet at the top of driver softcs. Instead theBrooks Davis2005-06-102-151/+149
| | | | | | | | | | | | | | | | | | | | | | | 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
* /* -> /*- for copyright notices, minor format tweaks as necessaryWarner Losh2005-01-067-21/+28
| | | | Notes: svn path=/head/; revision=139790
* Mark i4b IPR and SPPP drivers as NET_NEEDS_GIANT(), as they bothRobert Watson2004-10-122-0/+4
| | | | | | | | | | | interface with the network stack but are not yet sufficiently synchronized to run without the Giant lock. It migh be possible to mark the interfaces as IFF_NEEDSGIANT, but I'm unable to test that configuration and am unfamiliar with the architecture of i4b. Notes: svn path=/head/; revision=136427
* Kill count device support from config. I've changed the last fewPeter Wemm2004-08-306-8/+4
| | | | | | | | | | | | | | | | | | | | remaining consumers to have the count passed as an option. This is i4b, pc98/wdc, and coda. Bump configvers.h from 500013 to 600000. Remove heuristics that tried to parse "device ed5" as 5 units of the ed device. This broke things like the snd_emu10k1 device, which required quotes to make it parse right. The no-longer-needed quotes have been removed from NOTES, GENERIC etc. eg, I've removed the quotes from: device snd_maestro device "snd_maestro3" device snd_mss I believe everything will still compile and work after this. Notes: svn path=/head/; revision=134542
* Apply error and success logic consistently to the function netisr_queue() andAndre Oppermann2004-08-271-5/+1
| | | | | | | | | | | | | | | | | | | | | its users. netisr_queue() now returns (0) on success and ERRNO on failure. At the moment ENXIO (netisr queue not functional) and ENOBUFS (netisr queue full) are supported. Previously it would return (1) on success but the return value of IF_HANDOFF() was interpreted wrongly and (0) was actually returned on success. Due to this schednetisr() was never called to kick the scheduling of the isr. However this was masked by other normal packets coming through netisr_dispatch() causing the dequeueing of waiting packets. PR: kern/70988 Found by: MOROHOSHI Akihiko <moro@remus.dti.ne.jp> MFC after: 3 days Notes: svn path=/head/; revision=134391
* Catch up with the new world order of Netgraph metas.Ruslan Ermilov2004-07-061-15/+3
| | | | | | | | | (This one was the last, according to grep(1).) Submitted by: Gleb Smirnoff Notes: svn path=/head/; revision=131679
* Add another ifdef...Warner Losh2004-07-051-0/+2
| | | | Notes: svn path=/head/; revision=131638
* meta_p is a void *, so a variable that's of type void * can't beWarner Losh2004-07-041-1/+4
| | | | | | | | | | | | | | | dereferenced directly. Toss an ifdef around it for the moment and allow this to compile. This likely means that priority packets aren't queued to the special high priority queue. The maintainer of this should look into the problem. This is likely fallout from the netgraph migration to using a more generic meta tag from the mbug recently. Fixes: pc98 tinerbox Notes: svn path=/head/; revision=131574
* Be BURN_BRIDGES compliantPoul-Henning Kamp2004-06-211-1/+1
| | | | Notes: svn path=/head/; revision=130880
* Do the dreaded s/dev_t/struct cdev */Poul-Henning Kamp2004-06-164-21/+21
| | | | | | | Bump __FreeBSD_version accordingly. Notes: svn path=/head/; revision=130585
* Link ALTQ to the build and break with ABI for struct ifnet. Please recompileMax Laier2004-06-131-1/+1
| | | | | | | | | | | | | | | your (network) modules as well as any userland that might make sense of sizeof(struct ifnet). This does not change the queueing yet. These changes will follow in a seperate commit. Same with the driver changes, which need case by case evaluation. __FreeBSD_version bump will follow. Tested-by: (i386)LINT Notes: svn path=/head/; revision=130416
* Switch to using C99 sparse initialisers for the type methods array.Julian Elischer2004-05-291-12/+10
| | | | | | | | | | | Should make no binary difference. Submitted by: Gleb Smirnoff <glebius@cell.sick.ru> Reviewed by: Harti Brandt <harti@freebsd.org> MFC after: 1 week Notes: svn path=/head/; revision=129823
* Device megapatch 4/6:Poul-Henning Kamp2004-02-214-0/+8
| | | | | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags. Notes: svn path=/head/; revision=126080
* Device megapatch 1/6:Poul-Henning Kamp2004-02-214-8/+0
| | | | | | | | | | Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number. Notes: svn path=/head/; revision=126076
* Based on an excellent suggestion from tanimura@ define I4BPRI and use itGary Jennejohn2003-11-103-38/+17
| | | | | | | in place of TTIPRI. Notes: svn path=/head/; revision=122422
* Fix breakage cuased by the selwakeuppri commit by defining TTIPRI forGary Jennejohn2003-11-103-0/+21
| | | | | | | recent versions of FreeBSD (based on __FreeBSD_version check). Notes: svn path=/head/; revision=122419
* - Implement selwakeuppri() which allows raising the priority of aSeigo Tanimura2003-11-092-8/+8
| | | | | | | | | | | | | | | | thread being waken up. The thread waken up can run at a priority as high as after tsleep(). - Replace selwakeup()s with selwakeuppri()s and pass appropriate priorities. - Add cv_broadcastpri() which raises the priority of the broadcast threads. Used by selwakeuppri() if collision occurs. Not objected in: -arch, -current Notes: svn path=/head/; revision=122352
* Replace the if_name and if_unit members of struct ifnet with new membersBrooks Davis2003-10-312-10/+10
| | | | | | | | | | | | | | | | 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
* Initialize if_softc and use it in favor of &ipr_softc[ifp->if_unit] toBrooks Davis2003-10-311-3/+4
| | | | | | | get the softc. Notes: svn path=/head/; revision=121776
* Use __FBSDID().David E. O'Brien2003-06-107-21/+21
| | | | Notes: svn path=/head/; revision=116177
* Fix systematic off-by-one errors in unit number range checks.Poul-Henning Kamp2003-05-311-1/+1
| | | | | | | Found by: FlexeLint Notes: svn path=/head/; revision=115467
* Update netisr handling; Each SWI now registers its queue, and all queueJonathan Lemon2003-03-041-1/+1
| | | | | | | | | | | | | drain routines are done by swi_net, which allows for better queue control at some future point. Packets may also be directly dispatched to a netisr instead of queued, this may be of interest at some installations, but currently defaults to off. Reviewed by: hsu, silby, jayanth, sam Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=111888
* Gigacommit to improve device-driver source compatibility betweenPoul-Henning Kamp2003-03-034-52/+29
| | | | | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl) Notes: svn path=/head/; revision=111815
* More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).Dag-Erling Smørgrav2003-03-023-25/+25
| | | | Notes: svn path=/head/; revision=111748
* NODEVFS cleanup:Poul-Henning Kamp2003-02-264-64/+0
| | | | | | | | Don't call cdevsw_{add,remove}() Remove remnants of the previous DEVFS. Notes: svn path=/head/; revision=111575
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-191-1/+1
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Fix another typo in a comment which I noticed while doing the MFC.Gary Jennejohn2003-02-061-1/+1
| | | | Notes: svn path=/head/; revision=110459
* Fix some typos in 3 comments.Gary Jennejohn2003-02-011-4/+5
| | | | | | | Reported by: marius@alchemy.franken.de Notes: svn path=/head/; revision=110194
* Add a fix for the case where the dialout fails. In this case the ispGary Jennejohn2003-01-301-0/+13
| | | | | | | | | | | | | | | interface was left in an active, but not connected, state, which resulted in data being sent to it and the transmit queue filling up. This happened because the driver never informed sppp that it shoulkd clean up the connection. This fix informs sppp that it should clean things up. The fix was actually developed and tested under -stable, so a short MFC period seems appropriate, say 2 days. Contributed by: Ari Suutari <ari.suutari@syncrontech.com> Notes: svn path=/head/; revision=110100
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-211-1/+1
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* network interface and link layer changes:Sam Leffler2002-11-152-6/+4
| | | | | | | | | | | | | | | o on input don't strip the Ethernet header from packets o input packet handling is now done with if_input o track changes to ether_ifattach/ether_ifdetach API o track changes to bpf tapping o call ether_ioctl for default handling of ioctl's o use constants from net/ethernet.h where possible Reviewed by: many Approved by: re Notes: svn path=/head/; revision=106939
* Don't include the depricated "bpf.h" and always compile in bpf supportBrooks Davis2002-10-212-21/+1
| | | | | | | as per current practice. Notes: svn path=/head/; revision=105608
* Continue de-counting i4b. Devices i4bctl, i4bcapi, iavc, i4bq921,Brooks Davis2002-09-027-34/+0
| | | | | | | | | | | i4bq931, i4b, isic, iwic, ifpi, ifpi2, ifpnp, ihfc, and itjc are no longer count devices. Also remove a few other instances of N<DEVICE> being used to control compilation of whole files. Reviewed by: hm Notes: svn path=/head/; revision=102828
* Bugfix to enable dialer "connected" response.Hellmuth Michaelis2002-08-271-3/+12
| | | | Notes: svn path=/head/; revision=102487
* Replace various spelling with FALLTHROUGH which is lint()ablePhilippe Charnier2002-08-251-1/+1
| | | | Notes: svn path=/head/; revision=102412
* Unbreak LINT by compensating for theAlfred Perlstein2002-06-011-4/+3
| | | | | | | ng_parse_struct_info -> ng_parse_struct_field change. Notes: svn path=/head/; revision=97720
* Oops, I missed this warning. Comment out extra junk after #endifPeter Wemm2002-05-241-1/+1
| | | | Notes: svn path=/head/; revision=97225
* Change callers of mtx_init() to pass in an appropriate lock type name. InJohn Baldwin2002-04-044-6/+6
| | | | | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64 Notes: svn path=/head/; revision=93818
* Change the suser() API to take advantage of td_ucred as well as do aJohn Baldwin2002-04-011-2/+2
| | | | | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@ Notes: svn path=/head/; revision=93593
* Clean up the i4b kernel part: remove unmaintained #if(def)s for NetBSD,Hellmuth Michaelis2002-03-177-955/+95
| | | | | | | | OpenBSD and BSD/OS and respective code, remove pre $FreeBSD CVS id's, remove #if(def)s and respective code for FreeBSD versions < 5 . Notes: svn path=/head/; revision=92487