aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ns83820.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ns83820.c')
-rw-r--r--drivers/net/ns83820.c88
1 files changed, 45 insertions, 43 deletions
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c
index 706aed7d717f..e10da1aa3d30 100644
--- a/drivers/net/ns83820.c
+++ b/drivers/net/ns83820.c
@@ -65,7 +65,7 @@
65 * 0.20 - fix stupid RFEN thinko. i am such a smurf. 65 * 0.20 - fix stupid RFEN thinko. i am such a smurf.
66 * 20040828 0.21 - add hardware vlan accleration 66 * 20040828 0.21 - add hardware vlan accleration
67 * by Neil Horman <nhorman@redhat.com> 67 * by Neil Horman <nhorman@redhat.com>
68 * 20050406 0.22 - improved DAC ifdefs from Andi Kleen 68 * 20050406 0.22 - improved DAC ifdefs from Andi Kleen
69 * - removal of dead code from Adrian Bunk 69 * - removal of dead code from Adrian Bunk
70 * - fix half duplex collision behaviour 70 * - fix half duplex collision behaviour
71 * Driver Overview 71 * Driver Overview
@@ -96,7 +96,6 @@
96//#define dprintk printk 96//#define dprintk printk
97#define dprintk(x...) do { } while (0) 97#define dprintk(x...) do { } while (0)
98 98
99#include <linux/config.h>
100#include <linux/module.h> 99#include <linux/module.h>
101#include <linux/moduleparam.h> 100#include <linux/moduleparam.h>
102#include <linux/types.h> 101#include <linux/types.h>
@@ -378,7 +377,7 @@ static int lnksts = 0; /* CFG_LNKSTS bit polarity */
378#define LINK_DOWN 0x02 377#define LINK_DOWN 0x02
379#define LINK_UP 0x04 378#define LINK_UP 0x04
380 379
381#define HW_ADDR_LEN sizeof(dma_addr_t) 380#define HW_ADDR_LEN sizeof(dma_addr_t)
382#define desc_addr_set(desc, addr) \ 381#define desc_addr_set(desc, addr) \
383 do { \ 382 do { \
384 ((desc)[0] = cpu_to_le32(addr)); \ 383 ((desc)[0] = cpu_to_le32(addr)); \
@@ -494,7 +493,7 @@ static inline void kick_rx(struct net_device *ndev)
494 (((NR_TX_DESC-2 + dev->tx_done_idx - dev->tx_free_idx) % NR_TX_DESC) > MIN_TX_DESC_FREE) 493 (((NR_TX_DESC-2 + dev->tx_done_idx - dev->tx_free_idx) % NR_TX_DESC) > MIN_TX_DESC_FREE)
495 494
496 495
497#ifdef NS83820_VLAN_ACCEL_SUPPORT 496#ifdef NS83820_VLAN_ACCEL_SUPPORT
498static void ns83820_vlan_rx_register(struct net_device *ndev, struct vlan_group *grp) 497static void ns83820_vlan_rx_register(struct net_device *ndev, struct vlan_group *grp)
499{ 498{
500 struct ns83820 *dev = PRIV(ndev); 499 struct ns83820 *dev = PRIV(ndev);
@@ -804,7 +803,7 @@ static int ns83820_setup_rx(struct net_device *ndev)
804 803
805 writel(dev->IMR_cache, dev->base + IMR); 804 writel(dev->IMR_cache, dev->base + IMR);
806 writel(1, dev->base + IER); 805 writel(1, dev->base + IER);
807 spin_unlock_irq(&dev->misc_lock); 806 spin_unlock(&dev->misc_lock);
808 807
809 kick_rx(ndev); 808 kick_rx(ndev);
810 809
@@ -866,7 +865,7 @@ static void fastcall ns83820_rx_kick(struct net_device *ndev)
866} 865}
867 866
868/* rx_irq 867/* rx_irq
869 * 868 *
870 */ 869 */
871static void FASTCALL(rx_irq(struct net_device *ndev)); 870static void FASTCALL(rx_irq(struct net_device *ndev));
872static void fastcall rx_irq(struct net_device *ndev) 871static void fastcall rx_irq(struct net_device *ndev)
@@ -922,14 +921,14 @@ static void fastcall rx_irq(struct net_device *ndev)
922 * that are 64 bytes with a vlan header appended 921 * that are 64 bytes with a vlan header appended
923 * like arp frames, or pings, are flagged as Runts 922 * like arp frames, or pings, are flagged as Runts
924 * when the tag is stripped and hardware. This 923 * when the tag is stripped and hardware. This
925 * also means that the OK bit in the descriptor 924 * also means that the OK bit in the descriptor
926 * is cleared when the frame comes in so we have 925 * is cleared when the frame comes in so we have
927 * to do a specific length check here to make sure 926 * to do a specific length check here to make sure
928 * the frame would have been ok, had we not stripped 927 * the frame would have been ok, had we not stripped
929 * the tag. 928 * the tag.
930 */ 929 */
931 if (likely((CMDSTS_OK & cmdsts) || 930 if (likely((CMDSTS_OK & cmdsts) ||
932 ((cmdsts & CMDSTS_RUNT) && len >= 56))) { 931 ((cmdsts & CMDSTS_RUNT) && len >= 56))) {
933#else 932#else
934 if (likely(CMDSTS_OK & cmdsts)) { 933 if (likely(CMDSTS_OK & cmdsts)) {
935#endif 934#endif
@@ -946,7 +945,7 @@ static void fastcall rx_irq(struct net_device *ndev)
946 skb->ip_summed = CHECKSUM_NONE; 945 skb->ip_summed = CHECKSUM_NONE;
947 } 946 }
948 skb->protocol = eth_type_trans(skb, ndev); 947 skb->protocol = eth_type_trans(skb, ndev);
949#ifdef NS83820_VLAN_ACCEL_SUPPORT 948#ifdef NS83820_VLAN_ACCEL_SUPPORT
950 if(extsts & EXTSTS_VPKT) { 949 if(extsts & EXTSTS_VPKT) {
951 unsigned short tag; 950 unsigned short tag;
952 tag = ntohs(extsts & EXTSTS_VTG_MASK); 951 tag = ntohs(extsts & EXTSTS_VTG_MASK);
@@ -1013,8 +1012,6 @@ static void do_tx_done(struct net_device *ndev)
1013 struct ns83820 *dev = PRIV(ndev); 1012 struct ns83820 *dev = PRIV(ndev);
1014 u32 cmdsts, tx_done_idx, *desc; 1013 u32 cmdsts, tx_done_idx, *desc;
1015 1014
1016 spin_lock_irq(&dev->tx_lock);
1017
1018 dprintk("do_tx_done(%p)\n", ndev); 1015 dprintk("do_tx_done(%p)\n", ndev);
1019 tx_done_idx = dev->tx_done_idx; 1016 tx_done_idx = dev->tx_done_idx;
1020 desc = dev->tx_descs + (tx_done_idx * DESC_SIZE); 1017 desc = dev->tx_descs + (tx_done_idx * DESC_SIZE);
@@ -1050,7 +1047,7 @@ static void do_tx_done(struct net_device *ndev)
1050 dev_kfree_skb_irq(skb); 1047 dev_kfree_skb_irq(skb);
1051 atomic_dec(&dev->nr_tx_skbs); 1048 atomic_dec(&dev->nr_tx_skbs);
1052 } else 1049 } else
1053 pci_unmap_page(dev->pci_dev, 1050 pci_unmap_page(dev->pci_dev,
1054 addr, 1051 addr,
1055 len, 1052 len,
1056 PCI_DMA_TODEVICE); 1053 PCI_DMA_TODEVICE);
@@ -1070,7 +1067,6 @@ static void do_tx_done(struct net_device *ndev)
1070 netif_start_queue(ndev); 1067 netif_start_queue(ndev);
1071 netif_wake_queue(ndev); 1068 netif_wake_queue(ndev);
1072 } 1069 }
1073 spin_unlock_irq(&dev->tx_lock);
1074} 1070}
1075 1071
1076static void ns83820_cleanup_tx(struct ns83820 *dev) 1072static void ns83820_cleanup_tx(struct ns83820 *dev)
@@ -1157,7 +1153,7 @@ again:
1157 if (!nr_frags) 1153 if (!nr_frags)
1158 frag = NULL; 1154 frag = NULL;
1159 extsts = 0; 1155 extsts = 0;
1160 if (skb->ip_summed == CHECKSUM_HW) { 1156 if (skb->ip_summed == CHECKSUM_PARTIAL) {
1161 extsts |= EXTSTS_IPPKT; 1157 extsts |= EXTSTS_IPPKT;
1162 if (IPPROTO_TCP == skb->nh.iph->protocol) 1158 if (IPPROTO_TCP == skb->nh.iph->protocol)
1163 extsts |= EXTSTS_TCPPKT; 1159 extsts |= EXTSTS_TCPPKT;
@@ -1277,16 +1273,18 @@ static u32 ns83820_get_link(struct net_device *ndev)
1277 return cfg & CFG_LNKSTS ? 1 : 0; 1273 return cfg & CFG_LNKSTS ? 1 : 0;
1278} 1274}
1279 1275
1280static struct ethtool_ops ops = { 1276static const struct ethtool_ops ops = {
1281 .get_drvinfo = ns83820_get_drvinfo, 1277 .get_drvinfo = ns83820_get_drvinfo,
1282 .get_link = ns83820_get_link 1278 .get_link = ns83820_get_link
1283}; 1279};
1284 1280
1281/* this function is called in irq context from the ISR */
1285static void ns83820_mib_isr(struct ns83820 *dev) 1282static void ns83820_mib_isr(struct ns83820 *dev)
1286{ 1283{
1287 spin_lock(&dev->misc_lock); 1284 unsigned long flags;
1285 spin_lock_irqsave(&dev->misc_lock, flags);
1288 ns83820_update_stats(dev); 1286 ns83820_update_stats(dev);
1289 spin_unlock(&dev->misc_lock); 1287 spin_unlock_irqrestore(&dev->misc_lock, flags);
1290} 1288}
1291 1289
1292static void ns83820_do_isr(struct net_device *ndev, u32 isr); 1290static void ns83820_do_isr(struct net_device *ndev, u32 isr);
@@ -1308,6 +1306,8 @@ static irqreturn_t ns83820_irq(int foo, void *data, struct pt_regs *regs)
1308static void ns83820_do_isr(struct net_device *ndev, u32 isr) 1306static void ns83820_do_isr(struct net_device *ndev, u32 isr)
1309{ 1307{
1310 struct ns83820 *dev = PRIV(ndev); 1308 struct ns83820 *dev = PRIV(ndev);
1309 unsigned long flags;
1310
1311#ifdef DEBUG 1311#ifdef DEBUG
1312 if (isr & ~(ISR_PHY | ISR_RXDESC | ISR_RXEARLY | ISR_RXOK | ISR_RXERR | ISR_TXIDLE | ISR_TXOK | ISR_TXDESC)) 1312 if (isr & ~(ISR_PHY | ISR_RXDESC | ISR_RXEARLY | ISR_RXOK | ISR_RXERR | ISR_TXIDLE | ISR_TXOK | ISR_TXDESC))
1313 Dprintk("odd isr? 0x%08x\n", isr); 1313 Dprintk("odd isr? 0x%08x\n", isr);
@@ -1322,10 +1322,10 @@ static void ns83820_do_isr(struct net_device *ndev, u32 isr)
1322 if ((ISR_RXDESC | ISR_RXOK) & isr) { 1322 if ((ISR_RXDESC | ISR_RXOK) & isr) {
1323 prefetch(dev->rx_info.next_rx_desc); 1323 prefetch(dev->rx_info.next_rx_desc);
1324 1324
1325 spin_lock_irq(&dev->misc_lock); 1325 spin_lock_irqsave(&dev->misc_lock, flags);
1326 dev->IMR_cache &= ~(ISR_RXDESC | ISR_RXOK); 1326 dev->IMR_cache &= ~(ISR_RXDESC | ISR_RXOK);
1327 writel(dev->IMR_cache, dev->base + IMR); 1327 writel(dev->IMR_cache, dev->base + IMR);
1328 spin_unlock_irq(&dev->misc_lock); 1328 spin_unlock_irqrestore(&dev->misc_lock, flags);
1329 1329
1330 tasklet_schedule(&dev->rx_tasklet); 1330 tasklet_schedule(&dev->rx_tasklet);
1331 //rx_irq(ndev); 1331 //rx_irq(ndev);
@@ -1359,8 +1359,8 @@ static void ns83820_do_isr(struct net_device *ndev, u32 isr)
1359 dev->tx_idx = 0; 1359 dev->tx_idx = 0;
1360 } 1360 }
1361 /* The may have been a race between a pci originated read 1361 /* The may have been a race between a pci originated read
1362 * and the descriptor update from the cpu. Just in case, 1362 * and the descriptor update from the cpu. Just in case,
1363 * kick the transmitter if the hardware thinks it is on a 1363 * kick the transmitter if the hardware thinks it is on a
1364 * different descriptor than we are. 1364 * different descriptor than we are.
1365 */ 1365 */
1366 if (dev->tx_idx != dev->tx_free_idx) 1366 if (dev->tx_idx != dev->tx_free_idx)
@@ -1371,30 +1371,32 @@ static void ns83820_do_isr(struct net_device *ndev, u32 isr)
1371 * work has accumulated 1371 * work has accumulated
1372 */ 1372 */
1373 if ((ISR_TXDESC | ISR_TXIDLE | ISR_TXOK | ISR_TXERR) & isr) { 1373 if ((ISR_TXDESC | ISR_TXIDLE | ISR_TXOK | ISR_TXERR) & isr) {
1374 spin_lock_irqsave(&dev->tx_lock, flags);
1374 do_tx_done(ndev); 1375 do_tx_done(ndev);
1376 spin_unlock_irqrestore(&dev->tx_lock, flags);
1375 1377
1376 /* Disable TxOk if there are no outstanding tx packets. 1378 /* Disable TxOk if there are no outstanding tx packets.
1377 */ 1379 */
1378 if ((dev->tx_done_idx == dev->tx_free_idx) && 1380 if ((dev->tx_done_idx == dev->tx_free_idx) &&
1379 (dev->IMR_cache & ISR_TXOK)) { 1381 (dev->IMR_cache & ISR_TXOK)) {
1380 spin_lock_irq(&dev->misc_lock); 1382 spin_lock_irqsave(&dev->misc_lock, flags);
1381 dev->IMR_cache &= ~ISR_TXOK; 1383 dev->IMR_cache &= ~ISR_TXOK;
1382 writel(dev->IMR_cache, dev->base + IMR); 1384 writel(dev->IMR_cache, dev->base + IMR);
1383 spin_unlock_irq(&dev->misc_lock); 1385 spin_unlock_irqrestore(&dev->misc_lock, flags);
1384 } 1386 }
1385 } 1387 }
1386 1388
1387 /* The TxIdle interrupt can come in before the transmit has 1389 /* The TxIdle interrupt can come in before the transmit has
1388 * completed. Normally we reap packets off of the combination 1390 * completed. Normally we reap packets off of the combination
1389 * of TxDesc and TxIdle and leave TxOk disabled (since it 1391 * of TxDesc and TxIdle and leave TxOk disabled (since it
1390 * occurs on every packet), but when no further irqs of this 1392 * occurs on every packet), but when no further irqs of this
1391 * nature are expected, we must enable TxOk. 1393 * nature are expected, we must enable TxOk.
1392 */ 1394 */
1393 if ((ISR_TXIDLE & isr) && (dev->tx_done_idx != dev->tx_free_idx)) { 1395 if ((ISR_TXIDLE & isr) && (dev->tx_done_idx != dev->tx_free_idx)) {
1394 spin_lock_irq(&dev->misc_lock); 1396 spin_lock_irqsave(&dev->misc_lock, flags);
1395 dev->IMR_cache |= ISR_TXOK; 1397 dev->IMR_cache |= ISR_TXOK;
1396 writel(dev->IMR_cache, dev->base + IMR); 1398 writel(dev->IMR_cache, dev->base + IMR);
1397 spin_unlock_irq(&dev->misc_lock); 1399 spin_unlock_irqrestore(&dev->misc_lock, flags);
1398 } 1400 }
1399 1401
1400 /* MIB interrupt: one of the statistics counters is about to overflow */ 1402 /* MIB interrupt: one of the statistics counters is about to overflow */
@@ -1456,7 +1458,7 @@ static void ns83820_tx_timeout(struct net_device *ndev)
1456 u32 tx_done_idx, *desc; 1458 u32 tx_done_idx, *desc;
1457 unsigned long flags; 1459 unsigned long flags;
1458 1460
1459 local_irq_save(flags); 1461 spin_lock_irqsave(&dev->tx_lock, flags);
1460 1462
1461 tx_done_idx = dev->tx_done_idx; 1463 tx_done_idx = dev->tx_done_idx;
1462 desc = dev->tx_descs + (tx_done_idx * DESC_SIZE); 1464 desc = dev->tx_descs + (tx_done_idx * DESC_SIZE);
@@ -1483,7 +1485,7 @@ static void ns83820_tx_timeout(struct net_device *ndev)
1483 ndev->name, 1485 ndev->name,
1484 tx_done_idx, dev->tx_free_idx, le32_to_cpu(desc[DESC_CMDSTS])); 1486 tx_done_idx, dev->tx_free_idx, le32_to_cpu(desc[DESC_CMDSTS]));
1485 1487
1486 local_irq_restore(flags); 1488 spin_unlock_irqrestore(&dev->tx_lock, flags);
1487} 1489}
1488 1490
1489static void ns83820_tx_watch(unsigned long data) 1491static void ns83820_tx_watch(unsigned long data)
@@ -1833,7 +1835,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
1833 } else if (!pci_set_dma_mask(pci_dev, DMA_32BIT_MASK)) { 1835 } else if (!pci_set_dma_mask(pci_dev, DMA_32BIT_MASK)) {
1834 using_dac = 0; 1836 using_dac = 0;
1835 } else { 1837 } else {
1836 printk(KERN_WARNING "ns83820.c: pci_set_dma_mask failed!\n"); 1838 dev_warn(&pci_dev->dev, "pci_set_dma_mask failed!\n");
1837 return -ENODEV; 1839 return -ENODEV;
1838 } 1840 }
1839 1841
@@ -1856,7 +1858,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
1856 1858
1857 err = pci_enable_device(pci_dev); 1859 err = pci_enable_device(pci_dev);
1858 if (err) { 1860 if (err) {
1859 printk(KERN_INFO "ns83820: pci_enable_dev failed: %d\n", err); 1861 dev_info(&pci_dev->dev, "pci_enable_dev failed: %d\n", err);
1860 goto out_free; 1862 goto out_free;
1861 } 1863 }
1862 1864
@@ -1882,11 +1884,11 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
1882 1884
1883 dev->IMR_cache = 0; 1885 dev->IMR_cache = 0;
1884 1886
1885 err = request_irq(pci_dev->irq, ns83820_irq, SA_SHIRQ, 1887 err = request_irq(pci_dev->irq, ns83820_irq, IRQF_SHARED,
1886 DRV_NAME, ndev); 1888 DRV_NAME, ndev);
1887 if (err) { 1889 if (err) {
1888 printk(KERN_INFO "ns83820: unable to register irq %d\n", 1890 dev_info(&pci_dev->dev, "unable to register irq %d, err %d\n",
1889 pci_dev->irq); 1891 pci_dev->irq, err);
1890 goto out_disable; 1892 goto out_disable;
1891 } 1893 }
1892 1894
@@ -1900,7 +1902,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
1900 rtnl_lock(); 1902 rtnl_lock();
1901 err = dev_alloc_name(ndev, ndev->name); 1903 err = dev_alloc_name(ndev, ndev->name);
1902 if (err < 0) { 1904 if (err < 0) {
1903 printk(KERN_INFO "ns83820: unable to get netdev name: %d\n", err); 1905 dev_info(&pci_dev->dev, "unable to get netdev name: %d\n", err);
1904 goto out_free_irq; 1906 goto out_free_irq;
1905 } 1907 }
1906 1908
@@ -1954,7 +1956,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
1954 /* When compiled with 64 bit addressing, we must always enable 1956 /* When compiled with 64 bit addressing, we must always enable
1955 * the 64 bit descriptor format. 1957 * the 64 bit descriptor format.
1956 */ 1958 */
1957 if (sizeof(dma_addr_t) == 8) 1959 if (sizeof(dma_addr_t) == 8)
1958 dev->CFG_cache |= CFG_M64ADDR; 1960 dev->CFG_cache |= CFG_M64ADDR;
1959 if (using_dac) 1961 if (using_dac)
1960 dev->CFG_cache |= CFG_T64ADDR; 1962 dev->CFG_cache |= CFG_T64ADDR;
@@ -1992,7 +1994,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
1992 writel(dev->CFG_cache, dev->base + CFG); 1994 writel(dev->CFG_cache, dev->base + CFG);
1993 } 1995 }
1994 1996
1995#if 0 /* Huh? This sets the PCI latency register. Should be done via 1997#if 0 /* Huh? This sets the PCI latency register. Should be done via
1996 * the PCI layer. FIXME. 1998 * the PCI layer. FIXME.
1997 */ 1999 */
1998 if (readl(dev->base + SRR)) 2000 if (readl(dev->base + SRR))
@@ -2004,7 +2006,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
2004 * can be transmitted is 8192 - FLTH - burst size. 2006 * can be transmitted is 8192 - FLTH - burst size.
2005 * If only the transmit fifo was larger... 2007 * If only the transmit fifo was larger...
2006 */ 2008 */
2007 /* Ramit : 1024 DMA is not a good idea, it ends up banging 2009 /* Ramit : 1024 DMA is not a good idea, it ends up banging
2008 * some DELL and COMPAQ SMP systems */ 2010 * some DELL and COMPAQ SMP systems */
2009 writel(TXCFG_CSI | TXCFG_HBI | TXCFG_ATP | TXCFG_MXDMA512 2011 writel(TXCFG_CSI | TXCFG_HBI | TXCFG_ATP | TXCFG_MXDMA512
2010 | ((1600 / 32) * 0x100), 2012 | ((1600 / 32) * 0x100),
@@ -2018,8 +2020,8 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
2018 /* Set Rx to full duplex, don't accept runt, errored, long or length 2020 /* Set Rx to full duplex, don't accept runt, errored, long or length
2019 * range errored packets. Use 512 byte DMA. 2021 * range errored packets. Use 512 byte DMA.
2020 */ 2022 */
2021 /* Ramit : 1024 DMA is not a good idea, it ends up banging 2023 /* Ramit : 1024 DMA is not a good idea, it ends up banging
2022 * some DELL and COMPAQ SMP systems 2024 * some DELL and COMPAQ SMP systems
2023 * Turn on ALP, only we are accpeting Jumbo Packets */ 2025 * Turn on ALP, only we are accpeting Jumbo Packets */
2024 writel(RXCFG_AEP | RXCFG_ARP | RXCFG_AIRL | RXCFG_RX_FD 2026 writel(RXCFG_AEP | RXCFG_ARP | RXCFG_AIRL | RXCFG_RX_FD
2025 | RXCFG_STRIPCRC 2027 | RXCFG_STRIPCRC
@@ -2043,7 +2045,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
2043 * also turn on tag stripping if hardware acceleration is enabled 2045 * also turn on tag stripping if hardware acceleration is enabled
2044 */ 2046 */
2045#ifdef NS83820_VLAN_ACCEL_SUPPORT 2047#ifdef NS83820_VLAN_ACCEL_SUPPORT
2046#define VRCR_INIT_VALUE (VRCR_IPEN|VRCR_VTDEN|VRCR_VTREN) 2048#define VRCR_INIT_VALUE (VRCR_IPEN|VRCR_VTDEN|VRCR_VTREN)
2047#else 2049#else
2048#define VRCR_INIT_VALUE (VRCR_IPEN|VRCR_VTDEN) 2050#define VRCR_INIT_VALUE (VRCR_IPEN|VRCR_VTDEN)
2049#endif 2051#endif
@@ -2176,7 +2178,7 @@ static struct pci_driver driver = {
2176static int __init ns83820_init(void) 2178static int __init ns83820_init(void)
2177{ 2179{
2178 printk(KERN_INFO "ns83820.c: National Semiconductor DP83820 10/100/1000 driver.\n"); 2180 printk(KERN_INFO "ns83820.c: National Semiconductor DP83820 10/100/1000 driver.\n");
2179 return pci_module_init(&driver); 2181 return pci_register_driver(&driver);
2180} 2182}
2181 2183
2182static void __exit ns83820_exit(void) 2184static void __exit ns83820_exit(void)