1. 22 5月, 2015 2 次提交
  2. 10 5月, 2015 1 次提交
    • 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
  3. 09 3月, 2015 1 次提交
  4. 07 12月, 2013 1 次提交
  5. 05 10月, 2013 1 次提交
  6. 30 8月, 2013 1 次提交
  7. 22 8月, 2013 1 次提交
    • B
      sfc: Update MCDI protocol definitions for EF10 · f2b0befd
      Ben Hutchings 提交于
      EF10 controllers do not have shared memory for communication with the
      MC; instead it reads requests and writes responses in host memory,
      which allows for longer messages.  It is also responsible for all
      datapath control operations and hardware resource allocation, which
      requires a large number of new commands and adds more possible error
      cases.  MCDI v2 extends the message header to support this.
      
      Update the MCDI protocol definition header to include v2 lengths,
      errors and messages, and a few definitions specific to the
      SFC9100 family (codenames Farmingdale and Huntington) which is
      the first generation of EF10.
      
      Some messages have been extended, so adjust the code accordingly:
      - The request for MC_CMD_DRV_ATTACH now includes a datapath firmware
        ID.  This is ignored by Siena but we should fill it in anyway,
        initially always specifying low-latency datapath.
      - The response for MC_CMD_GET_LOOPBACK_MODES now includes a 40G
        field.  Accept shorter responses that don't include it.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      f2b0befd
  8. 21 8月, 2013 1 次提交
  9. 08 3月, 2013 1 次提交
    • L
      sfc: PTP changes to support improved UUID filtering mode · c939a316
      Laurence Evans 提交于
      There is a long-standing problem with the packet-timestamp matching in
      the driver. When a PTP packet is received by the MC, the FPGA
      timestamps the packet and the MC sends the timestamp and 6 bytes of
      the UUID to the driver. The driver then matches the timestamp against
      received packets using the same 6 bytes of UUID.
      
      The problem comes from the choice of which 6 bytes to use. The PTP
      spec is slightly contradictory and misleading in one of the two places
      where the UUIDs are discussed. From section 7.2.2.2 of the spec, a
      PTPD2 UUID can be either a EUI-64 or a EUI-64 constructed from a
      EUI-48. The typical ethernet based implementation uses a EUI-64
      constructed from a EUI-48. This works by taking the first 3 bytes of
      the MAC address of the NIC being used for PTP (the OUI), then
      inserting 0xFF, 0xFE, then taking the last 3 bytes of the MAC address
      giving
                MAC[0], MAC[1], MAC[2], 0xFF, 0xFE, MAC[3], MAC[4], MAC[5]
      The current MC firmware and driver discard the first two bytes of this
      UUID and packets are matched against timestamps using bytes 2 to 7 so
      there is a small risk that in a deployment of Solarflare PTP NICs used
      with other vendors NICs, that a PTP packet could be matched against
      the wrong timestamp. This applies to all other organisations whose
      third byte of the OUI is 0x53. It's a long list but I notice that it
      includes Cisco.
      
      The necessary modifications to use bytes 0-2 and 5-7 of the UUID to
      match against are quite small but introduce incompatibility between
      older version of the firmware and driver.
      
      When PTP is enabled via SO_TIMESTAMPING specifying PTP V2, the driver
      will try to enable PTP in the firmware using the enhanced mode
      (above). If the firmware returns an error, the driver will enable PTP
      in the firmware using the old mode.
      
      [bwh: Fix some style errors; remove private ioctl bits]
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      c939a316
  10. 19 9月, 2012 2 次提交
  11. 11 7月, 2012 1 次提交
  12. 10 1月, 2012 1 次提交
  13. 11 8月, 2011 1 次提交
  14. 31 3月, 2011 1 次提交
  15. 01 3月, 2011 1 次提交
  16. 29 4月, 2010 1 次提交
  17. 04 2月, 2010 1 次提交
  18. 26 1月, 2010 1 次提交
  19. 30 11月, 2009 1 次提交