1. 29 8月, 2015 1 次提交
    • S
      sfc: Allow driver to cope with a lower number of VIs than it needs for RSS · b0fbdae1
      Shradha Shah 提交于
      Previously, the driver would refuse to load if it couldn't secure
      enough VIs from the MC to fulfill its RSS requirements.
      This was causing probe to fail on later functions in
      configurations where we'd run out of VIs, such as having many
      VFs.
      
      This change allows the driver to load with fewer VIs, down to a
      minimum of 2. A warning will be printed saying that RSS
      requirements were not met, possibly affecting performance.
      
      efx->max_tx_channels needs to be set to avoid going down the
      failure path in efx_probe_nic() immediately in the loop after the
      probe() NIC-type function.
      Also, Set rc=ENOSPC when bombing out of efx_probe_nic due to lack
      of VIs.
      Signed-off-by: NShradha Shah <sshah@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b0fbdae1
  2. 28 8月, 2015 1 次提交
  3. 01 8月, 2015 2 次提交
  4. 22 7月, 2015 8 次提交
  5. 09 7月, 2015 3 次提交
  6. 03 6月, 2015 12 次提交
  7. 28 5月, 2015 1 次提交
    • E
      sfc: add tracing of MCDI commands · 75aba2a5
      Edward Cree 提交于
      MCDI tracing is conditional on CONFIG_SFC_MCDI_LOGGING, which is enabled
       by default.
      
      Each MCDI command will produce a console line like
          sfc dom:bus:dev:fn ifname: MCDI RPC REQ: xxxxxxxx [yyyyyyyy...]
      where xxxxxxxx etc. are the raw MCDI payload in 32-bit hex chunks.
      The response will then produce a similar line with "RESP" instead of "REQ",
       and containing the MCDI response payload (if any).
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      75aba2a5
  8. 22 5月, 2015 9 次提交
  9. 10 5月, 2015 3 次提交
    • 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