summaryrefslogtreecommitdiffstats
path: root/sys/dev/ixgb
Commit message (Collapse)AuthorAgeFilesLines
* Catch up the rest of the drivers with the ether_vlan_mtap modifications.csjp2007-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
* 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@
* Move ethernet VLAN tags from mtags to its own mbuf packet header fieldandre2006-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
* 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
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-162-2/+0
| | | | unnecessary.
* - Fix VLAN_INPUT_TAG() macro, so that it doesn't touch mtag inglebius2005-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
* - 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.
* - Don't pollute opt_global.h with DEVICE_POLLING and introduceglebius2005-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
* Big polling(4) cleanup.glebius2005-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
* Remove bridge(4) from the tree. if_bridge(4) is a full functionalmlaier2005-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)
* Make sure that we call if_free(ifp) after bus_teardown_intr. Since weimp2005-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.
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-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
* 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
* - add missing ether_poll_deregisterbrueffer2005-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
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-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
* Convert to the faster bus_dmamap_load_mbuf_sg() interface.alc2005-05-182-34/+16
| | | | MFC after: 1 week
* Add locking and enable INTR_MPSAFE. Eliminate spl calls.alc2005-04-052-55/+102
| | | | | Submitted by: Paul Willmann willmann at rice dot edu MFC After: 3 weeks
* Fix copy&paste error in my previous commit.mux2005-03-271-2/+2
| | | | Spotted by: ru
* Fix a bunch of bugs I came accross when looking at the ixgb(4) driver,mux2005-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.
* Use BUS_PROBE_DEFAULT for pci probe return valueimp2005-03-051-1/+1
|
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-064-3/+7
|
* Since if_ixgb doesn't contain locking or run with INTR_MPSAFE, markrwatson2004-08-141-1/+2
| | | | the interface as IFF_NEEDSGIANT so if_start is run holding Giant.
* PR kern/68474:tackerman2004-07-011-2/+2
| | | | Changed if_ipending to if_flags
* Add missing <sys/module.h> includes currently relying on nested includephk2004-06-031-0/+1
| | | | in <sys/kernel.h>
* First release of ixgb driver for the Intel(R) PRO/10GbE Family of Adapters. ↵tackerman2004-05-2810-0/+6297
This driver has been developed for use with FreeBSD, version 4.8 and later. Submitted by: Hema Joyce Reviewed by: Prafulla Deuskar Approved by: Prafulla Deuskar MFC after: 1 week
OpenPOWER on IntegriCloud