Re: [PATCH] r8169: Don't update statistics counters when interface is down

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Francois Romieu
Date: Tuesday, February 3, 2009 - 2:46 pm

Ivan Vecera <ivecera@redhat.com> :

It makes sense.

[...]


int dev_close(struct net_device *dev)
{
[...]
	clear_bit(__LINK_STATE_START, &dev->state);
        -> netif_running is not true anymore
[...]
	if (ops->ndo_stop)
		ops->ndo_stop(dev);

-> Calling rtl8169_update_counters in rtl8169_close looks like a no-op.

Aside from that, I do not understand from the description the need for
the "while (wait--)" loop.

Aside from the aside, the diff can probably be shorter if a local "counters"
variable is kept in the ethtool function (nit).

-- 
Ueimor
--
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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] r8169: Don't update statistics counters when i ..., Francois Romieu, (Tue Feb 3, 2:46 pm)