summaryrefslogtreecommitdiff
path: root/drivers/net/e1000e/netdev.c
AgeCommit message (Collapse)Author
2008-05-22e1000e: use resource_size_t, not unsigned long, for phys addrsBecky Bruce
The use of unsigned long causes the driver to fail on 32-bit systems which support 64-bit resources. Signed-off-by: Becky Bruce <becky.bruce@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-06e1000e: Add support for BM PHYs on ICH9Bruce Allan
This patch adds support for the BM PHY, a new PHY model being used on ICH9-based implementations. This new PHY exposes issues in the ICH9 silicon when receiving jumbo frames large enough to use more than a certain part of the Rx FIFO, and this unfortunately breaks packet split jumbo receives. For this reason we re-introduce (for affected adapters only) the jumbo single-skb receive routine back so that people who do wish to use jumbo frames on these ich9 platforms can do so. Part of this problem has to do with CPU sleep states and to make sure that all the wake up timings are correctly we force them with the recently merged pm_qos infrastructure written by Mark Gross. (See http://lkml.org/lkml/2007/10/4/400). To make code read a bit easier we introduce a _IS_ICH flag so that we don't need to do mac type checks over the code. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-25e1000e: Increment version to 0.2.1Jesse Brandeburg
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-25e1000e: save and restore pcie/msi state to support EEH recoveryWendy Xiong
To enable EEH support for pci-express network adapters, pcie/msi state needs to be saved and restored for that adapter. Tested this EEH patch with 2ports and 4ports pci-express e1000e adapters. Signed-off-by: Wendy Xiong <wendyx@us.ibm.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-25e1000e: cleanup several stats issuesBruce Allan
Several stats registers are completely unused and we just waste pci bus time reading them. We also omit using the high 32 bits of the GORC/ GOTC counters. We can just read clear them and only read the low registers. Mii-tool can also break es2lan if it executes a MII PHY register ioctl while the device is in autonegotiation. Unfortunately it seems that several applications and installations still perform this ioctl call periodically and especially in this crucial startup time. We can fool the ioctl by providing fail safe information that mimics the "down" link state and only perform the dangerous PHY reads once after link comes up to fill in the real values. As long as link stays up the information will not change. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16e1000e: rename a few functionsJeff Kirsher
Several minor cosmetic function renames. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16e1000e: Make arrays out of these Rx/Tx registersJeff Kirsher
With multiple queues coming into the code these base control registers need to be made into arrays. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-03-28e1000e: reorganize PHY and flow control interfaceJeff Kirsher
This reorganization moves the PHY status into a separate struct. Flow Control setup is moved into this struct as well and frame size away from here into the adapter struct where its inly use is. The post-link-up code is now a separate function and moved out of the watchdog function itself. This allows us to track the es2lan restart issue a bit easier. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-28e1000e: rename mc_addr_list_updateJeff Kirsher
Rename this function to be consistent with function naming (verb first) Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-28e1000e: reformat comment blocks, cosmetic changes onlyBruce Allan
Adjusting the comment blocks here to be code-style compliant. no code changes. Changed some copyright dates to 2008. Indentation fixes. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-03-26e1000e: remove irq_semJesse Brandeburg
irq_sem can safely be removed by auditing all irq.*able sites to make sure that interrupts don't get enabled unexpectedly when the interface is down. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-24e1000e: remove unused read value in ASPM disable code.Auke Kok
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-24e1000e: fix spelling errors in commentsAuke Kok
Fix some spelling errors and inconsistencies in comment blocks. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-15e1000e: PCIe devices do not need to unset MANC_ARP_ENADavid Graham
Users reported that ARP's were lost with e1000e. The problem is fixed by not enabling this manageability configuration bit. None of the release_manageability code is actually needed as the normal device reset during a shutdown returns everthing to the right condition automatically. Signed-off-by: David Graham <david.graham@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-15e1000e: Fix CRC stripping in hardware context bugAuke Kok
CRC stripping was only correctly enabled for packet split recieves which is used when receiving jumbo frames. Correctly enable SECRC also for normal buffer packet receives. Tested by Andy Gospodarek and Johan Andersson, see bugzilla #9940. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11e1000e: Fix logic reversal keeping link activeAuke Kok
A logic mishap caused the adapter to keep link while we can disable it due to WoL not being active, and vice versa. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-03e1000e: tweak irq allocation messagesAndy Gospodarek
There's too much noise on systems that don't support MSI. Let's get rid of a few and make the real error message more specific. Signed-off-by: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28e1000e endianness annotationsAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28[E1000E]: update netstats traffic counters realtimeAuke Kok
formerly e1000/e1000e only updated traffic counters once every 2 seconds with the register values of bytes/packets. With newer code however in the interrupt and polling code we can real-time fill in these values in the netstats struct for users to see. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28e1000/e1000e: Move PCI-Express device IDs over to e1000eAuke Kok
e1000e will from now on support the PCI-Express adapters that previously were supported by e1000. This support means better performance and easier debugging from now on for both the old PCI-X/PCI hardware and PCI-Express adapters. This patch also moves 3 recently merged device IDs over to e1000e that are identical to quad-port versions of already existing dual port versions. With this last bit every former e1000 pci-e device should work now with e1000e. Here is a brief list of which gigabit driver to use with which adapter: e1000: 82540 -> 82547 e1000e: 82571 -> 82573 ich8, ich9 (82562 or 82566) es2lan (80003eslan) igb: (not yet merged, only available from e1000.sf.net) 82575 Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28e1000e: Disable L1 ASPM power savings for 82573 mobile variantsAuke Kok
L1 ASPM link (pci-e link power savings) has significant benefits (~1W savings when link is active) but unfortunately does not work correctly on any of the chipsets that have 82573 on mobile platforms which causes various nuisances: - eeprom reads return garbage information leading to bad eeprom checksums - long ping times (up to 2 seconds) - complete system hangs (freeze/lockup) A lot of T60 owners have been plagued by this, but other mobile solutions also suffer from these symptoms. Disabling L1 ASPM before we activate the PCI-E link fixes all of these issues at the cost of some power consumption. Remove a workaround RDTR adjustment that is no longer needed with this new one. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-20[NET]: Fix interrupt semaphore corruption in Intel drivers.David S. Miller
Several of the Intel ethernet drivers keep an atomic counter used to manage when to actually hit the hardware with a disable or an enable. The way the net_rx_work() breakout logic works during a pending napi_disable() is that it simply unschedules the poll even if it still has work. This can potentially leave interrupts disabled, but that is OK because all of the drivers are about to disable interrupts anyways in all such code paths that do a napi_disable(). Unfortunately, this trips up the semaphore used here in the Intel drivers. If you hit this case, when you try to bring the interface back up it won't enable interrupts. A reload of the driver module fixes it of course. So what we do is make sure all the sequences now go: napi_disable(); atomic_set(&adapter->irq_sem, 0); *_irq_disable(); which makes sure the counter is always in the correct state. Reported by Robert Olsson. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-17[NET]: Fix TX timeout regression in Intel drivers.David S. Miller
This fixes a regression added by changeset 53e52c729cc169db82a6105fac7a166e10c2ec36 ("[NET]: Make ->poll() breakout consistent in Intel ethernet drivers.") As pointed out by Jesse Brandeburg, for three of the drivers edited above there is breakout logic in the *_clean_tx_irq() code to prevent running TX reclaim forever. If this occurs, we have to elide NAPI poll completion or else those TX events will never be serviced. Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
2008-01-08[NET]: Make ->poll() breakout consistent in Intel ethernet drivers.David S. Miller
This makes the ->poll() routines of the E100, E1000, E1000E, IXGB, and IXGBE drivers complete ->poll() consistently. Now they will all break out when the amount of RX work done is less than 'budget'. At a later time, we may want put back code to include the TX work as well (as at least one other NAPI driver does, but by in large NAPI drivers do not do this). But if so, it should be done consistently across the board to all of these drivers. Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Auke Kok <auke-jan.h.kok@intel.com>
2008-01-08[NET]: Do not check netif_running() and carrier state in ->poll()David S. Miller
Drivers do this to try to break out of the ->poll()'ing loop when the device is being brought administratively down. Now that we have a napi_disable() "pending" state we are going to solve that problem generically. Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-29e1000e: Remove legacy jumbo frame receive codeAuke Kok
The legacy jumbo frame receive code is no longer needed since all hardware can do packet split and we're no longer offering a bypass kernel config option to disable packet split. Remove the unused code. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-29e1000e: Re-enable SECRC - crc strippingAuke Kok
This workaround code performed software stripping instead of the hardware which can do it much faster. None of the e1000e target hardware has issues with this feature and should work fine. This gives us some performance back on receive, and removes some kludging stripping the 4 bytes. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-29e1000e: Fix PBA calculation for jumbo frame packetsAuke Kok
Upon inspection the rx FIFO size calculation code was found to have 2 significant flaws: A superfluous minus sign resulting in the wrong size to be used for jumbo frames on 82573 and ich9, as well as that this code rewrote the read-only adapter->pba variable resulting in different values at each run. Without this patch jumbo's will work but performance will be awkward since the TX size is not adequate for two whole frames. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-29e1000e: Fix jumbo frame receive code.Auke Kok
Fix allocation and freeing of jumbo frames where several bugs were recently introduced by cleanups after we forked this code from e1000. This moves ps_pages to buffer_info where it really belongs and makes it a dynamically allocated array. The penalty is not that high since it's allocated outside of the buffer_info struct anyway. Without this patch all jumbo frames are completely broken and the driver panics. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10e1000e: restore flow control settings properlyAuke Kok
After a cable unplug the forced flow control settings were lost accidentally and the flow control settings fell back to the default EEPROM determined values. This breaks for people who want to run without fc enabled - after a cable reset the driver would refuse to run with fc disabled. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10e1000e: Simple optimizations in e1000_xmit_frameAuke Kok
After an e1000 patch from Krishna Kumar <krkumar2@in.ibm.com>. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10e1000e: fix debugging printout codeAuke Kok
A small bug crawled in the -DDEBUG enabled code. Fix this to properly call the backreference device name. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10e1000e: Do not allow requeue of freed skbKrishna Kumar
Returning BUSY will make qdisc_restart enqueue the skb which was already freed. The bad skb was correctly freed and we should return NETDEV_TX_OK. First spotted by Jeff Garzik on 08/13/07. Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10[NET]: Nuke SET_MODULE_OWNER macro.Ralf Baechle
It's been a useless no-op for long enough in 2.6 so I figured it's time to remove it. The number of people that could object because they're maintaining unified 2.4 and 2.6 drivers is probably rather small. [ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ] Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[E1000E]: New pci-express e1000 driver (currently for ICH9 devices only)Auke Kok
This driver implements support for the ICH9 on-board LAN ethernet device. The device is similar to ICH8. The driver encompasses code to support 82571/2/3, es2lan and ICH8 devices as well, but those device IDs are disabled and will be "lifted" from the e1000 driver over one at a time once this driver receives some more live time. Changes to the last snapshot posted are exclusively in the internal hardware API organization. Many thanks to Jeff Garzik for jumping in and getting this organized with a keen eye on the future layout. [ Integrated napi_struct patch from Auke as well... -DaveM ] Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>