summaryrefslogtreecommitdiff
path: root/sys/dev/tx
Commit message (Collapse)AuthorAgeFilesLines
* Remove duplicate FBSDID's, move others to their right place.David E. O'Brien2003-11-141-4/+0
| | | | Notes: svn path=/head/; revision=122678
* Try to create some sort of consistency in how the routings to find theDavid E. O'Brien2003-11-131-12/+9
| | | | | | | | | | multicast hash are written. There are still two distinct algorithms used, and there actually isn't any reason each driver should have its own copy of this function as they could all share one copy of it (if it grew an additional argument). Notes: svn path=/head/; revision=122625
* 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
* Use PCIR_BAR(x) instead of PCIR_MAPS.John Baldwin2003-09-021-2/+2
| | | | | | | | Glanced over by: imp, gibbs Tested by: i386 LINT Notes: svn path=/head/; revision=119690
* 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=119287
* - No need to bzero() the softc structure.Maxime Henrion2003-08-121-7/+3
| | | | | | | - Use BUS_DMA_ZERO where appropriate. Notes: svn path=/head/; revision=118828
* Mega busdma API commit.Scott Long2003-07-011-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Convert the tx(4) driver to use the busdma API.Maxime Henrion2003-04-202-125/+327
| | | | | | | | Special thanks to brueffer for sending me such a card so that I could do this work. Notes: svn path=/head/; revision=113754
* Better comment, more style(9) fixes.Maxime Henrion2003-04-201-4/+4
| | | | Notes: svn path=/head/; revision=113753
* style(9).Maxime Henrion2003-04-201-8/+11
| | | | Notes: svn path=/head/; revision=113726
* Make this file closer to style(9) paradigm.Maxime Henrion2003-04-191-212/+215
| | | | Notes: svn path=/head/; revision=113717
* - Enable interrupts only at the end of epic_attach() when all theMaxime Henrion2003-04-191-39/+35
| | | | | | | | | | | | | | | | other initializations succeeded. - Initialize the TX and RX rings in epic_attach() rather than in epic_init() where we're not supposed to fail. Similarly, free the TX and RX rings in epic_detach() rather than in epic_stop(). - Change epic_init() to be a void function now that it can't fail. Also change its parameter to a void * so that we have a correct prototype for if_init. - Now that epic_init() has a correct prototype, don't cast the function pointer when initializing if_init. - Fix nearby style bugs. Notes: svn path=/head/; revision=113715
* - Correct a comment made bogus by my last commit.Maxime Henrion2003-04-191-2/+4
| | | | | | | - Use __FBSDID. Notes: svn path=/head/; revision=113698
* Various cleanups:Maxime Henrion2003-04-191-20/+1
| | | | | | | | | | - Don't initialize if_output, ether_ifattach() does this for us. - Use pci_enable_busmaster() instead of using pci_read_config() and pci_write_config() directly. - Don't try to enable I/O, bus_alloc_resource() does this for us. Notes: svn path=/head/; revision=113697
* - Express hard dependencies on bus (pci, isa, pccard) andMatthew N. Dodd2003-04-151-1/+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.) Notes: svn path=/head/; revision=113506
* Nuke EPIC_MGETCLUSTER entirely. Since 1.60 we don't use it anymore andBosko Milekic2003-02-211-13/+0
| | | | | | | | | | instead use our optimized m_getcl(). Submitted by: Hiten Pandya <hiten@unixdaemons.com> MFC After: 1 week Notes: svn path=/head/; revision=111229
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-192-6/+6
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-212-6/+6
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* Remove miidevs.h and generate it from miidevs at compile time.David E. O'Brien2003-01-191-1/+1
| | | | | | | The devlist2h.awk tool to do this has been repocopied to sys/tools/. Notes: svn path=/head/; revision=109514
* network interface driver changes:Sam Leffler2002-11-141-14/+8
| | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=106937
* o m_adj rx buffer so IP header is 32-bit alignedSam Leffler2002-10-252-18/+21
| | | | | | | | | o replace EPIC_MGETCLUSER with m_getcl MFC after: 1 week Notes: svn path=/head/; revision=105966
* Remove the OpenBSD comatibility stuff. Many changes to be more style(9)Semen Ustimenko2002-10-223-616/+350
| | | | | | | | compilant. Split two pieces if code into separate functions to do not exceed line length due to indentation. Notes: svn path=/head/; revision=105666
* Stop trying to align malloc()ed memory. Rely on malloc() instead, just likeSemen Ustimenko2002-08-192-24/+17
| | | | | | | others. Notes: svn path=/head/; revision=102138
* Do not reset card in epic_freebsd_attach() as reset is done inSemen Ustimenko2002-08-191-7/+0
| | | | | | | epic_common_attach(). Notes: svn path=/head/; revision=102135
* Add an epic_stats_update() function (called once per second). Even thoughSemen Ustimenko2002-05-011-9/+27
| | | | | | | | | | | | | | we don't collect any stats in it, we mii_tick() in it! This fix the bug when autonegotiating fullduplex modes. Also, pause activity before setting TXCON in epic_miibus_statchg(). Though i've never seen problmes from not doing that, the documentation says we need to do it. MFC after: 1 week Notes: svn path=/head/; revision=95879
* Implement true multicast filtering.Semen Ustimenko2002-04-251-16/+64
| | | | | | | | | Inspired by: dc(4) MFC after: 1 week Notes: svn path=/head/; revision=95460
* Update the email appearing in copyright string.Semen Ustimenko2002-04-201-1/+1
| | | | | | | MFC after: 1 day Notes: svn path=/head/; revision=95129
* Merge ``&& must be ||'' bug noticed and fixed in OpenBSD. The only ill effectSemen Ustimenko2002-04-201-1/+1
| | | | | | | | | | was if_baudrate being always 10Mbit. Obtained from: OpenBSD MFC after: 1 day Notes: svn path=/head/; revision=95128
* Move tx(4) driver to sys/dev/tx. BTW split hardware structures and constantsSemen Ustimenko2002-04-193-380/+12
| | | | | | | | | into if_txreg.h. MFC after: 1 week Notes: svn path=/head/; revision=95075
* Remove __P.Alfred Perlstein2002-03-201-38/+38
| | | | Notes: svn path=/head/; revision=92739
* Cast pointers to uintptr_t rather than u_int32_t. This doesn't work tooPeter Wemm2002-03-191-1/+1
| | | | | | | well on machines with 64 bit pointers. Notes: svn path=/head/; revision=92734
* Remove mbuf exhaustion warning messages; these are handled by theMike Silbersack2002-02-111-2/+0
| | | | | | | | | mbuf system in a rate-limited fashion now. MFC after: 3 days Notes: svn path=/head/; revision=90548
* Update tx(4) to always enable vlan(4) support.Brooks Davis2001-09-051-6/+0
| | | | | | | Approved by: semenu Notes: svn path=/head/; revision=83122
* Fix an bug in FreeBSD attach routine - attaching MII interfaces before doingSemen Ustimenko2001-08-131-9/+7
| | | | | | | | | | | | common_attach is wrong as common attach initialize some fileds used by mediainit routine. This was hard to notify because loading driver as kld lead to mediainit routine being called after common_attach, though probe_phy is called before. MFC after: 1 week Notes: svn path=/head/; revision=81594
* Add support for 802.1Q VLAN and oversized ethernet frames.Semen Ustimenko2001-08-133-4/+34
| | | | | | | | | | PR: kern/29235 Submitted by: Peter Jeremy <peter.jeremy@alcatel.com.au> Reviewed by: Yar Tikhiy <yar@FreeBSD.org> MFC after: 1 week Notes: svn path=/head/; revision=81593
* Add initializetion of NVCTL register with EEPROM stored value.Semen Ustimenko2001-06-233-0/+29
| | | | | | | | | This fix hazardous very slow work for one of my cards. MFC after: 1 week Notes: svn path=/head/; revision=78677
* Add support for SMC9432FTX card, possibly othe fiber optic SMC9432 familySemen Ustimenko2001-02-073-43/+216
| | | | | | | cards will work too. Notes: svn path=/head/; revision=72134
* Another round of the <sys/queue.h> FOREACH transmogriffer.Poul-Henning Kamp2001-02-041-2/+1
| | | | | | | | Created with: sed(1) Reviewed by: md5(1) Notes: svn path=/head/; revision=72012
* Convert more malloc+bzero to malloc+M_ZERO.David Malone2000-12-081-2/+1
| | | | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Notes: svn path=/head/; revision=69781
* Add missing delay after card reset.Pierre Beyssac2000-11-091-0/+1
| | | | | | | | | | This fixes randoms lockups when probing the card at boot time, when more than 1 similar card is found in the machine. Reviewed by: semenu Notes: svn path=/head/; revision=68530
* Remove unneeded #include <machine/clock.h>Poul-Henning Kamp2000-10-151-1/+0
| | | | Notes: svn path=/head/; revision=67164
* Make all Ethernet drivers attach using ether_ifattach() and detach usingArchie Cobbs2000-07-131-6/+2
| | | | | | | | | | | | ether_ifdetach(). The former consolidates the operations of if_attach(), ng_ether_attach(), and bpfattach(). The latter consolidates the corresponding detach operations. Reviewed by: julian, freebsd-net Notes: svn path=/head/; revision=63090
* Added support for SMC9432BTX cards.Semen Ustimenko2000-06-213-11/+87
| | | | Notes: svn path=/head/; revision=61906
* Avoid double-call to bpf_mtap(). This is now handled in ether_input().Archie Cobbs2000-05-241-0/+2
| | | | Notes: svn path=/head/; revision=60837
* Move code to handle BPF and bridging for incoming Ethernet packets outArchie Cobbs2000-05-141-50/+0
| | | | | | | | | | | | | | | | | | of the individual drivers and into the common routine ether_input(). Also, remove the (incomplete) hack for matching ethernet headers in the ip_fw code. The good news: net result of 1016 lines removed, and this should make bridging now work with *all* Ethernet drivers. The bad news: it's nearly impossible to test every driver, especially for bridging, and I was unable to get much testing help on the mailing lists. Reviewed by: freebsd-net Notes: svn path=/head/; revision=60536
* Depend on miibus.Peter Wemm2000-04-291-0/+2
| | | | | | | | | | | Note that if_aue doesn't strictly depend on usb because it uses the method interface for calls rather than using internal symbols, and because it's a child driver of usb and therefore will not try and do anything unless the parent usb code is loaded at some point. if_aue does strictly depend on miibus as it will fail to link if it is missing. Notes: svn path=/head/; revision=59758
* Driver is now using miibus, and newbus.Semen Ustimenko2000-04-123-1100/+674
| | | | | | | PR: kern/17601 Notes: svn path=/head/; revision=59164
* Change incorrect NULLs to 0sEivind Eklund1999-12-211-1/+1
| | | | Notes: svn path=/head/; revision=54952
* Added code to enable BusMaster operations.Semen Ustimenko1999-10-293-4/+39
| | | | | | | | | Kurt D. Starsinic <kstar@chapin.edu> had reported this patch fixing strange behaviour (like timeouts and RX/TX DMAs stopping errors). Notes: svn path=/head/; revision=52623