diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-12-07 04:57:19 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-07 04:57:19 -0500 |
commit | 8d1413b28033c49c7f1a4d320e815d7a5531acee (patch) | |
tree | b37281abef014cd60803b81c100388d7a475d49e /drivers/net/ns83820.c | |
parent | ed25ffa16434724f5ed825aa48734c7f3aefa203 (diff) | |
parent | 620034c84d1d939717bdfbe02c51a3fee43541c3 (diff) |
Merge branch 'master' into upstream
Conflicts:
drivers/net/netxen/netxen_nic.h
drivers/net/netxen/netxen_nic_main.c
Diffstat (limited to 'drivers/net/ns83820.c')
-rw-r--r-- | drivers/net/ns83820.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c index eb0e119bc0d6..568daeb3e9d8 100644 --- a/drivers/net/ns83820.c +++ b/drivers/net/ns83820.c | |||
@@ -427,6 +427,7 @@ struct ns83820 { | |||
427 | u8 __iomem *base; | 427 | u8 __iomem *base; |
428 | 428 | ||
429 | struct pci_dev *pci_dev; | 429 | struct pci_dev *pci_dev; |
430 | struct net_device *ndev; | ||
430 | 431 | ||
431 | #ifdef NS83820_VLAN_ACCEL_SUPPORT | 432 | #ifdef NS83820_VLAN_ACCEL_SUPPORT |
432 | struct vlan_group *vlgrp; | 433 | struct vlan_group *vlgrp; |
@@ -631,10 +632,10 @@ static void fastcall rx_refill_atomic(struct net_device *ndev) | |||
631 | } | 632 | } |
632 | 633 | ||
633 | /* REFILL */ | 634 | /* REFILL */ |
634 | static inline void queue_refill(void *_dev) | 635 | static inline void queue_refill(struct work_struct *work) |
635 | { | 636 | { |
636 | struct net_device *ndev = _dev; | 637 | struct ns83820 *dev = container_of(work, struct ns83820, tq_refill); |
637 | struct ns83820 *dev = PRIV(ndev); | 638 | struct net_device *ndev = dev->ndev; |
638 | 639 | ||
639 | rx_refill(ndev, GFP_KERNEL); | 640 | rx_refill(ndev, GFP_KERNEL); |
640 | if (dev->rx_info.up) | 641 | if (dev->rx_info.up) |
@@ -1844,6 +1845,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ | |||
1844 | 1845 | ||
1845 | ndev = alloc_etherdev(sizeof(struct ns83820)); | 1846 | ndev = alloc_etherdev(sizeof(struct ns83820)); |
1846 | dev = PRIV(ndev); | 1847 | dev = PRIV(ndev); |
1848 | dev->ndev = ndev; | ||
1847 | err = -ENOMEM; | 1849 | err = -ENOMEM; |
1848 | if (!dev) | 1850 | if (!dev) |
1849 | goto out; | 1851 | goto out; |
@@ -1856,7 +1858,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ | |||
1856 | SET_MODULE_OWNER(ndev); | 1858 | SET_MODULE_OWNER(ndev); |
1857 | SET_NETDEV_DEV(ndev, &pci_dev->dev); | 1859 | SET_NETDEV_DEV(ndev, &pci_dev->dev); |
1858 | 1860 | ||
1859 | INIT_WORK(&dev->tq_refill, queue_refill, ndev); | 1861 | INIT_WORK(&dev->tq_refill, queue_refill); |
1860 | tasklet_init(&dev->rx_tasklet, rx_action, (unsigned long)ndev); | 1862 | tasklet_init(&dev->rx_tasklet, rx_action, (unsigned long)ndev); |
1861 | 1863 | ||
1862 | err = pci_enable_device(pci_dev); | 1864 | err = pci_enable_device(pci_dev); |