summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* netfilter: xtables: remove some gotoJan Engelhardt2009-05-082-10/+4Star
| | | | | | Combining two ifs, and goto is easily gone. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* netfilter: xtables: reduce indent level by oneJan Engelhardt2009-05-083-189/+177Star
| | | | | | | | | Cosmetic only. Transformation applied: -if (foo) { long block; } else { short block; } +if (!foo) { short block; continue; } long block; Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* netfilter: xtables: consolidate open-coded logicJan Engelhardt2009-05-084-18/+40
| | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* netfilter: xtables: fix const inconsistencyJan Engelhardt2009-05-082-14/+14
| | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* netfilter: xtables: remove redundant castsJan Engelhardt2009-05-082-2/+2
| | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* netfilter: xtables: use NFPROTO_ in standard targetsJan Engelhardt2009-05-082-6/+6
| | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* netfilter: queue: use NFPROTO_ for queue callsitesJan Engelhardt2009-05-083-4/+4
| | | | | | af is an nfproto. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* netfilter: xtables: use NFPROTO_ for xt_proto_init callsitesJan Engelhardt2009-05-082-4/+4
| | | | Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
* smsc911x: fix calculation of res_size for ioremapMatthias Ludwig2009-05-081-1/+1
| | | | | | | | | fix size of remaped iomem, which is 1 byte to small (e.g. mappes only 0xff bytes instead of 0x100) Signed-off-by: Matthias Ludwig <mludwig@ultratronik.de> Acked-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* e1000/e1000e/igb/ixgb: don't txhang after link downJesse Brandeburg2009-05-074-0/+8
| | | | | | | | | | | | | | | | 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>
* ixgbe: Typecase '1' for 64 bit shiftNelson, Shannon2009-05-071-3/+3
| | | | | | | | | Make sure we don't get any sign-extend issues when we shift a 1 into bit 31. Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: fix failing to log fan failuresDon Skidmore2009-05-071-2/+26
| | | | | | | | | | | | | | | | | | | We weren't logging the 82598AT fan failure if it occurred before (ixgbe_open) as we hadn't sent up to catch the interrupt that event caused. This patch checks for this failure in: ixgbe_probe - So we can log the failure asap. We check right after we set up the adapter->flags, which is when we know that we have a fan. ixgbe_up_complete - To catch failures that may have happened between probe and when we set up the interrupt that would normally detect the fan failure. To enable all of this we need to initialize the adapter flag with IXGBE_FLAG_FAN_FAIL_CAPABLE when the NIC contained a fan. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: Enable L2 header split in 82599Yi Zou2009-05-072-1/+3
| | | | | | | | This enables L2 header split when packet split is enabled for 82599. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: set queue0 for srrctl configuration correctly for DCBAlexander Duyck2009-05-071-1/+12
| | | | | | | | | | The current configuration is not setting queue 0 correctly for DCB configurations. As a result unconfigured queues are being used to setup the SRRCTL register rx buffer len sizes. 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>
* ixgbe: always set header length in SRRCTLAlexander Duyck2009-05-071-18/+10Star
| | | | | | | | | | As per the documentation for 82599 in order to support hardware RSC the header size must be set. This is only currently done for packet split mode. This patch sets the header buffer length for all modes. 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>
* tcp: tcp_prequeue() can use keyed wakeupsEric Dumazet2009-05-071-1/+2
| | | | | | | | We can avoid waking up tasks not interested in receive notifications, using wake_up_interruptible_poll() instead of wake_up_interruptible() Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tcp: tcp_prequeue() cleanupEric Dumazet2009-05-071-22/+23
| | | | | | | | Small cleanup patch to reduce line lengths, before a change in tcp_prequeue(). Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: Add missing rculist.h include to netdevice.hDavid S. Miller2009-05-071-0/+1
| | | | | | | Otherwise list_for_each_entry_rcu() et al. aren't visible and we get build failures in some configurations. Signed-off-by: David S. Miller <davem@davemloft.net>
* net: Make inet_twsk_put similar to sock_putArnaldo Carvalho de Melo2009-05-071-10/+13
| | | | | | | | | | By separating the freeing code from the refcounting decrementing. Probably reducing icache pressure when we still have reference counts to go. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: Proposed PARCH PCIE legacy I/O port free intel 10Gb NIC drivergouji-new2009-05-071-7/+12
| | | | | | | | | | | | | | | | | Traditionally Intel based NIC drivers request I/O port even though it doesn't need that really. Intel PCIE 10Gb driver (ixgbe) also requests I/O port but it doesn't need it either. This is a little inconvenient situation because sometimes we have to handle those cards on the slots where any I/O space is not attached. So we made pach which makes ixgbe driver legacy I/O port free. Signed-off-by: Masayuki Gouji <gouji.masayuki@jp.fujitsu.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: Return PCI_ERS_RESULT_DISCONNECT when bus is disabledBreno Leitao2009-05-071-0/+3
| | | | | | | | | | | | | According to the "PCI Error Recovery" document, if after a recovery, the bus is disabled, the error_detected function should return PCI_ERS_RESULT_DISCONNECT. Actually ixgbe error_detected function is always returning PCI_ERS_RESULT_NEED_RESET, even if the bus is in failure. This patch just check if the bus is disabled and then returns PCI_ERS_RESULT_DISCONNET. Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: remove ixgbe_napi_add/del_all referencesAlexander Duyck2009-05-071-2/+0Star
| | | | | | | | | | | There were still some references to napi_add/del_all left after the dynamic vector allocation patch. This patch removes those references since the ixgbe_napi_add/del_all calls are no longer needed as the napi struct is added when the vector is created, and deleted when the vector is freed. 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>
* ixgbe: skb_record_rx_queue should record rx queue instead of vectorAlexander Duyck2009-05-071-2/+3
| | | | | | | | | | currently ixgbe_receive_skb is passing the vector index to skb_record_rx_queue instead of the queue index. This patch changes that so that the ring index is passed instead. 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>
* ixgbe: make q_vectors dynamic to reduce netdev sizeAlexander Duyck2009-05-074-133/+158
| | | | | | | | | | | | Currently the q_vectors are being allocated statically inside of the adapter struct. This increases the overall size of the adapter struct when we can easily allocate the vectors dynamically. This patch changes that behavior so that the q_vectors are allocated dynamically and the napi structures are automatically allocated inside of the q_vectors as needed. 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>
* pci: update 82576 sr-iov quirk with latest device IDsAlexander Duyck2009-05-071-0/+2
| | | | | | | | | The current quirk doesn't include all 82576 device IDs. This update resolves that. 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>
* igb/igbvf: set rx csum always enabled in hw, disable via swAlexander Duyck2009-05-073-10/+12
| | | | | | | | | | | | An issue was found in which rx checksum could not be enabled without resetting the interface. The issue was the hardware enable was not being done via ethtool. To resolve this issue and prevent conflicts with VF configuration we will leave the feature always enabled in hardware, and then in software we will choose to ignore the results via a sw flag. 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>
* igbvf: cleanup flags and allow for rx checksum to be disabledAlexander Duyck2009-05-073-33/+26Star
| | | | | | | | | | This patch cleans up a number of unused or unneeded feature flags. As a result of these changes the user should now be able to enable or disable rx checksumming via ethtool. 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>
* mv643xx_eth: only unmask RX and TX_END interrupts for available queuesSaeed Bishara2009-05-071-6/+14
| | | | | | | | | | | | It is not a good idea to blindly unmask the RX and TX_END interrupts for all eight queues on all mv643xx_eth hardware, since some variations of the hardware have less than eight transmit/receive queues, and the RX/TX_END interrupts for the queues they don't have can be in use by other interrupt sources. Signed-off-by: Saeed Bishara <saeed@marvell.com> Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mv643xx_eth: rework receive skb cache alignmentLennert Buytenhek2009-05-071-8/+13
| | | | | | | | | | | | On the platforms that mv643xx_eth is used on, the manual skb->data alignment logic in mv643xx_eth can be simplified, as the only case we need to handle is where NET_SKB_PAD is not a multiple of the cache line size. If this is the case, the extra padding we need can be computed at compile time, while if NET_SKB_PAD _is_ a multiple of the cache line size, the code can be optimised out entirely. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mv643xx_eth: minor register definition cleanupLennert Buytenhek2009-05-071-23/+21Star
| | | | | | | | | Move the definitions for the SDMA and port serial configuration register values to where all the other register definitions live, and expand the shifts to 32 bit constants. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mv643xx_eth: count handling a link event as one unit of napi workLennert Buytenhek2009-05-071-0/+1
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mv643xx_eth: fix variable shadowing sparse warningLennert Buytenhek2009-05-071-1/+0Star
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netxen: fix bonding supportDhananjay Phadke2009-05-076-168/+82Star
| | | | | | | | o Pause traffic during mac addr change. o Enable setting mac address for NX3031. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netxen: fix mac list managementDhananjay Phadke2009-05-073-79/+58Star
| | | | | | | | | o use standard linked list api for mac addr list management in NX3031. o release mac addresses in firmware in dev close(). Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netxen: fix race in tx ring acccessDhananjay Phadke2009-05-073-7/+8
| | | | | | | | Fix the distance check between tx ring producer and consumer that could lead to tx ring wrap around. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* lasi_82596: fix printk format warningAlexander Beregalov2009-05-051-3/+3
| | | | | | | | | | drivers/net/lasi_82596.c:164: warning: format '%lx' expects type 'long unsigned int', but argument 3 has type 'resource_size_t' drivers/net/lasi_82596.c:169: warning: format '%lx' expects type 'long unsigned int', but argument 2 has type 'resource_size_t' Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tcp:fix the code indentShan Wei2009-05-051-1/+1
| | | | | Signed-off-by: Shan Wei<shanwei@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* r6040: bump version to 0.23 and date to 05May2009Florian Fainelli2009-05-051-2/+2
| | | | | | | Bump version to 0.23 and date to 05May2009. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* r6040: check for absent PHYFlorian Fainelli2009-05-051-0/+8
| | | | | | | | | | | Some devices have two R6040 MACs but the second one is not wired to any PHY, therefore the interface is just unusable. Warn the user about that and prevent device from registering. Tested-by: bifferos <bifferos@yahoo.co.uk> Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* bonding: get rid of CONFIG_PROC_FS ifdefsJiri Pirko2009-05-051-10/+20
| | | | | | | | | | Remove CONFIG_PROC_FS ifdefs from the code by adding void functions. Signed-off-by: Jiri Pirko <jpirko@redhat.com> drivers/net/bonding/bond_main.c | 30 ++++++++++++++++++++---------- 1 files changed, 20 insertions(+), 10 deletions(-) Signed-off-by: David S. Miller <davem@davemloft.net>
* net: introduce a list of device addresses dev_addr_list (v6)Jiri Pirko2009-05-053-2/+312
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v5 -> v6 (current): -removed so far unused static functions -corrected dev_addr_del_multiple to call del instead of add v4 -> v5: -added device address type (suggested by davem) -removed refcounting (better to have simplier code then safe potentially few bytes) v3 -> v4: -changed kzalloc to kmalloc in __hw_addr_add_ii() -ASSERT_RTNL() avoided in dev_addr_flush() and dev_addr_init() v2 -> v3: -removed unnecessary rcu read locking -moved dev_addr_flush() calling to ensure no null dereference of dev_addr v1 -> v2: -added forgotten ASSERT_RTNL to dev_addr_init and dev_addr_flush -removed unnecessary rcu_read locking in dev_addr_init -use compare_ether_addr_64bits instead of compare_ether_addr -use L1_CACHE_BYTES as size for allocating struct netdev_hw_addr -use call_rcu instead of rcu_synchronize -moved is_etherdev_addr into __KERNEL__ ifdef This patch introduces a new list in struct net_device and brings a set of functions to handle the work with device address list. The list is a replacement for the original dev_addr field and because in some situations there is need to carry several device addresses with the net device. To be backward compatible, dev_addr is made to point to the first member of the list so original drivers sees no difference. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: smsc911x: add power management functionsDaniel Mack2009-05-051-0/+46
| | | | | | | | | | This adds a power management implementation for smsc911x.c which assumes the chips remains powered during suspend. The device is put in its D1 power saving mode. Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: remove driver_data direct access of struct device from more driversGreg Kroah-Hartman2009-05-053-11/+11
| | | | | | | | | | | In the near future, the driver core is going to not allow direct access to the driver_data pointer in struct device. Instead, the functions dev_get_drvdata() and dev_set_drvdata() should be used. These functions have been around since the beginning, so are backwards compatible with all older kernel versions. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* netns 2/2: extract net_create()Alexey Dobriyan2009-05-041-24/+20Star
| | | | | | | | net_create() will be used by C/R to create fresh netns on restart. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netns 1/2: don't get/put old netns on CLONE_NEWNETAlexey Dobriyan2009-05-041-4/+1Star
| | | | | | | | | copy_net_ns() doesn't copy anything, it creates fresh netns, so get/put of old netns isn't needed. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* macb: Add support of the netpoll APIThomas Petazzoni2009-05-041-0/+18
| | | | | | | | | | | | | With this patch in place, I'm successfully able to use the netconsole mechanism with the Calao USB-A9263 board, which uses the AT91SAM9263 CPU, which in terms of Ethernet controller is supported by the macb driver. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> [haavard.skinnemoen@atmel.com: disable_irq() -> local_irq_save()] [haavard.skinnemoen@atmel.com: convert to net_device_ops] Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tcp: extend ECN sysctl to allow server-side only ECNIlpo Järvinen2009-05-043-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | This should be very safe compared with full enabled, so I see no reason why it shouldn't be done right away. As ECN can only be negotiated if the SYN sending party is also supporting it, somebody in the loop probably knows what he/she is doing. If SYN does not ask for ECN, the server side SYN-ACK is identical to what it is without ECN. Thus it's quite safe. The chosen value is safe w.r.t to existing configs which choose to currently set manually either 0 or 1 but silently upgrades those who have not explicitly requested ECN off. Whether to just enable both sides comes up time to time but unless that gets done now we can at least make the servers aware of ECN already. As there are some known problems to occur if ECN is enabled, it's currently questionable whether there's any real gain from enabling clients as servers mostly won't support it anyway (so we'd hit just the negative sides). After enabling the servers and getting that deployed, the client end enable really has some potential gain too. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: Avoid modulus in skb_tx_hash() for forwarding case.David S. Miller2009-05-031-2/+6
| | | | | | | | | | | | | Based almost entirely upon a patch by Eric Dumazet. The common case is to have num-tx-queues <= num_rx_queues and even if num_tx_queues is larger it will not be significantly larger. Therefore, a subtraction loop is always going to be faster than modulus. Signed-off-by: David S. Miller <davem@davemloft.net>
* ipv4: remove unused macro (FIB_RES_RESET) from ip_fib.h.Rami Rosen2009-05-031-2/+0Star
| | | | | Signed-off-by: Rami Rosen <ramirose@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ne2k-pci: use dev->addr_len instead of "6"Jiri Pirko2009-05-031-1/+1
| | | | | | | | | | | | Spotted a tiny ugliness in a recently posted patch. This patch cuts it out. Jirka Signed-off-by: Jiri Pirko <jpirko@redhat.com> drivers/net/ne2k-pci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Signed-off-by: David S. Miller <davem@davemloft.net>