summaryrefslogtreecommitdiffstats
path: root/sys/dev/pdq/if_fpa.c
Commit message (Collapse)AuthorAgeFilesLines
* Several fixes to these drivers. Note that these two drivers are actuallyjhb2009-11-191-20/+10
| | | | | | | | | | | | | | | | | | | | 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.
* 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)
* Catchup with filtersimp2007-02-231-1/+1
|
* - Make IFP2ENADDR() a pointer to IF_LLADDR() rather than anotherru2005-11-111-4/+1
| | | | | | | | 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.
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-101-2/+2
| | | | | | | | | | | | | | | | | | | | 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-291-2/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* Use BUS_PROBE_DEFAULT for pci probe return valueimp2005-03-051-1/+1
|
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-4/+4
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-311-3/+2
| | | | | | | | | | | | | 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-241-1/+3
| | | | Also some minor style cleanups.
* - 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-151-3/+3
| | | | | | | | 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.)
* Fix typo in the BSD copyright: s/withough/without/schweikh2002-06-021-1/+1
| | | | | Spotted and suggested by: des MFC after: 3 weeks
* - Merge the pdq driver (if_fpa and if_fea) from NetBSD.mdodd2002-03-291-47/+125
| | | | | Among other things this gets us ifmedia support. - Update fddi_ifattach() to take an additional argument.
* 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>
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Clean up after removing sys/eventhandler.h from sys/systm.h at the lastmsmith1999-08-211-1/+2
| | | | | minute. This should cover all of the missed cases (and should let LINT build again).
* Implement a new generic mechanism for attaching handler functions tomsmith1999-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
* Simplify the COMPAT_PCI_DRIVER/DATA_SET hack. We can add:peter1999-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.)
* Use COMPAT_PCI_DRIVER() for registration if it exists. This shouldn'tpeter1999-04-241-3/+6
| | | | hurt the driver portability to 3.x too much for where drivers are shared.
* probe function changed from returning char * to const char *.dillon1998-12-141-2/+2
|
* Removed unused #includes.bde1998-02-201-8/+1
|
* Staticize.eivind1998-02-091-2/+2
|
* Make INET a proper option.eivind1998-01-081-1/+4
| | | | | | | | | | | | This will not make any of object files that LINT create change; there might be differences with INET disabled, but hardly anything compiled before without INET anyway. Now the 'obvious' things will give a proper error if compiled without inet - ipx_ip, ipfw, tcp_debug. The only thing that _should_ work (but can't be made to compile reasonably easily) is sppp :-( This commit move struct arpcom from <netinet/if_ether.h> to <net/if_arp.h>.
* Removed unused #includes.bde1997-08-021-27/+1
|
* Don't include <sys/ioctl.h> in the kernel. Stage 1: don't includebde1997-03-241-2/+1
| | | | | it when it is not used. In most cases, the reasons for including it went away when the special ioctl headers became self-sufficient.
* This mega-merge brings Matt Thomas' 960801 FDDI driver (almost) upjoerg1997-01-171-12/+11
| | | | | | | | | | | | | to -current. Thanks goes to Ulrike Nitzsche <ulrike@ifw-dresden.de> for giving me a chance to test this. Only the PCI driver is tested though. One final patch will follow in a separate commit. This is so that everything up to here can be dragged into 2.2, if we decide so. Reviewed by: joerg Submitted by: Matt Thomas <matt@3am-software.com>
* Finally import the 960801 of Matt Thomas' DEC FDDI driver. I'mjoerg1997-01-171-0/+472
importing it onto a vendor branch first, in the hope that this will make future maintenance easier. The conflicts are (hopefully) unimportant. More commits that actually bring this into the source tree will follow. Submitted by: Matt Thomas (thomas@lkg.dec.com)
OpenPOWER on IntegriCloud