1. 17 7月, 2010 2 次提交
    • R
      ibmveth: lost IRQ while closing/opening device leads to service loss · ee2e6114
      Robert Jennings 提交于
      The order of freeing the IRQ and freeing the device in firmware
      in ibmveth_close can cause the adapter to become unusable after a
      subsequent ibmveth_open.  Only a reboot of the OS will make the
      network device usable again. This is seen when cycling the adapter
      up and down while there is network activity.
      
      There is a window where an IRQ will be left unserviced (H_EOI will not
      be called).  The solution is to make a VIO_IRQ_DISABLE h_call, free the
      device with firmware, and then call free_irq.
      Signed-off-by: NRobert Jennings <rcj@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ee2e6114
    • S
      rt2x00: Fix lockdep warning in rt2x00lib_probe_dev() · 9acd56d3
      Stephen Boyd 提交于
      The rt2x00dev->intf_work workqueue is never initialized when a driver is
      probed for a non-existent device (in this case rt2500usb). On such a
      path we call rt2x00lib_remove_dev() to free any resources initialized
      during the probe before we use INIT_WORK to initialize the workqueue.
      This causes lockdep to get confused since the lock used in the workqueue
      hasn't been initialized yet but is now being acquired during
      cancel_work_sync() called by rt2x00lib_remove_dev().
      
      Fix this by initializing the workqueue first before we attempt to probe
      the device. This should make lockdep happy and avoid breaking any
      assumptions about how the library cleans up after a probe fails.
      
      phy0 -> rt2x00lib_probe_dev: Error - Failed to allocate device.
      INFO: trying to register non-static key.
      the code is fine but needs lockdep annotation.
      turning off the locking correctness validator.
      Pid: 2027, comm: modprobe Not tainted 2.6.35-rc5+ #60
      Call Trace:
       [<ffffffff8105fe59>] register_lock_class+0x152/0x31f
       [<ffffffff81344a00>] ? usb_control_msg+0xd5/0x111
       [<ffffffff81061bde>] __lock_acquire+0xce/0xcf4
       [<ffffffff8105f6fd>] ? trace_hardirqs_off+0xd/0xf
       [<ffffffff81492aef>] ?  _raw_spin_unlock_irqrestore+0x33/0x41
       [<ffffffff810628d5>] lock_acquire+0xd1/0xf7
       [<ffffffff8104f037>] ? __cancel_work_timer+0x99/0x17e
       [<ffffffff8104f06e>] __cancel_work_timer+0xd0/0x17e
       [<ffffffff8104f037>] ? __cancel_work_timer+0x99/0x17e
       [<ffffffff8104f136>] cancel_work_sync+0xb/0xd
       [<ffffffffa0096675>] rt2x00lib_remove_dev+0x25/0xb0 [rt2x00lib]
       [<ffffffffa0096bf7>] rt2x00lib_probe_dev+0x380/0x3ed [rt2x00lib]
       [<ffffffff811d78a7>] ? __raw_spin_lock_init+0x31/0x52
       [<ffffffffa00bbd2c>] ? T.676+0xe/0x10 [rt2x00usb]
       [<ffffffffa00bbe4f>] rt2x00usb_probe+0x121/0x15e [rt2x00usb]
       [<ffffffff813468bd>] usb_probe_interface+0x151/0x19e
       [<ffffffff812ea08e>] driver_probe_device+0xa7/0x136
       [<ffffffff812ea167>] __driver_attach+0x4a/0x66
       [<ffffffff812ea11d>] ? __driver_attach+0x0/0x66
       [<ffffffff812e96ca>] bus_for_each_dev+0x54/0x89
       [<ffffffff812e9efd>] driver_attach+0x19/0x1b
       [<ffffffff812e9b64>] bus_add_driver+0xb4/0x204
       [<ffffffff812ea41b>] driver_register+0x98/0x109
       [<ffffffff813465dd>] usb_register_driver+0xb2/0x173
       [<ffffffffa00ca000>] ? rt2500usb_init+0x0/0x20 [rt2500usb]
       [<ffffffffa00ca01e>] rt2500usb_init+0x1e/0x20 [rt2500usb]
       [<ffffffff81000203>] do_one_initcall+0x6d/0x17a
       [<ffffffff8106cae8>] sys_init_module+0x9c/0x1e0
       [<ffffffff8100296b>] system_call_fastpath+0x16/0x1b
      Signed-off-by: NStephen Boyd <bebarino@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      9acd56d3
  2. 15 7月, 2010 1 次提交
    • J
      hostap_pci: set dev->base_addr during probe · 0f4da2d7
      John W. Linville 提交于
      "hostap: Protect against initialization interrupt" (which reinstated
      "wireless: hostap, fix oops due to early probing interrupt")
      reintroduced Bug 16111.  This is because hostap_pci wasn't setting
      dev->base_addr, which is now checked in prism2_interrupt.  As a result,
      initialization was failing for PCI-based hostap devices.  This corrects
      that oversight.
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      0f4da2d7
  3. 13 7月, 2010 1 次提交
  4. 12 7月, 2010 1 次提交
  5. 08 7月, 2010 4 次提交
  6. 06 7月, 2010 1 次提交
  7. 03 7月, 2010 9 次提交
  8. 01 7月, 2010 2 次提交
    • F
      bonding: check if clients MAC addr has changed · 42d782ac
      Flavio Leitner 提交于
      When two systems using bonding devices in adaptive load
      balancing (ALB) communicates with each other, an endless
      ping-pong of ARP replies starts between these two systems.
      
      What happens? In the ALB mode, bonding driver keeps track
      of each client connected in a hash table, so it can do the
      receive load balancing (RLB). This hash table is updated
      when an ARP reply is received, then it scans for the client
      entry, updates its MAC address and flag it to be announced
      later. Therefore, two seconds later, the alb monitor runs
      and send for each updated client entry two ARP replies
      updating this specific client. The same process happens on
      the receiving system, causing the endless ping-pong of arp
      replies.
      
      See more information including the relevant functions below:
      
         System 1                          System 2
          bond0                             bond0
      
         ping <system2>
          ARP request  --------->
                                 <--------- ARP reply
      
      +->rlb_arp_recv  <---------------------+   <--- loop begins
      |  rlb_update_entry_from_arp           |
      |  client_info->ntt = 1;               |
      |  bond_info->rx_ntt = 1;              |
      |                                      |
      |         <communication succeed>      |
      |                                      |
      |  bond_alb_monitor                    |
      |  rlb_update_rx_clients               |
      |  rlb_update_client                   |
      |  arp_create(ARPOP_REPLY)             |
      |   send ARP reply -------------->     V
      |   send ARP reply -------------->
      |                               rlb_arp_recv
      |                               rlb_update_entry_from_arp
      |                               client_info->ntt = 1;
      |                               bond_info->rx_ntt = 1;
      |                           < snipped, same as in system 1>
      +-------           <-------------- send ARP reply
                         <-------------- send ARP reply
      
      Besides the unneeded networking traffic, this loop breaks
      a cluster because a backup system can't take over the IP
      address. There is always one system sending an ARP reply
      poisoning the network.
      
      This patch fixes the problem adding a check for the MAC
      address before updating it. Thus, if the MAC address didn't
      change, there is no need to update neither to announce it later.
      Signed-off-by: NFlavio Leitner <fleitner@redhat.com>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      42d782ac
    • S
      mv643xx_eth: use sw csum for big packets · 9b2c2ff7
      Saeed Bishara 提交于
      Some controllers (KW, Dove) limits the TX IP/layer4 checksum offloading to a max size.
      Signed-off-by: NSaeed Bishara <saeed@marvell.com>
      Acked-by: NLennert Buytenhek <buytenh@wantstofly.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9b2c2ff7
  9. 30 6月, 2010 3 次提交
  10. 29 6月, 2010 1 次提交
    • A
      bonding: prevent netpoll over bonded interfaces · c22d7ac8
      Andy Gospodarek 提交于
      Support for netpoll over bonded interfaces was added here:
      
      	commit f6dc31a8
      	Author: WANG Cong <amwang@redhat.com>
      	Date:   Thu May 6 00:48:51 2010 -0700
      
      	    bonding: make bonding support netpoll
      
      but it is bad enough that we should probably just disable netpoll over
      bonding until some of the locking logic in the bonding driver is changed
      or converted completely to RCU.  Simple actions like changing the active
      slave in active-backup mode will hang the box if a high enough printk
      debugging level is enabled.
      
      Keeping the old code around will be good for anyone that wants to work
      on it (and for after the RCU conversion), so I propose this small patch
      rather than ripping it all out.
      Signed-off-by: NAndy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c22d7ac8
  11. 27 6月, 2010 2 次提交
  12. 26 6月, 2010 4 次提交
    • F
      cpmac: do not leak struct net_device on phy_connect errors · ed770f01
      Florian Fainelli 提交于
      If the call to phy_connect fails, we will return directly instead of freeing
      the previously allocated struct net_device.
      Signed-off-by: NFlorian Fainelli <florian@openwrt.org>
      CC: stable@kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ed770f01
    • K
      smc91c92_cs: fix the problem that lan & modem does not work simultaneously · 9735b7ef
      Ken Kawasaki 提交于
      smc91c92_cs:
        Fix the problem that lan & modem does not work simultaneously
        in the Megahertz multi-function card.
        We need to write MEGAHERTZ_ISR to retrigger interrupt.
      Signed-off-by: NKen Kawasaki <ken_kawasaki@spring.nifty.jp>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9735b7ef
    • W
      iwlwifi: set TX_CMD_FLAG_PROT_REQUIRE_MSK in tx_flag · 062bee44
      Wey-Yi Guy 提交于
      When building tx command, always set TX_CMD_FLAG_PROT_REQUIRE_MSK
      for 5000 series and up.
      
      Without setting this bit the firmware will not examine the RTS/CTS setting
      and thus not send traffic with the appropriate protection. RTS/CTS is is
      required for HT traffic in a noisy environment where, without this setting,
      connections will stall on some hardware as documented in the patch that
      initially attempted to address this:
      
          commit 1152dcc2
          Author: Wey-Yi Guy <wey-yi.w.guy@intel.com>
          Date:   Fri Jan 15 13:42:58 2010 -0800
      
          iwlwifi: Fix throughput stall issue in HT mode for 5000
      
          Similar to 6000 and 1000 series, RTS/CTS is the recommended
          protection mechanism for 5000 series in HT mode based on the HW design.
          Using RTS/CTS will better protect the inner exchange from interference,
          especially in highly-congested environment, it also prevent uCode encounter
          TX FIFO underrun and other HT mode related performance issues.
      
      For 3945 and 4965, different flags are used for RTS/CTS or CTS-to-Self
      protection.
      Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
      Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      062bee44
    • J
      iwlwifi: fix multicast · d1e89f37
      Johannes Berg 提交于
      commit 3474ad63
      Author: Johannes Berg <johannes.berg@intel.com>
      Date:   Thu Apr 29 04:43:05 2010 -0700
      
          iwlwifi: apply filter flags directly
      
      broke multicast. The reason, it turns out, is that
      the code previously checked if ALLMULTI _changed_,
      which the new code no longer did, and normally it
      _never_ changes. Had somebody changed it manually,
      the code prior to my patch there would have been
      broken already.
      
      The reason is that we always, unconditionally, ask
      the device to pass up all multicast frames, but the
      new code made it depend on ALLMULTI which broke it
      since now we'd pass up multicast frames depending
      on the default filter in the device, which isn't
      necessarily what we want (since we don't program it
      right now).
      
      Fix this by simply not checking allmulti as we have
      allmulti behaviour enabled already anyway.
      Reported-by: NMaxim Levitsky <maximlevitsky@gmail.com>
      Tested-by: NMaxim Levitsky <maximlevitsky@gmail.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      d1e89f37
  13. 24 6月, 2010 4 次提交
  14. 23 6月, 2010 1 次提交
  15. 22 6月, 2010 2 次提交
  16. 19 6月, 2010 1 次提交
    • B
      ath5k: initialize ah->ah_current_channel · b6855772
      Bob Copeland 提交于
      ath5k assumes ah_current_channel is always a valid pointer in
      several places, but a newly created interface may not have a
      channel.  To avoid null pointer dereferences, set it up to point
      to the first available channel until later reconfigured.
      
      This fixes the following oops:
      $ rmmod ath5k
      $ insmod ath5k
      $ iw phy0 set distance 11000
      
      BUG: unable to handle kernel NULL pointer dereference at 00000006
      IP: [<d0a1ff24>] ath5k_hw_set_coverage_class+0x74/0x1b0 [ath5k]
      *pde = 00000000
      Oops: 0000 [#1]
      last sysfs file: /sys/devices/pci0000:00/0000:00:0e.0/ieee80211/phy0/index
      Modules linked in: usbhid option usb_storage usbserial usblp evdev lm90
      scx200_acb i2c_algo_bit i2c_dev i2c_core via_rhine ohci_hcd ne2k_pci
      8390 leds_alix2 xt_IMQ imq nf_nat_tftp nf_conntrack_tftp nf_nat_irc nf_cc
      
      Pid: 1597, comm: iw Not tainted (2.6.32.14 #8)
      EIP: 0060:[<d0a1ff24>] EFLAGS: 00010296 CPU: 0
      EIP is at ath5k_hw_set_coverage_class+0x74/0x1b0 [ath5k]
      EAX: 000000c2 EBX: 00000000 ECX: ffffffff EDX: c12d2080
      ESI: 00000019 EDI: cf8c0000 EBP: d0a30edc ESP: cfa09bf4
        DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
      Process iw (pid: 1597, ti=cfa09000 task=cf88a000 task.ti=cfa09000)
      Stack:
        d0a34f35 d0a353f8 d0a30edc 000000fe cf8c0000 00000000 1900063d cfa8c9e0
      <0> cfa8c9e8 cfa8c0c0 cfa8c000 d0a27f0c 199d84b4 cfa8c200 00000010 d09bfdc7
      <0> 00000000 00000000 ffffffff d08e0d28 cf9263c0 00000001 cfa09cc4 00000000
      Call Trace:
        [<d0a27f0c>] ? ath5k_hw_attach+0xc8c/0x3c10 [ath5k]
        [<d09bfdc7>] ? __ieee80211_request_smps+0x1347/0x1580 [mac80211]
        [<d08e0d28>] ? nl80211_send_scan_start+0x7b8/0x4520 [cfg80211]
        [<c10f5db9>] ? nla_parse+0x59/0xc0
        [<c11ca8d9>] ? genl_rcv_msg+0x169/0x1a0
        [<c11ca770>] ? genl_rcv_msg+0x0/0x1a0
        [<c11c7e68>] ? netlink_rcv_skb+0x38/0x90
        [<c11c9649>] ? genl_rcv+0x19/0x30
        [<c11c7c03>] ? netlink_unicast+0x1b3/0x220
        [<c11c893e>] ? netlink_sendmsg+0x26e/0x290
        [<c11a409e>] ? sock_sendmsg+0xbe/0xf0
        [<c1032780>] ? autoremove_wake_function+0x0/0x50
        [<c104d846>] ? __alloc_pages_nodemask+0x106/0x530
        [<c1074933>] ? do_lookup+0x53/0x1b0
        [<c10766f9>] ? __link_path_walk+0x9b9/0x9e0
        [<c11acab0>] ? verify_iovec+0x50/0x90
        [<c11a42b1>] ? sys_sendmsg+0x1e1/0x270
        [<c1048e50>] ? find_get_page+0x10/0x50
        [<c104a96f>] ? filemap_fault+0x5f/0x370
        [<c1059159>] ? __do_fault+0x319/0x370
        [<c11a55b4>] ? sys_socketcall+0x244/0x290
        [<c101962c>] ? do_page_fault+0x1ec/0x270
        [<c1019440>] ? do_page_fault+0x0/0x270
        [<c1002ae5>] ? syscall_call+0x7/0xb
      Code: 00 b8 fe 00 00 00 b9 f8 53 a3 d0 89 5c 24 14 89 7c 24 10 89 44 24
      0c 89 6c 24 08 89 4c 24 04 c7 04 24 35 4f a3 d0 e8 7c 30 60 f0 <0f> b7
      43 06 ba 06 00 00 00 a8 10 75 0e 83 e0 20 83 f8 01 19 d2
      EIP: [<d0a1ff24>] ath5k_hw_set_coverage_class+0x74/0x1b0 [ath5k] SS:ESP
      0068:cfa09bf4
      CR2: 0000000000000006
      ---[ end trace 54f73d6b10ceb87b ]---
      
      Cc: stable@kernel.org
      Reported-by: NSteve Brown <sbrown@cortland.com>
      Signed-off-by: NBob Copeland <me@bobcopeland.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      b6855772
  17. 17 6月, 2010 1 次提交
    • F
      bnx2: fix dma_get_ops compilation breakage · aabef8b2
      FUJITA Tomonori 提交于
      This removes dma_get_ops() prefetch optimization in bnx2.
      
      bnx2 uses dma_get_ops() to see if dma_sync_single_for_cpu() is
      noop. bnx2 does prefetch if it's noop.
      
      But dma_get_ops() isn't available on all the architectures (only the
      architectures that uses dma_map_ops struct have it). Using
      dma_get_ops() in drivers leads to compilation breakage on many
      architectures.
      
      This patch removes dma_get_ops() and changes bnx2 to do prefetch on
      all the architectures. This adds useless prefetch on non-coherent
      architectures but this is harmless. It is also unlikely to cause the
      performance drop.
      
      [ Remove now unused local variable 'pdev' -DaveM ]
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Acked-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      aabef8b2