1. 22 5月, 2015 8 次提交
  2. 10 5月, 2015 12 次提交
    • S
      sfc: Bind the sfc driver to any available VF's · 6f7f8aa6
      Shradha Shah 提交于
      Add the device ID of the VF to the PCI device ID table.
      
      Added a boolean flag is_vf in efx_nic_type to differentiate
      between a VF and PF at probe time. This flag is useful in later
      patches while setting MAC address specially in the
      PCI-passthrough case.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6f7f8aa6
    • 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
    • E
      sfc: Cope with permissions enforcement added to firmware for SR-IOV · 267d9d73
      Edward Cree 提交于
      * Accept EPERM in some simple cases, the following cases are handled:
      1) efx_mcdi_read_assertion()
      Unprivileged PCI functions aren't allowed to GET_ASSERTS.
      We return success as it's up to the primary PF to deal with asserts.
      2) efx_mcdi_mon_probe() in efx_ef10_probe()
      Unprivileged PCI functions aren't allowed to read sensor info, and
      worrying about sensor data is the primary PF's job.
      3) phy_op->reconfigure() in efx_init_port() and efx_reset_up()
      Unprivileged functions aren't allowed to MC_CMD_SET_LINK, they just have
      to accept the settings (including flow-control, which is what
      efx_init_port() is worried about) they've been given.
      4) Fallback to GET_WORKAROUNDS in efx_ef10_probe()
      Unprivileged PCI functions aren't allowed to set workarounds. So if
      efx_mcdi_set_workaround() fails EPERM, use efx_mcdi_get_workarounds()
      to find out if workaround_35388 is enabled.
      5) If DRV_ATTACH gets EPERM, try without specifying fw-variant
      Unprivileged PCI functions have to use a FIRMWARE_ID of 0xffffffff
      (MC_CMD_FW_DONT_CARE).
      6) Don't try to exit_assertion unless one had fired
      Previously we called efx_mcdi_exit_assertion even if
      efx_mcdi_read_assertion had received MC_CMD_GET_ASSERTS_FLAGS_NO_FAILS.
      This is unnecessary, and the resulting MC_CMD_REBOOT, even if the
      AFTER_ASSERTION flag made it a no-op, would fail EPERM for unprivileged
      PCI functions.
      So make efx_mcdi_read_assertion return whether an assert happened, and only
      call efx_mcdi_exit_assertion if it has.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      267d9d73
    • S
      sfc: manually allocate and free vadaptors · 7b8c7b54
      Shradha Shah 提交于
      To be able to use MC_CMD_VADAPTOR_SET_MAC, vadaptors must be
      manually allocated and freed as automatic vadaptors will disappear
      when their reference_count reaches zero, which must happen before
      the MAC address is changed.
      
      Vadaptors are allocated and freed in the vswitching_probe/remove
      functions for PFs and VFs, and this means that vadaptors are restored
      correctly following an MC reboot or other reset when required.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7b8c7b54
    • 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
    • S
      sfc: Use MCDI to set FILTER_OP_IN_TX_DOMAIN · e3d36293
      Shradha Shah 提交于
      The TX_DOMAIN field is currently reserved but its safer to set
      it to 0 for future compatibility.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e3d36293
    • S
      sfc: Enable VF's via a write to the sysfs file sriov_numvfs · 834e23dd
      Shradha Shah 提交于
      This patch adds support for the use of sriov_configure on EF10
      to enable Virtual Functions while the driver is loaded.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      834e23dd
    • 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
  3. 09 4月, 2015 3 次提交
  4. 07 11月, 2014 1 次提交
  5. 04 11月, 2014 1 次提交
  6. 16 7月, 2014 1 次提交
  7. 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
  8. 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
  9. 15 3月, 2014 1 次提交
  10. 11 3月, 2014 1 次提交
  11. 13 2月, 2014 1 次提交
  12. 22 1月, 2014 1 次提交
  13. 17 12月, 2013 1 次提交
  14. 13 12月, 2013 7 次提交