natsemi.c (e700ac213a0f793fb4f83098413303e3dd080892) | natsemi.c (4abd7cffc09a38015fa14a22471e3de48a4ca032) |
---|---|
1/* natsemi.c: A Linux PCI Ethernet driver for the NatSemi DP8381x series. */ 2/* 3 Written/copyright 1999-2001 by Donald Becker. 4 Portions copyright (c) 2001,2002 Sun Microsystems (thockin@sun.com) 5 Portions copyright 2001,2002 Manfred Spraul (manfred@colorfullife.com) 6 Portions copyright 2004 Harald Welte <laforge@gnumonks.org> 7 8 This software may be used and distributed according to the terms of --- 795 unchanged lines hidden (view full) --- 804 struct net_device *dev; 805 struct netdev_private *np; 806 int i, option, irq, chip_idx = ent->driver_data; 807 static int find_cnt = -1; 808 resource_size_t iostart; 809 unsigned long iosize; 810 void __iomem *ioaddr; 811 const int pcibar = 1; /* PCI base address register */ | 1/* natsemi.c: A Linux PCI Ethernet driver for the NatSemi DP8381x series. */ 2/* 3 Written/copyright 1999-2001 by Donald Becker. 4 Portions copyright (c) 2001,2002 Sun Microsystems (thockin@sun.com) 5 Portions copyright 2001,2002 Manfred Spraul (manfred@colorfullife.com) 6 Portions copyright 2004 Harald Welte <laforge@gnumonks.org> 7 8 This software may be used and distributed according to the terms of --- 795 unchanged lines hidden (view full) --- 804 struct net_device *dev; 805 struct netdev_private *np; 806 int i, option, irq, chip_idx = ent->driver_data; 807 static int find_cnt = -1; 808 resource_size_t iostart; 809 unsigned long iosize; 810 void __iomem *ioaddr; 811 const int pcibar = 1; /* PCI base address register */ |
812 u8 addr[ETH_ALEN]; |
|
812 int prev_eedata; 813 u32 tmp; 814 815/* when built into the kernel, we only print version if device is found */ 816#ifndef MODULE 817 static int printed_version; 818 if (!printed_version++) 819 printk(version); --- 34 unchanged lines hidden (view full) --- 854 i = -ENOMEM; 855 goto err_pci_request_regions; 856 } 857 858 /* Work around the dropped serial bit. */ 859 prev_eedata = eeprom_read(ioaddr, 6); 860 for (i = 0; i < 3; i++) { 861 int eedata = eeprom_read(ioaddr, i + 7); | 813 int prev_eedata; 814 u32 tmp; 815 816/* when built into the kernel, we only print version if device is found */ 817#ifndef MODULE 818 static int printed_version; 819 if (!printed_version++) 820 printk(version); --- 34 unchanged lines hidden (view full) --- 855 i = -ENOMEM; 856 goto err_pci_request_regions; 857 } 858 859 /* Work around the dropped serial bit. */ 860 prev_eedata = eeprom_read(ioaddr, 6); 861 for (i = 0; i < 3; i++) { 862 int eedata = eeprom_read(ioaddr, i + 7); |
862 dev->dev_addr[i*2] = (eedata << 1) + (prev_eedata >> 15); 863 dev->dev_addr[i*2+1] = eedata >> 7; | 863 addr[i*2] = (eedata << 1) + (prev_eedata >> 15); 864 addr[i*2+1] = eedata >> 7; |
864 prev_eedata = eedata; 865 } | 865 prev_eedata = eedata; 866 } |
867 eth_hw_addr_set(dev, addr); |
|
866 867 np = netdev_priv(dev); 868 np->ioaddr = ioaddr; 869 870 netif_napi_add(dev, &np->napi, natsemi_poll, 64); 871 np->dev = dev; 872 873 np->pci_dev = pdev; --- 2510 unchanged lines hidden --- | 868 869 np = netdev_priv(dev); 870 np->ioaddr = ioaddr; 871 872 netif_napi_add(dev, &np->napi, natsemi_poll, 64); 873 np->dev = dev; 874 875 np->pci_dev = pdev; --- 2510 unchanged lines hidden --- |