diff options
Diffstat (limited to 'drivers/net/sfc/efx.c')
-rw-r--r-- | drivers/net/sfc/efx.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c index 5b05789f0b79..f9139377989f 100644 --- a/drivers/net/sfc/efx.c +++ b/drivers/net/sfc/efx.c | |||
@@ -1459,6 +1459,7 @@ static int efx_netdev_event(struct notifier_block *this, | |||
1459 | struct efx_nic *efx = netdev_priv(net_dev); | 1459 | struct efx_nic *efx = netdev_priv(net_dev); |
1460 | 1460 | ||
1461 | strcpy(efx->name, net_dev->name); | 1461 | strcpy(efx->name, net_dev->name); |
1462 | efx_mtd_rename(efx); | ||
1462 | } | 1463 | } |
1463 | 1464 | ||
1464 | return NOTIFY_DONE; | 1465 | return NOTIFY_DONE; |
@@ -1550,6 +1551,7 @@ void efx_reset_down(struct efx_nic *efx, struct ethtool_cmd *ecmd) | |||
1550 | 1551 | ||
1551 | efx_stop_all(efx); | 1552 | efx_stop_all(efx); |
1552 | mutex_lock(&efx->mac_lock); | 1553 | mutex_lock(&efx->mac_lock); |
1554 | mutex_lock(&efx->spi_lock); | ||
1553 | 1555 | ||
1554 | rc = falcon_xmac_get_settings(efx, ecmd); | 1556 | rc = falcon_xmac_get_settings(efx, ecmd); |
1555 | if (rc) | 1557 | if (rc) |
@@ -1582,6 +1584,7 @@ int efx_reset_up(struct efx_nic *efx, struct ethtool_cmd *ecmd, bool ok) | |||
1582 | EFX_ERR(efx, "could not restore PHY settings\n"); | 1584 | EFX_ERR(efx, "could not restore PHY settings\n"); |
1583 | } | 1585 | } |
1584 | 1586 | ||
1587 | mutex_unlock(&efx->spi_lock); | ||
1585 | mutex_unlock(&efx->mac_lock); | 1588 | mutex_unlock(&efx->mac_lock); |
1586 | 1589 | ||
1587 | if (ok) { | 1590 | if (ok) { |
@@ -1777,6 +1780,7 @@ static int efx_init_struct(struct efx_nic *efx, struct efx_nic_type *type, | |||
1777 | memset(efx, 0, sizeof(*efx)); | 1780 | memset(efx, 0, sizeof(*efx)); |
1778 | spin_lock_init(&efx->biu_lock); | 1781 | spin_lock_init(&efx->biu_lock); |
1779 | spin_lock_init(&efx->phy_lock); | 1782 | spin_lock_init(&efx->phy_lock); |
1783 | mutex_init(&efx->spi_lock); | ||
1780 | INIT_WORK(&efx->reset_work, efx_reset_work); | 1784 | INIT_WORK(&efx->reset_work, efx_reset_work); |
1781 | INIT_DELAYED_WORK(&efx->monitor_work, efx_monitor); | 1785 | INIT_DELAYED_WORK(&efx->monitor_work, efx_monitor); |
1782 | efx->pci_dev = pci_dev; | 1786 | efx->pci_dev = pci_dev; |
@@ -1911,6 +1915,8 @@ static void efx_pci_remove(struct pci_dev *pci_dev) | |||
1911 | if (!efx) | 1915 | if (!efx) |
1912 | return; | 1916 | return; |
1913 | 1917 | ||
1918 | efx_mtd_remove(efx); | ||
1919 | |||
1914 | /* Mark the NIC as fini, then stop the interface */ | 1920 | /* Mark the NIC as fini, then stop the interface */ |
1915 | rtnl_lock(); | 1921 | rtnl_lock(); |
1916 | efx->state = STATE_FINI; | 1922 | efx->state = STATE_FINI; |
@@ -2077,6 +2083,7 @@ static int __devinit efx_pci_probe(struct pci_dev *pci_dev, | |||
2077 | 2083 | ||
2078 | EFX_LOG(efx, "initialisation successful\n"); | 2084 | EFX_LOG(efx, "initialisation successful\n"); |
2079 | 2085 | ||
2086 | efx_mtd_probe(efx); /* allowed to fail */ | ||
2080 | return 0; | 2087 | return 0; |
2081 | 2088 | ||
2082 | fail5: | 2089 | fail5: |