[PATCH] e1000 close

J.A. Magallon (jamagallon@able.es)
Sun, 6 Apr 2003 01:12:20 +0200


On 04.06, J.A. Magallon wrote:
>
> On 04.04, Marcelo Tosatti wrote:
> >
> > So here goes -pre7. Hopefully the last -pre.
> >
>

Supposed to cure a dev_close called without dev_open.
Is this still needed ?

--- linux-2.4.20/drivers/net/e1000/e1000_main.c.orig 2003-03-11 13:45:26.000000000 -0800
+++ linux-2.4.20/drivers/net/e1000/e1000_main.c 2003-03-11 14:12:12.000000000 -0800
@@ -997,6 +997,9 @@
unsigned long size;
int i;

+ if(!adapter->tx_ring.buffer_info)
+ return;
+
/* Free all the Tx ring sk_buffs */

for(i = 0; i < adapter->tx_ring.count; i++) {
@@ -1062,6 +1065,9 @@
unsigned long size;
int i;

+ if(!adapter->rx_ring.buffer_info)
+ return;
+
/* Free all the Rx ring sk_buffs */

for(i = 0; i < adapter->rx_ring.count; i++) {

-- 
J.A. Magallon <jamagallon@able.es>      \                 Software is like sex:
werewolf.able.es                         \           It's better when it's free
Mandrake Linux release 9.2 (Bamboo) for i586
Linux 2.4.21-pre7-jam1 (gcc 3.2.2 (Mandrake Linux 9.2 3.2.2-5mdk))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/