summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* can: mcp251x: fix NOHZ local_softirq_pending 08 warningMarc Kleine-Budde2010-10-181-2/+2
| | | | | | | | | | | This patch replaces netif_rx() with netif_rx_ni() which has to be used from the threaded interrupt i.e. process context context. Thanks to Christian Pellegrin for pointing at the right fix: 481a8199142c050b72bff8a1956a49fd0a75bbe0 by Oliver Hartkopp. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Acked-by: Wolfgang Grandegger <wg@grandegger.com>
* tipc: Kill tipc_get_mode() completely.David S. Miller2010-10-181-6/+0
| | | | | | | | It's completely unused and exporting a static symbol makes no sense and breaks the build. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Update version to 3.115Matt Carlson2010-10-171-2/+2
| | | | | | | | This patch updates the tg3 version to 3.115. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Report invalid link from tg3_get_settings()Matt Carlson2010-10-171-0/+3
| | | | | | | | | | | | | | Currently the tg3 driver leaves the speed and duplex fields uninitialized in tg3_get_settings() if the device is not up. This can lead to some strange deductions in certain versions of ethtool. When the device is up and the link is down, the driver reports SPEED_INVALID and DUPLEX_INVALID for these fields. This patch makes the presentation consistent by returning SPEED_INVALID and DUPLEX_INVALID when the device has not been brought up as well. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Don't allocate jumbo ring for 5780 class devsMatt Carlson2010-10-171-4/+7
| | | | | | | | | | The 5714, 5715, and 5780 devices do not have a separate rx jumbo producer ring. This patch changes the code so that resources are not allocated for it. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Cleanup tg3_alloc_rx_skb()Matt Carlson2010-10-171-2/+1
| | | | | | | | src_map is no longer used in tg3_alloc_rx_skb(). Remove it. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Add EEE supportMatt Carlson2010-10-172-1/+146
| | | | | | | | | This patch adds Energy Efficient Ethernet (EEE) support for the 5718 device ID and the 57765 B0 asic revision. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Add clause 45 register accessor methodsMatt Carlson2010-10-172-0/+50
| | | | | | | | | This patch adds clause 45 register access methods. They will be used in the following patch. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Disable unused transmit ringsMatt Carlson2010-10-171-0/+3
| | | | | | | | | | This patch allows the driver to disable the additional transmit rings available on the 5717 and 5719 devices. This is not strictly necessary, but is done anyways for correctness. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Add support for selfboot format 1 v6Matt Carlson2010-10-172-0/+5
| | | | | | | | | | 5718 B0 and 5719 devices will use a new selfboot firmware format. This patch adds code to detect the new format so that bootcode versions get reported correctly. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* fib_hash: RCU conversion phase 2Eric Dumazet2010-10-172-77/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Get rid of fib_hash_lock rwlock. The fn_zone hash table resize is the noticeable part of this patch. I added a seqlock per fn_zone, so that readers can restart their lookup in the (very rare) case a writer expanded the hash table. Add rcu heads in fib_alias and fib_node, use call_rcu() to defer their freeing, and use appropriate _rcu list manipulations. Stress test (160.000.000 udp frames sent, IP route cache disabled to mimic DDOS attack, FIB_HASH) Before: real 0m41.191s user 0m13.137s sys 8m55.241s After: real 0m38.091s user 0m13.189s sys 7m53.018s Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* fib_hash: RCU conversion phase 1Eric Dumazet2010-10-171-19/+38
| | | | | | | | | | | | | | | | | First step for RCU conversion of fib_hash : struct fn_zone are created and never deleted. Very classic conversion, using rcu_assign_pointer(), rcu_dereference() and rtnl_dereference() verbs. __rcu markers on fz_next and fn_zone_list They are created under RTNL, we dont need fib_hash_lock anymore in fn_new_zone(). Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* fib_hash: embed initial hash table in fn_zoneEric Dumazet2010-10-171-29/+23
| | | | | | | | | | | | | | | | | | | While looking for false sharing problems, I noticed sizeof(struct fn_zone) was small (28 bytes) and possibly sharing a cache line with an often written kernel structure. Most of the time, fn_zone uses its initial hash table of 16 slots. We can avoid the false sharing problem by embedding this initial hash table in fn_zone itself, so that sizeof(fn_zone) > L1_CACHE_BYTES We did a similar optimization in commit a6501e080c (Reduce memory needs and speedup lookups) Add a fz_revorder field to speedup fn_hash() a bit. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net/pch_gbe: Use DEFINE_PCI_DEVICE_TABLEJoe Perches2010-10-171-1/+1
| | | | | | | | | Use the standard macro to put this table in __devinitconst. Compiled, untested. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netns: reorder fields in struct netEric Dumazet2010-10-172-11/+15
| | | | | | | | | | | | | | | | | | In a network bench, I noticed an unfortunate false sharing between 'loopback_dev' and 'count' fields in "struct net". 'count' is written each time a socket is created or destroyed, while loopback_dev might be often read in routing code. Move loopback_dev in a read mostly section of "struct net" Note: struct netns_xfrm is cache line aligned on SMP. (It contains a "struct dst_ops") Move it at the end to avoid holes, and reduce sizeof(struct net) by 128 bytes on ia32. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tcp: use correct counters in CA_CWR state tooIlpo Järvinen2010-10-171-6/+7
| | | | | | | | | | | | | | As CWR is stronger than CA_Disorder state, we can miscount SACK/Reno failure into other timeouts. Not a bad problem as it can happen only due to ECN, FRTO detecting spurious RTO or xmit error which are the only callers of tcp_enter_cwr. And even then losses and RTO must still follow thereafter to actually end up into the relevant code paths. Compile tested. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
* tcp: sack lost marking fixesIlpo Järvinen2010-10-171-10/+14
| | | | | | | | | When only fast rexmit should be done, tcp_mark_head_lost marks L too far. Also, sacked_upto below 1 is perfectly valid number, the packets == 0 then needs to be trapped elsewhere. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: remove ifdef NETIF_F_TSO from stmmac_ethtool.cGiuseppe Cavallaro2010-10-171-2/+0
| | | | | | Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Reported-by: Armando Visconti <armando.visconti@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* niu: introduce temp variables to avoid sparse warnings when swapping in-situHarvey Harrison2010-10-171-55/+37
| | | | | | | | | | | | Suppress a large block of warnings like: drivers/net/niu.c:7094:38: warning: incorrect type in assignment (different base types) drivers/net/niu.c:7094:38: expected restricted __be32 [usertype] ip4src drivers/net/niu.c:7094:38: got unsigned long long drivers/net/niu.c:7104:17: warning: cast from restricted __be32 ... Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: move MII outside of NET_ETHERNET, fix kconfig warningRandy Dunlap2010-10-161-7/+7
| | | | | | | | | | | | | | | We have USB, PCMCIA, and gigabit ethernet drivers that select MII even though NET_ETHERNET is not enabled, so make MII not be dependent on NET_ETHERNET. It is still dependent on NET and NETDEVICES. Fixes kconfig unmet dependency warning (shortened, was very long string): warning: (ARM_AT91_ETHER && NETDEVICES && NET_ETHERNET && ARM && ARCH_AT91RM9200 || ARM_KS8695_ETHER && NETDEVICES && NET_ETHERNET && ARM && ARCH_KS8695 || ... || IP1000 && NETDEVICES && NETDEV_1000 && PCI && EXPERIMENTAL || HAMACHI && NETDEVICES && NETDEV_1000 && PCI || R8169 && NETDEVICES && NETDEV_1000 && PCI || SIS190 && NETDEVICES && NETDEV_1000 && PCI || VIA_VELOCITY && NETDEVICES && NETDEV_1000 && PCI || ATL1 && NETDEVICES && NETDEV_1000 && PCI || ATL1E && NETDEVICES && NETDEV_1000 && PCI && EXPERIMENTAL || ATL1C && NETDEVICES && NETDEV_1000 && PCI && EXPERIMENTAL || JME && NETDEVICES && NETDEV_1000 && PCI || STMMAC_ETH && NETDEV_1000 && NETDEVICES && HAS_IOMEM || USB_PEGASUS && NETDEVICES && USB && NET || USB_RTL8150 && NETDEVICES && USB && NET && EXPERIMENTAL || USB_USBNET && NETDEVICES && USB && NET || PCMCIA_SMC91C92 && NETDEVICES && NET_PCMCIA && PCMCIA) selects MII which has unmet direct dependencies (NETDEVICES && NET_ETHERNET) Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Jeff Garzik <jgarzik@pobox.com> [2006-NOV-30] Signed-off-by: David S. Miller <davem@davemloft.net>
* infiniband: fix mlx4 kconfig dependency warningRandy Dunlap2010-10-161-0/+1
| | | | | | | | | Fix kconfig dependency warning to satisfy dependencies: warning: (MLX4_EN && NETDEVICES && NETDEV_10000 && PCI && INET || MLX4_INFINIBAND && INFINIBAND) selects MLX4_CORE which has unmet direct dependencies (NETDEVICES && NETDEV_10000 && PCI) Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: make function tables conststephen hemminger2010-10-1610-13/+13
| | | | | | | | These tables only contain function pointers. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: David S. Miller <davem@davemloft.net>
* stmmac: make ethtool functions localstephen hemminger2010-10-161-11/+13
| | | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: David S. Miller <davem@davemloft.net>
* tipc: cleanup function namespacestephen hemminger2010-10-1628-462/+84
| | | | | | | | | | | | | | | | Do some cleanups of TIPC based on make namespacecheck 1. Don't export unused symbols 2. Eliminate dead code 3. Make functions and variables local 4. Rename buf_acquire to tipc_buf_acquire since it is used in several files Compile tested only. This make break out of tree kernel modules that depend on TIPC routines. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Jon Maloy <jon.maloy@ericsson.com> Acked-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* via-velocity: forced 1000 Mbps mode support.françois romieu2010-10-162-8/+79
| | | | | | | | | Full duplex only. Half duplex 1000 Mbps is not supported. Signed-off-by: David Lv <DavidLv@viatech.com.cn> Acked-by: Francois Romieu <romieu@fr.zoreil.com> Tested-by: Seguier Regis <rseguier@e-teleport.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* fib: avoid false sharing on fib_table_hashEric Dumazet2010-10-162-9/+11
| | | | | | | | | | | | | | | While doing profile analysis, I found fib_hash_table was sometime in a cache line shared by a possibly often written kernel structure. (CONFIG_IP_ROUTE_MULTIPATH || !CONFIG_IPV6_MULTIPLE_TABLES) It's hard to detect because not easily reproductible. Make sure we allocate a full cache line to keep this shared in all cpus caches. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* fib_trie: use fls() instead of open coded loopEric Dumazet2010-10-161-12/+4
| | | | | | | | | fib_table_lookup() might use fls() to speedup an open coded loop. Noticed while doing a profile analysis. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* fib: remove a useless synchronize_rcu() callEric Dumazet2010-10-161-1/+0
| | | | | | | | | | | fib_nl_delrule() calls synchronize_rcu() for no apparent reason, while rtnl is held. I suspect it was done to avoid an atomic_inc_not_zero() in fib_rules_lookup(), which commit 7fa7cb7109d07 added anyway. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* fib6: use FIB_LOOKUP_NOREF in fib6_rule_lookup()Eric Dumazet2010-10-161-2/+1
| | | | | | | Avoid two atomic ops on found rule in fib6_rule_lookup() Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sundance: Add initial ethtool stats supportDenis Kirjanov2010-10-161-7/+87
| | | | | | | | Add ethtool stats support. Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* pch_gbe: fix if condition in set_settings()Dan Carpenter2010-10-161-1/+2
| | | | | | | | | | | | There were no curly braces in this if condition so it always enabled full duplex. And ecmd->speed is an unsigned short so it is never equal to -1. The effect is that mii_ethtool_sset() fails with -EINVAL and an error is printed to dmesg. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* dnet: mark methods static and annotate for correct endiannessHarvey Harrison2010-10-161-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Their doesn't appear to be bugs with the endianness handling here, just get the annotations right to keep sparse happy. Suppresses the following sparse warnings: drivers/net/dnet.c:30:5: warning: symbol 'dnet_readw_mac' was not declared. Should it be static? drivers/net/dnet.c:49:6: warning: symbol 'dnet_writew_mac' was not declared. Should it be static? drivers/net/dnet.c:364:5: warning: symbol 'dnet_phy_marvell_fixup' was not declared. Should it be static? drivers/net/dnet.c:66:13: warning: incorrect type in assignment (different base types) drivers/net/dnet.c:66:13: expected unsigned short [unsigned] [usertype] tmp drivers/net/dnet.c:66:13: got restricted __be16 [usertype] <noident> drivers/net/dnet.c:68:13: warning: incorrect type in assignment (different base types) drivers/net/dnet.c:68:13: expected unsigned short [unsigned] [usertype] tmp drivers/net/dnet.c:68:13: got restricted __be16 [usertype] <noident> drivers/net/dnet.c:70:13: warning: incorrect type in assignment (different base types) drivers/net/dnet.c:70:13: expected unsigned short [unsigned] [usertype] tmp drivers/net/dnet.c:70:13: got restricted __be16 [usertype] <noident> drivers/net/dnet.c:92:27: warning: cast to restricted __be16 drivers/net/dnet.c:94:33: warning: cast to restricted __be16 drivers/net/dnet.c:96:33: warning: cast to restricted __be16 Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cxgb4vf: make single bit signed bitfields unsignedHarvey Harrison2010-10-161-13/+13
| | | | | | | | | | | | | | | | | | | | Single bit signed bitfields don't make a lot of sense, noticed by sparse: drivers/net/cxgb4vf/t4vf_common.h:135:31: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:136:36: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:137:36: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:138:36: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:139:36: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:140:31: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:141:31: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:142:35: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:143:35: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:154:27: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:155:26: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:156:27: error: dubious one-bit signed bitfield drivers/net/cxgb4vf/t4vf_common.h:157:26: error: dubious one-bit signed bitfield Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: allocate skbs on local nodeEric Dumazet2010-10-162-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | commit b30973f877 (node-aware skb allocation) spread a wrong habit of allocating net drivers skbs on a given memory node : The one closest to the NIC hardware. This is wrong because as soon as we try to scale network stack, we need to use many cpus to handle traffic and hit slub/slab management on cross-node allocations/frees when these cpus have to alloc/free skbs bound to a central node. skb allocated in RX path are ephemeral, they have a very short lifetime : Extra cost to maintain NUMA affinity is too expensive. What appeared as a nice idea four years ago is in fact a bad one. In 2010, NIC hardwares are multiqueue, or we use RPS to spread the load, and two 10Gb NIC might deliver more than 28 million packets per second, needing all the available cpus. Cost of cross-node handling in network and vm stacks outperforms the small benefit hardware had when doing its DMA transfert in its 'local' memory node at RX time. Even trying to differentiate the two allocations done for one skb (the sk_buff on local node, the data part on NIC hardware node) is not enough to bring good performance. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* r8169: use 50% less ram for RX ringEric Dumazet2010-10-161-119/+64
| | | | | | | | | | | | | | Using standard skb allocations in r8169 leads to order-3 allocations (if PAGE_SIZE=4096), because NIC needs 16383 bytes, and skb overhead makes this bigger than 16384 -> 32768 bytes per "skb" Using kmalloc() permits to reduce memory requirements of one r8169 nic by 4Mbytes. (256 frames * 16Kbytes). This is fine since a hardware bug requires us to copy incoming frames, so we build real skb when doing this copy. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: DCB: remove DCB check configJohn Fastabend2010-10-151-1/+0
| | | | | | | | | | | | | | | Remove a DCB check config from DCB configuration we continue to configure DCB even if it fails so don't even bother to check. Plus user space (lldpad) checks this before programming the hw anyways. Worse case is we program some values into the hw that don't make total sense resulting in incorrect bandwidth allocation. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* igb: add check for fiber/serdes devices to igb_set_spd_dplx;Carolyn Wyborny2010-10-141-0/+7
| | | | | | | Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: declare functions as staticEmil Tantilov2010-10-1411-86/+40
| | | | | | | | | | | | Following patch fixes warnings reported by `make namespacecheck` Reported by Stephen Hemminger CC: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ixgbe: remove unused functionsEmil Tantilov2010-10-148-555/+0
| | | | | | | | | | | | | Remove functions that are declared, but not used in the driver. This patch fixes warnings reported by `make namespacecheck` Reported by Stephen Hemminger CC: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Add support for 57712 deviceMichael Chan2010-10-143-17/+103
| | | | | | | | | | Add new interrupt ack functions and other hardware interface logic to support the new device. Update version to 2.2.6. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Decouple uio close from cnic shutdownMichael Chan2010-10-141-14/+42
| | | | | | | | | | | | | | | | | | | During cnic shutdown, the original driver code requires userspace to close the uio device within a few seconds. This doesn't always happen as the userapp may be hung or otherwise take a long time to close. The system may crash when this happens. We fix the problem by decoupling the uio structures from the cnic structures during cnic shutdown. We do not unregister the uio device until the cnic driver is unloaded. This eliminates the unreliable wait loop for uio to close. All uio structures are kept in a linked list. If the device is shutdown and later brought back up again, the uio strcture will be found in the linked list and coupled back to the cnic structures. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Add cnic_uio_dev structMichael Chan2010-10-142-100/+124
| | | | | | | | and put all uio related structures and ring buffers in it. This allows uio operations to be done independent of the cnic device structures. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Add cnic_free_uio()Michael Chan2010-10-141-10/+27
| | | | | | | to free all UIO related structures. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Defer iscsi connection cleanupMichael Chan2010-10-143-4/+111
| | | | | | | | | | | | | The bnx2x devices require a 2 second quiet time before sending the last RAMROD command to destroy a connection. This sleep wait adds up to a long delay when iscsid is serially destroying maultiple connections. Create a workqueue to perform the final connection cleanup in the background to speed up the process. This significantly speeds up the process as the wait time can be done in parallel for multiple connections. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Add cnic_bnx2x_destroy_ramrod()Michael Chan2010-10-141-14/+25
| | | | | | | Refactoring code for the next patch to defer connection clean up. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Convert ctx_flags to bit fieldsMichael Chan2010-10-142-4/+4
| | | | | | | so that we can additional bit definitions without requiring a spinlock. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cnic: Add common cnic_request_irq()Michael Chan2010-10-141-12/+20
| | | | | | | | to reduce some duplicate code. Also, use tasklet_kill() in cnic_free_irq() to wait for the cnic_irq_task to complete. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Documentation: Update Phonet doc for Pipe controller changesKumar Sanghvi2010-10-131-18/+14
| | | | | | | | Updates to Phonet doc for Pipe controller 'connect' socket implementation and changes related to socket options. Signed-off-by: Kumar Sanghvi <kumar.sanghvi@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Phonet: 'connect' socket implementation for Pipe controllerKumar Sanghvi2010-10-134-191/+215
| | | | | | | | | | | | | | | | | | | | | | | | | Based on suggestion by Rémi Denis-Courmont to implement 'connect' for Pipe controller logic, this patch implements 'connect' socket call for the Pipe controller logic. The patch does following:- - Removes setsockopts for PNPIPE_CREATE and PNPIPE_DESTROY - Adds setsockopt for setting the Pipe handle value - Implements connect socket call - Updates the Pipe controller logic User-space should now follow below sequence with Pipe controller:- -socket -bind -setsockopt for PNPIPE_PIPE_HANDLE -connect -setsockopt for PNPIPE_ENCAP_IP -setsockopt for PNPIPE_ENABLE GPRS/3G data has been tested working fine with this. Signed-off-by: Kumar Sanghvi <kumar.sanghvi@stericsson.com> Acked-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tipc: clean out all instances of #if 0'd unused codePaul Gortmaker2010-10-139-375/+1
| | | | | | | | | | | | Remove all instances of legacy, or as yet to be implemented code that is currently living within an #if 0 ... #endif block. In the rare instance that some of it be needed in the future, it can still be dragged out of history, but there is no need for it to sit in mainline. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud