aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/efx.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-01-27 17:23:58 +0000
committerBen Hutchings <bhutchings@solarflare.com>2012-02-13 23:40:50 +0000
commit7c43161c11d7f40e38db9a1adb61347f06127796 (patch)
treeb56ad975f2ea903ee58048c13b78705aadaec822 /drivers/net/ethernet/sfc/efx.c
parentsfc: Replace some literal constants with EFX_PAGE_SIZE/EFX_BUF_SIZE (diff)
downloadlinux-dev-7c43161c11d7f40e38db9a1adb61347f06127796.tar.xz
linux-dev-7c43161c11d7f40e38db9a1adb61347f06127796.zip
sfc: Warn if unable to create MTDs
Log an explicit warning if we are unable to create MTDs for a net device. Also correct the comment about why mtd_device_register() may fail; there is no longer an MTD table to fill up. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/efx.c')
-rw-r--r--drivers/net/ethernet/sfc/efx.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 2e6389c55cee..ce07aa516cd2 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -2502,9 +2502,14 @@ static int __devinit efx_pci_probe(struct pci_dev *pci_dev,
netif_dbg(efx, probe, efx->net_dev, "initialisation successful\n");
+ /* Try to create MTDs, but allow this to fail */
rtnl_lock();
- efx_mtd_probe(efx); /* allowed to fail */
+ rc = efx_mtd_probe(efx);
rtnl_unlock();
+ if (rc)
+ netif_warn(efx, probe, efx->net_dev,
+ "failed to create MTDs (%d)\n", rc);
+
return 0;
fail4: