Pull cpuidle into release branch
[pandora-kernel.git] / arch / ia64 / hp / sim / simeth.c
index e1a1b11..08b117e 100644 (file)
@@ -22,6 +22,9 @@
 #include <linux/bitops.h>
 #include <asm/system.h>
 #include <asm/irq.h>
+#include <asm/hpsim.h>
+
+#include "hpsim_ssc.h"
 
 #define SIMETH_RECV_MAX        10
 
 #define SIMETH_FRAME_SIZE      ETH_FRAME_LEN
 
 
-#define SSC_NETDEV_PROBE               100
-#define SSC_NETDEV_SEND                        101
-#define SSC_NETDEV_RECV                        102
-#define SSC_NETDEV_ATTACH              103
-#define SSC_NETDEV_DETACH              104
-
 #define NETWORK_INTR                   8
 
 struct simeth_local {
@@ -54,7 +51,7 @@ static int simeth_close(struct net_device *dev);
 static int simeth_tx(struct sk_buff *skb, struct net_device *dev);
 static int simeth_rx(struct net_device *dev);
 static struct net_device_stats *simeth_get_stats(struct net_device *dev);
-static irqreturn_t simeth_interrupt(int irq, void *dev_id, struct pt_regs * regs);
+static irqreturn_t simeth_interrupt(int irq, void *dev_id);
 static void set_multicast_list(struct net_device *dev);
 static int simeth_device_event(struct notifier_block *this,unsigned long event, void *ptr);
 
@@ -87,7 +84,7 @@ static int simeth_debug;              /* set to 1 to get debug information */
  */
 static struct notifier_block simeth_dev_notifier = {
        simeth_device_event,
-       0
+       NULL
 };
 
 
@@ -124,9 +121,6 @@ simeth_probe (void)
        return r;
 }
 
-extern long ia64_ssc (long, long, long, long, int);
-extern void ia64_ssc_connect_irq (long intr, long irq);
-
 static inline int
 netdev_probe(char *name, unsigned char *ether)
 {
@@ -300,6 +294,9 @@ simeth_device_event(struct notifier_block *this,unsigned long event, void *ptr)
                return NOTIFY_DONE;
        }
 
+       if (dev->nd_net != &init_net)
+               return NOTIFY_DONE;
+
        if ( event != NETDEV_UP && event != NETDEV_DOWN ) return NOTIFY_DONE;
 
        /*
@@ -427,7 +424,6 @@ make_new_skb(struct net_device *dev)
                printk(KERN_NOTICE "%s: memory squeeze. dropping packet.\n", dev->name);
                return NULL;
        }
-       nskb->dev = dev;
 
        skb_reserve(nskb, 2);   /* Align IP on 16 byte boundaries */
 
@@ -474,7 +470,7 @@ simeth_rx(struct net_device *dev)
                 * XXX Fix me
                 * Should really do a csum+copy here
                 */
-               memcpy(skb->data, frame, len);
+               skb_copy_to_linear_data(skb, frame, len);
 #endif
                skb->protocol = eth_type_trans(skb, dev);
 
@@ -497,7 +493,7 @@ simeth_rx(struct net_device *dev)
  * Interrupt handler (Yes, we can do it too !!!)
  */
 static irqreturn_t
-simeth_interrupt(int irq, void *dev_id, struct pt_regs * regs)
+simeth_interrupt(int irq, void *dev_id)
 {
        struct net_device *dev = dev_id;