aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-07-06e1000: fix flow control thresholdsJesse Brandeburg3-30/+33
when testing the jumbo frames with pages patch, the stats would show rx_missed errors (dropped packets) even when connected to a link partner with flow control enabled. this indicates that for this MTU (9000) the flow control thresholds are not adjusting correctly. In fact, before this change, the FCRTH (xoff threshold) is 36864 when the fifo size is only 40000, with 9000 byte MTU. fix it so that we at least have room for one frame after we send the xoff. 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>
2009-07-06e1000: implement jumbo receive with partial descriptorsJesse Brandeburg2-38/+391
This is code extremely similar to what is committed in e1000e already. e1000 will no longer request 32kB slab buffers to support jumbo frames on PCI/PCI-X adapters. This will significantly reduce the likelyhood of order:3 allocation failures. This new code adds support for using pages as receive buffers, and the driver will chain multiple pages together to build a jumbo frame for OS consumption. The hardware takes a power of two buffer size and will dump as much data as it can receive into 1 or more buffers. The benefits of applying this are 1) stop akpm's dissing :-) of this lame e1000 behavior [1] 2) more efficient memory allocation (half) when using jumbo frames, which will also allow for much better socket utilization with jumbos since the socket is charged for the full allocation of each receive buffer, regardless of how much is used. 3) this was a feature request by a customer 4) copybreak for small packets < 256 bytes still applies [1] http://lkml.org/lkml/2008/7/10/68 http://article.gmane.org/gmane.linux.network/130986 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> CC: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-06e1000: allow ethtool coalesece to adjust interrupts per secondJesse Brandeburg2-1/+53
This patch allows on-the-fly adjustment of the interrupts per second generated by e1000 devices 82545/82546 (hardware support of ITR register is a requirement) adjust using this command: ethtool -C eth0 rx-usecs 10 where 10 is 10 microseconds per interrupt interval, so 10 = 100,000 interrupts per second, and 125 = 8000 interrupts per second. changes should be immediate. 1,3 are special values and indicate the automatic tuning mode to the driver, where 1 is 4000-90000 interrupts per second and 3 is 4000-20000 interrupts per second and is the driver default. 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>
2009-06-30e1000: return PCI_ERS_RESULT_DISCONNECT on permanent errorAndre Detsch1-0/+3
PCI drivers that implement the io_error_detected callback should return PCI_ERS_RESULT_DISCONNECT if the state passed in is pci_channel_io_perm_failure. This state is not checked in many of the network drivers. The patch fixes the omission in the e1000 driver. Based on Mike Mason's similar patch for e1000e. Signed-off-by: Andre Detsch <adetsch@br.ibm.com> CC: Mike Mason <mmlnx@us.ibm.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-30e1000: fix unmap bugJesse Brandeburg1-1/+7
as reported by kerneloops.org [ 121.781161] ------------[ cut here ]------------ [ 121.781171] WARNING: at lib/dma-debug.c:793 check_unmap+0x14e/0x577() [ 121.781173] Hardware name: S5520HC [ 121.781177] e1000 0000:0a:00.0: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x00000001d688b0fa] [size=1522 bytes] [ 121.781180] Modules linked in: e1000 mdio dca [last unloaded: ixgbe] [ 121.781187] Pid: 4793, comm: bash Tainted: P 2.6.30-master-06161113 #3 [ 121.781190] Call Trace: [ 121.781195] [<ffffffff8123056f>] ? check_unmap+0x14e/0x577 [ 121.781201] [<ffffffff81057a19>] warn_slowpath_common+0x77/0x8f [ 121.781205] [<ffffffff81057ae1>] warn_slowpath_fmt+0x9f/0xa1 [ 121.781212] [<ffffffff81477ce2>] ? _spin_lock_irqsave+0x3f/0x49 [ 121.781216] [<ffffffff8122fa97>] ? get_hash_bucket+0x28/0x33 [ 121.781220] [<ffffffff8123056f>] check_unmap+0x14e/0x577 [ 121.781225] [<ffffffff810e4f48>] ? check_bytes_and_report+0x38/0xcb [ 121.781230] [<ffffffff81230bbf>] debug_dma_unmap_page+0x80/0x92 [ 121.781234] [<ffffffff8122e549>] ? unmap_single+0x1a/0x4e [ 121.781239] [<ffffffff813901e1>] ? __kfree_skb+0x74/0x78 [ 121.781250] [<ffffffffa00662ef>] pci_unmap_single+0x64/0x6d [e1000] [ 121.781259] [<ffffffffa0066344>] e1000_clean_rx_ring+0x4c/0xbf [e1000] [ 121.781268] [<ffffffffa00663df>] e1000_clean_all_rx_rings+0x28/0x36 [e1000] [ 121.781277] [<ffffffffa0067464>] e1000_down+0x138/0x141 [e1000] [ 121.781286] [<ffffffffa00681c2>] __e1000_shutdown+0x6b/0x198 [e1000] [ 121.781296] [<ffffffffa0068405>] e1000_suspend+0x17/0x50 [e1000] [ 121.781301] [<ffffffff81237665>] pci_legacy_suspend+0x3b/0xbe [ 121.781305] [<ffffffff81237bc6>] pci_pm_suspend+0x3e/0xf1 [ 121.781310] [<ffffffff812eaf1c>] pm_op+0x57/0xde [ 121.781314] [<ffffffff812eb444>] dpm_suspend_start+0x31e/0x470 [ 121.781319] [<ffffffff810877da>] suspend_devices_and_enter+0x3e/0x1a2 [ 121.781323] [<ffffffff81087a0f>] enter_state+0xd1/0x127 [ 121.781327] [<ffffffff8108717a>] state_store+0xa7/0xc9 [ 121.781332] [<ffffffff81221843>] kobj_attr_store+0x17/0x19 [ 121.781336] [<ffffffff8113c01e>] sysfs_write_file+0xe5/0x121 [ 121.781341] [<ffffffff810ed165>] vfs_write+0xab/0x105 [ 121.781344] [<ffffffff810ed279>] sys_write+0x47/0x6d [ 121.781349] [<ffffffff81027aab>] system_call_fastpath+0x16/0x1b [ 121.781352] ---[ end trace 97bacaaac2ed7786 ]--- Fix is to correctly zero out internal ->dma value when unmapping and make sure never to unmap unless there specifically was a mapping done. 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>
2009-06-18net: group address list and its countJiri Pirko1-2/+2
This patch is inspired by patch recently posted by Johannes Berg. Basically what my patch does is to group list and a count of addresses into newly introduced structure netdev_hw_addr_list. This brings us two benefits: 1) struct net_device becames a bit nicer. 2) in the future there will be a possibility to operate with lists independently on netdevices (with exporting right functions). I wanted to introduce this patch before I'll post a multicast lists conversion. Signed-off-by: Jiri Pirko <jpirko@redhat.com> drivers/net/bnx2.c | 4 +- drivers/net/e1000/e1000_main.c | 4 +- drivers/net/ixgbe/ixgbe_main.c | 6 +- drivers/net/mv643xx_eth.c | 2 +- drivers/net/niu.c | 4 +- drivers/net/virtio_net.c | 10 ++-- drivers/s390/net/qeth_l2_main.c | 2 +- include/linux/netdevice.h | 17 +++-- net/core/dev.c | 130 ++++++++++++++++++-------------------- 9 files changed, 89 insertions(+), 90 deletions(-) Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-08net: skb_shared_info optimizationEric Dumazet1-2/+2
skb_dma_unmap() is quite expensive for small packets, because we use two different cache lines from skb_shared_info. One to access nr_frags, one to access dma_maps[0] Instead of dma_maps being an array of MAX_SKB_FRAGS + 1 elements, let dma_head alone in a new dma_head field, close to nr_frags, to reduce cache lines misses. Tested on my dev machine (bnx2 & tg3 adapters), nice speedup ! Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-03Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-2/+3
Conflicts: drivers/net/forcedeth.c
2009-06-02e1000: add missing length check to e1000 receive routineNeil Horman1-2/+3
Patch to fix bad length checking in e1000. E1000 by default does two things: 1) Spans rx descriptors for packets that don't fit into 1 skb on recieve 2) Strips the crc from a frame by subtracting 4 bytes from the length prior to doing an skb_put Since the e1000 driver isn't written to support receiving packets that span multiple rx buffers, it checks the End of Packet bit of every frame, and discards it if its not set. This places us in a situation where, if we have a spanning packet, the first part is discarded, but the second part is not (since it is the end of packet, and it passes the EOP bit test). If the second part of the frame is small (4 bytes or less), we subtract 4 from it to remove its crc, underflow the length, and wind up in skb_over_panic, when we try to skb_put a huge number of bytes into the skb. This amounts to a remote DOS attack through careful selection of frame size in relation to interface MTU. The fix for this is already in the e1000e driver, as well as the e1000 sourceforge driver, but no one ever pushed it to e1000. This is lifted straight from e1000e, and prevents small frames from causing the underflow described above Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Tested-by: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29net: convert unicast addr listJiri Pirko1-9/+15
This patch converts unicast address list to standard list_head using previously introduced struct netdev_hw_addr. It also relaxes the locking. Original spinlock (still used for multicast addresses) is not needed and is no longer used for a protection of this list. All reading and writing takes place under rtnl (with no changes). I also removed a possibility to specify the length of the address while adding or deleting unicast address. It's always dev->addr_len. The convertion touched especially e1000 and ixgbe codes when the change is not so trivial. Signed-off-by: Jiri Pirko <jpirko@redhat.com> drivers/net/bnx2.c | 13 +-- drivers/net/e1000/e1000_main.c | 24 +++-- drivers/net/ixgbe/ixgbe_common.c | 14 ++-- drivers/net/ixgbe/ixgbe_common.h | 4 +- drivers/net/ixgbe/ixgbe_main.c | 6 +- drivers/net/ixgbe/ixgbe_type.h | 4 +- drivers/net/macvlan.c | 11 +- drivers/net/mv643xx_eth.c | 11 +- drivers/net/niu.c | 7 +- drivers/net/virtio_net.c | 7 +- drivers/s390/net/qeth_l2_main.c | 6 +- drivers/scsi/fcoe/fcoe.c | 16 ++-- include/linux/netdevice.h | 18 ++-- net/8021q/vlan.c | 4 +- net/8021q/vlan_dev.c | 10 +- net/core/dev.c | 195 +++++++++++++++++++++++++++----------- net/dsa/slave.c | 10 +- net/packet/af_packet.c | 4 +- 18 files changed, 227 insertions(+), 137 deletions(-) Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-29net: dont update dev->trans_startEric Dumazet1-1/+0
Second round of drivers for Gb cards (and NIU one I forgot in the 10GB round) Now that core network takes care of trans_start updates, dont do it in drivers themselves, if possible. Drivers can avoid one cache miss (on dev->trans_start) in their start_xmit() handler. Exceptions are NETIF_F_LLTX drivers Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-05-08Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-1/+1
Conflicts: include/net/tcp.h
2009-05-07e1000/e1000e/igb/ixgb: don't txhang after link downJesse Brandeburg1-0/+2
after the recent changes to wired drivers to use only netif_carrier_off the driver can have outstanding tx work to complete that will never complete once link is down. Since the intel hardware will hold this tx work forever, the driver notices a tx timeout condition internally and might try to instigate printk and reset of the part with a netif_stop_queue, which doesn't work because link is down. Don't bother arming to tx hang detection when link is down. 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>
2009-05-04e1000: fix virtualization bugJesse Brandeburg1-1/+1
a recent fix to e1000 (commit 15b2bee2) caused KVM/QEMU/VMware based virtualized e1000 interfaces to begin failing when resetting. This is because the driver in a virtual environment doesn't get to run instructions *AT ALL* when an interrupt is asserted. The interrupt code runs immediately and this recent bug fix allows an interrupt to be possible when the interrupt handler will reject it (due to the new code), when being called from any path in the driver that holds the E1000_RESETTING flag. the driver should use the __E1000_DOWN flag instead of the __E1000_RESETTING flag to prevent interrupt execution while reconfiguring the hardware. 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>
2009-04-22e1000/e1000e/igb/ixgb: do not use netif_wake_queue un-necessarilyJesse Brandeburg1-2/+2
It was pointed out that the Intel wired ethernet drivers do not need to wake the tx queue since netif_carrier_on/off will take care of the qdisc management in order to guarantee the correct handling of the transmit routine enable state. 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>
2009-04-21Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-3/+3
Conflicts: net/core/dev.c
2009-04-20e1000: init link state correctlyJesse Brandeburg1-4/+5
As reported by Andrew Lutomirski <amluto@gmail.com> All the intel wired ethernet drivers were calling netif_carrier_off and netif_stop_queue (or variants) before calling register_netdevice This is incorrect behavior as was pointed out by davem, and causes ifconfig and friends to report a strange state before first link after the driver was loaded. This apparently confused *some* versions of networkmanager. Andy tested this for e1000e and confirmed it was working for him. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Reported-by: Andrew Lutomirski <amluto@gmail.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-17e1000: fix transmit routine exit bugJesse Brandeburg1-3/+3
If the e1000 transmit cleanup inner loop exited early, then cleaned might not be true. This could cause tx hangs or other badness. Use count to track the total number of descriptors cleaned instead of basing a tx queue restart off of a temporary working state variable. This code now makes the flow the same for e1000/e1000e/igb/ixgbe 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>
2009-04-16NET/e1000: Fix powering off during shutdownRafael J. Wysocki1-13/+33
Prevent e1000 from putting the adapter into D3 during shutdown except when we're going to power off the system, since doing that may generally cause problems with kexec to happen (such problems were observed for igb and forcedeth). For this purpose seperate e1000_shutdown() from e1000_suspend() and use the appropriate PCI PM callbacks in both of them. 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>
2009-04-14e1000/e1000: fix compile warningJesse Brandeburg1-1/+1
e1000/e1000e compile report a possible unused variable, fix that for now. Shortly after this a small refactor and bug fix will follow in the same code. 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>
2009-04-07dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)Yang Hongyang1-2/+2
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07dma-mapping: replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64)Yang Hongyang1-2/+2
Replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64) Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-04e1000: fix loss of multicast packetsJesse Brandeburg1-8/+26
e1000 (and e1000e, igb, ixgbe, ixgb) all do a series of operations each time a multicast address is added. The flow goes something like 1) stack adds one multicast address 2) stack passes whole current list of unicast and multicast addresses to driver 3) driver clears entire list in hardware 4) driver programs each multicast address using iomem in a loop This was causing multicast packets to be lost during the reprogramming process. reference with test program: http://kerneltrap.org/mailarchive/linux-netdev/2009/3/14/5160514/thread Thanks to Dave Boutcher for his report and test program. This driver fix prepares an array all at once in memory and programs it in one shot to the hardware, not requiring an "erase" cycle. 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>
2009-03-26e1000: fix close race with interruptJesse Brandeburg1-4/+24
this is in regards to http://bugzilla.kernel.org/show_bug.cgi?id=12876 where it appears that e1000 can leave its interrupt enabled after exiting the driver. Fix the bug by making the interrupt enable paths more aware of the driver exiting. Thanks to Alan Cox for the poke and initial investigation. CC: Alan Cox <alan@lxorguk.ukuu.org.uk> 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>
2009-03-26e1000: cleanup clean_tx_irq routine so that it completely cleans ringAlexander Duyck1-12/+9
The tx cleanup routine was stopping after 64 packets and this was causing issues resulting in the ring not being completely cleaned. This change updates the driver to clean the entire ring and if it doesn't it then will retry on the next pass. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-26e1000: fix tx hang detect logic and address dma mapping issuesAlexander Duyck1-25/+30
This patch changes the dma mapping to better support skb_dma_map/skb_dma_unmap and addresses and redefines the tx hang logic to be based off of time stamp instead of if the dma field is populated Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-02e1000: fix unmap bugJesse Brandeburg1-24/+27
This is in reference to the issue shown in kerneloops (search e1000 unmap) The e1000 transmit code was calling pci_unmap_page on dma handles that it might have called pci_map_single on. Same bug as e1000e Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Acked-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-19e1000: Removing the unused macro PAGE_USE_COUNT()Breno Leitao1-2/+0
Removing the unused macro PAGE_USE_COUNT(), since there is no more reference to it. The last reference was removed by Jesse's commit number 630b25cdf4e3f8c0a11eb04fc8436cc36653cd58. Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-04Merge branch 'master' of /home/davem/src/GIT/linux-2.6/David S. Miller1-1/+1
2009-02-03e1000: Fix PCI enable to honor the need_ioport flagKarsten Keil1-1/+1
On machine were no IO ports are assigned the call to pci_enable_device() will fail, even if need_ioport is false, we need to use pci_enable_device_mem() here. Signed-off-by: Karsten Keil <kkeil@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-01net: replace uses of __constant_{endian}Harvey Harrison1-2/+2
Base versions handle constant folding now. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-30Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-2/+2
Conflicts: drivers/net/e1000/e1000_main.c
2009-01-27e1000: fix bug with shared interrupt during resetJesse Brandeburg1-2/+2
A nasty bug was found where an MTU change (or anything else that caused a reset) could race with the interrupt code. The interrupt code was entered by a shared interrupt during the MTU change. This change prevents the interrupt code from running while the driver is in the middle of its reset path. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-21e1000: drop lltx, remove unnecessary lockAlexander Duyck2-28/+3
LLTX is deprecated, don't use it. This completes the removal of LLTX from the Intel Network drivers. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-21net: Remove redundant NAPI functionsBen Hutchings1-5/+5
Following the removal of the unused struct net_device * parameter from the NAPI functions named *netif_rx_* in commit 908a7a1, they are exactly equivalent to the corresponding *napi_* functions and are therefore redundant. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-06trivial: fix then -> than typos in comments and documentationFrederik Schwarzer1-2/+2
- (better, more, bigger ...) then -> (...) than Signed-off-by: Frederik Schwarzer <schwarzerf@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2008-12-22net: Remove unused netdev arg from some NAPI interfaces.Neil Horman1-5/+5
When the napi api was changed to separate its 1:1 binding to the net_device struct, the netif_rx_[prep|schedule|complete] api failed to remove the now vestigual net_device structure parameter. This patch cleans up that api by properly removing it.. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-03e1000: e1000_adapter->polling_netdev is uselessWang Chen2-27/+1
Commit bea3348eef27e6044b6161fd04c3152215f96411 "[NET]: Make NAPI polling independent of struct net_device objects." made NAPI polling to be independent of net_device. So e1000_adapter->polling_netdev is no longer used. Kill it. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-27e1000: cleanup link up/down messagesJeff Kirsher1-5/+7
The system log messages created on a link status change need to follow a specific format to work with tools some customers use. This also makes the messages consistant with other Intel driver link messages. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-20netdev: add more functions to netdevice opsStephen Hemminger1-1/+1
This patch moves neigh_setup and hard_start_xmit into the network device ops structure. For bisection, fix all the previously converted drivers as well. Bonding driver took the biggest hit on this. Added a prefetch of the hard_start_xmit in the fast path to try and reduce any impact this would have. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-19e1000: convert to net_device_opsStephen Hemminger1-14/+21
Convert to new network device ops interface. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-18Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller2-2/+7
Conflicts: drivers/isdn/i4l/isdn_net.c fs/cifs/connect.c
2008-11-16e1000: Use device_set_wakeup_enable\"Rafael J. Wysocki\2-2/+7
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-11-12netdevice: safe convert to netdev_priv() #part-2Wang Chen1-5/+4
We have some reasons to kill netdev->priv: 1. netdev->priv is equal to netdev_priv(). 2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously netdev_priv() is more flexible than netdev->priv. But we cann't kill netdev->priv, because so many drivers reference to it directly. This patch is a safe convert for netdev->priv to netdev_priv(netdev). Since all of the netdev->priv is only for read. But it is too big to be sent in one mail. I split it to 4 parts and make every part smaller than 100,000 bytes, which is max size allowed by vger. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-03drivers/net: Kill now superfluous ->last_rx stores.David S. Miller1-2/+0
The generic packet receive code takes care of setting netdev->last_rx when necessary, for the sake of the bonding ARP monitor. Drivers need not do it any more. Some cases had to be skipped over because the drivers were making use of the ->last_rx value themselves. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-31pci: use pci_ioremap_bar() in drivers/netArjan van de Ven1-5/+2
Use the newly introduced pci_ioremap_bar() function in drivers/net. pci_ioremap_bar() just takes a pci device and a bar number, with the goal of making it really hard to get wrong, while also having a central place to stick sanity checks. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-27net: convert print_mac to %pMJohannes Berg1-2/+1
This converts pretty much everything to print_mac. There were a few things that had conflicts which I have just dropped for now, no harm done. I've built an allyesconfig with this and looked at the files that weren't built very carefully, but it's a huge patch. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-11e1000: allow VLAN devices to use TSO and CSUM offloadPatrick McHardy1-0/+5
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 Graham1-19/+36
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 master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-0/+23
Conflicts: drivers/net/wireless/ath9k/core.c drivers/net/wireless/ath9k/main.c net/core/dev.c