Commit fa44821a authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

sfc: don't use netif_info et al before net_device is registered

Using netif_info() before the net_device is registered results in ugly
messages like the following:
sfc 0000:01:00.1 (unnamed net_device) (uninitialized): Solarflare NIC detected
Therefore use pci_info() et al until net_device is registered.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 30515832
...@@ -722,8 +722,7 @@ static int efx_register_netdev(struct efx_nic *efx) ...@@ -722,8 +722,7 @@ static int efx_register_netdev(struct efx_nic *efx)
efx->state = STATE_READY; efx->state = STATE_READY;
smp_mb(); /* ensure we change state before checking reset_pending */ smp_mb(); /* ensure we change state before checking reset_pending */
if (efx->reset_pending) { if (efx->reset_pending) {
netif_err(efx, probe, efx->net_dev, pci_err(efx->pci_dev, "aborting probe due to scheduled reset\n");
"aborting probe due to scheduled reset\n");
rc = -EIO; rc = -EIO;
goto fail_locked; goto fail_locked;
} }
...@@ -990,8 +989,7 @@ static int efx_pci_probe_main(struct efx_nic *efx) ...@@ -990,8 +989,7 @@ static int efx_pci_probe_main(struct efx_nic *efx)
rc = efx->type->init(efx); rc = efx->type->init(efx);
up_write(&efx->filter_sem); up_write(&efx->filter_sem);
if (rc) { if (rc) {
netif_err(efx, probe, efx->net_dev, pci_err(efx->pci_dev, "failed to initialise NIC\n");
"failed to initialise NIC\n");
goto fail3; goto fail3;
} }
...@@ -1038,8 +1036,8 @@ static int efx_pci_probe_post_io(struct efx_nic *efx) ...@@ -1038,8 +1036,8 @@ static int efx_pci_probe_post_io(struct efx_nic *efx)
if (efx->type->sriov_init) { if (efx->type->sriov_init) {
rc = efx->type->sriov_init(efx); rc = efx->type->sriov_init(efx);
if (rc) if (rc)
netif_err(efx, probe, efx->net_dev, pci_err(efx->pci_dev, "SR-IOV can't be enabled rc %d\n",
"SR-IOV can't be enabled rc %d\n", rc); rc);
} }
/* Determine netdevice features */ /* Determine netdevice features */
...@@ -1106,8 +1104,7 @@ static int efx_pci_probe(struct pci_dev *pci_dev, ...@@ -1106,8 +1104,7 @@ static int efx_pci_probe(struct pci_dev *pci_dev,
if (rc) if (rc)
goto fail1; goto fail1;
netif_info(efx, probe, efx->net_dev, pci_info(pci_dev, "Solarflare NIC detected\n");
"Solarflare NIC detected\n");
if (!efx->type->is_vf) if (!efx->type->is_vf)
efx_probe_vpd_strings(efx); efx_probe_vpd_strings(efx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment