aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/efx.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/sfc/efx.h')
-rw-r--r--drivers/net/ethernet/sfc/efx.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/efx.h b/drivers/net/ethernet/sfc/efx.h
index f11170bc48bf..50247dfe8f57 100644
--- a/drivers/net/ethernet/sfc/efx.h
+++ b/drivers/net/ethernet/sfc/efx.h
@@ -163,4 +163,17 @@ extern void efx_link_status_changed(struct efx_nic *efx);
163extern void efx_link_set_advertising(struct efx_nic *efx, u32); 163extern void efx_link_set_advertising(struct efx_nic *efx, u32);
164extern void efx_link_set_wanted_fc(struct efx_nic *efx, u8); 164extern void efx_link_set_wanted_fc(struct efx_nic *efx, u8);
165 165
166static inline void efx_device_detach_sync(struct efx_nic *efx)
167{
168 struct net_device *dev = efx->net_dev;
169
170 /* Lock/freeze all TX queues so that we can be sure the
171 * TX scheduler is stopped when we're done and before
172 * netif_device_present() becomes false.
173 */
174 netif_tx_lock(dev);
175 netif_device_detach(dev);
176 netif_tx_unlock(dev);
177}
178
166#endif /* EFX_EFX_H */ 179#endif /* EFX_EFX_H */