summaryrefslogtreecommitdiffstats
path: root/sys/dev/fe
Commit message (Collapse)AuthorAgeFilesLines
* Silence a coverity warning about ignoring a return value. We do, butimp2015-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
* In order to reduce use of M_EXT outside of the mbuf allocator andrwatson2015-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
* Mechanically convert to if_inc_counter().glebius2014-09-181-14/+17
|
* The r48589 promised to remove implicit inclusion of if_var.h soon. Prepareglebius2013-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.
* Mechanically substitute flags from historic mbuf allocator withglebius2012-12-041-2/+2
| | | | malloc(9) flags in sys/dev.
* Improve media status reporting, when the driver knows...imp2012-01-301-2/+3
|
* Add new tunable 'net.link.ifqmaxlen' to set default send interfacesobomax2010-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
* Fix comment typo.rwatson2009-11-251-1/+1
| | | | | Submitted by: Marc Balmer <marc at msys.ch> MFC after: 3 days
* Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/rwatson2009-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
* It appears that the TDK LAK CD011 works with fe driver. I don't haveimp2009-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.
* Generalize the workaround for the Hitachi HT-4840-11. The Contecimp2009-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...
* Fix the whitespace in this file to be consistent with itself and withimp2009-03-121-42/+40
| | | | | | the rest of the project's files. s/sn_/fe_/ in a routine name that I copied from sn.
* Add support for Hitachi HT-4840-11. This card is supposedly just likeimp2009-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.
* - Use bus_foo() rather than bus_space_foo() and retire the bus tag and handlejhb2008-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
* Make fe(4) MPSAFE:jhb2008-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
* 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@
* Commit the results of the typo hunt by Darren Pilgrim.yar2006-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
* Return 0 if we are a network card and do match. Previously, we'd boguslyimp2005-11-191-0/+1
| | | | | | fail and the card wouldn't be detected. Submitted by: Bryan Blackburn
* - Store pointer to the link-level address right in "struct ifnet"ru2005-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.
* Preliminary support for Xircom Credit Card Adapter. Not to beimp2005-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.
* PC Card instead of other variantsimp2005-09-222-5/+5
|
* Remove OLDCARD support by removing compat shimsimp2005-09-201-27/+14
|
* 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" leak if attach() fails in the middle.ru2005-09-161-0/+1
|
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-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
* Modify device drivers supporting multicast addresses to lock if_addr_mtxrwatson2005-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
* Eliminate unused argument in PCMCIA_CARD macro.imp2005-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)
* s/sc_enaddr/enaddr/ to fix pc98 build.brooks2005-06-111-19/+19
| | | | Approved by: re (blanket)
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-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
* Perliminary support for Fujitsu SCSI LAN combo card. At least for theimp2005-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.
* Back out part of 1.23. This was a work in progress to support theimp2005-02-201-13/+5
| | | | Fujitsu LAN SCSI card's ethernet side.
* Forced commit after moving mb86960.h from i386/isa/ic to dev/fe. Itimp2005-02-204-10/+22
| | | | is only used by the fe driver, and isn't MD.
* we don't need the offset in the attr memory to get the ethernetimp2005-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).
* Remove prototype of undefined function so this compiles again.phk2005-01-211-2/+0
|
* Rework pccard attachment a little. Now both of my fe based ethernetimp2005-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.
* Only attach to network functions. This should be a nop since I'm notimp2005-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).
* Minor nitimp2005-01-201-1/+0
|
* Add a few cards from NetBSD. They don't work yet, since the code toimp2005-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...
* don't pollute global namespace with valid_Ether_p, instead, prependimp2005-01-105-24/+24
| | | | fe_ to it.
* NE200 -> NE200Timp2005-01-101-1/+1
|
* Add support for:imp2005-01-101-0/+1
| | | | | | | | | | | fe1: <EAGLE Technology NE200 ETHERNET LAN MBH10302 04> As reported by Sean Shapira. This appears to be working. Eagle used Fujitsu's vendor number, with a product number of 4 (which is the same as the vendor number, which is a little suspect). Since there's no apparent conflict, go ahead and use it. Submitted by: Sean Shapira
* /* -> /*- for copyright notices, minor format tweaks as necessaryimp2005-01-061-1/+1
|
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-066-6/+6
|
* Style. Use ETHER_IS_MULTICAST() appropriately instead of masking off the bit.bms2004-10-071-1/+1
| | | | Reviewed by: jmallett
* Since if_fe doesn't contain locking or run with INTR_MPSAFE, markrwatson2004-08-131-1/+2
| | | | the interface as IFF_NEEDSGIANT so if_start is run holding Giant.
* Replace handrolled CRC calculation with ether_crc32_[lb]e().naddy2004-06-091-24/+2
|
* Fix disordering of pccarddevs.h noticed by bde. Also remove a fewimp2004-05-271-2/+2
| | | | | | redundant includes and fix some of the include disordering. Submitted by: bde
* Move to generating pccarddevs.h on the fly, both for the kernel andimp2004-05-261-1/+1
| | | | | | | the modules. Also generate usbdevs.h automatically now, but a non-kernel file is stopping that at the moment.
* We don't need to initialize if_output, ether_ifattach() does itmux2004-05-231-1/+0
| | | | for us.
* Remove improper use of if_addrhead in device drivers to checkluigi2004-04-151-8/+0
| | | | | | | | | | | | if the link-level address has been initialized already. The majority of modern drivers never does this and works fine, which makes me think that the check is totally unnecessary and a residue of cut&paste from other drivers. This change is done to simplify locking because now almost none of the drivers uses this field. The exceptions are "ct" "ctau" and "cx" where i am not sure if i can remove that part.
OpenPOWER on IntegriCloud