Thread (5 messages) flat view 5 messages, 2 authors, 2011-02-09

Re: [PATCH] pch_gbe: Fix the issue which a driver locks when rx offload is set by ethtool

From: David Miller <davem@davemloft.net>
Date: 2011-02-09 07:03:30
Also in: lkml

From: David Miller <davem@davemloft.net>
Date: Tue, 08 Feb 2011 22:57:02 -0800 (PST)
From: "Toshiharu Okada" <redacted>
Date: Wed, 9 Feb 2011 11:04:11 +0900
quoted
From: David Miller <davem@davemloft.net>
Date: Tue, 08 Feb 2011 16:40:30 -0800 (PST)
quoted
quoted
@@ -531,12 +533,8 @@ void pch_gbe_reinit_locked(struct pch_gbe_adapter 
*adapter)
 {
 struct net_device *netdev = adapter->netdev;

- rtnl_lock();
- if (netif_running(netdev)) {
- pch_gbe_down(adapter);
- pch_gbe_up(adapter);
- }
- rtnl_unlock();
+ pch_gbe_down(adapter);
+ pch_gbe_up(adapter);
Are you sure you can just blindly delete the netif_running() check here?
Yes, sure.
pch_gbe_reinit_locked() is called after confirming of netif_running() except 
for pch_gbe_reset_task() function.
This netif_running() was redundant.
Thanks for explaining, applied, thank you.
Actually, I had to revert, this patch introduces an obvious compiler warning:

drivers/net/pch_gbe/pch_gbe_main.c: In function 'pch_gbe_reinit_locked':
drivers/net/pch_gbe/pch_gbe_main.c:533:21: warning: unused variable 'netdev'

Sloppy build issues like this reflects very poorly upon the patch
submitter.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help