summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-01-16vmxnet3: Make ethtool handlers multiqueue awareShreyas Bhatewara
Show per-queue stats in ethtool -S output for vmxnet3 interface. Register dump of ethtool should dump registers for all tx and rx queues. Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-16vmxnet3: Provide required number of bytes in first SG bufferShreyas Bhatewara
This is a performance enhancement fix. vmxnet3 device performs better when provided with at least 54 bytes (ethernet 14 + IP 20+ TCP 20) in the first SG buffer. For UDP packets driver provides lesser than that in first sg. This change fixes the same. Also avoid the redundant pskb_may_pull() call. Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-16vmxnet3: Enable HW Rx VLAN stripping by defaultShreyas Bhatewara
Make hw vlan tag stripping as enabled by default. Thereby remove the code to conditionally enable it later. Signed-off-by: Guolin Yang <gyang@vmware.com> Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-16vmxnet3: Preserve the MAC address configured by ifconfigShreyas Bhatewara
While activating the device get it's MAC address from netdev. This will allow the MAC address configured using ifconfig to persist through the reset. Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-16vmxnet3: fix ring size updateShreyas Bhatewara
Fix a bug while changing ring size when MTU is changed. Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com> Acked-by: Dmitry Torokhov <dtor@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-16caif: checking the wrong variableDan Carpenter
In the original code we check if (servl == NULL) twice. The first time should print the message that cfmuxl_remove_uplayer() failed and set "ret" correctly, but instead it just returns success. The second check should be checking the value of "ret" instead of "servl". Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Sjur Braendeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-16can: test size of struct sockaddr in sendmsgKurt Van Dijck
This patch makes the CAN socket code conform to the manpage of sendmsg. Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be> Acked-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-16Merge branch 'for-david' of git://git.open-mesh.org/ecsv/linux-mergeDavid S. Miller
2011-01-16qeth: l3 hw tx csum circumvent hw bugFrank Blaschka
Some OSA level have a bug in the hw tx csum logic. We can circumvent this bug by turning on IP hw csum also. Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-16qeth: postpone open till recovery is finishedUrsula Braun
The open function of qeth is not executed if the qeth device is in state DOWN or HARDSETUP. A recovery switches from state SOFTSETUP to HARDSETUP to DOWN to HARDSETUP and back to SOFTSETUP. If open and recover are running concurrently, open fails if it hits the states HARDSETUP or DOWN. This patch inserts waiting for recovery finish in the qeth open functions to enable successful qeth device opening in spite of a running recovery. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-16batman-adv: Use "__attribute__" shortcut macrosSven Eckelmann
Linux 2.6.21 defines different macros for __attribute__ which are also used inside batman-adv. The next version of checkpatch.pl warns about the usage of __attribute__((packed))). Linux 2.6.33 defines an extra macro __always_unused which is used to assist source code analyzers and can be used to removed the last existing __attribute__ inside the source code. Signed-off-by: Sven Eckelmann <sven@narfation.org>
2011-01-14GRETH: resolve SMP issues and other problemsDaniel Hellstrom
Fixes the following: 1. POLL should not enable IRQ when work is not completed 2. No locking between TX descriptor cleaning and XMIT descriptor handling 3. No locking between RX POLL and XMIT modifying control register 4. Since TX cleaning (called from POLL) is running in parallel with XMIT unnecessary locking is needed. 5. IRQ handler looks at RX frame status solely, this is wrong when IRQ is temporarily disabled (in POLL), and when IRQ is shared. 6. IRQ handler clears IRQ status, which is unnecessary 7. TX queue was stopped in preventing cause when not MAX_SKB_FRAGS+1 descriptors were available after a SKB been scheduled by XMIT. Instead the TX queue is stopped first when not enough descriptors are available upon entering XMIT. It was hard to split up this patch in smaller pieces since all are tied together somehow. Note the RX flag used in the interrupt handler does not signal that interrupt was asserted, but that a frame was received. Same goes for TX. Also, IRQ is not asserted when the RX flag is set before enabling IRQ enable until a new frame is received. So extra care must be taken to avoid enabling IRQ and all descriptors are already used, hence dead lock will upon us. See new POLL implementation that enableds IRQ then look at the RX flag to determine if one or more IRQs may have been missed. TX/RX flags are cleared before handling previously enabled descriptors, this ensures that the RX/TX flags are valid when determining if IRQ should be turned on again. By moving TX cleaning from POLL to XMIT in the standard case, removes some locking trouble. Enabling TX cleaning from poll only when not enough TX descriptors are available is safe because the TX queue is at the same time stopped, thus XMIT will not be called. The TX queue is woken up again when enough descriptrs are available. TX Frames are always enabled with IRQ, however the TX IRQ Enable flag will not be enabled until XMIT must wait for free descriptors. Locking RX and XMIT parts of the driver from each other is needed because the RX/TX enable bits share the same register. Signed-off-by: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-14GRETH: handle frame error interruptsDaniel Hellstrom
Frame error interrupts must also be handled since the RX flag only indicates successful reception, it is unlikely but the old code may lead to dead lock if 128 error frames are recieved in a row. Signed-off-by: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-14GRETH: avoid writing bad speed/duplex when setting transfer modeDaniel Hellstrom
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-14GRETH: fixed skb buffer memory leak on frame errorsDaniel Hellstrom
A new SKB buffer should not be allocated when the old SKB is reused. Signed-off-by: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-14GRETH: GBit transmit descriptor handling optimizationDaniel Hellstrom
It is safe to enable all fragments before enabling the first descriptor, this way all descriptors don't have to be processed twice, added extra memory barrier. Signed-off-by: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-14GRETH: fix opening/closingDaniel Hellstrom
When NAPI is disabled there is no point in having IRQs enabled, TX/RX should be off before clearing the TX/RX descriptor rings. Signed-off-by: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-14GRETH: added raw AMBA vendor/device number to match against.Daniel Hellstrom
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-14Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net-2.6
2011-01-14Merge branch 'master' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-2.6
2011-01-14Merge branch 'vhost-net' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
2011-01-14cassini: Fix build bustage on x86.David S. Miller
Unfortunately, not all CONFIG_OF platforms provide pci_device_to_OF_node(). Change the test to CONFIG_SPARC for now to deal with the build regressions. Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-14e1000e: consistent use of Rx/Tx vs. RX/TX/rx/tx in comments/logsBruce Allan
Some minor comment errors and whitespace issues discovered while looking into this are also addressed. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-01-14e1000e: update Copyright for 2011Bruce Allan
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-01-14e1000: Avoid unhandled IRQJesse Brandeburg
If hardware asserted an interrupt and driver is down, then there is nothing to do so return IRQ_HANDLED instead of IRQ_NONE. Returning IRQ_NONE in above situation causes screaming IRQ on virtual machines. CC: Andy Gospodarek <gospo@redhat.com> Signed-off-by: Tushar Dave <tushar.n.dave@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-01-14r8169: keep firmware in memory.françois romieu
The firmware agent is not available during resume. Loading the firmware during open() (see eee3a96c6368f47df8df5bd4ed1843600652b337) is not enough. close() is run during resume through rtl8169_reset_task(), whence the mildly natural release of firmware in the driver removal method instead. It will help with http://bugs.debian.org/609538. It will not avoid the 60 seconds delay when: - there is no firmware - the driver is loaded and the device is not up before a suspend/resume Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Tested-by: Jarek Kamiński <jarek@vilo.eu.org> Cc: Hayes <hayeswang@realtek.com> Cc: Ben Hutchings <benh@debian.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-14netdev: tilepro: Use is_unicast_ether_addr helperTobias Klauser
Use is_unicast_ether_addr from linux/etherdevice.h instead of custom macros. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-14etherdevice.h: Add is_unicast_ether_addr functionTobias Klauser
From a check for !is_multicast_ether_addr it is not always obvious that we're checking for a unicast address. So add this helper function to make those code paths easier to read. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-14ks8695net: Use default implementation of ethtool_ops::get_linkBen Hutchings
This is completely untested as I don't have an ARM build environment. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-14ks8695net: Disable non-working ethtool operationsBen Hutchings
Some ethtool operations can only be implemented for the WAN port, and not all such operations are allowed to return an error code such as -EOPNOTSUPP. Therefore, define two separate ethtool_ops structures for WAN and non-WAN ports; simplify and rename the WAN-only functions. This is completely untested as I don't have an ARM build environment. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-14USB CDC NCM: Don't deref NULL in cdc_ncm_rx_fixup() and don't use ↵Jesper Juhl
uninitialized variable. skb_clone() dynamically allocates memory and may fail. If it does it returns NULL. This means we'll dereference a NULL pointer in drivers/net/usb/cdc_ncm.c::cdc_ncm_rx_fixup(). As far as I can tell, the proper way to deal with this is simply to goto the error label. Furthermore gcc complains that 'skb' may be used uninitialized: drivers/net/usb/cdc_ncm.c: In function ‘cdc_ncm_rx_fixup’: drivers/net/usb/cdc_ncm.c:922:18: warning: ‘skb’ may be used uninitialized in this function and I believe it is right. On the line where we pr_debug("invalid frame detected (ignored)" ... we are using the local variable 'skb' but nothing has ever been assigned to that variable yet. I believe the correct fix for that is to use 'skb_in' instead. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-14vxge: Remember to release firmware after upgrading firmwareJesper Juhl
Regardless of whether the firmware update being performed by vxge_fw_upgrade() is a success or not we must still remember to always release_firmware() before returning. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Ram Vepa <ram.vepa@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-14netdev: bfin_mac: Remove is_multicast_ether_addr use in netdev_for_each_mc_addrJoe Perches
Remove code that has no effect. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-14ipsec: update MAX_AH_AUTH_LEN to support sha512Nicolas Dichtel
icv_truncbits is set to 256 for sha512, so update MAX_AH_AUTH_LEN to 64. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-14net: remove dev_txq_stats_fold()Eric Dumazet
After recent changes, (percpu stats on vlan/tunnels...), we dont need anymore per struct netdev_queue tx_bytes/tx_packets/tx_dropped counters. Only remaining users are ixgbe, sch_teql, gianfar & macvlan : 1) ixgbe can be converted to use existing tx_ring counters. 2) macvlan incremented txq->tx_dropped, it can use the dev->stats.tx_dropped counter. 3) sch_teql : almost revert ab35cd4b8f42 (Use net_device internal stats) Now we have ndo_get_stats64(), use it, even for "unsigned long" fields (No need to bring back a struct net_device_stats) 4) gianfar adds a stats structure per tx queue to hold tx_bytes/tx_packets This removes a lockdep warning (and possible lockup) in rndis gadget, calling dev_get_stats() from hard IRQ context. Ref: http://www.spinics.net/lists/netdev/msg149202.html Reported-by: Neil Jones <neiljay@gmail.com> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Jarek Poplawski <jarkao2@gmail.com> CC: Alexander Duyck <alexander.h.duyck@intel.com> CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com> CC: Sandeep Gopalpet <sandeep.kumar@freescale.com> CC: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-13sfc: Restore the effect of the rss_cpus module parameterBen Hutchings
Commit a4900ac ("sfc: Create multiple TX queues") accidentally disabled the rss_cpus module parameter. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2011-01-13sfc: Make efx_get_tx_queue() an inline functionBen Hutchings
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2011-01-13batman-adv: Even Batman should not dereference NULL pointersJesper Juhl
There's a problem in net/batman-adv/unicast.c::frag_send_skb(). dev_alloc_skb() allocates memory and may fail, thus returning NULL. If this happens we'll pass a NULL pointer on to skb_split() which in turn hands it to skb_split_inside_header() from where it gets passed to skb_put() that lets skb_tail_pointer() play with it and that function dereferences it. And thus the bat dies. While I was at it I also moved the call to dev_alloc_skb() above the assignment to 'unicast_packet' since there's no reason to do that assignment if the memory allocation fails. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Sven Eckelmann <sven@narfation.org>
2011-01-13Merge branch 'master' of git://1984.lsi.us.es/net-2.6David S. Miller
2011-01-13netfilter: ctnetlink: fix loop in ctnetlink_get_conntrack()Pablo Neira Ayuso
This patch fixes a loop in ctnetlink_get_conntrack() that can be triggered if you use the same socket to receive events and to perform a GET operation. Under heavy load, netlink_unicast() may return -EAGAIN, this error code is reserved in nfnetlink for the module load-on-demand. Instead, we return -ENOBUFS which is the appropriate error code that has to be propagated to user-space. Reported-by: Holger Eitzenberger <holger@eitzenberger.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2011-01-13eth: fix new kernel-doc warningRandy Dunlap
Fix new kernel-doc warning (copy-paste typo): Warning(net/ethernet/eth.c:366): No description found for parameter 'rxqs' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-13sched: remove unused backlog in RED statsstephen hemminger
The RED statistics structure includes backlog field which is not set or used by any code. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-13bna: Remove unnecessary memset(,0,)Joe Perches
kzalloc'd memory doesn't need a memset to 0. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Rasesh Mody <rmody@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-13Merge branch 'master' of git://1984.lsi.us.es/net-2.6David S. Miller
2011-01-13Merge branch 'master' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
2011-01-13inet6: prevent network storms caused by linux IPv6 routersAlexey Kuznetsov
Linux IPv6 forwards unicast packets, which are link layer multicasts... The hole was present since day one. I was 100% this check is there, but it is not. The problem shows itself, f.e. when Microsoft Network Load Balancer runs on a network. This software resolves IPv6 unicast addresses to multicast MAC addresses. Signed-off-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-13netdev: bfin_mac: Use is_multicast_ether_addr helperTobias Klauser
Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-13netdev: ucc_geth: Use is_multicast_ether_addr helperTobias Klauser
Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-01-12netfilter: fix compilation when conntrack is disabled but tproxy is enabledKOVACS Krisztian
The IPv6 tproxy patches split IPv6 defragmentation off of conntrack, but failed to update the #ifdef stanzas guarding the defragmentation related fields and code in skbuff and conntrack related code in nf_defrag_ipv6.c. This patch adds the required #ifdefs so that IPv6 tproxy can truly be used without connection tracking. Original report: http://marc.info/?l=linux-netdev&m=129010118516341&w=2 Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: KOVACS Krisztian <hidden@balabit.hu> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2011-01-12net: ax25: fix information leak to userland harderKees Cook
Commit fe10ae53384e48c51996941b7720ee16995cbcb7 adds a memset() to clear the structure being sent back to userspace, but accidentally used the wrong size. Reported-by: Brad Spengler <spender@grsecurity.net> Signed-off-by: Kees Cook <kees.cook@canonical.com> Cc: stable@kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>