1. 27 11月, 2014 2 次提交
  2. 24 11月, 2014 3 次提交
    • C
      igb: Fixes needed for surprise removal support · 17a402a0
      Carolyn Wyborny 提交于
      This patch adds some checks in order to prevent panic's on surprise
      removal of devices during S0, S3, S4.  Without this patch, Thunderbolt
      type device removal will panic the system.
      Signed-off-by: NYanir Lubetkin <yanirx.lubetkin@intel.com>
      Signed-off-by: NCarolyn Wyborny <carolyn.wyborny@intel.com>
      Tested-by: NAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      17a402a0
    • D
      ixgbe: fix use after free adapter->state test in ixgbe_remove/ixgbe_probe · b5b2ffc0
      Daniel Borkmann 提交于
      While working on a different issue, I noticed an annoying use
      after free bug on my machine when unloading the ixgbe driver:
      
      [ 8642.318797] ixgbe 0000:02:00.1: removed PHC on p2p2
      [ 8642.742716] ixgbe 0000:02:00.1: complete
      [ 8642.743784] BUG: unable to handle kernel paging request at ffff8807d3740a90
      [ 8642.744828] IP: [<ffffffffa01c77dc>] ixgbe_remove+0xfc/0x1b0 [ixgbe]
      [ 8642.745886] PGD 20c6067 PUD 81c1f6067 PMD 81c15a067 PTE 80000007d3740060
      [ 8642.746956] Oops: 0002 [#1] SMP DEBUG_PAGEALLOC
      [ 8642.748039] Modules linked in: [...]
      [ 8642.752929] CPU: 1 PID: 1225 Comm: rmmod Not tainted 3.18.0-rc2+ #49
      [ 8642.754203] Hardware name: Supermicro X10SLM-F/X10SLM-F, BIOS 1.1b 11/01/2013
      [ 8642.755505] task: ffff8807e34d3fe0 ti: ffff8807b7204000 task.ti: ffff8807b7204000
      [ 8642.756831] RIP: 0010:[<ffffffffa01c77dc>]  [<ffffffffa01c77dc>] ixgbe_remove+0xfc/0x1b0 [ixgbe]
      [...]
      [ 8642.774335] Stack:
      [ 8642.775805]  ffff8807ee824098 ffff8807ee824098 ffffffffa01f3000 ffff8807ee824000
      [ 8642.777326]  ffff8807b7207e18 ffffffff8137720f ffff8807ee824098 ffff8807ee824098
      [ 8642.778848]  ffffffffa01f3068 ffff8807ee8240f8 ffff8807b7207e38 ffffffff8144180f
      [ 8642.780365] Call Trace:
      [ 8642.781869]  [<ffffffff8137720f>] pci_device_remove+0x3f/0xc0
      [ 8642.783395]  [<ffffffff8144180f>] __device_release_driver+0x7f/0xf0
      [ 8642.784876]  [<ffffffff814421f8>] driver_detach+0xb8/0xc0
      [ 8642.786352]  [<ffffffff814414a9>] bus_remove_driver+0x59/0xe0
      [ 8642.787783]  [<ffffffff814429d0>] driver_unregister+0x30/0x70
      [ 8642.789202]  [<ffffffff81375c65>] pci_unregister_driver+0x25/0xa0
      [ 8642.790657]  [<ffffffffa01eb38e>] ixgbe_exit_module+0x1c/0xc8e [ixgbe]
      [ 8642.792064]  [<ffffffff810f93a2>] SyS_delete_module+0x132/0x1c0
      [ 8642.793450]  [<ffffffff81012c61>] ? do_notify_resume+0x61/0xa0
      [ 8642.794837]  [<ffffffff816d2029>] system_call_fastpath+0x12/0x17
      
      The issue is that test_and_set_bit() done on adapter->state is being
      performed *after* the netdevice has been freed via free_netdev().
      
      When netdev is being allocated on initialization time, it allocates
      a private area, here struct ixgbe_adapter, that resides after the
      net_device structure. In ixgbe_probe(), the device init routine,
      we set up the adapter after alloc_etherdev_mq() on the private area
      and add a reference for the pci_dev as well via pci_set_drvdata().
      
      Both in the error path of ixgbe_probe(), but also on module unload
      when ixgbe_remove() is being called, commit 41c62843 ("ixgbe:
      Fix rcu warnings induced by LER") accesses adapter after free_netdev().
      The patch stores the result in a bool and thus fixes above oops on my
      side.
      
      Fixes: 41c62843 ("ixgbe: Fix rcu warnings induced by LER")
      Cc: stable <stable@vger.kernel.org>
      Cc: Mark Rustad <mark.d.rustad@intel.com>
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b5b2ffc0
    • V
      ixgbe: Correctly disable VLAN filter in promiscuous mode · 4556dc59
      Vlad Yasevich 提交于
      IXGBE adapter seems to require that VLAN filtering be enabled if
      VMDQ or SRIOV are enabled.  When those functions are disabled,
      VLAN filtering may be disabled in promiscuous mode.
      
      Prior to commit a9b8943e ("ixgbe: remove vlan_filter_disable
      and enable functions")
      
      The logic was correct.  However, after the commit the logic
      got reversed and VLAN filtered in now turned on when VMDQ/SRIOV
      is disabled.
      
      This patch changes the condition to enable hw vlan filtered
      when VMDQ or SRIOV is enabled.
      
      Fixes: a9b8943e ("ixgbe: remove vlan_filter_disable and enable functions")
      Cc: stable <stable@vger.kernel.org>
      CC: Jacob Keller <jacob.e.keller@intel.com>
      Signed-off-by: NVladislav Yasevich <vyasevic@redhat.com>
      Acked-by: NEmil Tantilov <emil.s.tantilov@intel.com>
      Tested-by: NPhil Schmitt <phillip.j.schmitt@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4556dc59
  3. 12 11月, 2014 1 次提交
  4. 30 10月, 2014 4 次提交
  5. 26 10月, 2014 1 次提交
  6. 16 10月, 2014 4 次提交
  7. 15 10月, 2014 1 次提交
  8. 11 10月, 2014 3 次提交
  9. 10 10月, 2014 1 次提交
    • P
      networking: fm10k: Fix build failure · b71b12dc
      Pranith Kumar 提交于
      The latest linus git tip (3.18-rc1) fails with the following build failure. Fix
      this by making PTP support explicit for fm10k driver.
      
      rivers/built-in.o: In function `fm10k_ptp_register':
      (.text+0x12e760): undefined reference to `ptp_clock_registER'
      drivers/built-in.o: In function `fm10k_ptp_unregister':
      (.text+0x12e7dc): undefined reference to `ptp_clock_unregister'
      Makefile:930: recipe for target 'vmlinux' failed
      Signed-off-by: NPranith Kumar <bobby.prani@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b71b12dc
  10. 09 10月, 2014 1 次提交
  11. 02 10月, 2014 10 次提交
  12. 23 9月, 2014 9 次提交
    • A
      fm10k: Add support for PTP · a211e013
      Alexander Duyck 提交于
      This change adds support for the Linux PTP Hardware clock and timestamping
      functionality provided by the hardware.  There are actually two cases that
      this timestamping is meant to support.
      
      The first case would be an ordinary clock scenario.  In this configuration
      the host interface does not have access to BAR 4.  However all of the host
      interfaces should be locked into the same boundary clock region and as such
      they are all on the same clock anyway.  With this being the case they can
      synchronize among themselves and only need to adjust the offset since they
      are all on the same clock with the same frequency.
      
      The second case is a boundary clock scenario.  This is a special case and
      would require both BAR 4 access, and a means of presenting a netdev per
      boundary region.  The current plan is to use DSA at some point in the
      future to provide these interfaces, but the DSA portion is still under
      development.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Acked-by: NRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      a211e013
    • A
      fm10k: Add support for ptp to hw specific files · 5f226ddb
      Alexander Duyck 提交于
      This change adds the messaging support needed to support PTP.  In the case
      of Tx timestamps it is necessary for the Switch Management entity to return
      the frames via the mailbox as the host interface cannot know which port the
      timestamp will be delivered to.  In addition there is only one clock on the
      entire switch, as such the entity that has BAR 4 access is the only one who
      can actually update the frequency as it is the only one with access.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Acked-by: NRichard Cochran <richardcochran@gmail.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      5f226ddb
    • A
      fm10k: Add support for debugfs · 7461fd91
      Alexander Duyck 提交于
      This patch adds limited debugfs support for the driver.  Most of the
      functionality needed for dumping registers is already provided via ethtool.
      The only thing we saw that we really neeed was the ability to dump the
      descriptor rings so as such this patch will add a fm10k directory containing a
      listing of directories each one with a unique PCI Bus, Device, and Function
      number.  Each of those BDF directories will have a list of q_vectors, and
      the q_vectors will contain a file for each of the Rx/Tx rings that are a part
      of the vector.  For example:
      
      # ls -RD /sys/kernel/debug/fm10k/
      /sys/kernel/debug/fm10k/:
      0000:01:00.0
      
      /sys/kernel/debug/fm10k/0000:01:00.0:
      q_vector.000  q_vector.001  q_vector.002  q_vector.003
      
      /sys/kernel/debug/fm10k/0000:01:00.0/q_vector.000:
      rx_ring.000  tx_ring.000
      
      /sys/kernel/debug/fm10k/0000:01:00.0/q_vector.001:
      rx_ring.001  tx_ring.001
      
      /sys/kernel/debug/fm10k/0000:01:00.0/q_vector.002:
      rx_ring.002  tx_ring.002
      
      /sys/kernel/debug/fm10k/0000:01:00.0/q_vector.003:
      rx_ring.003  tx_ring.003
      
      # cat /sys/kernel/debug/fm10k/0000:01:00.0/q_vector.000/rx_ring.000
      DES DATA       RSS        STATERR    LENGTH VLAN   DGLORT SGLORT TIMESTAMP
      ---------------------------------------------------------------------------
      000 0x00000000 0x00000000 0x00000003 0x002a 0x0000 0x0000 0x0000 0x13951807dc4fedf0
      001 0x00000000 0x00000000 0x00000003 0x002a 0x0000 0x0000 0x0000 0x1395180906c9f2c8
      002 0x3731c000 0x00000000 0x00000000 0x0000 0x0000 0x0000 0x0000 0x0000000000000000
      003 0x3731d000 0x00000000 0x00000000 0x0000 0x0000 0x0000 0x0000 0x0000000000000000
      004 0xaab3a000 0x00000000 0x00000000 0x0000 0x0000 0x0000 0x0000 0x0000000000000000
      ...
      
      # cat /sys/kernel/debug/fm10k/0000:01:00.0/q_vector.000/tx_ring.000
      DES BUFFER_ADDRESS     LENGTH VLAN   MSS    HDRLEN FLAGS
      ---------------------------------------------------------
      000 0x00000000aa8a1002 0x005a 0x0000 0x0000 0x0000 0xc0
      001 0x00000000aa8a2002 0x005a 0x0000 0x0000 0x0000 0xc0
      002 0x000000006bc13202 0x004e 0x0000 0x0000 0x0000 0xc0
      003 0x000000006bc13c02 0x002a 0x0000 0x0000 0x0000 0xe1
      004 0x000000006bc13602 0x0062 0x0000 0x0000 0x0000 0xc0
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      7461fd91
    • A
      fm10k: Add support for IEEE DCBx · 9f801abc
      Alexander Duyck 提交于
      This patch adds support for management of the limited QOS features of the
      FM10000 interface.  Specifically we can support up to 8 traffic classes,
      however the part only provides 1 Rx and 1 Tx FIFO in the host interface and
      as a result this can lead to head-of-line blocking on Rx.  This can be
      avoided by setting PFC only for priorities that cannot afford to drop
      frames.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Acked-by: NJohn Fastabend <john.r.fastabend@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      9f801abc
    • A
      fm10k: Add support for SR-IOV to driver · 883a9ccb
      Alexander Duyck 提交于
      This patch combines the recently added VF messaging and configuration
      functionality with the interfaces provided by the kernel to allow for
      configuration and management of SR-IOV.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      883a9ccb
    • A
      fm10k: Add support for SR-IOV to PF core files · c2653865
      Alexander Duyck 提交于
      This change adds a set of functions to fm10k_pf.c which allows for
      configuring the VF via a set of standardized TLV messages.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      c2653865
    • A
      fm10k: Add support for VF · 5cb8db4a
      Alexander Duyck 提交于
      This patch provides the functions necessary to configure the VF making use
      of the same API pointers as the PF.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      5cb8db4a
    • A
      fm10k: Add support for PF <-> VF mailbox · b651957c
      Alexander Duyck 提交于
      This patch adds support for the PF <-> VF mailbox.  It functions similar to
      the PF <-> SM mailbox however there are several modifications made to
      improve the reliability of the mailbox itself.  In addition the PF/VF
      mailbox is much smaller an only supports a total size of 16 DWORDs vs the
      1024 DWORDS provided for the PF/SM mailbox.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      b651957c
    • A
      fm10k: Add support for MACVLAN acceleration · 5cd5e2e9
      Alexander Duyck 提交于
      This patch adds support for L2 MACVLAN by making use of the fact that the
      RRC provides a unique tag per filter called a Global Resource Tag, or GLORT.
      In the case of this offload what I have done is assigned a linear block of
      these so that each GLORT represents one of the MACVLAN netdevs.  By doing
      this I can share the Rx queues and Tx queues for all of the MACVLAN netdevs
      while allowing them to be demuxed in the Rx cleanup path.
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      5cd5e2e9