1. 13 3月, 2012 3 次提交
  2. 26 2月, 2012 1 次提交
  3. 23 2月, 2012 1 次提交
  4. 16 2月, 2012 10 次提交
  5. 15 2月, 2012 2 次提交
  6. 14 2月, 2012 8 次提交
  7. 10 2月, 2012 2 次提交
  8. 09 2月, 2012 8 次提交
    • J
      ixgbe: ethtool: stats user buffer overrun · 9cc00b51
      John Fastabend 提交于
      If the number of tx/rx queues changes the ethtool ioctl
      ETHTOOL_GSTATS may overrun the userspace buffer. This
      occurs because the general practice in user space to
      query stats is to issue a ETHTOOL_GSSET cmd to learn the
      buffer size needed, allocate the buffer, then call
      ETHTOOL_GSTIRNGS and ETHTOOL_GSTATS. If the number of
      real_num_queues is changed or flow control attributes
      are changed after ETHTOOL_GSSET but before the
      ETHTOOL_GSTRINGS/ETHTOOL_GSTATS a user space buffer
      overrun occurs.
      
      To fix the overrun always return the max buffer size
      needed from get_sset_count() then return all strings
      and stats from get_strings()/get_ethtool_stats().
      
      This _will_ change the output from the ioctl() call
      which could break applications and script parsing in
      theory. I believe these changes should not break existing
      tools because the only changes will be more {tx|rx}_queues
      and the {tx|rx}_pb_* stats will always be returned.
      Existing scripts already need to handle changing number
      of queues because this occurs today depending on system
      and current features. The {tx|rx}_pb_* stats are at the
      end of the output and should be handled by scripts today
      regardless.
      
      Finally get_ethtool_stats and get_strings are free-form
      outputs tools parsing these outputs should be defensive
      anyways. In the end these updates are better then
      having a tool segfault because of a buffer overrun.
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      9cc00b51
    • J
      ixgbe: dcb: up2tc mapping lost on disable/enable CEE DCB state · 5facb8e0
      John Fastabend 提交于
      Users expect the up2tc mapping to be maintained across a DCB
      enable/disable/enable transition. And since we maintain all
      the other DCB attributes we should do this for up2tc mappings
      as well just to be consistent. Also without this we break
      user space applications that expect this to occur that
      previously worked.
      Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Tested-by: NStephen Ko <stephen.s.ko@intel.com>
      Tested-by: NRoss Brattain <ross.b.brattain@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      5facb8e0
    • Y
      ixgbe: do not update real num queues when netdev is going away · 9d837ea2
      Yi Zou 提交于
      If the netdev is already in NETREG_UNREGISTERING/_UNREGISTERED state, do not
      update the real num tx queues. netdev_queue_update_kobjects() is already
      called via remove_queue_kobjects() at NETREG_UNREGISTERING time. So, when
      upper layer driver, e.g., FCoE protocol stack is monitoring the netdev
      event of NETDEV_UNREGISTER and calls back to LLD ndo_fcoe_disable() to remove
      extra queues allocated for FCoE, the associated txq sysfs kobjects are already
      removed, and trying to update the real num queues would cause something like
      below:
      
      ...
      PID: 25138  TASK: ffff88021e64c440  CPU: 3   COMMAND: "kworker/3:3"
       #0 [ffff88021f007760] machine_kexec at ffffffff810226d9
       #1 [ffff88021f0077d0] crash_kexec at ffffffff81089d2d
       #2 [ffff88021f0078a0] oops_end at ffffffff813bca78
       #3 [ffff88021f0078d0] no_context at ffffffff81029e72
       #4 [ffff88021f007920] __bad_area_nosemaphore at ffffffff8102a155
       #5 [ffff88021f0079f0] bad_area_nosemaphore at ffffffff8102a23e
       #6 [ffff88021f007a00] do_page_fault at ffffffff813bf32e
       #7 [ffff88021f007b10] page_fault at ffffffff813bc045
          [exception RIP: sysfs_find_dirent+17]
          RIP: ffffffff81178611  RSP: ffff88021f007bc0  RFLAGS: 00010246
          RAX: ffff88021e64c440  RBX: ffffffff8156cc63  RCX: 0000000000000004
          RDX: ffffffff8156cc63  RSI: 0000000000000000  RDI: 0000000000000000
          RBP: ffff88021f007be0   R8: 0000000000000004   R9: 0000000000000008
          R10: ffffffff816fed00  R11: 0000000000000004  R12: 0000000000000000
          R13: ffffffff8156cc63  R14: 0000000000000000  R15: ffff8802222a0000
          ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
       #8 [ffff88021f007be8] sysfs_get_dirent at ffffffff81178c07
       #9 [ffff88021f007c18] sysfs_remove_group at ffffffff8117ac27
      #10 [ffff88021f007c48] netdev_queue_update_kobjects at ffffffff813178f9
      #11 [ffff88021f007c88] netif_set_real_num_tx_queues at ffffffff81303e38
      #12 [ffff88021f007cc8] ixgbe_set_num_queues at ffffffffa0249763 [ixgbe]
      #13 [ffff88021f007cf8] ixgbe_init_interrupt_scheme at ffffffffa024ea89 [ixgbe]
      #14 [ffff88021f007d48] ixgbe_fcoe_disable at ffffffffa0267113 [ixgbe]
      #15 [ffff88021f007d68] vlan_dev_fcoe_disable at ffffffffa014fef5 [8021q]
      #16 [ffff88021f007d78] fcoe_interface_cleanup at ffffffffa02b7dfd [fcoe]
      #17 [ffff88021f007df8] fcoe_destroy_work at ffffffffa02b7f08 [fcoe]
      #18 [ffff88021f007e18] process_one_work at ffffffff8105d7ca
      #19 [ffff88021f007e68] worker_thread at ffffffff81060513
      #20 [ffff88021f007ee8] kthread at ffffffff810648b6
      #21 [ffff88021f007f48] kernel_thread_helper at ffffffff813c40f4
      Signed-off-by: NYi Zou <yi.zou@intel.com>
      Tested-by: NRoss Brattain <ross.b.brattain@intel.com>
      Tested-by: NStephen Ko <stephen.s.ko@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      9d837ea2
    • A
      ixgbe: Fix broken dependency on MAX_SKB_FRAGS being related to page size · 642c680e
      Alexander Duyck 提交于
      This patch fixes an issue in which RSC will generate corrupted frames when
      PAGE_SIZE is larger than 8K.  Specifically it looks like that in 2.6.39 a
      change was made so that GRO would always have at least 16 frags available
      for coalescing, but the ixgbe RSC logic was not updated.  As such the RSC
      feature would generate a frame larger than 64K and then overflow the value
      in the IP length field.
      
      To correct that I am now basing things on the PAGE_SIZE.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Tested-by: NStephen Ko <stephen.s.ko@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      642c680e
    • G
      ixgbe: Fix case of Tx Hang in PF with 32 VFs · 4cd6923d
      Greg Rose 提交于
      A check for the number of VFs allocated should have used a greater than
      equal operator instead of just greater than.  This caused allocation of
      exactly 32 VFs to not enable the PF transmit and receive enables.
      Signed-off-by: NGreg Rose <gregory.v.rose@intel.com>
      Tested-by: NRobert E Garrett <robertX.e.garrett@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      4cd6923d
    • G
      ixgbe: fix vf lookup · a4b08329
      Greg Rose 提交于
      Recent addition of code to find already allocated VFs failed to take
      account that systems with 2 or more multi-port SR-IOV capable controllers
      might have already enabled VFs.  Make sure that the VFs the function is
      finding are actually subordinate to the particular instance of the adapter
      that is looking for them and not subordinate to some device that has
      previously enabled SR-IOV.
      
      This bug exists in 3.2 stable as well as 3.3 release candidates.
      
      CC: stable@vger.kernel.org
      Reported-by: NDavid Ahern <daahern@cisco.com>
      Signed-off-by: NGreg Rose <gregory.v.rose@intel.com>
      Tested-by: NRobert E Garrett <robertX.e.garrett@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      a4b08329
    • G
      igb: fix vf lookup · 06292921
      Greg Rose 提交于
      Recent addition of code to find already allocated VFs failed to take
      account that systems with 2 or more multi-port SR-IOV capable controllers
      might have already enabled VFs.  Make sure that the VFs the function is
      finding are actually subordinate to the particular instance of the adapter
      that is looking for them and not subordinate to some device that has
      previously enabled SR-IOV.
      
      This is applicable to 3.2+ kernels.
      
      CC: stable@vger.kernel.org
      Reported-by: NDavid Ahern <daahern@cisco.com>
      Signed-off-by: NGreg Rose <gregory.v.rose@intel.com>
      Tested-by: NRobert E Garrett <robertX.e.garrett@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      06292921
    • D
      e1000: add dropped DMA receive enable back in for WoL · b868179c
      Dean Nelson 提交于
      Commit d5bc77a2 broke Wake-on-LAN by
      inadvertently dropping the enabling of DMA receives.
      
      Restore the enabling of DMA receives for WoL.
      
      This is applicable to 3.1+ stable trees.
      
      CC: stable@vger.stable.org
      Reported-by: NTobias Klausmann <klausman@schwarzvogel.de>
      Signed-off-by: NDean Nelson <dnelson@redhat.com>
      Tested-by: NTobias Klausmann <klausman@schwarzvogel.de>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      b868179c
  9. 08 2月, 2012 5 次提交
    • T
      zd1211rw: firmware needs duration_id set to zero for non-pspoll frames · e81a7bd5
      Tomas Vanek 提交于
      Some devices (iwl5100) cannot connect to zd1211rw based AP. It appears that
      zd1211 firmware messes up duration_id field if it is not set to zero by driver.
      
      Sniffing traffic shows that zd1211 is transmitting frames with duration_id bits
      14 and 15 set and other bits appearing random. Setting duration_id at driver to
      zero results zd1211 outputting sane duration_id. This means that firmware is
      setting correct values itself and expects duration_id to be zero in first
      place.
      
      Looking at vendor driver shows that only PSPoll frames have duration_id set by
      driver, for other frames duration_id left zero.
      
      Original bug-report and attached patch at:
        http://sourceforge.net/mailarchive/message.php?msg_id=28759111Reported-by: NTomas Vanek <Tomas.Vanek@fbl.cz>
      [modified original patch from bug-report, added check for pspoll frame]
      Signed-off-by: NJussi Kivilinna <jussi.kivilinna@mbnet.fi>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e81a7bd5
    • A
      net: enable TC35815 for MIPS again · a1728800
      Atsushi Nemoto 提交于
      8<----------------------------------------------------------------------
      From: Ralf Roesch <ralf.roesch@rw-gmbh.de>
      Date: Wed, 16 Nov 2011 09:33:50 +0100
      Subject: [PATCH] net: enable TC35815 for MIPS again
      
      TX493[8,9] MIPS SoCs support 2 Ethernet channels of type TC35815
      which are connected to the internal PCI controller.
      And JMR3927 MIPS board has a TC35815 chip on board.
      These dependencies were lost on movement to drivers/net/ethernet/toshiba.
      Signed-off-by: NRalf Roesch <ralf.roesch@rw-gmbh.de>
      Signed-off-by: NAtsushi Nemoto <anemo@mba.ocn.ne.jp>
      CC: stable@vger.kernel.org [3.2+]
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a1728800
    • Y
      net: sh_eth: fix skb_over_panic happen · fdb37a7f
      Yoshihiro Shimoda 提交于
      When this GETHER controller received a large frame (about 1800 bytes
      or more), skb_over_panic() happened. This is because the previous
      driver set the RFLR to 0x1000 (4096 bytes) and the skb allocate size
      is smaller than 4096 bytes. So, the controller accepted such a frame.
      
      The controller can discard a large frame by the RFLR setting.
      So, the patch modifies the value of RFLR to mtu + ETH_HLEN +
      VLAN_HLEN + ETH_FCS_LEN.
      Signed-off-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fdb37a7f
    • J
      bnx2x: Fix mem leak in bnx2x_tpa_stop() if build_skb() fails. · 3f61cd87
      Jesper Juhl 提交于
      We allocate memory for 'new_data' with kmalloc(). If we get the memory
      we then try to build_skb() and if that should fail (which it can) we
      do not enter 'if (likely(skb)) {' and actually use 'new_data' but
      instead fall through to the 'drop:' label and end up returning from
      the function without ever assigning 'new'data' to anything or freeing
      it. That leaks the memory allocated to 'new_data'.
      
      This patch fixes the memory leak by doing a kfree(new_data) in the
      case where build_skb() fails (or where allocation of 'new_data' itself
      fails, but in taht case it's just a harmless kfree(NULL)).
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      Acked-by: NEilon Greenstein <eilong@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3f61cd87
    • A
      CONFIG_TR/CONFIG_LLC: work around the problem with select · da091286
      Al Viro 提交于
      As it is, with PCI/ISA/MCA/CCW all set to n and PCMCIA set to m
      setting TR to y will set LLC to m, with very unpleasant results -
      net/802/psnap gets picked into obj-y, resulting in the kernel
      that won't link - psnap calls functions from llc.  The cause,
      AFAICS, is that kconfig gets rev_dep for LLC containing
      || TR && (deps for TR)
      and even though TR is boolean, both LLC and PCMCIA are tristate
      and that thing becomes || y && (n || m), i.e. || m.  The reason
      for dependency on PCMCIA is that when none of PCI, ISA, MCA, CCW
      or PCMCIA is set there'll be no tokenring drivers, so there's no
      point building tokenring core.  Proper fix probably belongs in
      kconfig (we need strict and, such that y <strict_and> m would be
      y, so that rev_deps added for tristate selected by bool would
      use that instead of &&; we'd have || TR <strict_and> (deps for TR)
      in this case), but it's a rather intrusive change.  There's an
      easy workaround in case of TR -> LLC select, namely to have a def_bool y
      symbol sitting under if TR and have that symbol selecting LLC.
      Kudos to johill for suggesting that one...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      da091286