| To: | Carl-Daniel Hailfinger <c-d.hailfinger.kernel.2004@xxxxxxx>, Jeff Garzik <jgarzik@xxxxxxxxx>, Manfred Spraul <manfred@xxxxxxxxxxxxxxxx> |
|---|---|
| Subject: | extra spinlocking in forcedeth 0.25 |
| From: | Denis Vlasenko <vda@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> |
| Date: | Wed, 24 Mar 2004 08:49:16 +0200 |
| Cc: | netdev@xxxxxxxxxxx |
| Reply-to: | Denis Vlasenko <vda@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
[I failed to find email addr of Andrew de Quincey,
who added WOL support. Feel frre to forward this to him]
In 0.23 -> 0.25 forcedeth diff I noticed this:
+ case ETHTOOL_GWOL:
+ {
+ struct ethtool_wolinfo wolinfo;
+ memset(&wolinfo, 0, sizeof(wolinfo));
+ wolinfo.supported = WAKE_MAGIC;
+
+ spin_lock_irq(&np->lock);
+ if (np->wolenabled)
+ wolinfo.wolopts = WAKE_MAGIC;
+ spin_unlock_irq(&np->lock);
+
+ if (copy_to_user(useraddr, &wolinfo, sizeof(wolinfo)))
+ return -EFAULT;
+ return 0;
+ }
IMHO this pair of lock()/unlock() is not needed
and can be safely removed.
--
vda
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: NETLINK upcalls and wireless events, Pavlin Radoslavov |
|---|---|
| Next by Date: | Follow-on: [OOPS] 2.4.25 fealnx: oops with heavy UDP traffic, Denis Vlasenko |
| Previous by Thread: | [BK PATCH] 2.4 SCTP updates, Sridhar Samudrala |
| Next by Thread: | Follow-on: [OOPS] 2.4.25 fealnx: oops with heavy UDP traffic, Denis Vlasenko |
| Indexes: | [Date] [Thread] [Top] [All Lists] |