aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ixgb
Commit message (Collapse)AuthorAgeFilesLines
* Retire ixgb(4)Sean Bruno2018-05-0210-6348/+0
| | | | | | | | | | | | | | This driver was for an early and uncommon legacy PCI 10GbE for a single ASIC, Intel 82597EX. Intel quickly shifted to the long lived ixgbe family. Submitted by: kbowling Reviewed by: brooks imp jeffrey.e.pieper@intel.com Relnotes: yes Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D15234 Notes: svn path=/head/; revision=333173
* ixgb(4): Add deprecation notice for this old and busted 10GE adapter.Sean Bruno2018-05-011-0/+1
| | | | | | | | | | | This is a prequisite before we remove the driver from -current. Reviewed by: emaste kbowling imp Relnotes: yes Differential Revision: https://reviews.freebsd.org/D15244 Notes: svn path=/head/; revision=333137
* Fall back to ether_ioctl() by default.Brooks Davis2018-03-301-7/+2
| | | | | | | | | | | | | | | | | | | | The common pratice in ethernet device drivers is to fall back to ether_ioctl() to implement generic ioctls not implemented by the driver and to fail if no handler exists. Convert these drivers to follow that practice rather than calling ether_ioctl() for specific cases. vxge(4) aready had the default case, but it was only called on failure to match. Reviewed by: imp Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14895 Notes: svn path=/head/; revision=331829
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-208-0/+8
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326022
* Remove register keyword from sys/ and ANSIfy prototypesEd Maste2017-05-171-1/+1
| | | | | | | | | | | | | | | A long long time ago the register keyword told the compiler to store the corresponding variable in a CPU register, but it is not relevant for any compiler used in the FreeBSD world today. ANSIfy related prototypes while here. Reviewed by: cem, jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D10193 Notes: svn path=/head/; revision=318389
* remove archaic register keyword from ixgb and exEd Maste2017-04-061-1/+1
| | | | | | | Reviewed by: sbruno Notes: svn path=/head/; revision=316583
* Consistently use `device_t`Jean-Sébastien Pédron2016-08-092-2/+2
| | | | | | | | | | | | | | | | | | Several files use the internal name of `struct device` instead of `device_t` which is part of the public API. This patch changes all `struct device *` to `device_t`. The remaining occurrences of `struct device` are those referring to the Linux or OpenBSD version of the structure, or the code is not built on FreeBSD and it's unclear what to do. Submitted by: Matthew Macy <mmacy@nextbsd.org> (previous version) Approved by: emaste, jhibbits, sbruno MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D7447 Notes: svn path=/head/; revision=303890
* Do not initialize the adapter on MTU change when adapter status is down.Sean Bruno2016-07-071-1/+2
| | | | | | | | | | | | | | | This fixes long-standing problems when changing settings of the adapter. Discussed in: https://lists.freebsd.org/pipermail/freebsd-net/2016-June/045509.html Submitted by: arnaud.ysmal@stormshield.eu Reviewed by: erj@freebsd.org Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D7030 Notes: svn path=/head/; revision=302384
* 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
* Replace several bus_alloc_resource() calls using default arguments with ↵Justin Hibbits2016-02-191-5/+5
| | | | | | | | | | | | bus_alloc_resource_any() Since these calls only use default arguments, bus_alloc_resource_any() is the right call. Differential Revision: https://reviews.freebsd.org/D5306 Notes: svn path=/head/; revision=295790
* Provide ixgb_get_counter().Gleb Smirnoff2014-09-281-20/+29
| | | | Notes: svn path=/head/; revision=272241
* Use define from if_var.h to access a field inside struct if_data,Gleb Smirnoff2014-08-301-1/+1
| | | | | | | | | that resides in struct ifnet. Sponsored by: Nginx, Inc. Notes: svn path=/head/; revision=270856
* - Don't compare bus_dma map pointers for static DMA allocations againstJohn Baldwin2014-06-121-1/+0
| | | | | | | | | | | NULL to determine if bus_dmamap_unload() or bus_dmamem_free() should be called. Instead, check the associated bus and virtual addresses. - Don't clear static DMA maps to NULL. Reviewed by: jfv Notes: svn path=/head/; revision=267385
* 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-8/+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
* Remove redundant definitions to appease tinderbox.Jung-uk Kim2013-07-092-7/+3
| | | | Notes: svn path=/head/; revision=253102
* Update Intel email address.Eitan Adler2013-05-021-1/+1
| | | | | | | | | PR: docs/175349 Submitted by: Lars Eggert <lars@netapp.com> Discussed with: jfv Notes: svn path=/head/; revision=250168
* Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on ↵Sofian Brabez2013-01-301-1/+2
| | | | | | | | | | device_method_t arrays Reviewed by: cognet Approved by: cognet Notes: svn path=/head/; revision=246128
* Mechanically substitute flags from historic mbuf allocator withGleb Smirnoff2012-12-041-1/+1
| | | | | | | malloc(9) flags in sys/dev. Notes: svn path=/head/; revision=243857
* More conversions of drivers to use the PCI parent DMA tag.Scott Long2012-03-121-3/+3
| | | | Notes: svn path=/head/; revision=232874
* ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it againKevin Lo2012-01-071-1/+0
| | | | | | | Reviewed by: yongari Notes: svn path=/head/; revision=229767
* Fix typos - remove duplicate "the".Rebecca Cran2011-02-211-1/+1
| | | | | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days Notes: svn path=/head/; revision=218909
* Do not allocate multicast array memory in multicast filterPyun YongHyeon2010-08-282-1/+18
| | | | | | | | | | | | | | | | | configuration function. For failed memory allocations, em(4)/lem(4) called panic(9) which is not acceptable on production box. igb(4)/ixgb(4)/ix(4) allocated the required memory in stack which consumed 768 bytes of stack memory which looks too big. To address these issues, allocate multicast array memory in device attach time and make multicast configuration success under any conditions. This change also removes the excessive use of memory in stack. Reviewed by: jfv Notes: svn path=/head/; revision=211913
* Do not call voluntary panic(9) in case of if_alloc() failure.Pyun YongHyeon2010-08-281-6/+11
| | | | | | | Reviewed by: jfv Notes: svn path=/head/; revision=211907
* - Use callout_init_mtx() instead of callout_init(..., CALLOUT_MPSAFE).John Baldwin2009-11-192-33/+22
| | | | | | | | | | | | | | - Add a missing callout_drain() to detach. - Hook into the stats timer and use that to drive the transmit watchdog instead of using if_watchdog. - Run the stats timer every second to match other drivers instead of every other second. - Remove dubious callout handling that stopped the timer only to start it again while holding the driver lock without dropping it in between the stop and the start. Notes: svn path=/head/; revision=199539
* Use device_printf() and if_printf() instead of printf() with an explicitJohn Baldwin2009-11-062-82/+75
| | | | | | | unit number and remove 'unit' members from softc. Notes: svn path=/head/; revision=198987
* 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
* When user_frac in the polling subsystem is low it is going to busy theAttilio Rao2009-05-301-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | CPU for too long period than necessary. Additively, interfaces are kept polled (in the tick) even if no more packets are available. In order to avoid such situations a new generic mechanism can be implemented in proactive way, keeping track of the time spent on any packet and fragmenting the time for any tick, stopping the processing as soon as possible. In order to implement such mechanism, the polling handler needs to change, returning the number of packets processed. While the intended logic is not part of this patch, the polling KPI is broken by this commit, adding an int return value and the new flag IFCAP_POLLING_NOCOUNT (which will signal that the return value is meaningless for the installed handler and checking should be skipped). Bump __FreeBSD_version in order to signal such situation. Reviewed by: emaste Sponsored by: Sandvine Incorporated Notes: svn path=/head/; revision=193096
* The module name convention is foo, not if_foo.Warner Losh2009-05-151-3/+3
| | | | Notes: svn path=/head/; revision=192147
* Catch up the rest of the drivers with the ether_vlan_mtap modifications.Christian S.J. Peron2007-03-041-1/+1
| | | | | | | | | | | | | If these drivers are setting M_VLANTAG because they are stripping the layer 2 802.1Q headers, then they need to be re-inserting them so any bpf(4) peers can properly decode them. It should be noted that this is compiled tested only. MFC after: 3 weeks Notes: svn path=/head/; revision=167190
* 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
* Move ethernet VLAN tags from mtags to its own mbuf packet header fieldAndre Oppermann2006-09-171-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | m_pkthdr.ether_vlan. The presence of the M_VLANTAG flag on the mbuf signifies the presence and validity of its content. Drivers that support hardware VLAN tag stripping fill in the received VLAN tag (containing both vlan and priority information) into the ether_vtag mbuf packet header field: m->m_pkthdr.ether_vtag = vlan_id; /* ntohs()? */ m->m_flags |= M_VLANTAG; to mark the packet m with the specified VLAN tag. On output the driver should check the mbuf for the M_VLANTAG flag to see if a VLAN tag is present and valid: if (m->m_flags & M_VLANTAG) { ... = m->m_pkthdr.ether_vtag; /* htons()? */ ... pass tag to hardware ... } VLAN tags are stored in host byte order. Byte swapping may be necessary. (Note: This driver conversion was mechanic and did not add or remove any byte swapping in the drivers.) Remove zone_mtag_vlan UMA zone and MTAG_VLAN definition. No more tag memory allocation have to be done. Reviewed by: thompsa, yar Sponsored by: TCP/IP Optimization Fundraise 2005 Notes: svn path=/head/; revision=162375
* 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
* Since DELAY() was moved, most <machine/clock.h> #includes have beenPoul-Henning Kamp2006-05-162-2/+0
| | | | | | | unnecessary. Notes: svn path=/head/; revision=158651
* - Fix VLAN_INPUT_TAG() macro, so that it doesn't touch mtag inGleb Smirnoff2005-12-181-2/+1
| | | | | | | | | | | | case if memory allocation failed. - Remove fourth argument from VLAN_INPUT_TAG(), that was used incorrectly in almost all drivers. Indicate failure with mbuf value of NULL. In collaboration with: yongari, ru, sam Notes: svn path=/head/; revision=153512
* - 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
* - Don't pollute opt_global.h with DEVICE_POLLING and introduceGleb Smirnoff2005-10-051-0/+4
| | | | | | | | | | | | opt_device_polling.h - Include opt_device_polling.h into appropriate files. - Embrace with HAVE_KERNEL_OPTION_HEADERS the include in the files that can be compiled as loadable modules. Reviewed by: bde Notes: svn path=/head/; revision=150968
* Big polling(4) cleanup.Gleb Smirnoff2005-10-012-42/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Axe poll in trap. o Axe IFF_POLLING flag from if_flags. o Rework revision 1.21 (Giant removal), in such a way that poll_mtx is not dropped during call to polling handler. This fixes problem with idle polling. o Make registration and deregistration from polling in a functional way, insted of next tick/interrupt. o Obsolete kern.polling.enable. Polling is turned on/off with ifconfig. Detailed kern_poll.c changes: - Remove polling handler flags, introduced in 1.21. The are not needed now. - Forget and do not check if_flags, if_capenable and if_drv_flags. - Call all registered polling handlers unconditionally. - Do not drop poll_mtx, when entering polling handlers. - In ether_poll() NET_LOCK_GIANT prior to locking poll_mtx. - In netisr_poll() axe the block, where polling code asks drivers to unregister. - In netisr_poll() and ether_poll() do polling always, if any handlers are present. - In ether_poll_[de]register() remove a lot of error hiding code. Assert that arguments are correct, instead. - In ether_poll_[de]register() use standard return values in case of error or success. - Introduce poll_switch() that is a sysctl handler for kern.polling.enable. poll_switch() goes through interface list and enabled/disables polling. A message that kern.polling.enable is deprecated is printed. Detailed driver changes: - On attach driver announces IFCAP_POLLING in if_capabilities, but not in if_capenable. - On detach driver calls ether_poll_deregister() if polling is enabled. - In polling handler driver obtains its lock and checks IFF_DRV_RUNNING flag. If there is no, then unlocks and returns. - In ioctl handler driver checks for IFCAP_POLLING flag requested to be set or cleared. Driver first calls ether_poll_[de]register(), then obtains driver lock and [dis/en]ables interrupts. - In interrupt handler driver checks IFCAP_POLLING flag in if_capenable. If present, then returns.This is important to protect from spurious interrupts. Reviewed by: ru, sam, jhb Notes: svn path=/head/; revision=150789
* Remove bridge(4) from the tree. if_bridge(4) is a full functionalMax Laier2005-09-271-1/+0
| | | | | | | | | | | replacement and has additional features which make it superior. Discussed on: -arch Reviewed by: thompsa X-MFC-after: never (RELENG_6 as transition period) Notes: svn path=/head/; revision=150636
* Make sure that we call if_free(ifp) after bus_teardown_intr. Since weWarner Losh2005-09-191-2/+3
| | | | | | | | | | 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
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andRobert Watson2005-08-091-17/+18
| | | | | | | | | | | | | | | | | 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
* - add missing ether_poll_deregisterChristian Brueffer2005-08-021-2/+13
| | | | | | | | | | | | - add per-device polling - move the setting of if_capenable further down so that the VLAN caps are honored as well Approved by: ru MFC after: 2 weeks Notes: svn path=/head/; revision=148637
* Stop embedding struct ifnet at the top of driver softcs. Instead theBrooks Davis2005-06-102-21/+23
| | | | | | | | | | | | | | | | | | | | | | | 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
* Convert to the faster bus_dmamap_load_mbuf_sg() interface.Alan Cox2005-05-182-34/+16
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=146339
* Add locking and enable INTR_MPSAFE. Eliminate spl calls.Alan Cox2005-04-052-55/+102
| | | | | | | | Submitted by: Paul Willmann willmann at rice dot edu MFC After: 3 weeks Notes: svn path=/head/; revision=144651
* Fix copy&paste error in my previous commit.Maxime Henrion2005-03-271-2/+2
| | | | | | | Spotted by: ru Notes: svn path=/head/; revision=144190
* Fix a bunch of bugs I came accross when looking at the ixgb(4) driver,Maxime Henrion2005-03-273-41/+9
| | | | | | | | | | | | | | | | | | | | | | | some of which are rather serious: - Use the device sysctl tree instead of rolling our own. - Don't create a bus_dmamap_t to pass to bus_dmamem_alloc(), it is bus_dmamem_alloc() that creates it itself. The DMA map created by the driver was overwritten and its memory was leaked. - Fix resource handling bugs in the error path of ixgb_dma_alloc(). - Don't use vtophys() to get the base address of the TX and RX rings when busdma already gave us the correct address to use! - Remove now useless includes and the alpha_XXX_dmamap() hack. - Don't initialize if_output to ether_output(), ether_ifattach() does it for us already. - Add proper module dependencies on ether and pci. Unfortunately, I'm not lucky enough to own an ixgb(4) card, nor a machine with a bus where to plug it in and I couldn't find anyone able to test these patches, so they are only build-tested and I won't MFC them for 5.4-RELEASE. Notes: svn path=/head/; revision=144183
* Use BUS_PROBE_DEFAULT for pci probe return valueWarner Losh2005-03-051-1/+1
| | | | Notes: svn path=/head/; revision=143160
* Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh2005-01-064-3/+7
| | | | Notes: svn path=/head/; revision=139749