Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360764
b: refs/heads/master
c: 29c69a4
h: refs/heads/master
v: v3
  • Loading branch information
Ben Hutchings committed Feb 26, 2013
1 parent 2d5d2bd commit ea933d1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b590ace09d51cd39744e0f7662c5e4a0d1b5d952
refs/heads/master: 29c69a4882641285a854d6d03ca5adbba68c0034
16 changes: 12 additions & 4 deletions trunk/drivers/net/ethernet/sfc/efx.c
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,7 @@ efx_realloc_channels(struct efx_nic *efx, u32 rxq_entries, u32 txq_entries)
tx_queue->txd.entries);
}

efx_device_detach_sync(efx);
efx_stop_all(efx);
efx_stop_interrupts(efx, true);

Expand Down Expand Up @@ -832,6 +833,7 @@ efx_realloc_channels(struct efx_nic *efx, u32 rxq_entries, u32 txq_entries)

efx_start_interrupts(efx, true);
efx_start_all(efx);
netif_device_attach(efx->net_dev);
return rc;

rollback:
Expand Down Expand Up @@ -1641,8 +1643,12 @@ static void efx_stop_all(struct efx_nic *efx)
/* Flush efx_mac_work(), refill_workqueue, monitor_work */
efx_flush_all(efx);

/* Stop the kernel transmit interface late, so the watchdog
* timer isn't ticking over the flush */
/* Stop the kernel transmit interface. This is only valid if
* the device is stopped or detached; otherwise the watchdog
* may fire immediately.
*/
WARN_ON(netif_running(efx->net_dev) &&
netif_device_present(efx->net_dev));
netif_tx_disable(efx->net_dev);

efx_stop_datapath(efx);
Expand Down Expand Up @@ -1963,16 +1969,18 @@ static int efx_change_mtu(struct net_device *net_dev, int new_mtu)
if (new_mtu > EFX_MAX_MTU)
return -EINVAL;

efx_stop_all(efx);

netif_dbg(efx, drv, efx->net_dev, "changing MTU to %d\n", new_mtu);

efx_device_detach_sync(efx);
efx_stop_all(efx);

mutex_lock(&efx->mac_lock);
net_dev->mtu = new_mtu;
efx->type->reconfigure_mac(efx);
mutex_unlock(&efx->mac_lock);

efx_start_all(efx);
netif_device_attach(efx->net_dev);
return 0;
}

Expand Down

0 comments on commit ea933d1

Please sign in to comment.