1. 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
  2. 13 12月, 2013 3 次提交
    • B
      8349f7f6
    • 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: Correct RX dropped count for drops while interface is down · f8f3b5ae
      Jon Cooper 提交于
      We don't directly control RX ingress on Siena or any later
      controllers, and so we cannot prevent packets from entering the RX
      datapath while the RX queues are not set up.  This results in
      the hardware incrementing RX_NODESC_DROP_CNT, but it's not an
      error and we should not include it in error stats.
      
      When bringing an interface up or down, pull (or wait for) stats and
      count the number of packets that were dropped while the interface was
      down.  Subtract this from the reported RX dropped count.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      f8f3b5ae
  3. 30 11月, 2013 1 次提交
  4. 25 9月, 2013 1 次提交
    • J
      sfc: Remove extern from function prototypes · 00aef986
      Joe Perches 提交于
      There are a mix of function prototypes with and without extern
      in the kernel sources.  Standardize on not using extern for
      function prototypes.
      
      Function prototypes don't need to be written with extern.
      extern is assumed by the compiler.  Its use is as unnecessary as
      using auto to declare automatic/local variables in a block.
      Signed-off-by: NJoe Perches <joe@perches.com>
      00aef986
  5. 30 8月, 2013 5 次提交
  6. 28 8月, 2013 2 次提交
    • D
      sfc: use MCDI epoch flag to improve MC reboot detection in the driver · d36a08b4
      Daniel Pieczko 提交于
      The Huntington MC will reject all MCDI requests after an MC reboot until it sees
      one with the NOT_EPOCH flag clear.  This flag is set by default for all requests,
      and then cleared on the first request after we detect that an MC reboot has
      occurred.
      
      The old MCDI_STATUS_DELAY_COUNT gave a timeout of 10ms, which was not long enough
      for the driver to detect that a reboot had occurred based on the warm boot count
      while calling efx_mcdi_poll_reboot() from the loop in efx_mcdi_ev_death().
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      d36a08b4
    • B
      sfc: Move MTD operations into efx_nic_type · 45a3fd55
      Ben Hutchings 提交于
      Merge the per-NIC-type MTD probe selection and struct efx_mtd_ops into
      struct efx_nic_type.  Move the implementations into the appropriate
      source files.
      
      Several NVRAM functions are now only called from MTD operations which
      are now implemented in the same file (falcon.c or mcdi.c).  There is no
      need for them to be extern, or to be defined at all if CONFIG_SFC_MTD
      is not enabled, so move them into the #ifdef CONFIG_SFC_MTD sections
      in those files.
      
      Most of the SPI-related definitions are also only used in falcon.c,
      so move them there.  Put the remainder of spi.h into nic.h (which
      previously included it).
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      45a3fd55
  7. 23 8月, 2013 1 次提交
  8. 22 8月, 2013 8 次提交
  9. 21 8月, 2013 6 次提交
  10. 02 10月, 2012 1 次提交
  11. 08 9月, 2012 1 次提交
  12. 16 2月, 2012 1 次提交
    • B
      sfc: Add SR-IOV back-end support for SFC9000 family · cd2d5b52
      Ben Hutchings 提交于
      On the SFC9000 family, each port has 1024 Virtual Interfaces (VIs),
      each with an RX queue, a TX queue, an event queue and a mailbox
      register.  These may be assigned to up to 127 SR-IOV virtual functions
      per port, with up to 64 VIs per VF.
      
      We allocate an extra channel (IRQ and event queue only) to receive
      requests from VF drivers.
      
      There is a per-port limit of 4 concurrent RX queue flushes, and queue
      flushes may be initiated by the MC in response to a Function Level
      Reset (FLR) of a VF.  Therefore, when SR-IOV is in use, we submit all
      flush requests via the MC.
      
      The RSS indirection table is shared with VFs, so the number of RX
      queues used in the PF is limited to the number of VIs per VF.
      
      This is almost entirely the work of Steve Hodgson, formerly
      shodgson@solarflare.com.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      cd2d5b52
  13. 27 1月, 2012 3 次提交
    • B
      sfc: Add hwmon driver for boards using SFC9000-family controllers · 55c5e0f8
      Ben Hutchings 提交于
      The SFC9000-family controllers have firmware to manage all board
      peripherals including temperature, heat sink continuity and voltage
      sensors.  The firmware reports sensor alarms, which we log, and
      will shut down the board if necessary.
      
      Some users may want to monitor their boards more closely, so add an
      hwmon driver that exposes all sensors reported by the firmware.  Move
      efx_mcdi_sensor_event() into the new file so it can share the array of
      sensor labels with the hwmon driver.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      55c5e0f8
    • M
    • B
      sfc: Merge efx_mac_operations into efx_nic_type · 710b208d
      Ben Hutchings 提交于
      No NICs need to switch efx_mac_operations at run-time, and the MAC
      operations are fairly closely bound to NIC types.
      
      Move efx_mac_operations::reconfigure to efx_nic_type::reconfigure_mac
      and efx_mac_operations::check_fault fo efx_nic_type::check_mac_fault.
      Change callers to call through efx->type or directly if the NIC type
      is known.
      
      Remove efx_mac_operations::update_stats.  The implementations for
      Falcon used to fetch MAC statistics synchronously and this was used by
      efx_register_netdev() to clear statistics after running self-tests.
      However, it now only converts statistics that have already been
      fetched (and that only for Falcon), and the call from
      efx_register_netdev() has no effect.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      710b208d
  14. 11 8月, 2011 1 次提交
  15. 01 3月, 2011 2 次提交
  16. 21 10月, 2010 1 次提交
  17. 04 2月, 2010 1 次提交
  18. 26 1月, 2010 1 次提交