aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/fatm
Commit message (Collapse)AuthorAgeFilesLines
* sys/dev: minor spelling fixes.Pedro F. Giffuni2016-05-033-6/+6
| | | | | | | Most affect comments, very few have user-visible effects. Notes: svn path=/head/; revision=298955
* sys/dev: extend use of the howmany() macro when available.Pedro F. Giffuni2016-04-261-2/+2
| | | | | | | | We have a howmany() macro in the <sys/param.h> header that is convenient to re-use as it makes things easier to read. Notes: svn path=/head/; revision=298646
* sys: use our roundup2/rounddown2() macros when param.h is available.Pedro F. Giffuni2016-04-211-2/+2
| | | | | | | | | | | | | rounddown2 tends to produce longer lines than the original code and when the code has a high indentation level it was not really advantageous to do the replacement. This tries to strike a balance between readability using the macros and flexibility of having the expressions, so not everything is converted. Notes: svn path=/head/; revision=298433
* To ease changes to underlying mbuf structure and the mbuf allocator, reduceRobert Watson2015-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | the knowledge of mbuf layout, and in particular constants such as M_EXT, MLEN, MHLEN, and so on, in mbuf consumers by unifying various alignment utility functions (M_ALIGN(), MH_ALIGN(), MEXT_ALIGN() in a single M_ALIGN() macro, implemented by a now-inlined m_align() function: - Move m_align() from uipc_mbuf.c to mbuf.h; mark as __inline. - Reimplement M_ALIGN(), MH_ALIGN(), and MEXT_ALIGN() using m_align(). - Update consumers around the tree to simply use M_ALIGN(). This change eliminates a number of cases where mbuf consumers must be aware of whether or not mbufs returned by the allocator use external storage, but also assumptions about the size of the returned mbuf. This will make it easier to introduce changes in how we use external storage, as well as features such as variable-size mbufs. Differential Revision: https://reviews.freebsd.org/D1436 Reviewed by: glebius, trasz, gnn, bz Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=276692
* Mechanically convert to if_inc_counter().Gleb Smirnoff2014-09-191-3/+3
| | | | Notes: svn path=/head/; revision=271849
* The r48589 promised to remove implicit inclusion of if_var.h soon. PrepareGleb Smirnoff2013-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. Notes: svn path=/head/; revision=257176
* Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCIScott Long2013-08-121-10/+2
| | | | | | | | | | | | | | | | | | | | command register. The lazy BAR allocation code in FreeBSD sometimes disables this bit when it detects a range conflict, and will re-enable it on demand when a driver allocates the BAR. Thus, the bit is no longer a reliable indication of capability, and should not be checked. This results in the elimination of a lot of code from drivers, and also gives the opportunity to simplify a lot of drivers to use a helper API to set the busmaster enable bit. This changes fixes some recent reports of disk controllers and their associated drives/enclosures disappearing during boot. Submitted by: jhb Reviewed by: jfv, marius, achadd, achim MFC after: 1 day Notes: svn path=/head/; revision=254263
* Mechanically substitute flags from historic mbuf allocator withGleb Smirnoff2012-12-041-5/+5
| | | | | | | malloc(9) flags in sys/dev. Notes: svn path=/head/; revision=243857
* Specify a CTLTYPE_FOO so that a future sysctl(8) change does not needMatthew D Fleming2011-01-181-4/+4
| | | | | | | to rely on the format string. Notes: svn path=/head/; revision=217556
* Remove extraneous semicolons, no functional changes.Martin Blapp2010-01-071-1/+1
| | | | | | | | Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week Notes: svn path=/head/; revision=201758
* - Add a private timer to drive the transmit watchdog instead of usingJohn Baldwin2009-11-192-11/+11
| | | | | | | | | if_watchdog and if_timer. - Fix some issues in detach for sn(4), ste(4), and ti(4). Primarily this means calling ether_ifdetach() before anything else. Notes: svn path=/head/; revision=199559
* Use bus_get_dma_tag() so fatm(4) works on platforms requiring it.Marius Strobl2008-09-301-1/+1
| | | | | | | | Reported and tested by: Sean Thomas Caron MFC after: 3 days Notes: svn path=/head/; revision=183504
* Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT.Ruslan Ermilov2008-03-251-14/+4
| | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=177599
* o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati2007-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@ Notes: svn path=/head/; revision=166901
* This driver has been MPSAFE from the beginning so declare the interruptHartmut Brandt2006-03-211-1/+1
| | | | | | | | | as such. Reminded by: rwatson@ Notes: svn path=/head/; revision=156950
* Replace custom mbuf writeability test with genericAndre Oppermann2005-09-191-2/+2
| | | | | | | M_WRITEABLE() test covering all edge cases too. Notes: svn path=/head/; revision=150346
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andRobert Watson2005-08-091-16/+16
| | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=148887
* Fix another fallout from the ifnet change that assumed that a softcHartmut Brandt2005-07-011-2/+2
| | | | | | | | | | starts with an ifatm which in turns has an ifnet. Remove also a couple of unneccessary casts that could hide such things in the future. Approved by: re Notes: svn path=/head/; revision=147721
* Free the struct ifnet when detaching is complete. Also add BPF stuff.Hartmut Brandt2005-06-221-0/+23
| | | | | | | Approved by: re Notes: svn path=/head/; revision=147525
* Stop embedding struct ifnet at the top of driver softcs. Instead theBrooks Davis2005-06-102-85/+91
| | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=147256
* Use BUS_PROBE_DEFAULT for pci probe return valueWarner Losh2005-03-051-1/+1
| | | | Notes: svn path=/head/; revision=143161
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-065-5/+5
| | | | Notes: svn path=/head/; revision=139749
* Convert callers to the new bus_alloc_resource_any(9) API.Nate Lawson2004-03-171-4/+4
| | | | | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Notes: svn path=/head/; revision=127135
* Fix 0 / NULL mixup (this module isn't in LINT!)Peter Wemm2003-12-241-1/+1
| | | | Notes: svn path=/head/; revision=123798
* Replace the if_name and if_unit members of struct ifnet with new membersBrooks Davis2003-10-311-2/+1
| | | | | | | | | | | | | | | | 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
* Remove duplicate SCM ID.David E. O'Brien2003-08-241-2/+0
| | | | Notes: svn path=/head/; revision=119425
* Use __FBSDID().David E. O'Brien2003-08-241-0/+3
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119418
* Prefer new location of pci include files (which have only been in theWarner Losh2003-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. Notes: svn path=/head/; revision=119277
* Consistently use the BSD u_int and u_short instead of the SYSV uint andJohn Baldwin2003-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) Notes: svn path=/head/; revision=118607
* When configuring the interface down and up again try to re-open allHartmut Brandt2003-08-072-33/+77
| | | | | | | | | connections that have been open (and were not closing) when the interface was stopped. This makes the behaviour of fatm(4) more like the behaviour of en(4). Notes: svn path=/head/; revision=118596
* Remove the ATMIOCENA and ATMIOCDIS ioctl. Everyting has been convertedHartmut Brandt2003-08-061-35/+12
| | | | | | | | to use the new OPENVCC and CLOSEVCC calls that allow the sepcification of traffic parameters for the connections. Notes: svn path=/head/; revision=118548
* Honor the new ATMIO_FLAG_ASYNC for asynchronuous open/close operationsHartmut Brandt2003-08-061-4/+6
| | | | | | | on a VC. Notes: svn path=/head/; revision=118538
* Rearrange the vcc structure so that the generic getvcc functionHartmut Brandt2003-07-302-265/+251
| | | | | | | can be used and add per-VC statistics. Notes: svn path=/head/; revision=118208
* Generate events when the interface state or a PVC state changes.Hartmut Brandt2003-07-291-18/+10
| | | | Notes: svn path=/head/; revision=118168
* Make the bus_dma_tag_create use NULL for the lock arguments. We areHartmut Brandt2003-07-021-5/+6
| | | | | | | | | | | | | | | careful to call all map_load calls with BUS_DMA_NOWAIT because we really don't want some PDUs to wait while others go out - ATM guarantees the ordering of cells and also of PDUs (within one VC, that is). With BUS_DMA_NOWAIT bus_dmamap_load should never return EINPROGRESS. Make the tag used for transmission buffers one larger than the maximum AAL5 PDU (65535). This is needed, because all PDU sizes need to be round up to multiple of four for the card and PDUs that are just below the maximum size will be rounded up to 65536 Notes: svn path=/head/; revision=117164
* Mega busdma API commit.Scott Long2003-07-011-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=117126
* This is a driver for Fore PCA200E cards that uses busdma and works onHartmut Brandt2003-06-235-0/+6659
little endian and big endian and with 32 and 64 bit pointers. It already has the hooks to be used for HARP, NATM and ngATM. Notes: svn path=/head/; revision=116735