1. 30 8月, 2013 2 次提交
  2. 28 8月, 2013 15 次提交
  3. 23 8月, 2013 14 次提交
  4. 22 8月, 2013 9 次提交
    • B
      sfc: Do not assume efx_nic_type::ev_fini is idempotent · be3fc09c
      Ben Hutchings 提交于
      efx_fini_eventq() needs to be idempotent but EF10 firmware is
      picky about queue states.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      be3fc09c
    • B
      sfc: EFX_WORKAROUND_ALWAYS is really specific to Falcon-architecture · ab3b8250
      Ben Hutchings 提交于
      The workarounds that currently use EFX_WORKAROUND_ALWAYS are in
      Falcon-specific or Falcon-arch-specific code, so get rid of the
      conditions altogether.  Add/move comments as appropriate.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      ab3b8250
    • B
      sfc: Get rid of per-NIC-type phys_addr_channels and mem_map_size · b105798f
      Ben Hutchings 提交于
      EF10 functions don't have a fixed BAR size, and the minimum is not
      large enough for all the queues we might want to allocate.  We have to
      find out the BAR size at run-time, and therefore phys_addr_channels
      and mem_map_size cannot be defined per-NIC-type.
      
      Change efx_nic_type::mem_map_size to a function pointer which is
      called to find the wanted memory map size (before probe).
      
      Replace efx_nic_type::phys_addr_channels with efx_nic::max_channels,
      to be initialised by the probe function.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      b105798f
    • B
    • B
      sfc: Fix race in completion handling · 369327fa
      Ben Hutchings 提交于
      When we poll for MCDI request completion, we don't hold the interface
      lock while setting the response fields in struct efx_mcdi_iface.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      369327fa
    • B
      sfc: Add support for MCDI v2 · df2cd8af
      Ben Hutchings 提交于
      MCDI v2 adds a second header dword with wider command and length
      fields.  It also defines extra error codes.
      
      Change the fallback error number for unknown MCDI error codes from EIO
      to EPROTO.  EIO is treated as indicating the MCDI transport has failed
      and we need to reset the function, which is rather drastic.
      
      v2 error codes and lengths don't fit into completion events, so for a
      v2-capable transport, always read the response header rather then
      using the event fields.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      df2cd8af
    • B
      sfc: Update MCDI protocol definitions for EF10 · f2b0befd
      Ben Hutchings 提交于
      EF10 controllers do not have shared memory for communication with the
      MC; instead it reads requests and writes responses in host memory,
      which allows for longer messages.  It is also responsible for all
      datapath control operations and hardware resource allocation, which
      requires a large number of new commands and adds more possible error
      cases.  MCDI v2 extends the message header to support this.
      
      Update the MCDI protocol definition header to include v2 lengths,
      errors and messages, and a few definitions specific to the
      SFC9100 family (codenames Farmingdale and Huntington) which is
      the first generation of EF10.
      
      Some messages have been extended, so adjust the code accordingly:
      - The request for MC_CMD_DRV_ATTACH now includes a datapath firmware
        ID.  This is ignored by Siena but we should fill it in anyway,
        initially always specifying low-latency datapath.
      - The response for MC_CMD_GET_LOOPBACK_MODES now includes a 40G
        field.  Accept shorter responses that don't include it.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      f2b0befd
    • B
      sfc: Translate MCDI error numbers received in events · 5bc283e5
      Ben Hutchings 提交于
      Currently we only translate error codes in efx_mcdi_poll(), but we
      also need to do so in efx_mcdi_ev_cpl().
      
      The reason we didn't notice before is that the MC firmware error codes
      are mostly taken from Unix/Linux and no translation is necessary on
      most architectures.  Make sure we notice any future failure by
      changing the sign of resprc (matching the kernel convention) and BUG
      if it's ever positive at command completion.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      5bc283e5
    • B
      sfc: Move and rename Falcon/Siena common NIC operations · 86094f7f
      Ben Hutchings 提交于
      Add efx_nic_type operations for the many efx_nic functions that need
      to be implemented different on EF10.  For now, change most of the
      existing efx_nic_*() functions into inline wrappers.  As a later step,
      we may be able to improve branch prediction for operations used on the
      fast path by copying the pointers into each queue/channel structure.
      
      Move the Falcon/Siena implementations to new file farch.c and rename
      the functions and static data to use a prefix of 'efx_farch_'.
      
      Move efx_may_push_tx_desc() to nic.h, as the EF10 TX code will also
      use it.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      86094f7f