1. 06 Jul, 2009 6 commits
    • Eric Dumazet's avatar
      forcedeth: Fix NAPI race. · 78c29bd9
      Eric Dumazet authored
      Eric Dumazet a écrit :
      > Ingo Molnar a écrit :
      >>> The following changes since commit 52989765:
      >>>   Linus Torvalds (1):
      >>>         Merge git://git.kernel.org/.../davem/net-2.6
      
      > >>> are available in the git repository at:
      
      >>>   master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git master
      >> Hm, something in this lot quickly wrecked networking here - see the
      >> tx timeout dump below. It starts with:
      >>
      >> [  351.004596] WARNING: at net/sched/sch_generic.c:246 dev_watchdog+0x10b/0x19c()
      >> [  351.011815] Hardware name: System Product Name
      >> [  351.016220] NETDEV WATCHDOG: eth0 (forcedeth): transmit queue 0 timed out
      >>
      >> Config attached. Unfortunately i've got no time to do bisection
      >> today.
      >
      >
      >
      > forcedeth might have a problem, in its netif_wake_queue() logic, but
      > I could not see why a recent patch could make this problem visible now.
      >
      > CPU0/1: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ stepping 02
      > is not a new cpu either :)
      >
      > forcedeth uses an internal tx_stop without appropriate barrier.
      >
      > Could you try following patch ?
      >
      > (random guess as I dont have much time right now)
      
      We might have a race in napi_schedule(), leaving interrupts disabled forever.
      I cannot test this patch, I dont have the hardware...
      Tested-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      78c29bd9
    • Julia Lawall's avatar
      drivers/net/smsc911x.c: Fix resource size off by 1 error · 39424539
      Julia Lawall authored
      The call resource_size(res) returns res->end - res->start + 1 and thus the
      second change is semantics-preserving.  res_size is then used as the second
      argument of a call to request_mem_region, and the memory allocated by this
      call appears to be the same as what is released in the two calls to
      release_mem_region.  So the size argument for those calls should be
      resource_size(size) as well.  Alternatively, in the second call to
      release_mem_region, the second argument could be res_size, as that variable
      has already been initialized at the point of this call.
      
      The problem was found using the following semantic patch:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @@
      struct resource *res;
      @@
      
      - (res->end - res->start) + 1
      + resource_size(res)
      
      @@
      struct resource *res;
      @@
      
      - res->end - res->start
      + BAD(resource_size(res))
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      39424539
    • Ken Kawasaki's avatar
      pcnet_cs: add new id · 4c3dd308
      Ken Kawasaki authored
      add new id (RIOS System PC CARD3 ETHERNET).
      Signed-off-by: default avatarKen Kawasaki <ken_kawasaki@spring.nifty.jp>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4c3dd308
    • Eilon Greenstein's avatar
      bnx2x: Fix the maximal values of coalescing timeouts. · 1e9d9987
      Eilon Greenstein authored
      This patch properly defines the maximum values for rx/tx coalescing timeouts.
      Signed-off-by: default avatarVlad Zolotarov <vladz@broadcom.com>
      Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1e9d9987
    • Eilon Greenstein's avatar
      bnx2x: Disable HC coalescing when setting timeout to zero. · 3799cf47
      Eilon Greenstein authored
      Problem reported by Flavio Leitner <fleitner@redhat.com>:
      When setting rx/tx coalescing timeout to the values less than 12 traffic was
      stopped.
      
      The FW supports coalescing in 12us granularity, and so value of less then 12
      should be interpreted as disabling coalescing
      Signed-off-by: default avatarVlad Zolotarov <vladz@broadcom.com>
      Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3799cf47
    • Herbert Xu's avatar
      tun: Fix device unregister race · d23e4365
      Herbert Xu authored
      It is currently possible for an asynchronous device unregister
      to cause the same tun device to be unregistered twice.  This
      is because the unregister in tun_chr_close only checks whether
      __tun_get(tfile) != NULL.  This however has nothing to do with
      whether the device has already been unregistered.  All it tells
      you is whether __tun_detach has been called.
      
      This patch fixes this by using the most obvious thing to test
      whether the device has been unregistered.
      
      It also moves __tun_detach outside of rtnl_unlock since nothing
      that it does requires that lock.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d23e4365
  2. 04 Jul, 2009 22 commits
  3. 02 Jul, 2009 7 commits
  4. 01 Jul, 2009 5 commits
    • Eric W. Biederman's avatar
      Revert "ipv4: arp announce, arp_proxy and windows ip conflict verification" · f8a68e75
      Eric W. Biederman authored
      This reverts commit 73ce7b01.
      
      After discovering that we don't listen to gratuitious arps in 2.6.30
      I tracked the failure down to this commit.
      
      The patch makes absolutely no sense.  RFC2131 RFC3927 and RFC5227.
      are all in agreement that an arp request with sip == 0 should be used
      for the probe (to prevent learning) and an arp request with sip == tip
      should be used for the gratitous announcement that people can learn
      from.
      
      It appears the author of the broken patch got those two cases confused
      and modified the code to drop all gratuitous arp traffic.  Ouch!
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarEric W. Biederman <ebiederm@aristanetworks.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f8a68e75
    • Alexander Duyck's avatar
      igb: return PCI_ERS_RESULT_DISCONNECT on permanent error · 59ed6eec
      Alexander Duyck authored
      PCI drivers that implement the io_error_detected callback should return
      PCI_ERS_RESULT_DISCONNECT if the state passed in is
      pci_channel_io_perm_failure.  This patch fixes the issue for igb.
      Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      59ed6eec
    • Mike Mason's avatar
      e1000e: io_error_detected callback should return PCI_ERS_RESULT_DISCONNECT · c93b5a76
      Mike Mason authored
      on permanent failure
      
      PCI drivers that implement the io_error_detected callback
      should return PCI_ERS_RESULT_DISCONNECT if the state
      passed in is pci_channel_io_perm_failure.  This state is not
      checked in many of the network drivers.
      
      This patch fixes the omission in the e1000e driver.
      Signed-off-by: default avatarMike Mason <mmlnx@us.ibm.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c93b5a76
    • Andre Detsch's avatar
      e1000: return PCI_ERS_RESULT_DISCONNECT on permanent error · eab63302
      Andre Detsch authored
      PCI drivers that implement the io_error_detected callback
      should return PCI_ERS_RESULT_DISCONNECT if the state
      passed in is pci_channel_io_perm_failure.  This state is
      not checked in many of the network drivers.
      
      The patch fixes the omission in the e1000 driver.
      
      Based on Mike Mason's similar patch for e1000e.
      Signed-off-by: default avatarAndre Detsch <adetsch@br.ibm.com>
      CC: Mike Mason <mmlnx@us.ibm.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eab63302
    • Jesse Brandeburg's avatar
      e1000: fix unmap bug · 679be3ba
      Jesse Brandeburg authored
      as reported by kerneloops.org
      
      [  121.781161] ------------[ cut here ]------------
      [  121.781171] WARNING: at lib/dma-debug.c:793 check_unmap+0x14e/0x577()
      [  121.781173] Hardware name: S5520HC
      [  121.781177] e1000 0000:0a:00.0: DMA-API: device driver tries to free DMA
      memory it has not allocated [device address=0x00000001d688b0fa] [size=1522
      bytes]
      [  121.781180] Modules linked in: e1000 mdio  dca [last unloaded: ixgbe]
      [  121.781187] Pid: 4793, comm: bash Tainted: P 2.6.30-master-06161113 #3
      [  121.781190] Call Trace:
      [  121.781195]  [<ffffffff8123056f>] ? check_unmap+0x14e/0x577
      [  121.781201]  [<ffffffff81057a19>] warn_slowpath_common+0x77/0x8f
      [  121.781205]  [<ffffffff81057ae1>] warn_slowpath_fmt+0x9f/0xa1
      [  121.781212]  [<ffffffff81477ce2>] ? _spin_lock_irqsave+0x3f/0x49
      [  121.781216]  [<ffffffff8122fa97>] ? get_hash_bucket+0x28/0x33
      [  121.781220]  [<ffffffff8123056f>] check_unmap+0x14e/0x577
      [  121.781225]  [<ffffffff810e4f48>] ? check_bytes_and_report+0x38/0xcb
      [  121.781230]  [<ffffffff81230bbf>] debug_dma_unmap_page+0x80/0x92
      [  121.781234]  [<ffffffff8122e549>] ? unmap_single+0x1a/0x4e
      [  121.781239]  [<ffffffff813901e1>] ? __kfree_skb+0x74/0x78
      [  121.781250]  [<ffffffffa00662ef>] pci_unmap_single+0x64/0x6d [e1000]
      [  121.781259]  [<ffffffffa0066344>] e1000_clean_rx_ring+0x4c/0xbf [e1000]
      [  121.781268]  [<ffffffffa00663df>] e1000_clean_all_rx_rings+0x28/0x36 [e1000]
      [  121.781277]  [<ffffffffa0067464>] e1000_down+0x138/0x141 [e1000]
      [  121.781286]  [<ffffffffa00681c2>] __e1000_shutdown+0x6b/0x198 [e1000]
      [  121.781296]  [<ffffffffa0068405>] e1000_suspend+0x17/0x50 [e1000]
      [  121.781301]  [<ffffffff81237665>] pci_legacy_suspend+0x3b/0xbe
      [  121.781305]  [<ffffffff81237bc6>] pci_pm_suspend+0x3e/0xf1
      [  121.781310]  [<ffffffff812eaf1c>] pm_op+0x57/0xde
      [  121.781314]  [<ffffffff812eb444>] dpm_suspend_start+0x31e/0x470
      [  121.781319]  [<ffffffff810877da>] suspend_devices_and_enter+0x3e/0x1a2
      [  121.781323]  [<ffffffff81087a0f>] enter_state+0xd1/0x127
      [  121.781327]  [<ffffffff8108717a>] state_store+0xa7/0xc9
      [  121.781332]  [<ffffffff81221843>] kobj_attr_store+0x17/0x19
      [  121.781336]  [<ffffffff8113c01e>] sysfs_write_file+0xe5/0x121
      [  121.781341]  [<ffffffff810ed165>] vfs_write+0xab/0x105
      [  121.781344]  [<ffffffff810ed279>] sys_write+0x47/0x6d
      [  121.781349]  [<ffffffff81027aab>] system_call_fastpath+0x16/0x1b
      [  121.781352] ---[ end trace 97bacaaac2ed7786 ]---
      
      Fix is to correctly zero out internal ->dma value when unmapping
      and make sure never to unmap unless there specifically was a mapping done.
      Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      679be3ba