1. 10 2月, 2017 1 次提交
  2. 18 1月, 2017 1 次提交
  3. 17 1月, 2017 2 次提交
    • E
      sfc: get PIO buffer size from the NIC · c634700f
      Edward Cree 提交于
      The 8000 series SFC NICs have 4K PIO buffers, rather than the 2K of
       the 7000 series.  Rather than having a hard-coded PIO buffer size
       (ER_DZ_TX_PIOBUF_SIZE), read it from the GET_CAPABILITIES_V2 MCDI
       response.
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c634700f
    • E
      sfc: allow PIO more often · de1deff9
      Edward Cree 提交于
      If an option descriptor has been sent on a queue but not followed by a
       packet, there will have been no completion event, so the read and write
       counts won't match and we'll think we can't do PIO.  This combines with
       the fact that we have two TX queues (for en/disable checksum offload),
       and that both must be empty for PIO to happen.
      This patch adds a separate "packet_write_count" that tracks the most
       recent write_count we expect to see a completion event for; this excludes
       option descriptors but _includes_ PIO descriptors (even though they look
       like option descriptors).  This is then used, rather than write_count,
       in efx_nic_tx_is_empty().
      We only bother to maintain packet_write_count on EF10, since on Siena
       (a) there are no option descriptors and it always equals write_count, and
       (b) there's no PIO, so we don't need it anyway.
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      de1deff9
  4. 30 11月, 2016 1 次提交
    • E
      sfc: separate out SFC4000 ("Falcon") support into new sfc-falcon driver · 5a6681e2
      Edward Cree 提交于
      Rationale: The differences between Falcon and Siena are in many ways larger
       than those between Siena and EF10 (despite Siena being nominally "Falcon-
       architecture"); for instance, Falcon has no MCPU, so there is no MCDI.
       Removing Falcon support from the sfc driver should simplify the latter,
       and avoid the possibility of Falcon support being broken by changes to sfc
       (which are rarely if ever tested on Falcon, it being end-of-lifed hardware).
      
      The sfc-falcon driver created in this changeset is essentially a copy of the
       sfc driver, but with Siena- and EF10-specific code, including MCDI, removed
       and with the "efx_" identifier prefix changed to "ef4_" (for "EFX 4000-
       series") to avoid collisions when both drivers are built-in.
      
      This changeset removes Falcon from the sfc driver's PCI ID table; then in
       sfc I've removed obvious Falcon-related code: I removed the Falcon NIC
       functions, Falcon PHY code, and EFX_REV_FALCON_*, then fixed up everything
       that referenced them.
      
      Also, increment minor version of both drivers (to 4.1).
      
      For now, CONFIG_SFC selects CONFIG_SFC_FALCON, so that updating old configs
       doesn't cause Falcon support to disappear; but that should be undone at
       some point in the future.
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5a6681e2
  5. 19 11月, 2016 1 次提交
    • B
      sfc: Firmware-Assisted TSO version 2 · e9117e50
      Bert Kenward 提交于
      Add support for FATSOv2 to the driver. FATSOv2 offloads far more of the task
       of TCP segmentation to the firmware, such that we now just pass a single
       super-packet to the NIC. This means TSO has a great deal in common with a
       normal DMA transmit, apart from adding a couple of option descriptors.
       NIC-specific checks have been moved off the fast path and in to
       initialisation where possible.
      
      This also moves FATSOv1/SWTSO to a new file (tx_tso.c).  The end of transmit
       and some error handling is now outside TSO, since it is common with other
       code.
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e9117e50
  6. 27 8月, 2016 1 次提交
  7. 13 8月, 2016 2 次提交
  8. 16 6月, 2016 1 次提交
  9. 22 7月, 2015 1 次提交
    • D
      sfc: enable cascaded multicast filters in MCFW · 46e612b0
      Daniel Pieczko 提交于
      After creating event queue 0, check to see if the workaround is enabled,
       and enable it if necessary.  This will be called during PCI probe and
       also when coming back up after a reset.  The nic_data->workaround_26807
       will be used in the future to control the filter insertion behaviour
       based on this workaround.
      
      Only the primary PF can enable this workaround, so tolerate an EPERM
       error and continue.  Otherwise, if any step in the checking and enabling
       of the workaround fails, the event queue must be removed.
      
      We check that workaround is implemented before trying to enable it,
       and store the current workaround setting before trying to change it.
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      46e612b0
  10. 03 6月, 2015 3 次提交
  11. 22 5月, 2015 1 次提交
  12. 10 5月, 2015 9 次提交
    • J
      sfc: Add use of shared RSS contexts. · 267c0157
      Jon Cooper 提交于
      Allow PFs to allocate shared RSS contexts if we exhaust our
      exclusive RSS contexts. Make VFs use shared RSS contexts in
      all cases.
      Spruce up error handling so that the shadow copy of the RSS
      table is updated after successful update, rather than in all
      cases, so that we report the actual contents of the RSS table
      after a failure to set it, rather than what we'd like it to be.
      
      Populate context_size parameter when vacuously allocating RSS
      context of size 1.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      267c0157
    • S
      sfc: create vports for VFs and assign random MAC addresses · 3c5eb876
      Shradha Shah 提交于
      The parent PF creates vports for all its child VFs and adds MAC
      addresses to these.  When the VF driver loads, it can make an MCDI
      call to get the MAC address that the parent PF assigned it.
      
      The parent PF also assigns a mac address to its own vport because
      implicit creation of a vAdaptor will only work on evb ports with
      MAC addresses assigned.
      
      The vport MAC address needs to be stored in the PF's nic_data
      struct as it can later be changed on the vadaptor (and its net_dev
      struct). When removing a vport the original MAC address must be
      deleted.
      
      A new flag is needed in the VF data structure to identify whether
      a vport has been assigned to the VF.  This is to determine whether
      it needs to be un-assigned before freeing the vport.  Also,
      attempting to un-assign a vport which is not assigned will result
      in an EALREADY error.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3c5eb876
    • S
      sfc: Prepare to bind the sfc driver to the VF. · 02246a7f
      Shradha Shah 提交于
      Added efx_nic_type structure for VF.
      Mapped a different BAR for VF as it uses BAR 0 for memory.
      Added functions sriov_init and sriov_fini.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      02246a7f
    • D
      sfc: get the PF number and record in nic_data · 1cd9ecbb
      Daniel Pieczko 提交于
      Use MC_CMD_GET_FUNCTION_INFO to record the PF number in nic_data.
      This will be needed when assigned vports to VFs.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1cd9ecbb
    • D
      sfc: create VEB vswitch and vport above default firmware setup · 6d8aaaf6
      Daniel Pieczko 提交于
      Adds functions to allocate and free vswitches and vports; vadaptors
      are automatically allocated and freed when TX/RX queues are
      initialised and finalised.  This vswitching structure is only created
      if the firmware supports it, so a check that full-featured firmware
      is running is performed first.
      
      If the MC resets, the vswitching infrastructure will need to be
      recreated, so mark the "must_probe_vswitching" flag when an MC reboot
      is detected.
      
      Don't try to create a vswitch if vf-count=0
      
      This allocation of vswitches and vports does not currently support
      configuring VLAN tags, but that can be added in a future change.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6d8aaaf6
    • D
      sfc: record the PF's vport ID in nic_data · 45b2449e
      Daniel Pieczko 提交于
      The default port ID of EVB_PORT_ID_ASSIGNED is a "magic" number
      for the MCFW to select the physical port of the PF.  If other
      vswitches and vports are created on top of the default firmware
      configuration, the ID of the newly created vport is then required
      when passed to MCDI commands.  Currently, this doesn't happen so
      the vport_id is never changed, but a subsequent patch will change
      this behaviour so that other vswitches and vports are created.
      
      The vport_id recorded in nic_data is only relevant for PFs.
      VFs will have their vports created by their parent PF, and in
      that case the parent PF will record the vport ID of each VF.
      For a VF, nic_data->vport_id is expected to remain at the default
      value.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      45b2449e
    • D
      sfc: Record [rt]x_dpcpu_fw_id in EF10 nic_data · 8d9f9dd4
      Daniel Pieczko 提交于
      The (future) code to add/remove vswitches and vports will be
      dependent on the firmware variant.
      To simplify the checking of the firmware variant, record
      values for rx_dpcpu_fw_id and tx_dpcpu_fw_id in EF10 nic_data.
      
      There was only one place where this was previously used:
      efx_mcdi_print_fwver() in ethtool.c.
      The MC_CMD_GET_CAPABILITIES can be replaced and the values from
      nic_data used instead.
      
      Note that the printing of "?" if the MC command fails or if the
      outlength is incorrect no longer apply, because errors are returned
      in efx_ef10_init_datapath_caps() in both of these cases.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8d9f9dd4
    • D
      sfc: Move and rename efx_vf struct to siena_vf · bf3d0156
      Daniel Pieczko 提交于
      The efx_vf struct contains Siena-specific fields for VFs,
      so rename to siena_vf.
      Also move it into the siena_nic_data struct, as EF10 will
      track its VFs in its own ef10_nic_data, storing much less
      information about them since VFDI is no longer used.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bf3d0156
    • S
      sfc: Own header for nic-specific sriov functions, single instance of... · 7fa8d547
      Shradha Shah 提交于
      sfc: Own header for nic-specific sriov functions, single instance of netdev_ops and sriov removed from Falcon code
      
      By putting all the efx_{siena,ef10}_sriov_* declarations in
      {siena,ef10}_sriov.h, ensure they cannot be called from nic-generic code.
      Also fixes up an instance of this, where mcdi.c was calling
      efx_siena_sriov_flr.
      
      The single instance of netdev_ops should call general high level
      functions that can then call something adapter specific in efx_nic_type.
      We should only do adapter specialisation via efx_nic_type.
      
      Removal of sriov functionality from the Falcon code means that tests
      are needed for the presence of some callbacks.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7fa8d547
  13. 09 4月, 2015 2 次提交
  14. 07 11月, 2014 3 次提交
  15. 18 10月, 2014 1 次提交
  16. 16 7月, 2014 1 次提交
  17. 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
  18. 13 12月, 2013 8 次提交