summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/if_em.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Call em_start() when we detect a link state change such that packets startkettenis2015-10-081-1/+3
| | | | | | | | flowing again even if the send queue is currently full. Restores the fix made by makeb@ in rev 1.263 which was lost in making the tx completion path mpsafe. ok mikeb@
* Make sure that tx_buffer->next_eop is properly set before we bump the numberkettenis2015-10-061-7/+13
| | | | | | | | | of available descriptors, such that the interrupt handler doesn't attempt to complete partially initialized descriptors. Seems to fix the watchdog timeouts reported by various people. Tested by Mattieu Baptiste and Gregor Best. ok mikeb@
* Run the tx completion path without the kernel held. This makes thekettenis2015-09-301-41/+24
| | | | | | | | | | | "fast path" through the interrupt handler not grab the kernel lock anymore. This removes the code that attempts to reclaim tx descriptors from em_start(). Keeping that code would have complicated the locking. The need to reclaim tx descriptors that way should have largely disappeared now that the interrupt handler doesn't have to wait on the kernel lock. ok mpi@ tested by many
* Avoid using a mutex in the rx completion path. Instead rely onkettenis2015-09-191-28/+13
| | | | | | | | intr_barrier(9) to avoid having the interrupt handler touch the rx data structures while we're brining down the interface. This actually reverts many of the changes in rev. 1.300. ok mikeb@
* Make room for media types of the future. Extend the ifmedia word to 64 bits.stsp2015-09-111-5/+5
| | | | | | | | | | | | | | | | This changes numbers of the SIOCSIFMEDIA and SIOCGIFMEDIA ioctls and grows struct ifmediareq. Old ifconfig and dhclient binaries can still assign addresses, however the 'media' subcommand stops working. Recompiling ifconfig and dhclient with new headers before a reboot should not be necessary unless in very special circumstances where non-default media settings must be used to get link and console access is not available. There may be some MD fallout but that will be cleared up later. ok deraadt miod with help and suggestions from several sharks attending l2k15
* Use the correct free(9) size for the RX ring.mpi2015-09-011-2/+2
| | | | ok dlg@, phessler@
* sizes for free(), mostly related to firmwares.deraadt2015-09-011-3/+5
| | | | ok dlg
* Get rid if em_align. This approach used to make sense, but now that thekettenis2015-08-261-62/+9
| | | | | | | | | | | hardware rx mtu always gets set to the maximum supported value we will hit it for every received packet. Instead, use a larger mbuf cluster size on strict alignment architectures such that we can always m_adj to make sure the packets are properly aligned. This wastes some memory but simplifies things considerably. Hopefully we can reduce the spillage in the near future by taking advantage of recent improvements in the pool code. ok mpi@, mikeb@, dlg@
* Run the part of the interrupt handler that does rx completion without holdingkettenis2015-08-211-8/+35
| | | | | | the kernel lock. ok mpi@, dlg@
* Increment if_ipackets in if_input().mpi2015-06-241-3/+1
| | | | | | | Note that pseudo-drivers not using if_input() are not affected by this conversion. ok mikeb@, kettenis@, claudio@, dlg@
* Add support for em(4) on Teak 3020, a Tolopai (EP80579)dms2015-06-041-4/+9
| | | | | | | based devices. This introduces Realtek PHY into em driver code and is only a temporary solution to the problem. OK deraadt@
* Make sure the rx ring lwm is set to at least 4. As far as we know, allkettenis2015-05-121-3/+4
| | | | | | | | hardware variants need at least 4 descriptors on the rx ring to be able to receive packets. Should fix the issue reported by Christian Schulte on bugs@. ok mikeb@, sthen@
* The i211 does not support an external EEPROM only a OTPjsg2015-05-121-3/+5
| | | | | | | Internal Non-Volatile Memory (iNVM). Add support for reading words out of it instead of an EEPROM. From Patrick Wildt with some more offsets added.
* Disable the L1 ASPM link state to workaround errata with thebrad2015-02-111-2/+18
| | | | | | | | 82571 / 82572 controllers. As noticed in the Linux driver and there is related errata for that too. ok jsg@
* Disable the L0S and L1 ASPM link states to workaround errata with thebrad2015-02-111-1/+33
| | | | | | | | | | | | | | | | | 82573 / 82574 controllers. 82573.. 8 82573 Disappears in PCI Configuration Space When L0s and L1 PCIe Link States Are Enabled 41 Delay of Received Ethernet Packet During ASPM L1 82574.. 24. PCIe: Common Mode Voltage Shift During L1 Exit 25. Dropped Rx Packets From FreeBSD ok jsg@
* tweak the new if_input function so it takes an mbuf_list insteaddlg2015-02-091-3/+5
| | | | | | | | | of a single mbuf. this forces us to batch work between the hardware rx handlers and the stack. this includes a converstion of bge from ether_input to if_input. ok claudio@ pelikan@ mpi@
* Convert to if_input().mpi2015-02-081-9/+2
| | | | ok pelikan@, reyk@, blambert@, henning@
* - Add PCH2 and PCH LPT to the list of chips capable of only 9K jumbos.brad2015-01-281-4/+10
| | | | | | | | | - Updated PBA values for the 82574 controller (20KB) and ICH9/10 with jumbos (14KB). Tested by a few on 82574, ICH9 and PCH LPT From FreeBSD
* unifdef INETtedu2014-12-221-3/+1
|
* Copy over some recent commits from ix(4)..brad2014-11-191-20/+23
| | | | | | | | - remove pointless timeout_del/add dance in the interrupt handler - don't try to update the link status every second - Gather full statistics only when EM_DEBUG is defined ok mikeb@
* Revert part of the if_rxr diff that incorrectly moves RX ring tailmikeb2014-08-261-3/+3
| | | | | index update code from the buf_get success path to the do it all the time code path. Tested by millert; ok dlg, deraadt
* Some reallocarray() use; review Jean-Philippe Ouellet, patrick keshishianderaadt2014-07-131-5/+5
| | | | ok tedu
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-3/+3
| | | | after discussions with beck deraadt kettenis.
* cut things that relied on mclgeti for rx ring accounting/restriction overdlg2014-07-081-19/+26
| | | | | | | | | | to using if_rxr. cut the reporting systat did over to the rxr ioctl. tested as much as i can on alpha, amd64, and sparc64. mpi@ has run it on macppc. ok mpi@
* bus_dmamap_sync the rx ring once per em_rxeof call, rather than for everydlg2014-07-081-16/+16
| | | | | | | rx descriptor. slightly tweak by matthew tested on alpha and amd64
* in em_rxeof, when the ifp stack var is declared its initted to thedlg2014-07-081-3/+1
| | | | | | | right value out of the softc. then its assigned the same value again after the rest of the var decls. well, it used to be. not after this commit.
* em_rxeof is only called from em_intr, and only if IFF_RUNNING isdlg2014-07-081-4/+1
| | | | set. em_rxeof doesnt have to check that flag again.
* if em encounters a heavilty fragmented packet, it can (will) stall thedlg2014-07-071-2/+13
| | | | | | | entire tx path. if we try to bus_dmamap_load a very fragmented packet m_defrag it and try again. this is just like if_bge.c r1.355.
* em(4) receives jumbos by chaining its MCLBYTES sized descriptorsdlg2014-06-111-2/+3
| | | | | | | | | | | | | | together, so to receive a full 9000 byte frame, it needs 5 descriptors. its current mclgeti low watermark is 4. it appears that the chip will block if it has rxed a packet into its internal buffers waiting for descriptors. if you're at the lwm, that means you're DoSed. this raises the lwm so we can get at least two jumbos, ie, 10 descriptors. ok deraadt@
* match on 82580 quad fiber and add untested support forjsg2014-03-101-1/+6
| | | | | DH89XX/Cave Creek PCH which seem to function like a 82580 with some external Marvell PHYs.
* match on more i217/i218 variantsjsg2014-03-101-1/+5
|
* basic i210/i211 support (improved after looking at gollo@ i210 diff on misc)chris2014-02-221-10/+26
| | | | | | tested on Supermicro X10SLL ok jsg@
* Add initial support for i354 MAC and M88E1543 PHY.jsg2014-02-171-1/+4
| | | | | | | Currently treated the same as i350, i354 specific EEE settings and 2.5Gb backplane connections not properly handled yet. Tested by Andrew Lester on a Supermicro A1SRi-2758F.
* The few network drivers that called their children's (ie. mii PHYderaadt2013-12-281-2/+1
| | | | | drivers) activate functions at DVACT_RESUME time do not need to do so, since their PHYs are repaired by IFF_UP.
* Add a DVACT_WAKEUP op to the *_activate() API. This is called after thederaadt2013-12-061-4/+4
| | | | | | | | kernel resumes normal (non-cold, able to run processes, etc) operation. Previously we were relying on specific DVACT_RESUME op's in drivers creating callback/threads themselves, but that has become too common, indicating the need for a built-in mechanism. ok dlg kettenis, tested by a sufficient amount of people
* use a macro when testing for an ich8 family mac typejsg2013-11-271-7/+2
| | | | no binary change
* Initial support for the integrated Lynx Point and Lynx Point LP Ethernetjsg2013-11-211-2/+8
| | | | | | with external i217 and i218 PHYs. Requires a changed way of detecting the eeprom flash bank from FreeBSD as suggested by Masanobu SAITOH. Thanks to everyone who tested.
* Nathan Wheeler has an em which lacks a prom. Rather than fail when noderaadt2013-11-151-18/+1
| | | | | MAC address, continue on, because if_etherattach contains logic for this. ok mikeb
* Enable TX checksum offload; from brad@ with input from mikeb@.naddy2013-10-191-14/+6
| | | | Tested extensively by henning@ and myself.
* Correct the PBA size used for PCH adapters (26KB).brad2013-01-271-2/+2
| | | | | | From FreeBSD ok jsg@
* - Use IF_Gbps(1) instead of IF_Mbps(1000)brad2012-11-281-2/+2
| | | | | | | | | - Use IF_Mbps() instead of multiplying the link speed by a bare value - Remove a useless comment as baudrate is already handled properly - Remove some commented out bits of code - Use IF_Mbps() instead of the bare value ok sthen@
* we're not going to loop in rxeof here as well so remove the leftoversmikeb2012-08-161-9/+5
| | | | from brad, ok jsg
* revert previous; wrong diffmikeb2012-08-161-14/+2
|
* we're not going to loop in rxeof here as well so remove the leftoversmikeb2012-08-151-2/+14
| | | | from brad, ok jsg
* Add support for i350 based devices, based in part on Intel codejsg2012-05-171-7/+27
| | | | | | | | | | in FreeBSD. Workaround the apparently undocumented errata where the CRC is always stripped whether asked to or not, and take the FreeBSD workaround for a known errata when clearing the vlan filter. Thanks to Jens A. Griepentrog for donating a card. ok dlg@ mikeb@
* trigger tx start routine when link goes up to prevent a lockupmikeb2012-05-141-4/+4
| | | | | situation when send queue is full and no rx interrupt happen. initial diff and tests by erik lax, <erik at halon.se>, ok jsg
* 82571/82572 do not properly set byte enables 2 and 3 on MSIjsg2012-02-151-3/+6
| | | | | | | | | | | writes. Some (but not all) chipsets will fail to generate interrupts in this case, so do not attempt to enable MSI on 82571/82572. Problem reported by David Imhoff with interrupts working on PE1950 but not working on a R610. ok kettenis@ claudio@ deraadt@
* Add the remaining parts of support for 82580 based devices such asjsg2011-10-051-3/+35
| | | | | | | | | the Intel I340-T4 and HP NC365T and simplify some of the multi port handling while here. Thanks to fredrik danerklint for donating a card, Linden Varley for setting up a test system and everyone who made sure this didn't break their existing em setups.
* Don't OR the VID, we want the whole TCI, this makes vlanprio (PCP/CF)haesbaert2011-08-301-3/+2
| | | | | available to our network stack. ok mcbride naddy henning
* Stupid driver makes a copy of struct pci_attach_args. Make sure we clearkettenis2011-07-051-3/+3
| | | | | | | | the MSI enabled flag there such that the driver actually pays attention to it. Found out the hard way by Chris Smith on an 82540EM, which defenitely does not like MSI. ok deraadt@