summaryrefslogtreecommitdiffstats
path: root/sys/dev/en
Commit message (Collapse)AuthorAgeFilesLines
* MFC r260038:dim2014-01-041-0/+2
| | | | In sys/dev/en/midway.c, #if 0 an unused static function.
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-041-6/+6
| | | | malloc(9) flags in sys/dev.
* Final pass at having devices use their bus parent for dma tags. Thescottl2012-03-121-2/+2
| | | | | | | | | | | | | | | remaining drivers that haven't been converted have various problems or complexities that will be dealt with later. This list includes: hptrr, hptmv, hpt27xx - device aggregation across multiple parents drm - want to talk to the maintainer first tsec, sec - Openfirmware devices, not sure if changes are warranted fatm - Done except for unused testing code usb - want to talk to the maintainer first ce, cp, ctau, cx - Significant driver changes needed to convey parent info There are also devices tucked into architecture subtrees that I'll leave for the respective maintainers to deal with.
* Remove duplicate header includeskevlo2011-06-281-3/+0
|
* Specify a CTLTYPE_FOO so that a future sysctl(8) change does not needmdf2011-01-181-2/+2
| | | | to rely on the format string.
* Hide an unused variable in case we compile with neither INET nor INET6.bz2008-11-061-1/+5
| | | | | | | NATM needs 'struct in_addr' to compile, which is a problem on its own but include in.h for now if we have NATM but neither INET or INET6. MFC after: 2 months
* Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT.ru2008-03-251-20/+6
| | | | | | | | | | Removed dead code that assumed that M_TRYWAIT can return NULL; it's not true since the advent of MBUMA. Reviewed by: arch There are ongoing disputes as to whether we want to switch to directly using UMA flags M_WAITOK/M_NOWAIT for mbuf(9) allocation.
* Where I previously removed calls to kdb_enter(), now remove include ofrwatson2007-05-291-1/+0
| | | | | | kdb.h. Pointed out by: bde
* Rather than entering DDB with the message "unexpected error" and wedgingrwatson2007-05-271-2/+1
| | | | | | the card, panic explicitly if EN_DEBUG is enabled. In the (default) case of !EN_DEBUG, the driver resets the card. Probably this case shouldn't exist at all.
* 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@
* Fix fat-fingering in previous commit.jhb2006-12-291-1/+1
| | | | Pointy hat to: jhb
* Various bpf(4) related fixes to catch places up to the new bpf(4)jhb2006-12-291-2/+2
| | | | | | | | | | | | | 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)
* - Consistently use if_printf() only in interface methods: if_start(),glebius2006-09-152-22/+22
| | | | | | | | 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>
* Subtracting two pointers produces a ptrdiff_t not a size_t so useharti2006-03-211-9/+9
| | | | the %td to print this instead of %zu or %d.
* Drop the driver lock around atm_input() analogous to all the ethernetjhb2005-10-271-0/+2
| | | | | | drivers dropping the driver lock around ether_input(). Silence by: harti
* - 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-092-12/+12
| | | | | | | | | | | | | | 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-103-67/+73
| | | | | | | | | | | | | | | | | | | | 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-063-6/+3
|
* * Add a "how" argument to uma_zone constructors and initialization functionsgreen2004-08-021-21/+12
| | | | | | | | | | | | | | | | | so that they know whether the allocation is supposed to be able to sleep or not. * Allow uma_zone constructors and initialation functions to return either success or error. Almost all of the ones in the tree currently return success unconditionally, but mbuf is a notable exception: the packet zone constructor wants to be able to fail if it cannot suballocate an mbuf cluster, and the mbuf allocators want to be able to fail in general in a MAC kernel if the MAC mbuf initializer fails. This fixes the panics people are seeing when they run out of memory for mbuf clusters. * Allow debug.nosleepwithlocks on WITNESS to be disabled, without changing the default. Both bmilekic and jeff have reviewed the changes made to make failable zone allocations work.
* Update for the KDB framework:marcel2004-07-101-3/+2
| | | | | | o Call kdb_enter() instead of Debugger(). o Don't make such calls conditional upon KDB instead of DDB because they're already conditional upon EN_DEBUG.
* 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
* All three of these drivers abused cv_waitq_empty in the same way by spinningscottl2004-02-291-4/+1
| | | | | | | | | on it in hopes of making sure that the waitq was empty before going on. This wasn't needed and probably never would have worked as intended. Now that cv_waitq_empty() and friends are gone, the code in these drivers that spins on it can go away too. This should unbreak LINT. Discussed with: kan
* Move the locking of the softc up to before the allocation of theharti2003-12-171-4/+6
| | | | | transmission map. This allocation accesses the softc so should be under the lock (it uses NOWAIT).
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-312-7/+5
| | | | | | | | | | | | | 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.
* Consistently use the BSD u_int and u_short instead of the SYSV uint andjhb2003-08-071-1/+1
| | | | | | | ushort. In most of these files, there was a mixture of both styles and this change just makes them self-consistent. Requested by: bde (kern_ktrace.c)
* Remove the ATMIOCENA and ATMIOCDIS ioctl. Everyting has been convertedharti2003-08-062-32/+6
| | | | | to use the new OPENVCC and CLOSEVCC calls that allow the sepcification of traffic parameters for the connections.
* Honor the new ATMIO_FLAG_ASYNC that requests asynchronuous open/closeharti2003-08-061-1/+1
| | | | operations on VCs.
* When sending check that the channel is really open. Get the informationharti2003-08-061-7/+9
| | | | | whether we use AAL5 or not from the aal field of the channel parameters instead of the flag in the pseudo header. This flag will go away soon.
* Print an array index that is computed as ptrdiff_t with %tu.harti2003-08-061-2/+2
|
* Change the format type to unbreak LINT on 64-bit platforms.obrien2003-08-061-2/+2
|
* Implement per-VC statistics.harti2003-08-051-1/+8
|
* Implement the ATMIOCOPENVCC and ATMIOCCLOSEVCC ioctls(). This was theharti2003-08-053-37/+86
| | | | last driver that did not know about those.
* Use the generic getvccs function from net/if_atmsubr.c and removeharti2003-08-051-54/+4
| | | | the home-grown version.
* Arrghhh. Remove debugging printf's that slipped in in the pre-previousharti2003-08-051-11/+1
| | | | commit.
* Use __FBSDID() as per style(9).harti2003-08-051-2/+2
|
* Make the en(4) driver more like the other ATM drivers. This is theharti2003-08-053-247/+348
| | | | | | | 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.
* Move the clearing of the IFF_RUNNING flag into the reset routine.harti2003-08-051-1/+2
| | | | | Otherwise the interface will report RUNNING to ifconfig after doing 'ifconfig down' although it isn't running anymore.
* Be careful to call bus_dmamap_load with BUS_DMA_NOWAIT so that theharti2003-07-151-7/+7
| | | | | | callback will never be deferred. ATM needs to prevent cell and packet ordering. Also use the default mutex and lock functions (those that panic) for the tag creation.
* Delete a superfluous semi-colon.harti2003-07-041-1/+1
| | | | Pointed out by: nick@garage.freebsd.pl
* Mega busdma API commit.scottl2003-07-011-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg. Lockfunc allows a driver to provide a function for managing its locking semantics while using busdma. At the moment, this is used for the asynchronous busdma_swi and callback mechanism. Two lockfunc implementations are provided: busdma_lock_mutex() performs standard mutex operations on the mutex that is specified from lockfuncarg. dftl_lock() is a panic implementation and is defaulted to when NULL, NULL are passed to bus_dma_tag_create(). The only time that NULL, NULL should ever be used is when the driver ensures that bus_dmamap_load() will not be deferred. Drivers that do not provide their own locking can pass busdma_lock_mutex,&Giant args in order to preserve the former behaviour. sparc64 and powerpc do not provide real busdma_swi functions, so this is largely a noop on those platforms. The busdma_swi on is64 is not properly locked yet, so warnings will be emitted on this platform when busdma callback deferrals happen. If anyone gets panics or warnings from dflt_lock() being called, please let me know right away. Reviewed by: tmm, gibbs
* Implement the ioctl that returns a list of currently open VCCs.harti2003-06-131-0/+70
|
* Make the midway driver use the new ATM phy driver. This allows one toharti2003-06-133-6/+86
| | | | | | | 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
|
OpenPOWER on IntegriCloud