patch-2.4.3 linux/drivers/net/3c505.c

Next file: linux/drivers/net/3c509.c
Previous file: linux/drivers/net/3c503.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.2/linux/drivers/net/3c505.c linux/drivers/net/3c505.c
@@ -601,15 +601,16 @@
 		printk("%s: memory squeeze, dropping packet\n", dev->name);
 		target = adapter->dma_buffer;
 		adapter->current_dma.target = NULL;
+		return;
+	}
+
+	skb_reserve(skb, 2);
+	target = skb_put(skb, rlen);
+	if (virt_to_bus(target + rlen) >= MAX_DMA_ADDRESS) {
+		adapter->current_dma.target = target;
+		target = adapter->dma_buffer;
 	} else {
-		skb_reserve(skb, 2);
-		target = skb_put(skb, rlen);
-		if (virt_to_bus(target + rlen) >= MAX_DMA_ADDRESS) {
-			adapter->current_dma.target = target;
-			target = adapter->dma_buffer;
-		} else {
-			adapter->current_dma.target = NULL;
-		}
+		adapter->current_dma.target = NULL;
 	}
 
 	/* if this happens, we die */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)