summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/if_em.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Add missing letoh in em(4) vlan handling, resulting in a problem onsthen2009-05-251-2/+2
| | | | | big-endian arch where vlans were in use. Fix from Brad. Problem reported and fix tested by Axton Grams, also tested by me. ok dlg@.
* make drivers tell the mclgeti allocator what their maximum ring size isdlg2009-01-271-1/+3
| | | | | | | to prevent the hwm growing beyond that. this allows the livelock mitigation to do something where the hwm used to grow beyond twice the rx rings size. ok kettenis@ claudio@
* allow us to completely exhaust the rx ring now that we handle the RXO (rxdlg2008-12-231-2/+2
| | | | | | overflow) interrupt. Yes deraadt@
* rework the programming of the multicast addresses onto the chip to use thedlg2008-12-211-20/+21
| | | | | | | "new" multicast address and address range counters in the ifp. shrinks and simplifies that code a lot. ive had this diff since may 2007.
* use the RXO (rx overflow) interrupt to try to refill the rx ring. this letsdlg2008-12-211-7/+13
| | | | | us cope if the rx ring empties completely and the hardware tells us we're still getting packets.
* revert 1.20 now that the new allocator is used to control the number ofbrad2008-12-151-17/+8
| | | | | | RX buffers allocated. ok dlg@
* uncount clusters taken off the rx ring immediately. if those clusters weredlg2008-12-061-1/+2
| | | | | being chained into a jumbo we would not replace them when filling the rx ring again until they were passed up the stack.
* Add initial support for the ICH9 IGP M and ICH9 IGP M AMT chipsets.brad2008-12-041-2/+4
| | | | | | | | | For now the chunk in em_detect_gig_phy() is a hack to get things going until it can be figured out why exactly the PHY id is not probed properly. Based on a diff from jcs@ via ckuethe@ ok kettenis@
* recommit the use of the new mbuf cluster allocator.dlg2008-12-031-190/+202
| | | | | | | | | | | this starts em up with 4 mbufs on the rx ring, which will then grow as usage demands. this also allows em to take advantage of the new livelock mitigation code as well as freeing up a boatload of kernel memory. this version of the diff makes sure we only ever post the last descriptor we filled to the hardware, rather than the whole ring when bringing the interface up. it has been tested by users who got panics with the previous diff without trouble.
* revert 1.197 if_em.c, 1.38/1.39 if_em.h, requested by dlg, until a bugsthen2008-11-291-193/+189
| | | | | | reported on misc@ can be tracked down. identical diff from jsing.
* Eliminate the redundant bits of code for MTU and multicast handlingbrad2008-11-281-26/+15
| | | | | | | | | | | | | | from the individual drivers now that ether_ioctl() handles this. Shrinks the i386 kernels by.. RAMDISK - 2176 bytes RAMDISKB - 1504 bytes RAMDISKC - 736 bytes Tested by naddy@/okan@/sthen@/brad@/todd@/jmc@ and lots of users. Build tested on almost all archs by todd@/brad@ ok naddy@
* rework the filling of the rx ring. this switches us to having the clusterdlg2008-11-261-189/+193
| | | | | | | | | | | | | allocation limited by per ifp statistics, ie, we're not guaranteed to have mbufs in every slot on the rx ring. instead of filling the ring with 256 mbufs all the time (about 512KB of kva) when em is brought up, we give it 4. as demand grows we increase the number of mbufs allowed on the ring. i will bet most users wont go above 50ish mbufs, so we're saving them 400KB of kva. tested by many, including one on sparc64 ok claudio@ deraadt@ henning@ krw@
* some whitespace fixes in em_rxeofdlg2008-11-241-14/+15
|
* Introduce bpf_mtap_ether(), which for the benefit of bpf listenersnaddy2008-11-091-3/+4
| | | | | | | | | creates the VLAN encapsulation from the tag stored in the mbuf header. Idea from FreeBSD, input from claudio@ and canacar@. Switch all hardware VLAN enabled drivers to the new function. ok claudio@
* Some tweaks for the usage of NVLAN > 0 checks in the code.brad2008-10-281-3/+8
|
* Re-add support TX VLAN tag insertion and RX VLAN tag stripping.brad2008-10-191-1/+40
| | | | Tested by naddy@
* Second pass of simple timeout_add -> timeout_add_sec conversionsblambert2008-10-151-4/+4
| | | | | | | This should take care of the simpler ones (i.e., timeout values of integer multiples of hz). ok krw@, art@
* Always update published link state even if the internal link state doesn'tkettenis2008-10-051-1/+5
| | | | | | | change. Prevents us from getting stuck in LINK_STATE_UNKNOWN. Fixes PR 5914. tested by deraadt@, sthen@ ok deraadt@
* First step towards cleaning up the Ethernet driver ioctl handling.brad2008-10-021-8/+2
| | | | | | | | | | | | | | | | | | | | Move calling ether_ioctl() from the top of the ioctl function, which at the moment does absolutely nothing, to the default switch case. Thus allowing drivers to define their own ioctl handlers and then falling back on ether_ioctl(). The only functional change this results in at the moment is having all Ethernet drivers returning the proper errno of ENOTTY instead of EINVAL/ENXIO when encountering unknown ioctl's. Shrinks the i386 kernels by.. RAMDISK - 1024 bytes RAMDISKB - 1120 bytes RAMDISKC - 832 bytes Tested by martin@/jsing@/todd@/brad@ Build tested on almost all archs by todd@/brad@ ok jsing@
* style nits.brad2008-09-301-4/+2
|
* remove dead stores and newly created unused variables.chl2008-09-241-3/+1
| | | | | | Found by LLVM/Clang Static Analyzer. ok henning@ brad@
* Disable the use of Jumbo frames on the first generation chips (82542).brad2008-08-291-2/+4
| | | | | | | | | | The exact details are unknown (possibly hw errata?) but the Windows and Linux drivers have never supported Jumbos on this chipset and since it is so old and rare it is not that big of a deal. From FreeBSD ok dlg@ awhile ago.
* Backout rev 1.162. This change made us muck with with pci config space atkettenis2008-07-151-18/+6
| | | | | | | | address 0x1a and 0x1e, and that's not where the PCIe capability stuff lives. Potentially it was mucking with an IO BAR (super dangerous). But probably it was achieving nothing at all. ok dlg@, marco@, brad@
* Don't see rx_abs_int_delay if rx_int_delay is not set. Settingmillert2008-06-151-2/+3
| | | | | | rx_abs_int_delay to be non-zero when rx_int_delay is zero appears to trigger a bug elsewhere in the kernel for certain em revisions. Based on a diff from beck@. OK beck@ marco@ henning@ brad@
* don't declare foo_driver_version[] strings and turn them into defines,reyk2008-06-081-2/+2
| | | | | | nothing uses them and it saves a few bytes in the kernel. ok claudio@
* put code to print periodic debug statistics in #ifdef EM_DEBUG, shrinksbrad2008-06-031-2/+10
| | | | | | the driver for about 292 bytes on i386. ok reyk@
* Since Ethernet links can only be full duplex or half duplex the linkbrad2008-05-131-4/+2
| | | | | | | | state reporting code in the MII layer / em(4) and vge(4) will never fall back to the point of only reporting the link as being UP without the duplex setting being reported, so simplify the code a bit here. ok dlg@
* dma sync the tx ring and post new packets to the chip once per call todlg2008-04-091-14/+48
| | | | | | the start routine instead of once per packet. tested on various archs including amd64, i386, and sparc64.
* At the moment em_flowstatus() does not deal with fiber interfaces andbrad2008-03-021-1/+5
| | | | | | | | will not return any flow control status so just return no status (0) instead of reading copper PHY registers and not returning anything anyway. ok kettenis@
* If bus_dmamap_load_mbuf() fails in em_get_buf() use m_freem() intead ofbrad2008-03-021-2/+2
| | | | | | m_free() to free the mbuf cluster. ok krw@ mglocker@
* Correct the watchdog timer by moving it out from under the condition checkbrad2008-02-271-9/+10
| | | | | | | | for the IFF_OACTIVE flag. Tested by brad@, johan@, krw@, wilfried@ From mickey
* Add support for the Intel ICH9 chipsets.brad2008-02-201-7/+17
| | | | | | | | | | | | Initial diff from Henry Precheur based on a commit from matthias@dragonflybsd which was derived from the FreeBSD driver. Additional Flash changes from sephe@dragonflybsd which was derived from the FreeBSD driver. Typo fixes in Henry's diff and a few other improvements from the FreeBSD driver from brad@. Tested on a variety of different em(4) adapters in addition to ICH8/9. ok dlg@
* Add PCI ids for some 82571 based multi port adapters.brad2008-02-041-1/+4
| | | | | | From FreeBSD ok dlg@
* Move the current flow control status code out of em_media_status()brad2008-02-021-18/+24
| | | | | | | | | | | | and into a separate function which was modeled after the MII frameworks mii_phy_flowstatus() function. This was done so as to make em_media_status() a little nicer looking and so that when flow control status is added for fiber adapters that em_media_status() won't look so ugly. No functional change. Tested by wilfried@ and brad@ ok dlg@
* Allow for the adjustment of the number of RX descriptorsbrad2007-10-211-6/+12
| | | | | | | | | | for the newer generations of em(4) chipsets independently from the first two generations (82542/82543). The first two generations have hardware errata limiting the upper maximum to 256 descriptors. The number of RX descriptors has not been adjusted yet. ok beck@ henning@ dlg@
* More easy bzero() -> M_ZERO. Use 'p = malloc(sizeof(*p) ...' wherekrw2007-10-011-15/+5
| | | | obvious.
* only call em_init() when IFF_UP is set, not unconditional.henning2007-05-311-3/+5
| | | | | | | | | prevents another round of autonegotiation (and thus, few seconds outage) with every address change that had to be reintroduced a few revs ago because of the watchdog timeout problems people were seeing. this gives the benifit from both with the problems of neither ;) tested by daniel polak on a system that saw the watchdog timeouts before ok theo
* 1000 != 0x1000 (4096)ckuethe2007-05-311-2/+2
| | | | | | Bring the flow control delay time down to what the comment says it should be. By using a smaller flow control pause time when the buffer isn't full, my em(4) goes about 20Mbps faster.
* Move the knob for the interrupt throttling register next to the knobs forckuethe2007-05-301-3/+1
| | | | | the other interrupt moderation schemes. ok beck drahn
* delete unused functions. typical vendor garbage driver..; ok kettenisderaadt2007-05-091-1/+5
|
* Revert rev 1.116. For some reason this caused the device to do DMA from/tokettenis2007-05-091-3/+2
| | | | | | random addresses in some cases, causing watchdog timeouts. tested by many; ok deraadt@
* A new PCI id for Intel's PCIe quad port fiber adapter.reyk2007-03-161-1/+2
|
* Workaround for an issue with em(4) interfaces on Lenovo X60/T60 laptops whereweingart2007-01-261-4/+11
| | | | | | | | | the interface will fail to initialize with an EEPROM error if the interface does not have a link upon boot. Tested by mk@ and janek@ From Jack Vogel@Intel via brad
* Fix typo. From brad@kettenis2007-01-211-2/+2
|
* Report flow control status.kettenis2007-01-151-2/+17
| | | | From brad@
* Set IFM_ETH_MASTER if local PHY configuration resolved to MASTER.kettenis2006-12-271-1/+9
| | | | From brad@
* Implement em_read_pcie_cap_reg(), where we set the max read size onreyk2006-12-061-6/+18
| | | | | | | | | | PCIe to 4k. >From kmacy@FreeBSD Tested by mk@ and Johan Mson Lindman <tybollt at solace dot mh dot se> with the 82573 chipset. ok brad@ mglocker@ mk@
* report full/half duplex state for non-MII interfacesreyk2006-12-041-2/+7
| | | | ok brad@
* Remove watchdog handler workaround introduced in rev 1.149 which is nobrad2006-11-211-9/+1
| | | | longer necessary.
* style changes. no op.brad2006-11-211-6/+4
|