aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/fe
Commit message (Collapse)AuthorAgeFilesLines
* FCP-101: Remove fe(4).Brooks Davis2019-05-176-4363/+0
| | | | | | | | | | Relnotes: yes FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md Reviewed by: jhb, imp Differential Revision: https://reviews.freebsd.org/D20230 Notes: svn path=/head/; revision=347914
* Deprecate a number of less used 10 and 10/100 Ethernet devices.Brooks Davis2018-10-251-0/+2
| | | | | | | | | | | | | | The current deprecated list is: ae, bm, cs, de, dme, ed, ep, ex, fe, pcn, sf, sn, tl, tx, txp, vx, wb, xe The list as refined as part of FCP-0101. Per the FCP, devices may be removed from the deprecation list if enough users are found or they are converted to iflib. FCP: https://github.com/freebsd/fcp/blob/master/fcp-0101.md Notes: svn path=/head/; revision=339703
* ifnet: Replace if_addr_lock rwlock with epoch + mutexMatt Macy2018-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Run on LLNW canaries and tested by pho@ gallatin: Using a 14-core, 28-HTT single socket E5-2697 v3 with a 40GbE MLX5 based ConnectX 4-LX NIC, I see an almost 12% improvement in received packet rate, and a larger improvement in bytes delivered all the way to userspace. When the host receiving 64 streams of netperf -H $DUT -t UDP_STREAM -- -m 1, I see, using nstat -I mce0 1 before the patch: InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree 4.98 0.00 4.42 0.00 4235592 33 83.80 4720653 2149771 1235 247.32 4.73 0.00 4.20 0.00 4025260 33 82.99 4724900 2139833 1204 247.32 4.72 0.00 4.20 0.00 4035252 33 82.14 4719162 2132023 1264 247.32 4.71 0.00 4.21 0.00 4073206 33 83.68 4744973 2123317 1347 247.32 4.72 0.00 4.21 0.00 4061118 33 80.82 4713615 2188091 1490 247.32 4.72 0.00 4.21 0.00 4051675 33 85.29 4727399 2109011 1205 247.32 4.73 0.00 4.21 0.00 4039056 33 84.65 4724735 2102603 1053 247.32 After the patch InMpps OMpps InGbs OGbs err TCP Est %CPU syscalls csw irq GBfree 5.43 0.00 4.20 0.00 3313143 33 84.96 5434214 1900162 2656 245.51 5.43 0.00 4.20 0.00 3308527 33 85.24 5439695 1809382 2521 245.51 5.42 0.00 4.19 0.00 3316778 33 87.54 5416028 1805835 2256 245.51 5.42 0.00 4.19 0.00 3317673 33 90.44 5426044 1763056 2332 245.51 5.42 0.00 4.19 0.00 3314839 33 88.11 5435732 1792218 2499 245.52 5.44 0.00 4.19 0.00 3293228 33 91.84 5426301 1668597 2121 245.52 Similarly, netperf reports 230Mb/s before the patch, and 270Mb/s after the patch Reviewed by: gallatin Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D15366 Notes: svn path=/head/; revision=333813
* Create a new ISA_PNP_INFO macro. Use this macro every where we haveWarner Losh2017-12-231-3/+2
| | | | | | | | | | ISA PNP card support (replace by hand version in if_ed). Move module declarations to the end of some files. Fix PCCARD_PNP_INFO to use nitems(). Remove some stale comments about pc98, turns out the comment was simply wrong. Notes: svn path=/head/; revision=327102
* sys/dev: Replace zero with NULL for pointers.Pedro F. Giffuni2017-02-201-2/+2
| | | | | | | | | | | Makes things easier to read, plus architectures may set NULL to something different than zero. Found with: devel/coccinelle MFC after: 3 weeks Notes: svn path=/head/; revision=313982
* Remove pc98 support completely.Yoshihiro Takahashi2017-01-283-1037/+0
| | | | | | | | | I thank all developers and contributors for pc98. Relnotes: yes Notes: svn path=/head/; revision=312910
* sys/dev: minor spelling fixes.Pedro F. Giffuni2016-05-032-2/+2
| | | | | | | Most affect comments, very few have user-visible effects. Notes: svn path=/head/; revision=298955
* Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().Justin Hibbits2016-02-271-2/+2
| | | | | | | | | | | Most calls to bus_alloc_resource() use "anywhere" as the range, with a given count. Migrate these to use the new bus_alloc_resource_anywhere() API. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D5370 Notes: svn path=/head/; revision=296137
* These files were getting sys/malloc.h and vm/uma.h with header pollutionGleb Smirnoff2016-02-011-0/+1
| | | | | | | via sys/mbuf.h Notes: svn path=/head/; revision=295126
* Convert rman to use rman_res_t instead of u_longJustin Hibbits2016-01-272-13/+13
| | | | | | | | | | | | | | | | | | | | | | | Summary: Migrate to using the semi-opaque type rman_res_t to specify rman resources. For now, this is still compatible with u_long. This is step one in migrating rman to use uintmax_t for resources instead of u_long. Going forward, this could feasibly be used to specify architecture-specific definitions of resource ranges, rather than baking a specific integer type into the API. This change has been broken out to facilitate MFC'ing drivers back to 10 without breaking ABI. Reviewed By: jhb Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5075 Notes: svn path=/head/; revision=294883
* Create a generic PCCARD_PNP_INFO from the MODULE_PNP_INFO buildingWarner Losh2015-12-111-0/+1
| | | | | | | | | | | | block. Use it in all the PNP drivers to export either the current PNP table. For uart, create a custom table and export it using MODULE_PNP_INFO since it's the only one that matches on function number. Differential Review: https://reviews.freebsd.org/D3461 Notes: svn path=/head/; revision=292079
* MFi386: r278165Yoshihiro Takahashi2015-06-271-3/+14
| | | | | | | Silence a coverity warning about ignoring a return value. Notes: svn path=/head/; revision=284886
* Silence a coverity warning about ignoring a return value. We do, butWarner Losh2015-02-031-3/+14
| | | | | | | | | | | | we also know that it "can't fail" given the single-threaded nature of device enumeration. Go ahead and check it just in case, but add a comment. CID: 1009393 Sponsored by: Netflix, Inc Notes: svn path=/head/; revision=278165
* In order to reduce use of M_EXT outside of the mbuf allocator andRobert Watson2015-01-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | socket-buffer implementations, introduce a return value for MCLGET() (and m_cljget() that underlies it) to allow the caller to avoid testing M_EXT itself. Update all callers to use the return value. With this change, very few network device drivers remain aware of M_EXT; the primary exceptions lie in mbuf-chain pretty printers for debugging, and in a few cases, custom mbuf and cluster allocation implementations. NB: This is a difficult-to-test change as it touches many drivers for which I don't have physical devices. Instead we've gone for intensive review, but further post-commit review would definitely be appreciated to spot errors where changes could not easily be made mechanically, but were largely mechanical in nature. Differential Revision: https://reviews.freebsd.org/D1440 Reviewed by: adrian, bz, gnn Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=276750
* Mechanically convert to if_inc_counter().Gleb Smirnoff2014-09-181-14/+17
| | | | Notes: svn path=/head/; revision=271807
* The r48589 promised to remove implicit inclusion of if_var.h soon. PrepareGleb Smirnoff2013-10-262-0/+4
| | | | | | | | | | | 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
* Mechanically substitute flags from historic mbuf allocator withGleb Smirnoff2012-12-041-2/+2
| | | | | | | malloc(9) flags in sys/dev. Notes: svn path=/head/; revision=243857
* Improve media status reporting, when the driver knows...Warner Losh2012-01-301-2/+3
| | | | Notes: svn path=/head/; revision=230789
* Add new tunable 'net.link.ifqmaxlen' to set default send interfaceMaxim Sobolev2010-05-031-1/+1
| | | | | | | | | | | | | queue length. The default value for this parameter is 50, which is quite low for many of today's uses and the only way to modify this parameter right now is to edit if_var.h file. Also add read-only sysctl with the same name, so that it's possible to retrieve the current value. MFC after: 1 month Notes: svn path=/head/; revision=207554
* Fix comment typo.Robert Watson2009-11-251-1/+1
| | | | | | | | Submitted by: Marc Balmer <marc at msys.ch> MFC after: 3 days Notes: svn path=/head/; revision=199798
* Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/Robert Watson2009-06-261-2/+2
| | | | | | | | | | | | | | | | IF_ADDR_UNLOCK() across network device drivers when accessing the per-interface multicast address list, if_multiaddrs. This will allow us to change the locking strategy without affecting our driver programming interface or binary interface. For two wireless drivers, remove unnecessary locking, since they don't actually access the multicast address list. Approved by: re (kib) MFC after: 6 weeks Notes: svn path=/head/; revision=195049
* It appears that the TDK LAK CD011 works with fe driver. I don't haveWarner Losh2009-03-251-0/+1
| | | | | | | | a dongle for the card, but it passes the sanity testsin the probe/attach routines and returns the correct MAC address. Notes: svn path=/head/; revision=190427
* Generalize the workaround for the Hitachi HT-4840-11. The ContecWarner Losh2009-03-151-6/+7
| | | | | | | | | | | | C-NET(PC) has a cfe at location 1 that has both an odd irq mask (it matches pc98 machines, so maybe it was a flag for pc98 operation) as well as a memory map. Since this driver doesn't know how to cope, we start with cfe2, which is purely an I/O space mapped and that seems to make it work. I say 'seems' here, because the card I have doesn't seem to have the right dongle for full testing... Notes: svn path=/head/; revision=189843
* Fix the whitespace in this file to be consistent with itself and withWarner Losh2009-03-121-42/+40
| | | | | | | | | the rest of the project's files. s/sn_/fe_/ in a routine name that I copied from sn. Notes: svn path=/head/; revision=189728
* Add support for Hitachi HT-4840-11. This card is supposedly just likeWarner Losh2009-03-111-0/+14
| | | | | | | | the J181, but not quite. This card's CIS has some quirks that means we have to ignore CFE's 1-9. Notes: svn path=/head/; revision=189681
* - Use bus_foo() rather than bus_space_foo() and retire the bus tag and handleJohn Baldwin2008-06-235-44/+27
| | | | | | | | | | | | | | | from the softc. - Rework the watchdog timer to match other NIC drivers: - Start a timer in fe_init() that runs once a second and checks a counter in the softc that is identical to the deprecated 'if_timer'. - Just adjust the softc tx timeout value when sending packets instead of scheduling the timer. - Use IFQ_SET_MAXLEN(). Tested by: WATANABE Kazuhiro Notes: svn path=/head/; revision=179959
* Make fe(4) MPSAFE:John Baldwin2008-06-023-44/+86
| | | | | | | | | | | | - Add a mutex to the softc to protect the softc and device hardware. - Don't leak bus resources if if_alloc() fails during attach. - Setup the interrupt handler after calling ether_ifattach(). - Use a private timer to manage the transmit watchdog. Tested by: WATANABE Kazuhiro CQG00620 of nifty.ne.jp Notes: svn path=/head/; revision=179493
* 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
* Commit the results of the typo hunt by Darren Pilgrim.Yaroslav Tykhiy2006-08-041-1/+1
| | | | | | | | | | | | | This change affects documentation and comments only, no real code involved. PR: misc/101245 Submitted by: Darren Pilgrim <darren pilgrim bitfreak org> Tested by: md5(1) MFC after: 1 week Notes: svn path=/head/; revision=160964
* Return 0 if we are a network card and do match. Previously, we'd boguslyWarner Losh2005-11-191-0/+1
| | | | | | | | | fail and the card wouldn't be detected. Submitted by: Bryan Blackburn Notes: svn path=/head/; revision=152621
* - Store pointer to the link-level address right in "struct ifnet"Ruslan Ermilov2005-11-111-1/+1
| | | | | | | | | | | | | rather than in ifindex_table[]; all (except one) accesses are through ifp anyway. IF_LLADDR() works faster, and all (except one) ifaddr_byindex() users were converted to use ifp->if_addr. - Stop storing a (pointer to) Ethernet address in "struct arpcom", and drop the IFP2ENADDR() macro; all users have been converted to use IF_LLADDR() instead. Notes: svn path=/head/; revision=152315
* Preliminary support for Xircom Credit Card Adapter. Not to beWarner Losh2005-10-251-13/+55
| | | | | | | | | | | | confused with the Credit Card Adapter II and its spawn (which the xe driver supports). These changes get my card probing and attaching. I recently won one of these (and a NEC rebadged version) in an lot auction. The NEC didn't work, so I took it apart and found the MB86960A chip and then modified if_fe_pccard.c to attach. I can't test this card further since I have no dongle for this card. Notes: svn path=/head/; revision=151638
* PC Card instead of other variantsWarner Losh2005-09-222-5/+5
| | | | Notes: svn path=/head/; revision=150458
* Remove OLDCARD support by removing compat shimsWarner Losh2005-09-201-27/+14
| | | | Notes: svn path=/head/; revision=150396
* Make sure that we call if_free(ifp) after bus_teardown_intr. Since weWarner Losh2005-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. Notes: svn path=/head/; revision=150306
* Fix "struct ifnet" leak if attach() fails in the middle.Ruslan Ermilov2005-09-161-0/+1
| | | | Notes: svn path=/head/; revision=150220
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andRobert Watson2005-08-091-14/+13
| | | | | | | | | | | | | | | | | 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
* Modify device drivers supporting multicast addresses to lock if_addr_mtxRobert Watson2005-08-031-0/+2
| | | | | | | | | | | 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> MFC after: 1 week Notes: svn path=/head/; revision=148654
* Eliminate unused argument in PCMCIA_CARD macro.Warner Losh2005-06-241-12/+12
| | | | | | | | | | | Provide a backwards compatible way to have the extra macro by defining PCCARD_API_LEVEL 5 before including pccarddevs for driver writers that want/need to have the same driver on 5 and 6 with pccard attachments. Approved by: re (dwhite) Notes: svn path=/head/; revision=147580
* s/sc_enaddr/enaddr/ to fix pc98 build.Brooks Davis2005-06-111-19/+19
| | | | | | | Approved by: re (blanket) Notes: svn path=/head/; revision=147304
* Stop embedding struct ifnet at the top of driver softcs. Instead theBrooks Davis2005-06-104-107/+116
| | | | | | | | | | | | | | | | | | | | | | | 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
* Perliminary support for Fujitsu SCSI LAN combo card. At least for theWarner Losh2005-02-201-1/+1
| | | | | | | | LAN side of things. It appears that all that's necessary is to relax the check on the DLCR2 register in the probe. Notes: svn path=/head/; revision=142137
* Back out part of 1.23. This was a work in progress to support theWarner Losh2005-02-201-13/+5
| | | | | | | Fujitsu LAN SCSI card's ethernet side. Notes: svn path=/head/; revision=142136
* Forced commit after moving mb86960.h from i386/isa/ic to dev/fe. ItWarner Losh2005-02-204-10/+22
| | | | | | | is only used by the fe driver, and isn't MD. Notes: svn path=/head/; revision=142135
* we don't need the offset in the attr memory to get the ethernetWarner Losh2005-01-211-14/+12
| | | | | | | | | | address, nor do we need the alignment requirements, so eliminate them. This likely means that we can now collapse some of the entries as we have no need of them anymore (they match other entries and were there only to get the right attr memory offset of the enet addr). Notes: svn path=/head/; revision=140597
* Remove prototype of undefined function so this compiles again.Poul-Henning Kamp2005-01-211-2/+0
| | | | Notes: svn path=/head/; revision=140565
* Rework pccard attachment a little. Now both of my fe based ethernetWarner Losh2005-01-211-26/+22
| | | | | | | | | | | | | | | cards work. These changes depend on the expanded funce parsing that just was committed to pccard_cis.c. In NetBSD the ethernet address was read out of attr memory directly. We rely on the kernel pccard parser to pulll this information out of what appears to be an obsolete funce with the information in it. # I'm still getting the no rx interrupt sometimes with some hub/switches # for reasons unknown... But usually only one and only when dhclient # runs. Notes: svn path=/head/; revision=140543
* Only attach to network functions. This should be a nop since I'm notWarner Losh2005-01-201-0/+10
| | | | | | | | | aware of any fe based cards that do anything except network (well, maybe the fujitsu scsi/lan card, but I've only seen two of those on ebay in the last 3 years). Notes: svn path=/head/; revision=140528
* Minor nitWarner Losh2005-01-201-1/+0
| | | | Notes: svn path=/head/; revision=140503
* Add a few cards from NetBSD. They don't work yet, since the code toWarner Losh2005-01-111-8/+10
| | | | | | | | | read the ethernet address from the attribute space hasn't been implemented. Also add flags for the MBH10302. The flags and maddr fields will be used when reading from the attribute space... Notes: svn path=/head/; revision=140041