1. 24 12月, 2015 2 次提交
  2. 22 7月, 2015 1 次提交
  3. 28 5月, 2015 2 次提交
  4. 22 5月, 2015 1 次提交
  5. 10 5月, 2015 1 次提交
    • 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
  6. 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
  7. 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
  8. 30 11月, 2013 1 次提交
  9. 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
  10. 30 8月, 2013 5 次提交
  11. 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
  12. 23 8月, 2013 1 次提交
  13. 22 8月, 2013 8 次提交
  14. 21 8月, 2013 6 次提交
  15. 02 10月, 2012 1 次提交
  16. 08 9月, 2012 1 次提交
  17. 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
  18. 27 1月, 2012 2 次提交