aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/e1000
AgeCommit message (Collapse)Author
2008-11-16e1000: Use device_set_wakeup_enable\"Rafael J. Wysocki\
Since dev->power.should_wakeup bit is used by the PCI core to decide whether the device should wake up the system from sleep states, set/unset this bit whenever WOL is enabled/disabled using e1000_set_wol(). Accordingly, use device_can_wakeup() for checking if wake-up is supported by the device. Signed-off-by: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-11e1000: allow VLAN devices to use TSO and CSUM offloadPatrick McHardy
This patch changes e1000 to set vlan_features so TSO and CSUM offload can be used by VLAN devices, similar as with the other Intel drivers. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-09e1000: don't generate bad checksums for tcp packets with 0 csumDave Graham
When offloading transmit checksums only, the driver was not correctly configuring the hardware to handle the case of a zero checksum. For UDP the correct behavior is to leave it alone, but for tcp the checksum must be changed from 0x0000 to 0xFFFF. The hardware takes care of this case but only if it is told the packet is tcp. same patch as e1000e Signed-off-by: Dave Graham <david.graham@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-01Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/ath9k/core.c drivers/net/wireless/ath9k/main.c net/core/dev.c
2008-09-24e1000: remove unused Kconfig option for disabling packet splitBrandeburg, Jesse
Since the e1000/e1000e split, no hardware supported by e1000 supports packet split, just remove the Kconfig option and associated code from the driver. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-09-18e1000: prevent corruption of EEPROM/NVMChristopher Li
Andrey reports e1000 corruption, and that a patch in vmware's ESX fixed it. The EEPROM corruption is triggered by concurrent access of the EEPROM read/write. Putting a lock around it solve the problem. [akpm@linux-foundation.org: use DEFINE_SPINLOCK to avoid confusing lockdep] Signed-off-by: Christopher Li <chrisl@vmware.com> Reported-by: Andrey Borzenkov <arvidjaar@mail.ru> Cc: Zach Amsden <zach@vmware.com> Cc: Pratap Subrahmanyam <pratap@vmware.com> Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Cc: Jesse Brandeburg <jesse.brandeburg@intel.com> Cc: Bruce Allan <bruce.w.allan@intel.com> Cc: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com> Cc: John Ronciak <john.ronciak@intel.com> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-08-27e1000: fix stack sizeLinus Torvalds
Here's the patch. It shrinks the stack from 1152 bytes to 192 bytes (the first version, that only did the e1000_option part, got it down to 600 bytes). About half comes from not using multiple "e1000_option" structures, the other half comes from turning the "e1000_opt_list[]" arrays into "static const" instead, so that gcc doesn't copy them onto the stack. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Reveiewed-by: Auke Kok <auke-jan.h.kok@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-22e1000: make ioport freeTaku Izumi
This patch makes e1000 driver ioport-free. This corrects behavior in probe function so as not to request ioport resources as long as they are not really needed. This is based on the ioport-free patch of e1000 driver from Auke Kok and Tomohiro Kusumi. Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@jp.fujitsu.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com> Signed-off-by: Jeff Kirsher<jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-22e1000: delete non NAPI code from the driverFrancois Romieu
Compile-tested only. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-22e1000: remove email referenceJeff Kirsher
The email linux-nics@intel.com is no longer available, remove all references. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-22e1000: Move assignments in tests before testJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-22e1000: checkpatch cleanJoe Perches
Redefine DPRINTK macro using do while(0) __FUNCTION__ to __func__ structs {} on separate lines Surround negative constants with () Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-22e1000: Remove spaces after casts and function namesJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-22e1000: Move extern function definitions to e1000.hJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-22e1000: Use hw, er32, and ew32Joe Perches
Use struct e1000_hw *hw = adapter->hw; where necessary Change macros E1000_READ_REG and E1000_WRITE_REG to er32 and ew32 Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-22e1000: neaten function declarationsJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-07-18e1000: resolve tx multiqueue bugBen Hutchings
With the recent changes to tx mutiqueue, e1000 was not calling netif_start_queue() before calling netif_wake_queue(). This causes an oops during loading of the driver. (Based on commit d55b53fff0c2ddb639dca04c3f5a0854f292d982 ("igb/ixgbe/e1000e: resolve tx multiqueue bug").) Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-16netdrv intel: always enable VLAN filtering except in promiscous modePatrick McHardy
Currently VLAN filtering is enabled when the first VLAN is added. Obviously before that there's no point in receiving any VLAN packets. Now that we disable VLAN filtering in promiscous mode, we can keep the VLAN filters enabled the remaining time. Signed-off-by: Patrick McHardy <kaber@trash.net> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-16netdrv intel: disable VLAN filtering in promiscous modePatrick McHardy
As discussed in this thread: http://www.mail-archive.com/netdev@vger.kernel.org/msg53976.html promiscous mode means to disable *all* filters. Currently only unicast and multicast filtering is disabled. This patch changes all Intel drivers to also disable VLAN filtering. Signed-off-by: Patrick McHardy <kaber@trash.net> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-06netdrv: don't truncate VLAN TCI with VLAN strippingPatrick McHardy
The vlan_hwaccel_{rx,receive_skb} functions expect the full TCI field for priority mappings, don't truncate the upper 4 bits. Signed-off-by: Patrick McHardy <kaber@trash.net> Acked-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-28Merge branch 'davem-next' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
2008-06-28e1000: remove e1000_clean_tx_irq call from e1000_netpollAndy Gospodarek
The call to e1000_clean_tx_irq in e1000_netpoll can race with the call to e1000_clean_tx_irq in e1000_clean. With a small bit of tweaking to to netpoll_send_skb to simulate a system that was under extreme stress, I was able to reproduce these concurrent calls. This can result in multiple frees to the skbs on the tx ring buffer. Dropping this call from e1000_netpoll should be fine since we can rely on the calls in e1000_clean to do what is needed since napi will poll the hardware just after calling poll_controller. Signed-off-by: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-28e1000: remove PCI Express device IDsAuke Kok
We do not want to prolong the situation much longer that e1000 and e1000e support these devices at the same time. As a result, take out the bandage that was added for the interim period and remove all the PCI Express device IDs from e1000. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-27e1000: only enable TSO6 via ethtool when using correct hardwareAndy Gospodarek
When enabling TSO via ethool on e1000, it is possible to set NETIF_F_TSO6 on hardware that does not support it. Setting TSO via ethtool now matches the settings used when the hardware is probed. Signed-off-by: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-16e1000: convert uint16_t style integers to u16Joe Perches
Conglomerate from 4 separate patches from Joe. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-03-26e1000: remove irq_semJesse Brandeburg
irq_sem was just a hack to prevent interrupts from being enabled unexpectedly in deep call paths. Simply finding those call paths and fixing them by hand results in a driver that behaves as we expect and doesn't need the atomic at all. 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-26e1000: Convert boolean_t to boolJoe Perches
On Thu, 2008-03-06 at 10:07 -0800, Kok, Auke wrote: > send me a patch for e1000 and for ixgb and I'll happily apply those :) boolean_t to bool TRUE to true FALSE to false comment typo ahread to ahead Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11e1000: warn if this driver is used for e1000e devicesAuke Kok
We're already starting to see reports from users still using e1000 where they should be using e1000e now that this is actually possible. Just to prevent some of this thrash, add a big warning on load on these devices that people should switch to e1000e. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11replace code with FIELD_SIZEOFJulia Lawall
Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-11e1000: Fix for 32 bits platforms with 64 bits resourcesBenjamin Herrenschmidt
The e1000 driver stores the content of the PCI resources into unsigned long's before ioremapping. This breaks on 32 bits platforms that support 64 bits MMIO resources such as ppc 44x. This fixes it by removing those temporary variables and passing directly the result of pci_resource_start/len to ioremap. The side effect is that I removed the assignments to the netdev fields mem_start, mem_end and base_addr, which are totally useless for PCI devices. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> -- drivers/net/e1000/e1000_main.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-02-03e1000: make e1000_dump_eeprom() staticAdrian Bunk
This patch makes the needlessly global e1000_dump_eeprom() static. Signed-off-by: Adrian Bunk <bunk@kernel.org> 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-31[net] Gracefully handle shared e1000/1000e driver PCI ID'sLinus Torvalds
Both the old e1000 driver and the new e1000e driver can drive some PCI-Express e1000 cards, and we should avoid ambiguity about which driver will pick up the support for those cards when both drivers are enabled. This solves the problem by having the old driver support those cards if the new driver isn't configured, but otherwise ceding support for PCI Express versions of the e1000 chipset to the newer driver. Thus allowing both legacy configurations where only the old driver is active (and handles all chips it knows about) and the new configuration with the new driver handling the more modern PCIE variants. Acked-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-30Mostly revert "e1000/e1000e: Move PCI-Express device IDs over to e1000e"Linus Torvalds
The new e1000e driver is apparently not yet suitable for general use, so mark it experimental, and re-instate all the PCI-Express device IDs in the old and stable e1000 driver so that people (namely me) can continue to use a driver that actually works. Auke & co have been appraised of the situation. Cc: Auke Kok <auke-jan.h.kok@intel.com> Cc: Jeff Garzik <jeff@garzik.org> Cc: David Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-28e1000: Dump the eeprom when a user encounters a bad checksumAuke Kok
To help supporting users with a bad eeprom checksum, dump the eeprom info when such a situation is encountered by a user. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28e1000: remove no longer used code for pci read/write cfgAdrian Bunk
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28e1000 endianness annotationsAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2008-01-28[netdrvr] checkpatch cleanupsJeff Garzik
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28[E1000]: Secondary unicast address supportPatrick McHardy
Add support for configuring secondary unicast addresses. Unicast addresses take precendece over multicast addresses when filling the exact address filters to avoid going to promiscous mode. When more unicast addresses are present than filter slots, unicast filtering is disabled and all slots can be used for multicast addresses. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28[E1000]: Convert regtest macro's to functionsJoe Perches
Minimal macro to function conversion in e1000_ethtool.c Adds functions reg_pattern_test and reg_set_and_check Changes REG_PATTERN_TEST and REG_SET_AND_CHECK macros to call these functions. Saves ~2.5KB Compiled x86, untested (no hardware) old: $ size drivers/net/e1000/e1000_ethtool.o text data bss dec hex filename 16778 0 0 16778 418a drivers/net/e1000/e1000_ethtool.o new: $ size drivers/net/e1000/e1000_ethtool.o text data bss dec hex filename 14128 0 0 14128 3730 drivers/net/e1000/e1000_ethtool.o Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28[E1000]: 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-28netdev: use ARRAY_SIZE() instead of sizeof(array) / ETH_GSTRING_LENAlejandro Martinez Ruiz
Using ARRAY_SIZE() on arrays of the form array[][K] makes it unnecessary to know the value of K when checking its size. Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org> 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-12-07e1000: fix memcpy in e1000_get_stringsRoel Kluin
drivers/net/e1000/e1000_ethtool.c:113: #define E1000_TEST_LEN sizeof(e1000_gstrings_test) / ETH_GSTRING_LEN drivers/net/e1000e/ethtool.c:106: #define E1000_TEST_LEN sizeof(e1000_gstrings_test) / ETH_GSTRING_LEN E1000_TEST_LEN*ETH_GSTRING_LEN will expand to sizeof(e1000_gstrings_test) / (ETH_GSTRING_LEN * ETH_GSTRING_LEN) A lack of parentheses around defines causes unexpected results due to operator precedences. Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-12-01e1000: Fix NAPI state bug when Rx completeAuke Kok
Don't exit polling when we have not yet used our budget, this causes the NAPI system to end up with a messed up poll list. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-11-13[E1000]: Fix schedule while atomic when called from mii-tool.Jesse Brandeburg
mii-tool can cause the driver to call msleep during nway reset, bugzilla.kernel.org bug 8430. Fix by simply calling reinit_locked outside of the spinlock, which is safe from ethtool, so it should be safe from here. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-30e1000: sparse warnings fixesStephen Hemminger
Fix sparse warnings and problems from e1000 driver. Added a sparse fix for the module param array index -- Auke Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>