]> err.no Git - linux-2.6/blobdiff - drivers/net/cris/eth_v10.c
Merge branch 'linux-2.6' into for-2.6.22
[linux-2.6] / drivers / net / cris / eth_v10.c
index 966b563e42bb8a81498f8cd1176675256aa0b439..5bdf5ca85a65b8629446e1e0b243c22717ea59bd 100644 (file)
 #include <linux/module.h>
 
 #include <linux/kernel.h>
-#include <linux/sched.h>
 #include <linux/delay.h>
 #include <linux/types.h>
 #include <linux/fcntl.h>
@@ -509,6 +508,8 @@ etrax_ethernet_init(void)
                 * does not share cacheline with any other data (to avoid cache bug)
                 */
                RxDescList[i].skb = dev_alloc_skb(MAX_MEDIA_DATA_SIZE + 2 * L1_CACHE_BYTES);
+               if (!RxDescList[i].skb)
+                       return -ENOMEM;
                RxDescList[i].descr.ctrl   = 0;
                RxDescList[i].descr.sw_len = MAX_MEDIA_DATA_SIZE;
                RxDescList[i].descr.next   = virt_to_phys(&RxDescList[i + 1]);
@@ -1347,7 +1348,8 @@ e100_rx(struct net_device *dev)
 
 #ifdef ETHDEBUG
                printk("head = 0x%x, data = 0x%x, tail = 0x%x, end = 0x%x\n",
-                 skb->head, skb->data, skb->tail, skb->end);
+                      skb->head, skb->data, skb_tail_pointer(skb),
+                      skb_end_pointer(skb));
                printk("copying packet to 0x%x.\n", skb_data_ptr);
 #endif
 
@@ -1374,7 +1376,6 @@ e100_rx(struct net_device *dev)
                myNextRxDesc->descr.buf = L1_CACHE_ALIGN(virt_to_phys(myNextRxDesc->skb->data));
        }
 
-       skb->dev = dev;
        skb->protocol = eth_type_trans(skb, dev);
 
        /* Send the packet to the upper layers */