1. 29 Aug, 2013 14 commits
  2. 27 Aug, 2013 15 commits
  3. 22 Aug, 2013 11 commits
    • Ben Hutchings's avatar
    • Ben Hutchings's avatar
      sfc: Eliminate struct efx_mtd · b766630b
      Ben Hutchings authored
      Currently we use struct efx_mtd to represent a physical NVRAM device
      and struct efx_mtd_partition to represent a partition on that device.
      But this only really makes sense for Falcon, as we don't know or care
      whether MC-managed NVRAM partitions are on one or more physical
      devices.  It complicates iteration and provides little benefit.
      Therefore:
      
      - Replace the pointer to efx_mtd in mtd_info::priv with a pointer to efx_nic
      - Move the falcon_spi_device pointer into the union in struct efx_mtd_partition
      - Move the device name to efx_mtd_partition::dev_type_name
      - Move the efx_mtd_ops pointer to efx_nic::mtd_ops
      - Make efx_nic::mtd_list a list of partitions
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      b766630b
    • Ben Hutchings's avatar
    • Ben Hutchings's avatar
      sfc: Cleanup Falcon-arch simple MAC filter state · 964e6135
      Ben Hutchings authored
      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: default avatarBen Hutchings <bhutchings@solarflare.com>
      964e6135
    • Ben Hutchings's avatar
      sfc: Define and use MCDI_POPULATE_DWORD_{1,2,3,4,5,6,7} · f5253d92
      Ben Hutchings authored
      There is only one user now, but we're about to add many more.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      f5253d92
    • Ben Hutchings's avatar
      sfc: Add flag for stack-owned RX MAC filters · 8803e150
      Ben Hutchings authored
      MAC filters inserted on request from the stack (ndo_set_rx_mode)
      should allow manual steering but not removal.  Currently we have a
      special case for Siena's all-multicast and all-unicast MAC filters,
      but on EF10 we need to allow for steering of precise MAC filters as
      well.
      
      The EFX_FILTER_FLAG_RX_STACK flag changes the behaviour of replacement
      and removal requests:
      
      - Replacement *of* a filter with this flag never clears the flag but
        does change steering and saved priority
      - Replacement *by* a filter with this flag only sets the flag but does
        not change steering
      - Removal with priority < EFX_FILTER_PRI_REQUIRED really resets RX
        steering and saved priority
      
      This could support precise MAC filtering on Siena in future.
      
      As a side-benefit, the default MAC filters are hidden from ethtool
      until they are steered.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      8803e150
    • Ben Hutchings's avatar
      sfc: Refactor Falcon-arch filter removal · 14990a5d
      Ben Hutchings authored
      Move the special case for removal of default filters from
      efx_farch_filter_table_clear_entry() into a wrapper function,
      efx_farch_filter_table_remove().  Move the existence and priority
      checks into the latter and use it where appropriate.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      14990a5d
    • Ben Hutchings's avatar
      sfc: Make most filter operations NIC-type-specific · add72477
      Ben Hutchings authored
      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: default avatarBen Hutchings <bhutchings@solarflare.com>
      add72477
    • Ben Hutchings's avatar
      sfc: Refactor Falcon-arch search limit reset · 9a0a9433
      Ben Hutchings authored
      Currently every call to efx_farch_filter_table_clear_entry() is
      shortly followed by a conditional reset of the table limits.  The new
      limits (0) are not pushed to hardware until the next filter insertion.
      Move both the reset and the hardware reconfiguration into
      efx_farch_filter_table_clear_entry(), and add an explanatory comment.
      
      Also, make consistent use of the term 'search limit' for the maximum
      number of probes the NIC must make when searching for a filter of a
      particular type.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      9a0a9433
    • Ben Hutchings's avatar
      sfc: Split Falcon-arch-specific and common filter state · 6d661cec
      Ben Hutchings authored
      Move the common state from struct efx_filter_state into struct efx_nic.
      Rename struct efx_filter_state to efx_farch_filter_state and change
      the type of efx_nic::filter_state to void *.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      6d661cec
    • Ben Hutchings's avatar
      sfc: Extend and abstract efx_filter_spec to cover Huntington/EF10 · 7c460d9b
      Ben Hutchings authored
      Replace type field with match_flags.  Add rss_context and match values
      covering of most of what is now in the MCDI protocol.
      
      Change some fields into bitfields so that the structure size doesn't grow
      beyond 64 bytes.
      
      Ditch the filter decoding functions as it is now easier to pick apart
      the abstract structure.
      
      Rewrite ethtool NFC rule functions to set/get filter match flags and
      values directly.
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      7c460d9b