summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/if_em.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Enable MSI on newish PCIe hardware, essentially everything handled by the Linuxkettenis2011-06-161-2/+6
| | | | | | | e1000e driver (which enables MSI as well), leaving everything handled by the old Linux e1000 driver (which doesn't enable MSI) use legacy interrupts. tested by many; ok jsg@
* Fix em_write_pci_cfg() and em_read_pci_cfg() to avoid unaligned access, andkettenis2011-06-031-12/+23
| | | | | | | | | | make em_write_pci_cfg() do a proper read/modify/write cycle, to avoid changing the neighbouring 16 bits. Also remove the comment in em_pci_set_mwi() and em_pci_clear_mwi(); writting 0 to the status bits in the command/status word is the right thing to do. Fixes a panic on sparc64 and other strict alignment architectures. ok deraadt@
* Add support for PCH2 (Sandy Bridge) MAC with 82579 PHY.jsg2011-04-221-2/+8
| | | | | | From Laurence Tratt. ok claudio@ deraadt@
* the mechanical part of 82580 support, more to comejsg2011-04-141-3/+12
| | | | ok claudio@
* modify the interrupt handler so it only processes the rings once,dlg2011-04-131-40/+32
| | | | | | | | | | | | | | | | | | | | | | | | | rather than looping over them until it runs out of work to do. looping in the isr is bad for several reasons: firstly, the chip does interrupt mitigation so you have a decent/predictable amount of work to do in the isr. your first loop will do that chunk of work (ie, it pulls off 50ish packets), and then the successive looping aggressively pull one or two packets off the rx ring. these extra loops work against the benefit that interrupt mitigation provides. bus space reads are slow. we should avoid doing them where possible (but we should always do them when necessary). doing the loop 5 times per isr works against the mclgeti semantics. it knows a nic is busy and therefore needs more rx descriptors by watching to see when the nic uses all of its descriptors between interrupts. if we're aggressively pulling packets off by looping in the isr then we're skewing this check. ok deraadt@ claudio@ this is like src/sys/dev/pci/if_ix.c r1.50.
* We only use the io space in em_reset_hw() on a few MAC typesjsg2011-04-051-2/+11
| | | | | | | | | | and it does not exist at all on newer hardware so only map it on those types we are interested in. Fixes "PRO/1000 PT (82575EB)" for Sylvain Desveaux and will also be required for at least 82580. ok claudio@
* mechanic rename M_{TCP|UDP}V4_CSUM_OUT -> M_{TCP|UDP}_CSUM_OUThenning2011-04-051-3/+3
| | | | ok claudio krw
* use nitems(); no binary change for drivers that are compiled on amd64.jasper2011-04-031-2/+2
| | | | ok claudio@
* HW stats debugging via ifconfig emX debug instead ofmpf2011-03-091-12/+3
| | | | | a global em_display_debug_stats variable. OK mcbride, matthew, deraadt, henning.
* Do not compile statistics counters code if defined(SMALL_KERNEL). Makes i386miod2011-02-131-1/+11
| | | | RAMDISKA breathe a bit better.
* add support for 82583V. Confirmed to work on Portwell CAD-0205.yasuoka2010-09-191-1/+2
| | | | ok jsg@
* remove the powerhook code. All architectures now use the ca_activate treederaadt2010-09-071-15/+1
| | | | | traversal code to suspend/resume ok oga kettenis blambert
* Add DVACT_QUIECE support. This is called before splhigh() and beforederaadt2010-08-311-2/+5
| | | | | | | | DVACT_SUSPEND, therefore DVACT_QUIECE can do standard sleeping operations to get ready. Discussed quite a while back with kettenis and jakemsr, oga suddenly needed it as well and wrote half of it, so it was time to finish it. proofread by miod.
* Have the em powerhook call the activate function, which does a way betterderaadt2010-08-271-16/+9
| | | | job of taking the chip up and down.
* Make sure hw.revision_id gets initialized before it's used by em_set_mac_type()kettenis2010-08-081-5/+4
| | | | | | | and move it back to the location where it was before rev. 1.239, while keeping the horrible override for em_pchlan. From Holger Mikolon. ok jsg@, deraadt@
* Correct a problem reported by Holger Mikolon that turns out to bejsg2010-08-041-4/+3
| | | | | | | | | a bug in the initial EP80579 commit from dms that was exposed by gcc4. Lots of help tracking down the block of code at fault from Mike Belopuhov, but I spotted the problem in the end :) ok kettenis@ deraadt@
* Disable hardware VLAN stripping/insertion on 8257[56] for now. Whilejsg2010-08-031-2/+3
| | | | | | | stripping works insertion seems to have trouble in certain conditions, which needs to be fixed before we want to enable hardware support for this. ok deraadt@
* Make sure we stop DMA before suspend instead of doing it as the first thingkettenis2010-07-261-2/+3
| | | | | | | we do upon resume and failing to cope with the fact that the state has changed under our feet. Fixes watchdog timeout issues in at least one case. ok deraadt@, tested by thib@
* Initial 82578 support from Mike Belopuhov.jsg2010-06-281-1/+3
| | | | ok claudio@
* More PCH/82577 bits from FreeBSD, this does not includejsg2010-06-271-4/+8
| | | | | | | | all the workarounds but is enough to make things run at faster than 10 Mbit speeds, though these aren't always reflecting in ifmedia properly just yet. ok claudio@
* Initial support for PCH based em adapters with 82577 PHY,jsg2010-06-211-2/+9
| | | | | | | | | | from Laurence Tratt based on FreeBSD code. Confirmed to work on lenovo t410i/t410s/x201. Desktop machines with PCH tend to be paired with a 82578 PHY, these will at some point be supported but not yet. ok claudio@
* Add some more ids for existing mac and phy types foundjsg2010-06-211-1/+6
| | | | | | in the FreeBSD driver. ok claudio@
* Add as yet untested support for the 82576 quad copper ET2jsg2010-05-181-1/+2
| | | | | | based on information in the linux driver. ok claudio@
* Set rx_ndescs to zero when initializing the rx ring. Otherwise we'llkettenis2010-03-161-1/+2
| | | | | | | | effectively lose receive descriptors each time we reset the interface, until we run out of descriptors and panic. Should fix the "em_rxeof: NULL mbuf in slot 0 (nrx 256, filled 255)" panic on em(4). ok jsing@ (for the em(4) bits), jsg@
* Zap trailing whitespace. From Brad.sthen2009-12-021-7/+7
|
* Fix an issue where 82573L based em(4) devices had long latencies on thedms2009-11-261-1/+8
| | | | | | | | recieved packets. fix from intel drivers, via Brad ok claudio@, deraadt@
* em_stop() removes IFF_RUNNING flag, so we should rely on the IFF_UP being setdms2009-11-261-2/+2
| | | | ok deraadt@
* unbrak previousdms2009-11-261-1/+2
| | | | ok deraadt@
* handle DV_SUSPEND and DV_RESUMEdms2009-11-261-2/+24
| | | | | tested by deraadt@ and me ok deraadt@
* Add support for em(4) interfaces found on intel EP80579 SoC. The MAC part isdms2009-11-251-13/+93
| | | | | | | | | | | | | | basicly 82545, but the PHY's are separated form the chip and they are accessed through a special PCI device called GCU which has the MDIO interface. Since there is no direct relationship between MAC and PHY, so for the moment they are assigned to each other the way its done on Axiomtek NA-200, that was danted to us by them. This also adds a device driver for the GCU. tested by me on Axiomtek board reviewed by claudio@, kettenis@, deraadt@ 'commit that as is' deraadt@
* Start doing the neccessary operations in the detach function in the right order.deraadt2009-10-131-16/+25
| | | | No other functional change expected. ok dms
* remove duplicate ierrors increment (rx_overruns gets incremented) which wasdms2009-10-111-2/+1
| | | | | | introduced in rev. 1.204. from brad ok by claudio@
* add support for ICH9 M V chipset, from brad.dms2009-10-111-1/+2
| | | | ok by claudio@
* Again, in detatch... call whatever disconnects our interrupt, before wederaadt2009-10-101-2/+2
| | | | go messing with the maps. Only affects my disconnectable em(4).
* Must also timeout_del twice in detach()...deraadt2009-10-091-1/+4
|
* A working detach function. Has no impact on anything else in the driver.deraadt2009-10-091-2/+22
|
* Bring back support for iCH10 based chips. This time support for fiber cardsdms2009-09-041-5/+15
| | | | | | | | | | | | | seems to be fixed, thanks to tests done by mpf at mailq dot de. Also support for older fiber cards that have no PHY seems to be working, thanks to claudio@ The code includes all the changes that i backed out, plus two tweaks: 1. em_detect_gig_phy() gets called in em_setup_link() instead of em_copper_link_preconfig(), this enables phy detection on fiber cards. 2. em_detect_gig_phy() gets a condition to look for old fiber cards, that have no PHY. ok by claudio@, prodded by deraadt@
* Back-out support for iCH10 chips from em(4).dms2009-08-211-15/+5
| | | | | | | It seems that new phy detection code breaks some of the newer fiber cards. found by Brad, ok by claudio@
* - consistify cfdriver for the ethernet drivers (0 -> NULL)jasper2009-08-131-2/+2
| | | | ok dlg@
* revert my change to m_cluncount which tries to prevent the systemdlg2009-08-121-5/+3
| | | | | | | | | | running out of mbufs for rx rings. if the system low watermark is lower than a rx rings low watermark, we'll never send a packet up the stack, we'll always recycle it. found by thib@ on a bge sadface
* if we get dangerously low on clusters during interrupts, we needdlg2009-08-121-3/+5
| | | | | | | | | | | | | to free some for use on the rx rings on network cards. this modifies m_cluncount to advise callers when we're in such a situation, and makes them responsible for freeing up the cluster for allocation by MCLGETI later. fixes an awesome lockup with sis(4) henning has been experiencing. this is not the best fix, but it is better than the current situation. yep deraadt@ tested by henning@
* A few more simple cases of shutdown hooks which only call xxstop, whenderaadt2009-08-101-17/+1
| | | | we now know the interface has already been stopped
* MCLGETI() will now allocate a mbuf header if it is not provided, thusderaadt2009-08-091-9/+3
| | | | | | reducing the amount of splnet/splx dancing required.. especially in the worst case (of m_cldrop) ok dlg kettenis damien
* Split comment from lint keyword. OK dms@claudio2009-07-271-2/+3
|
* Support the ICH10 variants of em(4). All the work done by Dariusz Swiderskiclaudio2009-06-261-5/+15
| | | | with help from Brad. OK deraadt@
* Add support for the 82574L chips and the bme1000 phy which is also used onclaudio2009-06-231-1/+6
| | | | | | some newer ICH* chips. All the hard work done by Dariusz Swiderski sfires (at) sfires.net, tested by myself, sthen@ and many more. Eyeballed and OK dlg@ kettenis@
* tidy up promiscuous mode and multicast handling; from Brad; ok sthen@naddy2009-06-051-57/+20
|
* Match em(4) against all the newer chips (82575/6) and treat them all theclaudio2009-06-041-2/+4
| | | | | same. Not sure if the 82576 is 100% compatible to the 82575 but only when enabled it will be possible to test them. OK jsg@
* Add support for the newer 82575 and maybe 82576 chips. The cards work moreclaudio2009-06-031-9/+25
| | | | | | or less out of the box if one explicitly enables the TX DMA engine. Only tested with 82575, people with 82576 cards may contact me for a diff. OK kettenis@
* doubled error messages are sillyderaadt2009-05-311-5/+2
|