summaryrefslogtreecommitdiff
path: root/sys/dev/pdq
Commit message (Collapse)AuthorAgeFilesLines
* Replace the if_name and if_unit members of struct ifnet with new membersBrooks Davis2003-10-314-9/+7
| | | | | | | | | | | | | | | | 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
* Use __FBSDID().David E. O'Brien2003-08-243-3/+9
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119418
* Make this compile on alpha.Andrew Gallatin2003-07-311-1/+1
| | | | Notes: svn path=/head/; revision=118263
* - Don't call pci_enable_io() in drivers (unless needed for resume).Matthew N. Dodd2003-04-161-15/+0
| | | | | | | | - Don't test memory/port status and emit an error message; the PCI bus code will do this now. Notes: svn path=/head/; revision=113545
* - Express hard dependencies on bus (pci, isa, pccard) andMatthew N. Dodd2003-04-152-6/+6
| | | | | | | | | | | network layer (ether). - Don't abuse module names to facilitate ifconfig module loading; such abuse isn't really needed. (And if we do need type information associated with a module then we should make it explicit and not use hacks.) Notes: svn path=/head/; revision=113506
* Add a crutch so that direct-mapped DMA works on alpha. This is a stepAndrew Gallatin2003-04-011-0/+4
| | | | | | | | | toward preventing this driver from crashing an alpha at boot. Tested by: Oliver Lehmann <lehmann@ans-netz.de> Notes: svn path=/head/; revision=112948
* Catch up with bpf_mtap() changes.Matthew N. Dodd2003-03-161-1/+1
| | | | Notes: svn path=/head/; revision=112310
* Catch up with recent infrastructure changes.Matthew N. Dodd2003-03-161-2/+2
| | | | Notes: svn path=/head/; revision=112309
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-193-6/+6
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-213-6/+6
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* network interface driver changes:Sam Leffler2002-11-141-6/+6
| | | | | | | | | | | | | | | | | o don't strip the Ethernet header from inbound packets; pass packets up the stack intact (required significant changes to some drivers) o reference common definitions in net/ethernet.h (e.g. ETHER_ALIGN) o track ether_ifattach/ether_ifdetach API changes o track bpf changes (use BPF_TAP and BPF_MTAP) o track vlan changes (ifnet capabilities, revised processing scheme, etc.) o use if_input to pass packets "up" o call ether_ioctl for default handling of ioctls Reviewed by: many Approved by: re Notes: svn path=/head/; revision=106937
* Fix mis-indentation.Poul-Henning Kamp2002-10-201-1/+1
| | | | | | | Spotted by: FlexeLint Notes: svn path=/head/; revision=105507
* Replace various spelling with FALLTHROUGH which is lint()ablePhilippe Charnier2002-08-251-2/+2
| | | | Notes: svn path=/head/; revision=102412
* Fix typo in the BSD copyright: s/withough/without/Jens Schweikhardt2002-06-024-4/+4
| | | | | | | | Spotted and suggested by: des MFC after: 3 weeks Notes: svn path=/head/; revision=97748
* Change callers of mtx_init() to pass in an appropriate lock type name. InJohn Baldwin2002-04-041-1/+2
| | | | | | | | | | 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
* - Merge the pdq driver (if_fpa and if_fea) from NetBSD.Matthew N. Dodd2002-03-297-508/+1688
| | | | | | | | Among other things this gets us ifmedia support. - Update fddi_ifattach() to take an additional argument. Notes: svn path=/head/; revision=93383
* Remove __P.Alfred Perlstein2002-03-201-7/+7
| | | | Notes: svn path=/head/; revision=92739
* Fix warning (passing wrong arg to arp_ifinit())Peter Wemm2002-02-271-1/+1
| | | | | | | Submitted by: LINT, -Werror Notes: svn path=/head/; revision=91439
* Undo part of the tangle of having sys/lock.h and sys/mutex.h included inMark Murray2001-05-011-0/+3
| | | | | | | | | | | | | | other "system" header files. Also help the deprecation of lockmgr.h by making it a sub-include of sys/lock.h and removing sys/lockmgr.h form kernel .c files. Sort sys/*.h includes where possible in affected files. OK'ed by: bde (with reservations) Notes: svn path=/head/; revision=76166
* Convert if_multiaddrs from LIST to TAILQ so that it can be traversedPoul-Henning Kamp2001-02-061-2/+2
| | | | | | | | | backwards in the three drivers which want to do that. Reviewed by: mikeh Notes: svn path=/head/; revision=72084
* Mechanical change to use <sys/queue.h> macro API instead ofPoul-Henning Kamp2001-02-041-2/+2
| | | | | | | | | | fondling implementation details. Created with: sed(1) Reviewed by: md5(1) Notes: svn path=/head/; revision=71999
* make PCI DEFPA fiddi adapters work on alpha:Andrew Gallatin2001-01-081-2/+5
| | | | | | | | | | | | | | | - add a dma hack similar to the NetBSD one - change PDQ_OS_MEM{RD,WR} to use readl/writel rather than deref'ing a 32 bit va. Note that I did just enough to get this working on alpha. I probably should have updated it to use busspace, but I was too lazy to navigate the twisty minefield of ifdefs that make up this driver. Tested by: wilko (on both x86 and alpha) Notes: svn path=/head/; revision=70801
* Newbusify the PCI PDQ (fddi) attachment. This isn't as clean asPeter Wemm2001-01-021-353/+71
| | | | | | | | the EISA attachment and has not been tested (no hardware!), but at least it stands a chance at working. At least it compiles now. Notes: svn path=/head/; revision=70594
* Convert more malloc+bzero to malloc+M_ZERO.David Malone2000-12-081-2/+1
| | | | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Notes: svn path=/head/; revision=69781
* Lock down the network interface queues. The queue mutex must be obtainedJonathan Lemon2000-11-251-7/+1
| | | | | | | | | | | | | | | | | before adding/removing packets from the queue. Also, the if_obytes and if_omcasts fields should only be manipulated under protection of the mutex. IF_ENQUEUE, IF_PREPEND, and IF_DEQUEUE perform all necessary locking on the queue. An IF_LOCK macro is provided, as well as the old (mutex-less) versions of the macros in the form _IF_ENQUEUE, _IF_QFULL, for code which needs them, but their use is discouraged. Two new macros are introduced: IF_DRAIN() to drain a queue, and IF_HANDOFF, which takes care of locking/enqueue, and also statistics updating/start if necessary. Notes: svn path=/head/; revision=69152
* Remove unneeded <stddef.h> #includes.Poul-Henning Kamp2000-10-291-1/+0
| | | | Notes: svn path=/head/; revision=67899
* Use appropriate resource management accessors instead of directlyMatthew N. Dodd2000-10-181-1/+1
| | | | | | | | | referencing structure members. Use rman_get_size() instead of end - start + 1. Notes: svn path=/head/; revision=67268
* Uh, ya, sure this almost compiled for __bsdi__. NOT!Tim Vanderhoek2000-05-211-0/+1
| | | | | | | | | | | | | | | Note that __bsdi__s_/_i_/_os_/__ has moved this file to dev/ic/ and has completely removed the non-compiling function from pdq_ifsubr.c and has completely removed this function and placed it into netinet/if_ether.c (if, in fact, it wasn't there the whole time). I was tempted to simply remove this __bsdi__only__ function. The function is arp_ifinit(). PR: kern/7903 Notes: svn path=/head/; revision=60753
* Pre 4.0 tidy up.Peter Wemm2000-01-141-1/+1
| | | | | | | | | | | | | | | Collect together the components of several drivers and export eisa from the i386-only area (It's not, it's on some alphas too). The code hasn't been updated to work on the Alpha yet, but that can come later. Repository copies were done a while ago. Moving these now keeps them in consistant place across the 4.x series as the newbusification progresses. Submitted by: mdodd Notes: svn path=/head/; revision=55953
* Set ifq_maxlen. (to default IFQ_MAXLEN)Matthew N. Dodd2000-01-131-0/+1
| | | | Notes: svn path=/head/; revision=55892
* Remove NBPF conditionality of bpf calls in most of our network drivers.Poul-Henning Kamp1999-09-251-9/+0
| | | | | | | | | | | | | | | This means that we will not have to have a bpf and a non-bpf version of our driver modules. This does not open any security hole, because the bpf core isn't loadable The drivers left unchanged are the "cross platform" drivers where the respective maintainers are urged to DTRT, whatever that may be. Add a couple of missing FreeBSD tags. Notes: svn path=/head/; revision=51646
* $Id$ -> $FreeBSD$Peter Wemm1999-08-286-6/+6
| | | | Notes: svn path=/head/; revision=50477
* Clean up after removing sys/eventhandler.h from sys/systm.h at the lastMike Smith1999-08-211-1/+2
| | | | | | | | minute. This should cover all of the missed cases (and should let LINT build again). Notes: svn path=/head/; revision=50135
* Implement a new generic mechanism for attaching handler functions toMike Smith1999-08-211-5/+6
| | | | | | | | | | | | | | | | events, in order to pave the way for removing a number of the ad-hoc implementations currently in use. Retire the at_shutdown family of functions and replace them with new event handler lists. Rework kern_shutdown.c to take greater advantage of the use of event handlers. Reviewed by: green Notes: svn path=/head/; revision=50107
* Move the specification of EDGE/LEVEL triggered interrupts toMatthew N. Dodd1999-08-011-3/+3
| | | | | | | | | | | | | | | | | | | | eisa_add_intr() which now takes an additional arguement (one of EISA_TRIGGER_LEVEL or EISA_TRIGGER_EDGE). The flag RR_SHAREABLE has no effect when passed to bus_alloc_resource(dev, SYS_RES_IRQ, ...) in an EISA device context as the eisa_alloc_resource() call (bus_alloc_resource method) now deals with this flag directly, depending on the device ivars. This change does nothing more than move all the 'shared = inb(foo + iobsse)' nonesense to the device probe methods rather than the device attach. Also, print out 'edge' or 'level' in the IRQ announcement message. Reviewed by: dfr Notes: svn path=/head/; revision=49360
* Don't use at_shutdown() now that we have new_bus which lets usMatthew N. Dodd1999-07-311-8/+11
| | | | | | | | | specify a DEVICE_SHUTDOWN method instead. Reviewed by: me, since nobody else seems to run this hardware in -CURRENT Notes: svn path=/head/; revision=49301
* Convert the if_fea (DEC FDDI) driver to newbus since it has been brokenPeter Wemm1999-07-101-395/+165
| | | | | | | | | | for ages. This is the EISA wrapper for sys/dev/pdq/*. The pci bus driver is in sys/pci/if_fpa.c. Submitted by: "Matthew N. Dodd" <winter@jurai.net> Notes: svn path=/head/; revision=48741
* Rename bpfilter to bpf.Dag-Erling Smørgrav1999-07-061-6/+6
| | | | Notes: svn path=/head/; revision=48645
* Simplify the COMPAT_PCI_DRIVER/DATA_SET hack. We can add:Peter Wemm1999-05-091-5/+1
| | | | | | | | | | | #define COMPAT_PCI_DRIVER(name,data) DATA_SET(pcidevice_set,data) .. to 2.2.x and 3.x if people think it's worth it. Driver writers can do this if it's not defined. (The reason for this is that I'm trying to progressively eliminate use of linker_sets where it hurts modularity and runtime load capability, and these DATA_SET's keep getting in the way.) Notes: svn path=/head/; revision=46813
* Add sufficient braces to keep egcs happy about potentially ambiguousPeter Wemm1999-05-061-2/+3
| | | | | | | if/else nesting. Notes: svn path=/head/; revision=46568
* These two drivers have not been converted for newbus eisa yet.Peter Wemm1999-05-021-1/+4
| | | | Notes: svn path=/head/; revision=46332
* Use COMPAT_PCI_DRIVER() for registration if it exists. This shouldn'tPeter Wemm1999-04-241-3/+6
| | | | | | | hurt the driver portability to 3.x too much for where drivers are shared. Notes: svn path=/head/; revision=46024
* Fix '|' that was supposed to be '||'Matthew Dillon1999-01-271-2/+2
| | | | Notes: svn path=/head/; revision=43292
* Silence warnings.Eivind Eklund1999-01-121-2/+2
| | | | Notes: svn path=/head/; revision=42546
* The previous commit was bogus. malloc(..., M_WAITOK) should not beBruce Evans1999-01-011-2/+6
| | | | | | | | | | used in device attach routines. At least for attaches at boot time, actually waiting, or actually failing for malloc(..., M_NOWAIT), are almost equally unlikely and harmless, but using M_WAITOK interferes with automatic detection of bogus M_WAITOK's. Notes: svn path=/head/; revision=42230
* probe function changed from returning char * to const char *.Matthew Dillon1998-12-141-2/+2
| | | | Notes: svn path=/head/; revision=41771
* malloc(xxx, yyy, M_WAITOK) does not fail. This probably explains whyEivind Eklund1998-12-091-6/+2
| | | | | | | the bug in the check had never been discovered. Notes: svn path=/head/; revision=41611
* Fixed printf format errors. Only one left in LINT on i386's.Bruce Evans1998-08-241-4/+4
| | | | Notes: svn path=/head/; revision=38505
* This commit fixes various 64bit portability problems required forDoug Rabson1998-06-071-2/+2
| | | | | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time. Notes: svn path=/head/; revision=36735
* Removed unused #includes.Bruce Evans1998-02-203-19/+3
| | | | Notes: svn path=/head/; revision=33676