aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/tx
Commit message (Collapse)AuthorAgeFilesLines
* MFC:Gleb Smirnoff2006-03-171-8/+0
| | | | | | | | | Do not touch ifp->if_baudrate in miibus aware drivers. Approved by: re (scottl) Notes: svn path=/stable/6/; revision=156820
* Merge linux_ioctl.c:1.128 svr4_sockio.c:1.17 altq_cbq.c:1.3 if_oltr.c:1.38Robert Watson2005-08-251-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if_pflog.c:1.14 if_pfsync.c:1.21 if_an.c:1.70 if_ar.c:1.72 if_arl.c:1.11 amrr.c:1.10 onoe.c:1.10 if_ath.c:1.101 awi.c:1.41 if_bfe.c:1.27 if_bge.c:1.93 if_cm_isa.c:1.7 smc90cx6.c:1.16 if_cnw.c:1.20 if_cp.c:1.25 if_cs.c:1.42 if_ct.c:1.26 if_cx.c:1.46 if_ed.c:1.256 if_em.c:1.68 if_en_pci.c:1.37 midway.c:1.66 if_ep.c:1.143 if_ex.c:1.58 if_fatm.c:1.20 if_fe.c:1.93 if_fwe.c:1.38 if_fwip.c:1.8 if_fxp.c:1.244 if_gem.c:1.33 if_hatm.c:1.25 if_hatm_intr.c:1.20 if_hatm_ioctl.c:1.13 if_hatm_rx.c:1.10 if_hatm_tx.c:1.14 if_hme.c:1.39 if_ie.c:1.104 if_ndis.c:1.101 if_ic.c:1.24 if_ipw.c:1.10 if_iwi.c:1.10 if_ixgb.c:1.13 if_lge.c:1.41 if_lnc.c:1.113 if_my.c:1.31 if_nge.c:1.77 if_nve.c:1.10 if_owi.c:1.12 if_patm.c:1.9 if_patm_intr.c:1.6 if_patm_ioctl.c:1.10 if_patm_tx.c:1.10 pdq_ifsubr.c:1.28 if_plip.c:1.38 if_ral.c:1.12 if_ral_pci.c:1.2 if_ray.c:1.81 if_rayvar.h:1.22 if_re.c:1.49 if_sbni.c:1.21 if_sbsh.c:1.14 if_sn.c:1.48 dp83932.c:1.21 if_snc_pccard.c:1.9 if_sr.c:1.70 if_tx.c:1.91 if_txp.c:1.33 if_aue.c:1.92 if_axe.c:1.32 if_cdce.c:1.8 if_cue.c:1.59 if_kue.c:1.66 if_rue.c:1.23 if_udav.c:1.16 if_ural.c:1.12 if_vge.c:1.16 if_vx.c:1.58 if_wi.c:1.185 if_wi_pci.c:1.26 if_wl.c:1.68 if_xe.c:1.60 if_xe_pccard.c:1.30 if_el.c:1.68 i4b_ipr.c:1.35 i4b_isppp.c:1.31 kern_poll.c:1.20 bridge.c:1.94 bridgestp.c:1.4 if_arcsubr.c:1.27 if_atm.h:1.24 if_atmsubr.c:1.40 if_bridge.c:1.16 if_ef.c:1.35 if_ethersubr.c:1.196 if_faith.c:1.37 if_fddisubr.c:1.100 if_fwsubr.c:1.14 if_gif.c:1.54 if_gre.c:1.34 if_iso88025subr.c:1.70 if_loop.c:1.107 if_ppp.c:1.106 if_spppsubr.c:1.121 if_tap.c:1.57 if_tun.c:1.154 if_vlan.c:1.80 ppp_tty.c:1.67 ieee80211_ioctl.c:1.32 atm_if.c:1.31 ng_eiface.c:1.33 ng_ether.c:1.50 ng_fec.c:1.19 ng_iface.c:1.44 ng_sppp.c:1.9 ip_carp.c:1.30 ip_fastfwd.c:1.30 in6.c:1.53 nd6_nbr.c:1.31 natm.c:1.40 if_dc.c:1.162 if_de.c:1.168 if_pcn.c:1.72 if_rl.c:1.154 if_sf.c:1.84 if_sis.c:1.135 if_sk.c:1.108 if_ste.c:1.86 if_ti.c:1.109 if_tl.c:1.101 if_vr.c:1.106 if_wb.c:1.81 if_xl.c:1.194 from HEAD to RELENG_6: Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 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 Approved by: re (scottl) Notes: svn path=/stable/6/; revision=149443
* Merge if_ath.c:1.99 awi.c:1.39 if_bfe.c:1.26 if_bge.c:1.92 if_ed.c:1.255Robert Watson2005-08-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | if_em.c:1.67 if_ex.c:1.57 if_fe.c:1.92 if_fxp.c:1.242 if_gem.c:1.32 if_hme.c:1.38 if_ie.c:1.103 if_ndis.c:1.100 if_ixgb.c:1.12 if_lge.c:1.40 if_lnc.c:1.112 if_my.c:1.30 if_nge.c:1.76 if_nve.c:1.9 if_owi.c:1.11 pdq_ifsubr.c:1.27 if_ray.c:1.80 if_re.c:1.47 if_sn.c:1.47 dp83932.c:1.20 if_tx.c:1.90 if_txp.c:1.32 if_aue.c:1.91 if_axe.c:1.31 if_cue.c:1.58 if_kue.c:1.65 if_rue.c:1.22 if_udav.c:1.15 if_vge.c:1.15 if_wi.c:1.182 if_wl.c:1.67 if_xe.c:1.58 if_dc.c:1.161 if_de.c:1.167 if_pcn.c:1.70 if_rl.c:1.153 if_sf.c:1.83 if_sis.c:1.134 if_sk.c:1.107 if_ste.c:1.85 if_ti.c:1.108 if_tl.c:1.100 if_vr.c:1.105 if_wb.c:1.80 if_xl.c:1.193 from HEAD to RELENG_6: Modify device drivers supporting multicast addresses to lock if_addr_mtx over iteration of their multicast address lists when synchronizing the hardware address filter with the network stack-maintained list. Problem reported by: Ed Maste (emaste at phaedrus dot sandvine dot ca> Approved by: re (scottl) Notes: svn path=/stable/6/; revision=149422
* Stop embedding struct ifnet at the top of driver softcs. Instead theBrooks Davis2005-06-102-30/+36
| | | | | | | | | | | | | | | | | | | | | | | 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
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386Yoshihiro Takahashi2005-05-291-2/+0
| | | | | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr) Notes: svn path=/head/; revision=146734
* Use BUS_PROBE_DEFAULT in preference to 0. Also for vx, returnWarner Losh2005-03-011-1/+1
| | | | | | | | BUS_PROBE_LOW_PRIORITY in stead of ifdef for devices that xl and vx both support so that xl will snarf them on up. Notes: svn path=/head/; revision=142880
* Since if_tx doesn't contain locking or run with INTR_MPSAFE, markRobert Watson2004-08-131-1/+1
| | | | | | | the interface as IFF_NEEDSGIANT so if_start is run holding Giant. Notes: svn path=/head/; revision=133700
* Replace handrolled CRC calculation with ether_crc32_[lb]e().Christian Weisgerber2004-06-091-28/+2
| | | | Notes: svn path=/head/; revision=130270
* Add missing <sys/module.h> includesPoul-Henning Kamp2004-05-301-0/+1
| | | | Notes: svn path=/head/; revision=129879
* Mark the VLAN_MTU capability as initially enabled since it'sYaroslav Tykhiy2004-05-231-0/+1
| | | | | | | hardcoded to "ON" for these interfaces. Notes: svn path=/head/; revision=129631
* Convert callers to the new bus_alloc_resource_any(9) API.Nate Lawson2004-03-171-3/+2
| | | | | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Notes: svn path=/head/; revision=127135
* Announce ethernet MAC addresss in ether_ifattach().Matthew N. Dodd2004-03-141-3/+0
| | | | Notes: svn path=/head/; revision=126966
* Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones.David E. O'Brien2003-12-081-5/+5
| | | | | | | Requested by: bde,imp Notes: svn path=/head/; revision=123289
* 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-126/+328
| | | | | | | | 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-621/+355
| | | | | | | | 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-25/+18
| | | | | | | 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-41/+41
| | | | 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