1. 14 5月, 2014 1 次提交
  2. 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
  3. 02 4月, 2014 1 次提交
    • D
      Call efx_set_channels() before efx->type->dimension_resources() · 52ad762b
      Daniel Pieczko 提交于
      When using the "separate_tx_channels=1" module parameter, the TX queues are
      initially numbered starting from the first TX-only channel number (after all the
      RX-only channels).  efx_set_channels() renumbers the queues so that they are
      indexed from zero.
      
      On EF10, the TX queues need to be relabelled in this way before calling the
      dimension_resources NIC type operation, otherwise the TX queue PIO buffers can be
      linked to the wrong VIs when using "separate_tx_channels=1".
      
      Added comments to explain UC/WC mappings for PIO buffers
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      52ad762b
  4. 11 3月, 2014 1 次提交
  5. 19 2月, 2014 1 次提交
  6. 13 2月, 2014 3 次提交
  7. 13 12月, 2013 8 次提交
  8. 10 12月, 2013 1 次提交
  9. 07 12月, 2013 2 次提交
  10. 20 11月, 2013 1 次提交
  11. 22 9月, 2013 1 次提交
  12. 30 8月, 2013 8 次提交
  13. 28 8月, 2013 4 次提交
  14. 23 8月, 2013 2 次提交
    • B
      sfc: Cleanup Falcon-arch simple MAC filter state · 964e6135
      Ben Hutchings 提交于
      On Falcon we implement MAC filtering requested by the stack using the
      MAC wrapper's single unicast filter and multicast hash filter.  Siena
      is very similar, though MAC configuration is mediated by the MC.
      
      Since MCDI operations may sleep, reconfiguration is deferred from
      ndo_set_rx_mode to a work item.  However, it still updates the private
      variables describing the filter state synchronously.  Contrary to
      comments, the later use of these variables is not protected using the
      address lock, resulting in race conditions.
      
      Move the state update to a new function
      efx_farch_filter_sync_rx_mode() and make the Falcon-arch MAC
      configuration functions call that, so that its use is consistently
      serialised by the mac_lock.
      
      Invert and rename the promiscuous flag to the more accurate
      unicast_filter, and comment that both this and multicast_hash are
      not used on EF10.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      964e6135
    • B
      sfc: Make most filter operations NIC-type-specific · add72477
      Ben Hutchings 提交于
      Aside from accelerated RFS, there is almost nothing that can be shared
      between the filter table implementations for the Falcon architecture
      and EF10.
      
      Move the few shared functions into efx.c and rx.c and the rest into
      farch.c.  Introduce efx_nic_type operations for the implementation and
      inline wrapper functions that call these.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      add72477
  15. 22 8月, 2013 5 次提交
    • 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: 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
      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
    • B
      sfc: Refactor queue teardown sequence to allow for EF10 flush behaviour · e42c3d85
      Ben Hutchings 提交于
      Currently efx_stop_datapath() will try to flush our DMA queues (if DMA
      is enabled), then finalise software and hardware state for each queue.
      However, for EF10 we must ask the MC to finalise each queue, which
      implicitly starts flushing it, and then wait for the flush events.
      We therefore need to delegate more of this to the NIC type.
      
      Combine all the hardware operations into a new NIC-type operation
      efx_nic_type::fini_dmaq, and call this before tearing down the
      software state and buffers for all the DMA queues.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      e42c3d85
    • B
      sfc: Remove bogus call to efx_release_tx_buffers() · 501a248c
      Ben Hutchings 提交于
      efx_unregister_netdev() should not call efx_release_tx_buffers()
      directly, as it is already done when closing the device:
      efx_net_stop() -> efx_stop_all() -> efx_stop_datapath() ->
      efx_fini_tx_queue() -> efx_release_tx_buffers().
      
      (This was presumably a workaround for a race between efx_stop_all()
      and the data path that has since been properly fixed.)
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      501a248c