Skip to contentSkip to conversation

skge: get rid of warning on race

PATCH Olaf Hering 4 participants 4 messages Dec 13, 2005 – Dec 14, 2005 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Review

Quoted 13 lines · Linux Kernel Mailing List

tree 987cfbd2134b82bea55c55fa17bd70d29df70458
parent 0e670506668a43e1355b8f10c33d081a676bd521
author Stephen Hemminger <[email protected]> Wed, 07 Dec 2005 07:01:49 -0800 committer Jeff Garzik <[email protected]> Tue, 13 Dec 2005 09:33:03 -0500

[PATCH] skge: get rid of warning on race

 drivers/net/skge.c |   10 ++++++----
(quoted diff) +2 -2
-		netif_stop_queue(dev);
-		spin_unlock_irqrestore(&skge->tx_lock, flags);
+		if (!netif_stopped(dev)) {
+			netif_stop_queue(dev);

Current Linus tree does not compile:

drivers/net/skge.c:2283: error: implicit declaration of function 'netif_stopped'

Signature · 2 lines
short story of a lazy sysadmin:
 alias appserv=wotan
#2 lore raw
Quoted 11 lines · On Tue, 13 Dec 2005 15:50:54 +0100 Olaf Hering <[email protected]> wrote:
Quoted 8 lines · Linux Kernel Mailing List

tree 987cfbd2134b82bea55c55fa17bd70d29df70458
parent 0e670506668a43e1355b8f10c33d081a676bd521
author Stephen Hemminger <[email protected]> Wed, 07 Dec 2005 07:01:49 -0800 committer Jeff Garzik <[email protected]> Tue, 13 Dec 2005 09:33:03 -0500

[PATCH] skge: get rid of warning on race

 drivers/net/skge.c |   10 ++++++----
Quoted 8 lines

Review

Quoted 4 lines
(quoted diff) +2 -2
-		netif_stop_queue(dev);
-		spin_unlock_irqrestore(&skge->tx_lock, flags);
+		if (!netif_stopped(dev)) {
+			netif_stop_queue(dev);

Current Linus tree does not compile:

drivers/net/skge.c:2283: error: implicit declaration of function 'netif_stopped'

Should have been netif_queue_stopped..

drivers/net/skge.c +1 -1
Index: skge-2.6/drivers/net/skge.c
===================================================================
@@ -2280,7 +2280,7 @@ static int skge_xmit_frame(struct sk_buf
  	}
 
 	if (unlikely(skge->tx_avail < skb_shinfo(skb)->nr_frags +1)) {
-		if (!netif_stopped(dev)) {
+		if (!netif_queue_stopped(dev)) {
 			netif_stop_queue(dev);
 
 			printk(KERN_WARNING PFX "%s: ring full when

queue awake!\n",

#3 lore raw
In reply to a message not in the archive
Quoted 5 lines · Linux Kernel

tree 987cfbd2134b82bea55c55fa17bd70d29df70458
parent 0e670506668a43e1355b8f10c33d081a676bd521
author Stephen Hemminger <[email protected]> Wed, 07 Dec 2005 07:01:49 -0800 committer Jeff Garzik <[email protected]> Tue, 13 Dec 2005 09:33:03 -0500

Quoted 8 lines

[PATCH] skge: get rid of warning on race

Get rid of warning in case of race with ring full and lockless tx on the skge driver. It is possible to be in the transmit routine with no available slots and already stopped.

You've traded a warning for something more serious :)

now I get...

drivers/net/skge.ko needs unknown symbol netif_stopped

Dave

maintainer
#4 lore raw

From: Dave Jones <[email protected]>
Date: Wed, 14 Dec 2005 00:37:08 -0500

Quoted 1 line

drivers/net/skge.ko needs unknown symbol netif_stopped

it's a typo, it should be netif_queue_stopped(). :-/