Message ID | 52F2B6B2.1020901@broadcom.com |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
On 05/02/14 22:09, Nithin Nayak Sujir wrote: > > David, > Rather than doing it this way, I think it's sufficient to move the call > to tg3_set_mtu() between tg3_netif_stop() and tg3_full_lock(). > > Before tg3 started using set_bit() for flags, tg3_set_mtu() needed to be > under a lock, but that's not the case anymore. > > Can you try this patch? That looks better. Tested-by: David Vrabel <david.vrabel@citrix.com> Thanks. David > diff --git a/drivers/net/ethernet/broadcom/tg3.c > b/drivers/net/ethernet/broadcom/tg3.c > index e2ca03e..0bb79b8 100644 > --- a/drivers/net/ethernet/broadcom/tg3.c > +++ b/drivers/net/ethernet/broadcom/tg3.c > @@ -14113,12 +14113,12 @@ static int tg3_change_mtu(struct net_device > *dev, int new_mtu) > > tg3_netif_stop(tp); > > + tg3_set_mtu(dev, tp, new_mtu); > + > tg3_full_lock(tp, 1); > > tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); > > - tg3_set_mtu(dev, tp, new_mtu); > - > /* Reset PHY, otherwise the read DMA engine will be in a mode that > * breaks all requests to 256 bytes. > */ > > Nithin. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index e2ca03e..0bb79b8 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -14113,12 +14113,12 @@ static int tg3_change_mtu(struct net_device *dev, int new_mtu) tg3_netif_stop(tp); + tg3_set_mtu(dev, tp, new_mtu); + tg3_full_lock(tp, 1); tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); - tg3_set_mtu(dev, tp, new_mtu); - /* Reset PHY, otherwise the read DMA engine will be in a mode that * breaks all requests to 256 bytes.