summaryrefslogtreecommitdiffstats
path: root/sys/dev/en/if_en_pci.c
Commit message (Collapse)AuthorAgeFilesLines
* The r48589 promised to remove implicit inclusion of if_var.h soon. Prepareglebius2013-10-261-0/+1
| | | | | | | | to this event, adding if_var.h to files that do need it. Also, include all includes that now are included due to implicit pollution via if_var.h Sponsored by: Netflix Sponsored by: Nginx, Inc.
* Remove duplicate header includeskevlo2011-06-281-3/+0
|
* 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 Reviewed by: many Approved by: re@
* - Consistently use if_printf() only in interface methods: if_start(),glebius2006-09-151-4/+4
| | | | | | | | if_watchdog, etc., or in functions used only in these methods. In all other functions in the driver use device_printf(). - Use __func__ instead of typing function name. Submitted by: Alex Lyashkov <umka sevcity.net>
* - Use PCIR_BAR macro rather than hardcoding 0x10.jhb2005-09-291-6/+2
| | | | | - Use pci_enable_busmaster() rather than doing it by hand. - Remove duplicate if_free().
* Make sure that we call if_free(ifp) after bus_teardown_intr. Since weimp2005-09-191-1/+1
| | | | | | | 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.
* Fix "struct ifnet" leaks when attach() fails in the middle.ru2005-09-161-2/+9
|
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-091-2/+2
| | | | | | | | | | | | | | 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
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-101-14/+20
| | | | | | | | | | | | | | | | | | | | 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
* Use BUS_PROBE_DEFAULT for pci probe return valueimp2005-03-051-2/+2
|
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-2/+1
|
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-3/+3
| | | | | 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-4/+3
| | | | | | | | | | | | | 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-0/+3
| | | | Also some minor style cleanups.
* Prefer new location of pci include files (which have only been in theimp2003-08-221-2/+2
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* Implement the ATMIOCOPENVCC and ATMIOCCLOSEVCC ioctls(). This was theharti2003-08-051-0/+1
| | | | last driver that did not know about those.
* Make the en(4) driver more like the other ATM drivers. This is theharti2003-08-051-1/+2
| | | | | | | preparation for supporting the OPENVCC and CLOSEVCC ioctls which are needed for ng_atm. This required some re-organisation of the code (mostly converting array indexes to pointers). This also gives us an array of open vccs that will help in using the generic GETVCCS handler.
* Make the midway driver use the new ATM phy driver. This allows one toharti2003-06-131-0/+3
| | | | | | | toggle several media options (sonet/sdh, for example) with ifconfig and to see the carrier state in ifconfig's output. It gives also read/write access (given the right privilegs) to the S/Uni registers to user space programs.
* Use __FBSDID().obrien2003-06-111-3/+4
|
* Define a link layer MIB for ATM. Most fields of this MIB are needed byharti2003-05-051-16/+16
| | | | | | ILMI daemons. Factor out common softc fields for all ATM interfaces that need to be externally visible into an ifatm structure and make the midway driver using this structure and fill the MIB.
* Add module data and version to the atm_subr and reference this info from theharti2003-04-291-2/+5
| | | | | | | | | | | | | | | | (currently) only consumer (en). Add a sysctl node hw.atm where the atm drivers will hook on their hardware sysctl sub-trees. Make atm_ifattach call if_attach and remove the corresponding call to if_attach from en. Create atm_ifdetach and use that in en. While the last change actually changes the interface this is not a problem in practice because the only other consumer of this API is an older LANAI driver on the net, that is not ready for current anyway. Reviewed by: -atm
* Convert the midway driver to use busdma. Except for this conversion theharti2003-04-251-290/+283
| | | | | | | | | | | | | | | | | | | | following changes have been done: - stylify. The original code was too hard to read. - get rid of a number of compilation options (Adaptec-only, Eni-only, no-DMA). - more debugging features. - locking. This is not correct yet in the absence of interface layer locking, but is correct enough to not to cause lock order reversals. - remove RAW mode. There are no users of this in the tree and I doubt that there are any. - remove NetBSD compatibility code. There was no way to keep NetBSD non-busdma and FreeBSD busdma code together. - if_en now buildable as a module. This has been actively tested on sparc64 and i386 with ENI server and client cards and an Adaptec card (thanks to kjc). Reviewed by: mdodd, arr
* - Express hard dependencies on bus (pci, isa, pccard) andmdodd2003-04-151-1/+1
| | | | | | | | 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.)
* Remove __P.alfred2002-03-201-7/+7
|
* newbusify the en atm driver.kjc2000-11-071-144/+187
|
* Added used include of <machine/bus.h> -- don't depend on evil namespacebde2000-11-041-1/+2
| | | | | | | | pollution in <sys/mutex.h>. This was half fixed in rev.1.3 of midwayreg.h. The pollution exposed the bug that this driver was using toy versions of the bus space macros under FreeBSD. Disabling the toy versions made this driver compile but dependent on the pollution. There was still a toy version of bus_space_read_1() in unreachable code.
* Make LINT compile again.phk2000-10-221-1/+0
|
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* Ahhrggg. Put the test for the compat shims AFTER the file that includesimp2000-03-271-4/+4
| | | | | | them. Pointed out by: bde
* Per conversations in -current, add #error to these drivers when you don'timp2000-03-271-0/+4
| | | | have the right compatibility shims enabled. ISA drivers to follow later.
* Clean up after removing sys/eventhandler.h from sys/systm.h at the lastmsmith1999-08-211-0/+3
| | | | | 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-4/+5
| | | | | | | | | | | | | 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
* Eliminate a bunch of #include "pci.h" and #if NPCI > 0 around entirepeter1999-07-031-4/+0
| | | | files. config will leave the whole file out if configured to do so.
* Missing revision markers.peter1999-05-091-0/+2
|
* Simplify the COMPAT_PCI_DRIVER/DATA_SET hack. We can add:peter1999-05-091-4/+0
| | | | | | | | #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-0/+4
| | | | hurt the driver portability to 3.x too much for where drivers are shared.
* cleanup: remove part of the code for 2.1.kjc1999-01-091-36/+128
| | | | | | add two functions to get the MAC address of the card. Obtained from: ALTQ
* probe function changed from returning char * to const char *.dillon1998-12-141-2/+2
|
* Examine all occurrences of sprintf(), strcat(), and str[n]cpy()archie1998-12-041-1/+1
| | | | | | | | | | | | | | for possible buffer overflow problems. Replaced most sprintf()'s with snprintf(); for others cases, added terminating NUL bytes where appropriate, replaced constants like "16" with sizeof(), etc. These changes include several bug fixes, but most changes are for maintainability's sake. Any instance where it wasn't "immediately obvious" that a buffer overflow could not occur was made safer. Reviewed by: Bruce Evans <bde@zeta.org.au> Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Reviewed by: Mike Spengler <mks@networkcs.com>
* Removed unused #includes.bde1997-10-281-4/+0
|
* Added used #include - don't depend on <sys/mbuf.h> includingbde1997-09-021-0/+1
| | | | <sys/malloc.h> (unless we only use the bogusly shared M*WAIT flags).
* import Chuck Cranor's ATM driverkjc1997-05-091-0/+348
OpenPOWER on IntegriCloud