1. 05 10月, 2013 1 次提交
    • E
      sfc: Add PM and RXDP drop counters to ethtool stats · 568d7a00
      Edward Cree 提交于
      Recognise the new Packet Memory and RX Data Path counters.
      
      The following counters are added:
      rx_pm_{trunc,discard}_bb_overflow - burst buffer overflowed.  This should not
       occur if BB correctly configured.
      rx_pm_{trunc,discard}_vfifo_full - not enough space in packet memory.  May
       indicate RX performance problems.
      rx_pm_{trunc,discard}_qbb - dropped by 802.1Qbb early discard mechanism.
       Since Qbb is not supported at present, this should not occur.
      rx_pm_discard_mapping - 802.1p priority configured to be dropped.  This should
       not occur in normal operation.
      rx_dp_q_disabled_packets - packet was to be delivered to a queue but queue is
       disabled.  May indicate misconfiguration by the driver.
      rx_dp_di_dropped_packets - parser-dispatcher indicated that a packet should be
       dropped.
      rx_dp_streaming_packets - packet was sent to the RXDP streaming bus, ie. a
       filter directed the packet to the MCPU.
      rx_dp_emerg_{fetch,wait} - RX datapath had to wait for descriptors to be
       loaded.  Indicates performance problems but not drops.
      
      These are only provided if the MC firmware has the
      PM_AND_RXDP_COUNTERS capability.  Otherwise, mask them out.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      568d7a00
  2. 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
  3. 21 9月, 2013 2 次提交
    • B
    • B
      sfc: Allocate and link PIO buffers; map them with write-combining · 183233be
      Ben Hutchings 提交于
      Try to allocate a segment of PIO buffer to each TX channel.  If
      allocation fails, log an error but continue.
      
      PIO buffers must be mapped separately from the NIC registers, with
      write-combining enabled.  Where the host page size is 4K, we could
      potentially map each VI's registers and PIO buffer separately.
      However, this would add significant complexity, and we also need to
      support architectures such as POWER which have a greater page size.
      So make a single contiguous write-combining mapping after the
      uncacheable mapping, aligned to the host page size, and link PIO
      buffers there.  Where necessary, allocate additional VIs within
      the write-combining mapping purely for access to PIO buffers.
      
      Link all TX buffers to TX queues and the additional VIs in
      efx_ef10_dimension_resources() and in efx_ef10_init_nic() after
      an MC reboot.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      183233be
  4. 11 9月, 2013 1 次提交
  5. 30 8月, 2013 3 次提交
    • B
      sfc: Update copyright banners · f7a6d2c4
      Ben Hutchings 提交于
      Update the dates for files that have been added to in 2012-2013.
      Drop the 'Solarstorm' brand name that's still lingering here.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      f7a6d2c4
    • B
      sfc: Add support for Solarflare SFC9100 family · 8127d661
      Ben Hutchings 提交于
      This adds support for the EF10 network controller architecture and the
      SFC9100 family, starting with SFC9120 'Farmingdale', and bumps the
      driver version to 4.0.
      
      New features in the SFC9100 family include:
      
      - Flexible allocation of internal resources to PCIe physical and virtual
        functions under firmware control
      - RX event merging to reduce DMA writes at high packet rates
      - Integrated RX timestamping
      - PIO buffers for lower TX latency
      - Firmware-driven data path that supports additional offload features
        and filter types
      - Delivery of packets between functions and to multiple recipients,
        allowing firmware to implement a vswitch
      - Multiple RX flow hash (RSS) contexts with their own hash keys and
        indirection tables
      - 40G MAC (single port only)
      
      ...not all of which are enabled in this initial driver or the initial
      firmware release.
      
      Much of the new code is by Jon Cooper.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      8127d661
    • J
      sfc: Allow event queue initialisation to fail · 261e4d96
      Jon Cooper 提交于
      On EF10, event queue initialisation requires an MCDI request which
      may return failure.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      261e4d96
  6. 28 8月, 2013 3 次提交
    • B
      sfc: Delegate MAC/NIC statistic description to efx_nic_type · cd0ecc9a
      Ben Hutchings 提交于
      Various hardware statistics that are available for Siena are
      unavailable or meaningless for Falcon.  Huntington adds further to the
      NIC-type-specific statistics, as it has different MAC blocks from
      Falcon/Siena.
      
      All NIC types still provide most statistics by DMA, and use
      little-endian byte order.
      
      Therefore:
      1. Add some general utility functions for reporting hardware statistics,
         efx_nic_describe_stats() and efx_nic_update_stats().
      2. Add an efx_nic_type::describe_stats operation to get the number and
         names of statistics, implemented using efx_nic_describe_stats()
      3. Change efx_nic_type::update_stats to store the core statistics
         (struct rtnl_link_stats64) or full statistics (array of u64) in a
         caller-provided buffer.  Use efx_nic_update_stats() to aid in the
         implementation.
      4. Rename struct efx_ethtool_stat to struct efx_sw_stat_desc and
         EFX_ETHTOOL_NUM_STATS to EFX_ETHTOOL_SW_STAT_COUNT.
      5. Remove efx_nic::mac_stats and struct efx_mac_stats.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      cd0ecc9a
    • B
      sfc: Remove more left-overs from Falcon GMAC support · e5136124
      Ben Hutchings 提交于
      We only ever used the XMAC (10G link speed) in production.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      e5136124
    • 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 3 次提交
    • B
      ecd0a6f0
    • 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
  8. 22 8月, 2013 5 次提交
  9. 21 8月, 2013 2 次提交
  10. 25 6月, 2013 1 次提交
  11. 01 12月, 2012 1 次提交
    • B
      sfc: Really disable flow control while flushing · d5e8cc6c
      Ben Hutchings 提交于
      Receiving pause frames can block TX queue flushes.  Earlier changes
      work around this by reconfiguring the MAC during flushes for VFs, but
      during flushes for the PF we would only change the fc_disable counter.
      Unless the MAC is reconfigured for some other reason during the flush
      (which I would not expect to happen) this had no effect at all.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      d5e8cc6c
  12. 01 11月, 2012 1 次提交
  13. 19 9月, 2012 1 次提交
  14. 17 7月, 2012 1 次提交
  15. 07 3月, 2012 4 次提交
  16. 16 2月, 2012 4 次提交
  17. 14 2月, 2012 1 次提交
  18. 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
    • B
      sfc: Correct interrupt timer quantum for Siena (normal and turbo mode) · cc180b69
      Ben Hutchings 提交于
      We currently assume that the timer quantum for Siena is 5 us, the same
      as for Falcon.  This is not correct; timer ticks are generated on a
      rota which takes a minimum of 768 cycles (each event delivery or other
      timer change will delay it by 3 cycles).  The timer quantum should be
      6.144 or 3.072 us depending on whether turbo mode is active.
      
      Replace EFX_IRQ_MOD_RESOLUTION with a timer_quantum_ns field in struct
      efx_nic, initialised by the efx_nic_type::probe function.
      
      While we're at it, replace EFX_IRQ_MOD_MAX with a timer_period_max
      field in struct efx_nic_type.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      cc180b69
    • 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
  19. 17 9月, 2011 1 次提交
  20. 11 8月, 2011 1 次提交