X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fnet%2Fvia-velocity.c;h=8e5d82051bd4f94f42c91b711793b23a1f9825c3;hb=d18edcb212d7dc864a59e6aa9b6b9826299e0210;hp=dd472b64e5a29b10b24ae8ff7d29991c8008e74d;hpb=23b6b0e3e8306ce3d00e0c87196bfaad335b9096;p=linux-2.6-omap-h63xx.git diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index dd472b64e5a..8e5d82051bd 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c @@ -236,7 +236,7 @@ static void velocity_print_info(struct velocity_info *vptr); static int velocity_open(struct net_device *dev); static int velocity_change_mtu(struct net_device *dev, int mtu); static int velocity_xmit(struct sk_buff *skb, struct net_device *dev); -static int velocity_intr(int irq, void *dev_instance, struct pt_regs *regs); +static int velocity_intr(int irq, void *dev_instance); static void velocity_set_multi(struct net_device *dev); static struct net_device_stats *velocity_get_stats(struct net_device *dev); static int velocity_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); @@ -265,15 +265,19 @@ static int velocity_set_media_mode(struct velocity_info *vptr, u32 mii_status); static int velocity_suspend(struct pci_dev *pdev, pm_message_t state); static int velocity_resume(struct pci_dev *pdev); +static DEFINE_SPINLOCK(velocity_dev_list_lock); +static LIST_HEAD(velocity_dev_list); + +#endif + +#if defined(CONFIG_PM) && defined(CONFIG_INET) + static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr); static struct notifier_block velocity_inetaddr_notifier = { .notifier_call = velocity_netdev_event, }; -static DEFINE_SPINLOCK(velocity_dev_list_lock); -static LIST_HEAD(velocity_dev_list); - static void velocity_register_notifier(void) { register_inetaddr_notifier(&velocity_inetaddr_notifier); @@ -284,12 +288,12 @@ static void velocity_unregister_notifier(void) unregister_inetaddr_notifier(&velocity_inetaddr_notifier); } -#else /* CONFIG_PM */ +#else #define velocity_register_notifier() do {} while (0) #define velocity_unregister_notifier() do {} while (0) -#endif /* !CONFIG_PM */ +#endif /* * Internal board variants. At the moment we have only one @@ -2002,7 +2006,7 @@ static int velocity_xmit(struct sk_buff *skb, struct net_device *dev) * Handle hardware checksum */ if ((vptr->flags & VELOCITY_FLAGS_TX_CSUM) - && (skb->ip_summed == CHECKSUM_HW)) { + && (skb->ip_summed == CHECKSUM_PARTIAL)) { struct iphdr *ip = skb->nh.iph; if (ip->protocol == IPPROTO_TCP) td_ptr->tdesc1.TCR |= TCR0_TCPCK; @@ -2036,7 +2040,6 @@ static int velocity_xmit(struct sk_buff *skb, struct net_device *dev) * velocity_intr - interrupt callback * @irq: interrupt number * @dev_instance: interrupting device - * @pt_regs: CPU register state at interrupt * * Called whenever an interrupt is generated by the velocity * adapter IRQ line. We may not be the source of the interrupt @@ -2044,7 +2047,7 @@ static int velocity_xmit(struct sk_buff *skb, struct net_device *dev) * efficiently as possible. */ -static int velocity_intr(int irq, void *dev_instance, struct pt_regs *regs) +static int velocity_intr(int irq, void *dev_instance) { struct net_device *dev = dev_instance; struct velocity_info *vptr = netdev_priv(dev); @@ -3133,7 +3136,7 @@ static u16 wol_calc_crc(int size, u8 * pattern, u8 *mask_pattern) } /* Finally, invert the result once to get the correct data */ crc = ~crc; - return bitreverse(crc) >> 16; + return bitrev32(crc) >> 16; } /** @@ -3293,6 +3296,8 @@ static int velocity_resume(struct pci_dev *pdev) return 0; } +#ifdef CONFIG_INET + static int velocity_netdev_event(struct notifier_block *nb, unsigned long notification, void *ptr) { struct in_ifaddr *ifa = (struct in_ifaddr *) ptr; @@ -3313,4 +3318,6 @@ static int velocity_netdev_event(struct notifier_block *nb, unsigned long notifi } return NOTIFY_DONE; } + +#endif #endif