summaryrefslogtreecommitdiffstats
path: root/sys/dev/pdq
Commit message (Collapse)AuthorAgeFilesLines
* Add new tunable 'net.link.ifqmaxlen' to set default send interfacesobomax2010-05-031-1/+1
| | | | | | | | | | 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
* Remove extraneous semicolons, no functional changes.mbr2010-01-071-1/+1
| | | | | Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week
* Several fixes to these drivers. Note that these two drivers are actuallyjhb2009-11-194-72/+114
| | | | | | | | | | | | | | | | | | | | just two different attachments (EISA and PCI) to a single driver. - Add real locking. Previously these drivers only acquired their lock in their interrupt handler or in the ioctl routine (but too broadly in the latter). No locking was used for the stack calling down into the driver via if_init() or if_start(), for device shutdown or detach. Also, the interrupt handler held the driver lock while calling if_input(). All this stuff should be fixed in the locking changes. - Really fix these drivers to handle if_alloc(). The front-end attachments were using if_initname() before the ifnet was allocated. Fix this by moving some of the duplicated logic from each driver into pdq_ifattach(). While here, make pdq_ifattach() return an error so that the driver just fails to attach if if_alloc() fails rather than panic'ing. Also, defer freeing the ifnet until the driver has stopped using it during detach. - Add a new private timer to drive the watchdog timer. - Pass the softc pointer to the interrupt handlers instead of the device_t so we can avoid the use of device_get_softc() and to better match what other drivers do.
* Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/rwatson2009-06-261-2/+2
| | | | | | | | | | | | | IF_ADDR_UNLOCK() across network device drivers when accessing the per-interface multicast address list, if_multiaddrs. This will allow us to change the locking strategy without affecting our driver programming interface or binary interface. For two wireless drivers, remove unnecessary locking, since they don't actually access the multicast address list. Approved by: re (kib) MFC after: 6 weeks
* strict kobj sigs: fix assortment of device_detach and device_shutdown implsavg2009-06-111-3/+3
| | | | | | | with common issue of having void return type instead of int Reviewed by: imp, current@ Approved by: jhb (mentor)
* Fix preprocessor code to check for a symbol being defined prior to checkingmjacob2007-06-081-1/+1
| | | | for non-zero.
* Carry volatile type in cast so gcc 4.2 will be happy.mjacob2007-06-081-1/+1
|
* 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 Approved by: re (implicit?)
* Catchup with filtersimp2007-02-231-1/+1
|
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-162-2/+0
| | | | unnecessary.
* Remove various bits of conditional Alpha code and fixup a few comments.jhb2006-05-122-5/+1
|
* - Make IFP2ENADDR() a pointer to IF_LLADDR() rather than anotherru2005-11-114-11/+5
| | | | | | | | copy of Ethernet address. - Change iso88025_ifattach() and fddi_ifattach() to accept MAC address as an argument, similar to ether_ifattach(), to make this work.
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-091-8/+8
| | | | | | | | | | | | | | 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
* Modify device drivers supporting multicast addresses to lock if_addr_mtxrwatson2005-08-031-0/+2
| | | | | | | | over iteration of their multicast address lists when synchronizing the hardware address filter with the network stack-maintained list. Problem reported by: Ed Maste (emaste at phaedrus dot sandvine dot ca> MFC after: 1 week
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-106-281/+45
| | | | | | | | | | | | | | | | | | | | 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
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386nyan2005-05-293-6/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* Offer unhandled IOCTLS to fddi_ioctl().mdodd2005-03-241-8/+1
|
* Use BUS_PROBE_DEFAULT for pci probe return valueimp2005-03-051-1/+1
|
* Prefer C99's __func__ over GCC's __FUNCTION__.stefanf2004-09-221-1/+1
|
* Link ALTQ to the build and break with ABI for struct ifnet. Please recompilemlaier2004-06-131-0/+2
| | | | | | | | | | | | 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
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-172-10/+10
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Use contigmalloc() and contigfree() instead of vm_page_alloc_contig() andalc2004-01-131-2/+2
| | | | | | | | kmem_free(). Note: The FreeBSD-specific code in this file has been subsumed by the FreeBSD-specific header file, pdq_freebsd.h. That header file already specifies the use of contigmalloc() and contigfree(). Thus, the purpose of this change is to avoid having nonsensical examples of FreeBSD-specific memory allocation in our source tree.
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-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)
* Use __FBSDID().obrien2003-08-243-3/+9
| | | | Also some minor style cleanups.
* Make this compile on alpha.gallatin2003-07-311-1/+1
|
* - Don't call pci_enable_io() in drivers (unless needed for resume).mdodd2003-04-161-15/+0
| | | | | - Don't test memory/port status and emit an error message; the PCI bus code will do this now.
* - Express hard dependencies on bus (pci, isa, pccard) andmdodd2003-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.)
* Add a crutch so that direct-mapped DMA works on alpha. This is a stepgallatin2003-04-011-0/+4
| | | | | | toward preventing this driver from crashing an alpha at boot. Tested by: Oliver Lehmann <lehmann@ans-netz.de>
* Catch up with bpf_mtap() changes.mdodd2003-03-161-1/+1
|
* Catch up with recent infrastructure changes.mdodd2003-03-161-2/+2
|
* Back out M_* changes, per decision of the TRB.imp2003-02-193-6/+6
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-213-6/+6
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* network interface driver changes:sam2002-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
* Fix mis-indentation.phk2002-10-201-1/+1
| | | | Spotted by: FlexeLint
* Replace various spelling with FALLTHROUGH which is lint()ablecharnier2002-08-251-2/+2
|
* Fix typo in the BSD copyright: s/withough/without/schweikh2002-06-024-4/+4
| | | | | Spotted and suggested by: des MFC after: 3 weeks
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-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
* - Merge the pdq driver (if_fpa and if_fea) from NetBSD.mdodd2002-03-297-516/+1696
| | | | | Among other things this gets us ifmedia support. - Update fddi_ifattach() to take an additional argument.
* Remove __P.alfred2002-03-201-7/+7
|
* Fix warning (passing wrong arg to arp_ifinit())peter2002-02-271-1/+1
| | | | Submitted by: LINT, -Werror
* Undo part of the tangle of having sys/lock.h and sys/mutex.h included inmarkm2001-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)
* Convert if_multiaddrs from LIST to TAILQ so that it can be traversedphk2001-02-061-2/+2
| | | | | | backwards in the three drivers which want to do that. Reviewed by: mikeh
* Mechanical change to use <sys/queue.h> macro API instead ofphk2001-02-041-2/+2
| | | | | | | fondling implementation details. Created with: sed(1) Reviewed by: md5(1)
* make PCI DEFPA fiddi adapters work on alpha: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)
* Newbusify the PCI PDQ (fddi) attachment. This isn't as clean aspeter2001-01-021-355/+73
| | | | | the EISA attachment and has not been tested (no hardware!), but at least it stands a chance at working. At least it compiles now.
* Convert more malloc+bzero to malloc+M_ZERO.dwmalone2000-12-081-2/+1
| | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
* Lock down the network interface queues. The queue mutex must be obtainedjlemon2000-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.
* Remove unneeded <stddef.h> #includes.phk2000-10-291-1/+0
|
* Use appropriate resource management accessors instead of directlymdodd2000-10-181-1/+1
| | | | | | referencing structure members. Use rman_get_size() instead of end - start + 1.
* Uh, ya, sure this almost compiled for __bsdi__. NOT!hoek2000-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
OpenPOWER on IntegriCloud