All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	dahinds@users.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 3c589_cs: don't reference skb after passing it to netif_rx
Date: Mon, 26 Feb 2001 21:07:49 -0500	[thread overview]
Message-ID: <3A9B0BF5.4EE5D191@mandrakesoft.com> (raw)
In-Reply-To: <20010226211058.M8692@conectiva.com.br>

[-- Attachment #1: Type: text/plain, Size: 237 bytes --]

And here are the rest of the ones in pcmcia.
-- 
Jeff Garzik       | "You see, in this world there's two kinds of
Building 1024     |  people, my friend: Those with loaded guns
MandrakeSoft      |  and those who dig. You dig."  --Blondie

[-- Attachment #2: pcmcia-rx.patch --]
[-- Type: text/plain, Size: 4784 bytes --]

Index: drivers/net/pcmcia/3c574_cs.c
===================================================================
RCS file: /cvsroot/gkernel/linux_2_4/drivers/net/pcmcia/3c574_cs.c,v
retrieving revision 1.1.1.11
diff -u -r1.1.1.11 3c574_cs.c
--- drivers/net/pcmcia/3c574_cs.c	2001/02/11 21:28:07	1.1.1.11
+++ drivers/net/pcmcia/3c574_cs.c	2001/02/27 02:05:52
@@ -1166,7 +1166,9 @@
 
 				skb->protocol = eth_type_trans(skb, dev);
 				netif_rx(skb);
+				dev->last_rx = jiffies;
 				lp->stats.rx_packets++;
+				lp->stats.rx_bytes += pkt_len;
 			} else {
 				DEBUG(1, "%s: couldn't allocate a sk_buff of"
 					  " size %d.\n", dev->name, pkt_len);
Index: drivers/net/pcmcia/netwave_cs.c
===================================================================
RCS file: /cvsroot/gkernel/linux_2_4/drivers/net/pcmcia/netwave_cs.c,v
retrieving revision 1.1.1.8
diff -u -r1.1.1.8 netwave_cs.c
--- drivers/net/pcmcia/netwave_cs.c	2001/02/11 21:28:08	1.1.1.8
+++ drivers/net/pcmcia/netwave_cs.c	2001/02/27 02:05:53
@@ -1463,16 +1463,16 @@
 	skb->protocol = eth_type_trans(skb,dev);
 	/* Queue packet for network layer */
 	netif_rx(skb);
-		
+
+	dev->last_rx = jiffies;
+	priv->stats.rx_packets++;
+	priv->stats.rx_bytes += rcvLen;
+
 	/* Got the packet, tell the adapter to skip it */
 	wait_WOC(iobase);
 	writeb(NETWAVE_CMD_SRP, ramBase + NETWAVE_EREG_CB + 0);
 	writeb(NETWAVE_CMD_EOC, ramBase + NETWAVE_EREG_CB + 1);
 	DEBUG(3, "Packet reception ok\n");
-		
-	priv->stats.rx_packets++;
-
-	priv->stats.rx_bytes += skb->len;
     }
     return 0;
 }
Index: drivers/net/pcmcia/nmclan_cs.c
===================================================================
RCS file: /cvsroot/gkernel/linux_2_4/drivers/net/pcmcia/nmclan_cs.c,v
retrieving revision 1.1.1.9
diff -u -r1.1.1.9 nmclan_cs.c
--- drivers/net/pcmcia/nmclan_cs.c	2001/02/11 21:28:08	1.1.1.9
+++ drivers/net/pcmcia/nmclan_cs.c	2001/02/27 02:05:53
@@ -1288,9 +1288,9 @@
 	skb->protocol = eth_type_trans(skb, dev);
 	
 	netif_rx(skb); /* Send the packet to the upper (protocol) layers. */
-
+	dev->last_rx = jiffies;
 	lp->linux_stats.rx_packets++;
-	lp->linux_stats.rx_bytes += skb->len;
+	lp->linux_stats.rx_bytes += pkt_len;
 	outb(0xFF, ioaddr + AM2150_RCV_NEXT); /* skip to next frame */
 	continue;
       } else {
Index: drivers/net/pcmcia/ray_cs.c
===================================================================
RCS file: /cvsroot/gkernel/linux_2_4/drivers/net/pcmcia/ray_cs.c,v
retrieving revision 1.1.1.8
diff -u -r1.1.1.8 ray_cs.c
--- drivers/net/pcmcia/ray_cs.c	2001/02/11 21:28:06	1.1.1.8
+++ drivers/net/pcmcia/ray_cs.c	2001/02/27 02:05:54
@@ -2219,9 +2219,9 @@
 
     skb->protocol = eth_type_trans(skb,dev);
     netif_rx(skb);
-
+    dev->last_rx = jiffies;
     local->stats.rx_packets++;
-    local->stats.rx_bytes += skb->len;
+    local->stats.rx_bytes += total_len;
 
     /* Gather signal strength per address */
 #ifdef WIRELESS_SPY
Index: drivers/net/pcmcia/smc91c92_cs.c
===================================================================
RCS file: /cvsroot/gkernel/linux_2_4/drivers/net/pcmcia/smc91c92_cs.c,v
retrieving revision 1.1.1.12.2.2
diff -u -r1.1.1.12.2.2 smc91c92_cs.c
--- drivers/net/pcmcia/smc91c92_cs.c	2001/02/25 15:20:31	1.1.1.12.2.2
+++ drivers/net/pcmcia/smc91c92_cs.c	2001/02/27 02:05:55
@@ -1617,8 +1617,9 @@
 	
 	skb->dev = dev;
 	netif_rx(skb);
+	dev->last_rx = jiffies;
 	smc->stats.rx_packets++;
-	smc->stats.rx_bytes += skb->len;
+	smc->stats.rx_bytes += packet_length;
 	if (rx_status & RS_MULTICAST)
 	    smc->stats.multicast++;
     } else {
Index: drivers/net/pcmcia/wavelan_cs.c
===================================================================
RCS file: /cvsroot/gkernel/linux_2_4/drivers/net/pcmcia/wavelan_cs.c,v
retrieving revision 1.1.1.16.2.1
diff -u -r1.1.1.16.2.1 wavelan_cs.c
--- drivers/net/pcmcia/wavelan_cs.c	2001/02/23 00:15:34	1.1.1.16.2.1
+++ drivers/net/pcmcia/wavelan_cs.c	2001/02/27 02:05:56
@@ -2733,8 +2733,9 @@
   netif_rx(skb);
 
   /* Keep stats up to date */
+  dev->last_rx = jiffies;
   lp->stats.rx_packets++;
-  lp->stats.rx_bytes += skb->len;
+  lp->stats.rx_bytes += sksize;
 
 #ifdef DEBUG_RX_TRACE
   printk(KERN_DEBUG "%s: <-wv_packet_read()\n", dev->name);
Index: drivers/net/pcmcia/xirc2ps_cs.c
===================================================================
RCS file: /cvsroot/gkernel/linux_2_4/drivers/net/pcmcia/xirc2ps_cs.c,v
retrieving revision 1.1.1.14.2.2
diff -u -r1.1.1.14.2.2 xirc2ps_cs.c
--- drivers/net/pcmcia/xirc2ps_cs.c	2001/02/23 03:37:00	1.1.1.14.2.2
+++ drivers/net/pcmcia/xirc2ps_cs.c	2001/02/27 02:05:57
@@ -1420,6 +1420,7 @@
 		skb->protocol = eth_type_trans(skb, dev);
 		skb->dev = dev;
 		netif_rx(skb);
+		dev->last_rx = jiffies;
 		lp->stats.rx_packets++;
 		lp->stats.rx_bytes += pktlen;
 		if (!(rsr & PhyPkt))

  parent reply	other threads:[~2001-02-27  2:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-27  0:10 [PATCH] 3c589_cs: don't reference skb after passing it to netif_rx Arnaldo Carvalho de Melo
2001-02-27  1:56 ` Jeff Garzik
2001-02-27  0:26   ` Arnaldo Carvalho de Melo
2001-02-27  2:07 ` Jeff Garzik [this message]
2001-02-27  0:32   ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A9B0BF5.4EE5D191@mandrakesoft.com \
    --to=jgarzik@mandrakesoft.com \
    --cc=acme@conectiva.com.br \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=dahinds@users.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.