alistair23-linux/drivers/net/ethernet/sfc
Edward Cree 267d9d7387 sfc: Cope with permissions enforcement added to firmware for SR-IOV
* 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: Shradha Shah <sshah@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09 16:16:48 -04:00
..
bitfield.h
ef10.c sfc: Cope with permissions enforcement added to firmware for SR-IOV 2015-05-09 16:16:48 -04:00
ef10_regs.h
ef10_sriov.c sfc: manually allocate and free vadaptors 2015-05-09 16:16:48 -04:00
ef10_sriov.h sfc: manually allocate and free vadaptors 2015-05-09 16:16:48 -04:00
efx.c sfc: Cope with permissions enforcement added to firmware for SR-IOV 2015-05-09 16:16:48 -04:00
efx.h sfc: Prepare to bind the sfc driver to the VF. 2015-05-09 16:16:47 -04:00
enum.h
ethtool.c ethtool: Support for configurable RSS hash function 2014-12-08 21:07:10 -05:00
falcon.c sfc: Prepare to bind the sfc driver to the VF. 2015-05-09 16:16:47 -04:00
falcon_boards.c
farch.c sfc: Own header for nic-specific sriov functions, single instance of netdev_ops and sriov removed from Falcon code 2015-05-09 16:16:46 -04:00
farch_regs.h
filter.h
io.h
Kconfig
Makefile sfc: Enable VF's via a write to the sysfs file sriov_numvfs 2015-05-09 16:16:46 -04:00
mcdi.c sfc: Cope with permissions enforcement added to firmware for SR-IOV 2015-05-09 16:16:48 -04:00
mcdi.h sfc: Cope with permissions enforcement added to firmware for SR-IOV 2015-05-09 16:16:48 -04:00
mcdi_mon.c
mcdi_pcol.h sfc: Cope with permissions enforcement added to firmware for SR-IOV 2015-05-09 16:16:48 -04:00
mcdi_port.c sfc: Add 40G link capability decoding 2014-07-14 19:11:48 -07:00
mdio_10g.c
mdio_10g.h
mtd.c
net_driver.h sfc: Prepare to bind the sfc driver to the VF. 2015-05-09 16:16:47 -04:00
nic.c
nic.h sfc: create vports for VFs and assign random MAC addresses 2015-05-09 16:16:48 -04:00
phy.h
ptp.c ptp: sfc: convert to the 64 bit get/set time methods. 2015-03-31 12:01:18 -04:00
qt202x_phy.c
rx.c sfc: Add support for busy polling 2014-07-22 19:55:20 -07:00
selftest.c sfc: Fix memcpy() with const destination compiler warning. 2015-04-17 15:15:40 -04:00
selftest.h
siena.c sfc: Prepare to bind the sfc driver to the VF. 2015-05-09 16:16:47 -04:00
siena_sriov.c sfc: Enable VF's via a write to the sysfs file sriov_numvfs 2015-05-09 16:16:46 -04:00
siena_sriov.h sfc: Enable VF's via a write to the sysfs file sriov_numvfs 2015-05-09 16:16:46 -04:00
sriov.c sfc: Own header for nic-specific sriov functions, single instance of netdev_ops and sriov removed from Falcon code 2015-05-09 16:16:46 -04:00
sriov.h sfc: Own header for nic-specific sriov functions, single instance of netdev_ops and sriov removed from Falcon code 2015-05-09 16:16:46 -04:00
tenxpress.c
tx.c sfc: remove incorrect EFX_BUG_ON_PARANOID check 2014-10-22 12:51:16 -04:00
txc43128_phy.c
vfdi.h ethernet: codespell comment spelling fixes 2015-03-08 22:54:22 -04:00
workarounds.h