8ce6909f77ba1b7bcdea65cc2388fd1742b6d669 |
|
17-May-2012 |
Tushar Dave <tushar.n.dave@intel.com> |
e1000: Prevent reset task killing itself. Killing reset task while adapter is resetting causes deadlock. Only kill reset task if adapter is not resetting. Ref bug #43132 on bugzilla.kernel.org CC: stable@vger.kernel.org Signed-off-by: Tushar Dave <tushar.n.dave@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
dd7f5c9e5cb24f72140206d3e5961b4cc5a84034 |
|
25-Mar-2012 |
Andrei Emeltchenko <andrei.emeltchenko@intel.com> |
e1000: Silence sparse warnings by correcting type Silence sparse warnings shown below: ... drivers/net/ethernet/intel/e1000/e1000_main.c:3435:17: warning: cast to restricted __le64 drivers/net/ethernet/intel/e1000/e1000_main.c:3435:17: warning: cast to restricted __le64 ... Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
|
b3f4d5990bfc8b060e5010c1464789fca1f4c5b4 |
|
13-Mar-2012 |
stephen hemminger <shemminger@vyatta.com> |
intel: make wired ethernet driver message level consistent (rev2) Dan Carpenter noticed that ixgbevf initial default was different than the rest. But the problem is broader than that, only one Intel driver (ixgb) was doing it almost right. The convention for default debug level should be consistent among Intel drivers and follow established convention. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
|
52f5509fe8ccb607ff9b84ad618f244262336475 |
|
20-Mar-2012 |
Jiri Pirko <jpirko@redhat.com> |
e1000: fix vlan processing regression This patch fixes a regression introduced by commit "e1000: do vlan cleanup (799d531)". Apparently some e1000 chips (not mine) are sensitive about the order of setting vlan filter and vlan stripping/inserting functionality. So this patch changes the order so it's the same as before vlan cleanup. Reported-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Jiri Pirko <jpirko@redhat.com> Tested-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
|
4679026d783eb5ac90247bc466d66b817b213abf |
|
25-Nov-2011 |
Cong Wang <amwang@redhat.com> |
net: remove the second argument of k[un]map_atomic() Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com>
|
e29b5d8f0896bfe908c0036f2614a89e71bdf42c |
|
10-Feb-2012 |
Tushar Dave <tushar.n.dave@intel.com> |
v2 e1000: Neaten e1000_dump function Use pr_<level> for printk Use temporary instead of multiple pr_conts Coalesce formats. Save a few bytes of object code too: $ size drivers/net/ethernet/intel/e1000/e1000_main.o* text data bss dec hex filename 60507 369 14120 74996 124f4 drivers/net/ethernet/intel/e1000/e1000_main.o.new 60717 369 14176 75262 125fe drivers/net/ethernet/intel/e1000/e1000_main.o.old Removed printing of pktdata. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Tushar Dave <tushar.n.dave@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
|
b0d1562c820ae0f9ffe4d21f43676f1466ccaec2 |
|
11-Feb-2012 |
Ben Greear <greearb@candelatech.com> |
e1000: Support RX-FCS flag. This allows the NIC to pass the Ethernet Frame Checksum (FCS) up the stack. Useful when sniffing packets. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
|
11a78dcf35fc20bd6ae57fee11ca0447a62d33a8 |
|
11-Feb-2012 |
Ben Greear <greearb@candelatech.com> |
e1000: Support sending custom Ethernet CRC. Good for testing the RX logic for bad CRC handling. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
|
b868179c47e9e8eadcd04c1f3105998e528988a3 |
|
19-Jan-2012 |
Dean Nelson <dnelson@redhat.com> |
e1000: add dropped DMA receive enable back in for WoL Commit d5bc77a223b0e9b9dfb002048d2b34a79e7d0b48 broke Wake-on-LAN by inadvertently dropping the enabling of DMA receives. Restore the enabling of DMA receives for WoL. This is applicable to 3.1+ stable trees. CC: stable@vger.stable.org Reported-by: Tobias Klausmann <klausman@schwarzvogel.de> Signed-off-by: Dean Nelson <dnelson@redhat.com> Tested-by: Tobias Klausmann <klausman@schwarzvogel.de> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
|
b04e36bac5075ceeacf11b639fbf0cb69aa68996 |
|
27-Jan-2012 |
Tushar Dave <tushar.n.dave@intel.com> |
e1000: Adding e1000_dump function When TX hang occurs e1000_dump prints TX ring, RX ring and Device registers. Signed-off-by: Tushar Dave <tushar.n.dave@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
|
e404decb0fb017be80552adee894b35307b6c7b4 |
|
29-Jan-2012 |
Joe Perches <joe@perches.com> |
drivers/net: Remove unnecessary k.alloc/v.alloc OOM messages alloc failures use dump_stack so emitting an additional out-of-memory message is an unnecessary duplication. Remove the allocation failure messages. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
13acde8fffc0afbe8341fe08d2c594243f905c1f |
|
04-Jan-2012 |
Florian Fainelli <ffainelli@freebox.fr> |
e1000: cleanup CE4100 MDIO registers access A global variable is currently used to hold the virtual address of the CE4100 MDIO base register address. Store the address in the e1000_hw structure and update macros accordingly. Signed-off-by: Florian Fainelli <ffainelli@freebox.fr> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
1c26750c485de20a3bd68ec5d396887650b53976 |
|
04-Jan-2012 |
Florian Fainelli <ffainelli@freebox.fr> |
e1000: unmap ce4100_gbe_mdio_base_virt in e1000_remove We are not unmapping ce4100_gbe_mdio_base_virt in exit path in case we are running on a CE4100 adapter, fix that. Signed-off-by: Florian Fainelli <ffainelli@freebox.fr> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
3a3847e007aae732d64d8fd1374126393e9879a3 |
|
04-Jan-2012 |
Jesse Brandeburg <jesse.brandeburg@intel.com> |
e1000: fix lockdep splat in shutdown handler As reported by Steven Rostedt, e1000 has a lockdep splat added during the recent merge window. The issue is that cancel_delayed_work is called while holding our private mutex. There is no reason that I can see to hold the mutex during pci shutdown, it was more just paranoia that I put the mutex_lock around the call to e1000_down. In a quick survey lots of drivers handle locking differently when being called by the pci layer. The assumption here is that we don't need the mutexes' protection in this function because the driver could not be unloaded while in the shutdown handler which is only called at reboot or poweroff. Reported-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Steven Rostedt <rostedt@goodmis.org> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
3db1cd5c05f35fb43eb134df6f321de4e63141f2 |
|
19-Dec-2011 |
Rusty Russell <rusty@rustcorp.com.au> |
net: fix assignment of 0/1 to bool variables. DaveM said: Please, this kind of stuff rots forever and not using bool properly drives me crazy. Joe Perches <joe@perches.com> gave me the spatch script: @@ bool b; @@ -b = 0 +b = false @@ bool b; @@ -b = 1 +b = true I merely installed coccinelle, read the documentation and took credit. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
|
8e586137e6b63af1e881b328466ab5ffbe562510 |
|
09-Dec-2011 |
Jiri Pirko <jpirko@redhat.com> |
net: make vlan ndo_vlan_rx_[add/kill]_vid return error value Let caller know the result of adding/removing vlan id to/from vlan filter. In some drivers I make those functions to just return 0. But in those where there is able to see if hw setup went correctly, return value is set appropriately. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
c8f44affb7244f2ac3e703cab13d55ede27621bb |
|
15-Nov-2011 |
Michał Mirosław <mirq-linux@rere.qmqm.pl> |
net: introduce and use netdev_features_t for device features sets v2: add couple missing conversions in drivers split unexporting netdev_fix_features() implemented %pNF convert sock::sk_route_(no?)caps Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
|
9e903e085262ffbf1fc44a17ac06058aca03524a |
|
18-Oct-2011 |
Eric Dumazet <eric.dumazet@gmail.com> |
net: add skb frag size accessors To ease skb->truesize sanitization, its better to be able to localize all references to skb frags size. Define accessors : skb_frag_size() to fetch frag size, and skb_frag_size_{set|add|sub}() to manipulate it. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
ed64b3cc11502f50e1401f12e33d021592800bca |
|
13-Oct-2011 |
Eric Dumazet <eric.dumazet@gmail.com> |
e1000: fix skb truesize underestimation e1000 allocates a full page per skb fragment. We must account PAGE_SIZE increments on skb->truesize, not the actual frag length. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
0ef4eedc2e98edd51cd106e1f6a27178622b7e57 |
|
05-Oct-2011 |
Jesse Brandeburg <jesse.brandeburg@intel.com> |
e1000: convert to private mutex from rtnl The e1000 driver when running with lockdep could run into some possible deadlocks between the work items acquiring rtnl and the rtnl lock being acquired before work items were cancelled. Use a private mutex to make sure lock ordering isn't violated. The private mutex is only used to protect areas not generally covered by the rtnl lock already. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> CC: Thomas Gleixner <tglx@linutronix.de> CC: Tushar Dave <tushar.n.dave@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
|
4e0d8f7d97f9150bdd07f6355e5c1486967dce79 |
|
05-Oct-2011 |
Jesse Brandeburg <jesse.brandeburg@intel.com> |
e1000: convert mdelay to msleep With the previous commit, there are several functions that are only ever called from thread context, and are able to sleep with msleep instead of mdelay. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> CC: Thomas Gleixner <tglx@linutronix.de> CC: Tushar Dave <tushar.n.dave@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
|
a4010afef585b7142eb605e3a6e4210c0e1b2957 |
|
05-Oct-2011 |
Jesse Brandeburg <jesse.brandeburg@intel.com> |
e1000: convert hardware management from timers to threads Thomas Gleixner (tglx) reported that e1000 was delaying for many milliseconds (using mdelay) from inside timer/interrupt context. None of these paths are performance critical and can be moved into threads/work items. This patch implements the work items and the next patch changes the mdelays to msleeps. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> CC: Thomas Gleixner <tglx@linutronix.de> CC: Tushar Dave <tushar.n.dave@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
|
d5bc77a223b0e9b9dfb002048d2b34a79e7d0b48 |
|
16-Sep-2011 |
Dean Nelson <dnelson@redhat.com> |
e1000: don't enable dma receives until after dma address has been setup Doing an 'ifconfig ethN down' followed by an 'ifconfig ethN up' on a qemu-kvm guest system configured with two e1000 NICs can result in an 'unable to handle kernel paging request at 0000000100000000' or 'bad page map in process ...' or something similar. These result from a 4096-byte page being corrupted with the following two-word pattern (16-bytes) repeated throughout the entire page: 0x0000000000000000 0x0000000100000000 There can be other bits set as well. What is a constant is that the 2nd word has the 32nd bit set. So one could see: : 0x0000000000000000 0x0000000100000000 0x0000000000000000 0x0000000172adc067 <<< bad pte 0x800000006ec60067 0x0000000700000040 0x0000000000000000 0x0000000100000000 : Which came from from a process' page table I dumped out when the marked line was seen as bad by print_bad_pte(). The repeating pattern represents the e1000's two-word receive descriptor: struct e1000_rx_desc { __le64 buffer_addr; /* Address of the descriptor's data buffer */ __le16 length; /* Length of data DMAed into data buffer */ __le16 csum; /* Packet checksum */ u8 status; /* Descriptor status */ u8 errors; /* Descriptor Errors */ __le16 special; }; And the 32nd bit of the 2nd word maps to the 'u8 status' member, and corresponds to E1000_RXD_STAT_DD which indicates the descriptor is done. The corruption appears to result from the following... . An 'ifconfig ethN down' gets us into e1000_close(), which through a number of subfunctions results in: 1. E1000_RCTL_EN being cleared in RCTL register. [e1000_down()] 2. dma_free_coherent() being called. [e1000_free_rx_resources()] . An 'ifconfig ethN up' gets us into e1000_open(), which through a number of subfunctions results in: 1. dma_alloc_coherent() being called. [e1000_setup_rx_resources()] 2. E1000_RCTL_EN being set in RCTL register. [e1000_setup_rctl()] 3. E1000_RCTL_EN being cleared in RCTL register. [e1000_configure_rx()] 4. RDLEN, RDBAH and RDBAL registers being set to reflect the dma page allocated in step 1. [e1000_configure_rx()] 5. E1000_RCTL_EN being set in RCTL register. [e1000_configure_rx()] During the 'ifconfig ethN up' there is a window opened, starting in step 2 where the receives are enabled up until they are disabled in step 3, in which the address of the receive descriptor dma page known by the NIC is still the previous one which was freed during the 'ifconfig ethN down'. If this memory has been reallocated for some other use and the NIC feels so inclined, it will write to that former dma page with predictably unpleasant results. I realize that in the guest, we're dealing with an e1000 NIC that is software emulated by qemu-kvm. The problem doesn't appear to occur on bare-metal. Andy suspects that this is because in the emulator link-up is essentially instant and traffic can start flowing immediately. Whereas on bare-metal, link-up usually seems to take at least a few milliseconds. And this might be enough to prevent traffic from flowing into the device inside the window where E1000_RCTL_EN is set. So perhaps a modification needs to be made to the qemu-kvm e1000 NIC emulator to delay the link-up. But in defense of the emulator, it seems like a bad idea to enable dma operations before the address of the memory to be involved has been made known. The following patch no longer enables receives in e1000_setup_rctl() but leaves them however they were. It only enables receives in e1000_configure_rx(), and only after the dma address has been made known to the hardware. There are two places where e1000_setup_rctl() gets called. The one in e1000_configure() is followed immediately by a call to e1000_configure_rx(), so there's really no change functionally (except for the removal of the problem window. The other is in __e1000_shutdown() and is not followed by a call to e1000_configure_rx(), so there is a change functionally. But consider... . An 'ifconfig ethN down' (just as described above). . A 'suspend' of the system, which (I'm assuming) will find its way into e1000_suspend() which calls __e1000_shutdown() resulting in: 1. E1000_RCTL_EN being set in RCTL register. [e1000_setup_rctl()] And again we've re-opened the problem window for some unknown amount of time. Signed-off-by: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Dean Nelson <dnelson@redhat.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
|
877749bf3f2f7a517ae74cd2c2fa4eed7aa9b51d |
|
30-Aug-2011 |
Ian Campbell <Ian.Campbell@citrix.com> |
intel: convert to SKB paged frag API. Signed-off-by: Ian Campbell <ian.campbell@citrix.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: Carolyn Wyborny <carolyn.wyborny@intel.com> Cc: Don Skidmore <donald.c.skidmore@intel.com> Cc: Greg Rose <gregory.v.rose@intel.com> Cc: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com> Cc: Alex Duyck <alexander.h.duyck@intel.com> Cc: John Ronciak <john.ronciak@intel.com> Cc: e1000-devel@lists.sourceforge.net Cc: netdev@vger.kernel.org Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
31c15a2f24ebdab14333d9bf5df49757842ae2ec |
|
25-Aug-2011 |
Dean Nelson <dnelson@redhat.com> |
e1000: save skb counts in TX to avoid cache misses Virtual Machines with emulated e1000 network adapter running on Parallels' server were seeing kernel panics due to the e1000 driver dereferencing an unexpected NULL pointer retrieved from buffer_info->skb. The problem has been addressed for the e1000e driver, but not for the e1000. Since the two drivers share similar code in the affected area, a port of the following e1000e driver commit solves the issue for the e1000 driver: commit 9ed318d546a29d7a591dbe648fd1a2efe3be1180 Author: Tom Herbert <therbert@google.com> Date: Wed May 5 14:02:27 2010 +0000 e1000e: save skb counts in TX to avoid cache misses In e1000_tx_map, precompute number of segements and bytecounts which are derived from fields in skb; these are stored in buffer_info. When cleaning tx in e1000_clean_tx_irq use the values in the associated buffer_info for statistics counting, this eliminates cache misses on skb fields. Signed-off-by: Dean Nelson <dnelson@redhat.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
01789349ee52e4a3faf376f1485303d9723c4f1f |
|
16-Aug-2011 |
Jiri Pirko <jpirko@redhat.com> |
net: introduce IFF_UNICAST_FLT private flag Use IFF_UNICAST_FTL to find out if driver handles unicast address filtering. In case it does not, promisc mode is entered. Patch also fixes following drivers: stmmac, niu: support uc filtering and yet it propagated ndo_set_multicast_list bna, benet, pxa168_eth, ks8851, ks8851_mll, ksz884x : has set ndo_set_rx_mode but do not support uc filtering Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
dee1ad47f2ee75f5146d83ca757c1b7861c34c3b |
|
07-Apr-2011 |
Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
intel: Move the Intel wired LAN drivers Moves the Intel wired LAN drivers into drivers/net/ethernet/intel/ and the necessary Kconfig and Makefile changes. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
|