1. 23 9月, 2016 1 次提交
  2. 13 8月, 2016 1 次提交
  3. 24 12月, 2015 3 次提交
  4. 12 10月, 2015 1 次提交
    • D
      sfc: fully reset if MC_REBOOT event received without warm_boot_count increment · c577e59e
      Daniel Pieczko 提交于
      On EF10, MC_CMD_VPORT_RECONFIGURE can cause a CODE_MC_REBOOT event
      to be sent to a function without incrementing the (adapter-wide)
      warm_boot_count.  In this case, the reboot is not detected by the
      loop on efx_mcdi_poll_reboot(), so prepare for recovery from an MC
      reboot anyway.  When this codepath is run, the MC has always just
      rebooted, so this recovery is valid.
      
      The loop on efx_mcdi_poll_reboot() is still required for other MC
      reboot cases, so that actions in response to an MC reboot are
      performed, such as clearing locally calculated statistics.
      Siena NICs are unaffected by this change as the above scenario
      does not apply.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c577e59e
  5. 13 9月, 2015 1 次提交
    • B
      locking/atomics, cmpxchg: Privatize the inclusion of asm/cmpxchg.h · 84567995
      Boqun Feng 提交于
      After commit:
      
        654672d4 ("locking/atomics: Add _{acquire|release|relaxed}() variants of some atomic operations")
      
      Architectures may only provide {cmp,}xchg_relaxed definitions in
      asm/cmpxchg.h. Other variants, such as {cmp,}xchg, may be built in
      linux/atomic.h, which means simply including asm/cmpxchg.h may not get
      the definitions of all the{cmp,}xchg variants.
      
      Therefore, we should privatize the inclusions of asm/cmpxchg.h to
      keep it only included in arch/* and replace the inclusions outside
      with linux/atomic.h
      Signed-off-by: NBoqun Feng <boqun.feng@gmail.com>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Aybuke Ozdemir <aybuke.147@gmail.com>
      Cc: Chris Brannon <chris@the-brannons.com>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Kirk Reiser <kirk@reisers.ca>
      Cc: Kishon Vijay Abraham I <kishon@ti.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
      Cc: Shradha Shah <sshah@solarflare.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: William Hubbs <w.d.hubbs@gmail.com>
      Cc: devel@driverdev.osuosl.org
      Cc: linux-net-drivers@solarflare.com
      Cc: speakup@linux-speakup.org
      Link: http://lkml.kernel.org/r/1440589966-26280-1-git-send-email-boqun.feng@gmail.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      84567995
  6. 22 7月, 2015 2 次提交
  7. 28 5月, 2015 3 次提交
  8. 22 5月, 2015 2 次提交
  9. 10 5月, 2015 4 次提交
    • S
      sfc: Bind the sfc driver to any available VF's · 6f7f8aa6
      Shradha Shah 提交于
      Add the device ID of the VF to the PCI device ID table.
      
      Added a boolean flag is_vf in efx_nic_type to differentiate
      between a VF and PF at probe time. This flag is useful in later
      patches while setting MAC address specially in the
      PCI-passthrough case.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6f7f8aa6
    • E
      sfc: Cope with permissions enforcement added to firmware for SR-IOV · 267d9d73
      Edward Cree 提交于
      * Accept EPERM in some simple cases, the following cases are handled:
      1) efx_mcdi_read_assertion()
      Unprivileged PCI functions aren't allowed to GET_ASSERTS.
      We return success as it's up to the primary PF to deal with asserts.
      2) efx_mcdi_mon_probe() in efx_ef10_probe()
      Unprivileged PCI functions aren't allowed to read sensor info, and
      worrying about sensor data is the primary PF's job.
      3) phy_op->reconfigure() in efx_init_port() and efx_reset_up()
      Unprivileged functions aren't allowed to MC_CMD_SET_LINK, they just have
      to accept the settings (including flow-control, which is what
      efx_init_port() is worried about) they've been given.
      4) Fallback to GET_WORKAROUNDS in efx_ef10_probe()
      Unprivileged PCI functions aren't allowed to set workarounds. So if
      efx_mcdi_set_workaround() fails EPERM, use efx_mcdi_get_workarounds()
      to find out if workaround_35388 is enabled.
      5) If DRV_ATTACH gets EPERM, try without specifying fw-variant
      Unprivileged PCI functions have to use a FIRMWARE_ID of 0xffffffff
      (MC_CMD_FW_DONT_CARE).
      6) Don't try to exit_assertion unless one had fired
      Previously we called efx_mcdi_exit_assertion even if
      efx_mcdi_read_assertion had received MC_CMD_GET_ASSERTS_FLAGS_NO_FAILS.
      This is unnecessary, and the resulting MC_CMD_REBOOT, even if the
      AFTER_ASSERTION flag made it a no-op, would fail EPERM for unprivileged
      PCI functions.
      So make efx_mcdi_read_assertion return whether an assert happened, and only
      call efx_mcdi_exit_assertion if it has.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      267d9d73
    • D
      sfc: Record [rt]x_dpcpu_fw_id in EF10 nic_data · 8d9f9dd4
      Daniel Pieczko 提交于
      The (future) code to add/remove vswitches and vports will be
      dependent on the firmware variant.
      To simplify the checking of the firmware variant, record
      values for rx_dpcpu_fw_id and tx_dpcpu_fw_id in EF10 nic_data.
      
      There was only one place where this was previously used:
      efx_mcdi_print_fwver() in ethtool.c.
      The MC_CMD_GET_CAPABILITIES can be replaced and the values from
      nic_data used instead.
      
      Note that the printing of "?" if the MC command fails or if the
      outlength is incorrect no longer apply, because errors are returned
      in efx_ef10_init_datapath_caps() in both of these cases.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8d9f9dd4
    • S
      sfc: Own header for nic-specific sriov functions, single instance of... · 7fa8d547
      Shradha Shah 提交于
      sfc: Own header for nic-specific sriov functions, single instance of netdev_ops and sriov removed from Falcon code
      
      By putting all the efx_{siena,ef10}_sriov_* declarations in
      {siena,ef10}_sriov.h, ensure they cannot be called from nic-generic code.
      Also fixes up an instance of this, where mcdi.c was calling
      efx_siena_sriov_flr.
      
      The single instance of netdev_ops should call general high level
      functions that can then call something adapter specific in efx_nic_type.
      We should only do adapter specialisation via efx_nic_type.
      
      Removal of sriov functionality from the Falcon code means that tests
      are needed for the presence of some callbacks.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7fa8d547
  10. 09 4月, 2015 2 次提交
  11. 07 11月, 2014 1 次提交
  12. 17 4月, 2014 1 次提交
    • E
      sfc:On MCDI timeout, issue an FLR (and mark MCDI to fail-fast) · e283546c
      Edward Cree 提交于
      When an MCDI command times out (whether or not we find it
      completed when we poll), call efx_mcdi_abandon(), which tells
      all subsequent MCDI calls to fail-fast, and queues up an FLR.
      
      Because an FLR doesn't lead to receiving any reboot even from
      the MC (unlike most other types of reset), we have to call
      efx_ef10_reset_mc_allocations.
      In efx_start_all(), if a reset (of any kind) is pending, we
      bail out.
      Without this, attempts to reconfigure (e.g. change mtu) can
      cause driver/mc state inconsistency if the first MCDI call
      triggers an FLR.
      
      For similar reasons, on EF10, in
      efx_reset_down(method=RESET_TYPE_MCDI_TIMEOUT), set the number
      of active queues to zero before calling efx_stop_all().
      And, on farch, in efx_reset_up(method=RESET_TYPE_MCDI_TIMEOUT),
      set active_queues and flushes pending & outstanding to zero.
      
      efx_mcdi_mode_{poll,event}() should not take us out of fail-fast
       mode. Instead, this is done by efx_mcdi_reset() after the FLR
      completes.
      
      The new FLR reset_type RESET_TYPE_MCDI_TIMEOUT doesn't really
      fit into the hierarchy of reset 'scopes' whereby efx_reset()
      decides some resets subsume others.  Thus, it uses separate logic.
      
      Also, fixed up some inconsistency around RESET_TYPE_MC_BIST,
      which was in the wrong place in that hierarchy.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e283546c
  13. 11 3月, 2014 1 次提交
  14. 22 1月, 2014 1 次提交
  15. 13 12月, 2013 6 次提交
    • B
      sfc: Associate primary and secondary functions of controller · 0bcf4a64
      Ben Hutchings 提交于
      The primary function of an EF10 controller will share its clock
      device with other functions in the same domain (which we call
      secondary functions).  To this end, we need to associate functions
      on the same controller.
      
      We do not control probe order, so allow primary and secondary
      functions to appear in any order.  Maintain global lists of all
      primary functions and of unassociated secondary functions,
      and a list of secondary functions on each primary function.
      
      Use the VPD serial number to tell whether functions are part of the
      same controller.  VPD will not be readable by virtual functions, so
      this may need to be revisited later.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      0bcf4a64
    • J
      sfc: Add RX packet timestamping for EF10 · bd9a265d
      Jon Cooper 提交于
      The EF10 firmware can optionally insert RX timestamps in the packet
      prefix.  These only include the clock minor value.  We must also
      enable periodic time sync events on each event queue which provide
      the high bits of the clock value.
      
      [bwh: Combined and rebased several changes.
       Added the above description and some sanity checks for inline vs
       separate timestamps.
       Changed efx_rx_skb_attach_timestamp() to read the packet prefix
       from the skb head area.]
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      bd9a265d
    • B
      8349f7f6
    • B
    • E
      sfc: Log all unexpected MCDI errors · 1e0b8120
      Edward Cree 提交于
      Split each of efx_mcdi_rpc, efx_mcdi_rpc_finish, and efx_mcdi_rpc_async into
      a normal and a _quiet version; made the former log MCDI errors with
      netif_err (and include the raw MCDI error code), and the latter never log
      them at all.  Changed various callers; any where some errors are expected
      (but others are not) call the _quiet version and then if necessary log the
      MCDI error themselves.  Said logging is done by new efx_mcdi_display_error.
      
      Callers of efx_mcdi_rpc*_quiet functions which may want to log the error
      need to ensure that their outbuf is big enough to hold an MCDI error; to
      this end, they now use MCDI_DECLARE_BUF_OUT_OR_ERR, which always allocates
      at least 8 bytes.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      1e0b8120
    • J
      sfc: Add MC BISTs to ethtool offline self test on EF10 · 74cd60a4
      Jon Cooper 提交于
      To run BISTs the MC goes down in to a special mode where it will only
      respond to MCDI from the testing PF, and TX, RX and event queues are
      torn down. Other PFs get a message as it goes down to tell them it's
      going down.
      
      When the other PFs get this message, they check the soft status
      register to tell when the MC has rebooted after BIST mode and they can
      start recovery.
      
      [bwh: Convert the test result to 1 or -1 as for earlier NICs]
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      74cd60a4
  16. 07 12月, 2013 3 次提交
  17. 08 10月, 2013 1 次提交
    • B
      sfc: Only bind to EF10 functions with the LinkCtrl and Trusted flags · ecb1c9cc
      Ben Hutchings 提交于
      Although we do not yet enable multiple PFs per port, it is possible
      that a board will be reconfigured to enable them while the driver has
      not yet been updated to fully support this.
      
      The most obvious problem is that multiple functions may try to set
      conflicting link settings.  But we will also run into trouble if the
      firmware doesn't consider us fully trusted.  So, abort probing unless
      both the LinkCtrl and Trusted flags are set for this function.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      ecb1c9cc
  18. 21 9月, 2013 2 次提交
  19. 30 8月, 2013 4 次提交