summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/mcdi.c
diff options
context:
space:
mode:
authorEdward Cree <ecree@solarflare.com>2015-07-21 16:09:31 +0200
committerDavid S. Miller <davem@davemloft.net>2015-07-22 07:21:31 +0200
commit832dc9ed43da8eb2033d90b46c1041e1d6947907 (patch)
tree96d6f91d99258465e30a935ddb0fd0729f29cea8 /drivers/net/ethernet/sfc/mcdi.c
parentsfc: enable cascaded multicast filters in MCFW (diff)
downloadlinux-832dc9ed43da8eb2033d90b46c1041e1d6947907.tar.xz
linux-832dc9ed43da8eb2033d90b46c1041e1d6947907.zip
sfc: cope with ENOSYS from efx_mcdi_get_workarounds()
GET_WORKAROUNDS was only introduced in May 2014, not all firmware will have it. So call sites need to handle ENOSYS. In this case we're probing the bug26807 workaround, which is not implemented in any firmware that doesn't have GET_WORKAROUNDS. So interpret ENOSYS as 'false'. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/mcdi.c')
-rw-r--r--drivers/net/ethernet/sfc/mcdi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/mcdi.c b/drivers/net/ethernet/sfc/mcdi.c
index 81640f8bb811..58232e78feaa 100644
--- a/drivers/net/ethernet/sfc/mcdi.c
+++ b/drivers/net/ethernet/sfc/mcdi.c
@@ -1816,7 +1816,11 @@ int efx_mcdi_get_workarounds(struct efx_nic *efx, unsigned int *impl_out,
return 0;
fail:
- netif_err(efx, hw, efx->net_dev, "%s: failed rc=%d\n", __func__, rc);
+ /* Older firmware lacks GET_WORKAROUNDS and this isn't especially
+ * terrifying. The call site will have to deal with it though.
+ */
+ netif_printk(efx, hw, rc == -ENOSYS ? KERN_DEBUG : KERN_ERR,
+ efx->net_dev, "%s: failed rc=%d\n", __func__, rc);
return rc;
}