aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tulip
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-27 12:29:04 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-04-27 12:29:04 -0400
commit0278ef8b484a71917bd4f03a763285cdaac10954 (patch)
tree8f6f7bf2e2a85b4643dfe3d0475811ce858fb4fc /drivers/net/tulip
parent15c54033964a943de7b0763efd3bd0ede7326395 (diff)
parentcd9ad58d4061494e7fdd70ded7bcf2418daf356a (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: (67 commits) [SCSI] SUNESP: Complete driver rewrite to version 2.0 [SPARC64]: Convert PCI over to generic struct iommu/strbuf. [SPARC]: device_node name constification fallout [SPARC64]: Convert SBUS over to generic iommu/strbuf structs. [SPARC64]: Add generic iommu and strbuf structs to iommu.h [SPARC64]: Consolidate {sbus,pci}_iommu_arena. [SPARC]: Make device_node name and type const [SPARC64]: constify some paramaters of OF routines [TIGON3]: of_get_property() returns const. [SPARC64]: Fix PCI rework to adhere to of_get_property() const return. [SPARC64]: Document and fix calculation of pages_avail. [SPARC64]: Make sure pbm->prom_node is setup easly enough in psycho.c [SPARC64]: Use bootmem_bootmap_pages() in choose_bootmap_pfn(). [SPARC64]: Add proper header file extern for cmdline_memory_size. [SPARC64]: Kill sparc_ultra_dump_{i,d}tlb() [SPARC64]: Use DECLARE_BITMAP and BITS_TO_LONGS in mm/init.c [SPARC64]: Give move verbose show_mem() output just like i386. [SPARC64]: Mark show_mem() printk's with KERN_INFO. [SPARC64]: Kill kvaddr_to_phys() and friends. [SPARC64]: Privatize sun4u_get_pte() and fix name. ...
Diffstat (limited to 'drivers/net/tulip')
-rw-r--r--drivers/net/tulip/de2104x.c2
-rw-r--r--drivers/net/tulip/de4x5.c10
-rw-r--r--drivers/net/tulip/tulip_core.c30
-rw-r--r--drivers/net/tulip/winbond-840.c2
-rw-r--r--drivers/net/tulip/xircom_tulip_cb.c2
5 files changed, 19 insertions, 27 deletions
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
index d19f8568440f..861729806dc1 100644
--- a/drivers/net/tulip/de2104x.c
+++ b/drivers/net/tulip/de2104x.c
@@ -63,7 +63,7 @@ MODULE_PARM_DESC (debug, "de2104x bitmapped message enable number");
63 63
64/* Set the copy breakpoint for the copy-only-tiny-buffer Rx structure. */ 64/* Set the copy breakpoint for the copy-only-tiny-buffer Rx structure. */
65#if defined(__alpha__) || defined(__arm__) || defined(__hppa__) \ 65#if defined(__alpha__) || defined(__arm__) || defined(__hppa__) \
66 || defined(__sparc__) || defined(__ia64__) \ 66 || defined(CONFIG_SPARC) || defined(__ia64__) \
67 || defined(__sh__) || defined(__mips__) 67 || defined(__sh__) || defined(__mips__)
68static int rx_copybreak = 1518; 68static int rx_copybreak = 1518;
69#else 69#else
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c
index e40ddb869583..62143f92c231 100644
--- a/drivers/net/tulip/de4x5.c
+++ b/drivers/net/tulip/de4x5.c
@@ -1160,7 +1160,7 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev)
1160 sprintf(lp->adapter_name,"%s (%s)", name, gendev->bus_id); 1160 sprintf(lp->adapter_name,"%s (%s)", name, gendev->bus_id);
1161 1161
1162 lp->dma_size = (NUM_RX_DESC + NUM_TX_DESC) * sizeof(struct de4x5_desc); 1162 lp->dma_size = (NUM_RX_DESC + NUM_TX_DESC) * sizeof(struct de4x5_desc);
1163#if defined(__alpha__) || defined(__powerpc__) || defined(__sparc_v9__) || defined(DE4X5_DO_MEMCPY) 1163#if defined(__alpha__) || defined(__powerpc__) || defined(CONFIG_SPARC) || defined(DE4X5_DO_MEMCPY)
1164 lp->dma_size += RX_BUFF_SZ * NUM_RX_DESC + DE4X5_ALIGN; 1164 lp->dma_size += RX_BUFF_SZ * NUM_RX_DESC + DE4X5_ALIGN;
1165#endif 1165#endif
1166 lp->rx_ring = dma_alloc_coherent(gendev, lp->dma_size, 1166 lp->rx_ring = dma_alloc_coherent(gendev, lp->dma_size,
@@ -1175,7 +1175,7 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev)
1175 ** Set up the RX descriptor ring (Intels) 1175 ** Set up the RX descriptor ring (Intels)
1176 ** Allocate contiguous receive buffers, long word aligned (Alphas) 1176 ** Allocate contiguous receive buffers, long word aligned (Alphas)
1177 */ 1177 */
1178#if !defined(__alpha__) && !defined(__powerpc__) && !defined(__sparc_v9__) && !defined(DE4X5_DO_MEMCPY) 1178#if !defined(__alpha__) && !defined(__powerpc__) && !defined(CONFIG_SPARC) && !defined(DE4X5_DO_MEMCPY)
1179 for (i=0; i<NUM_RX_DESC; i++) { 1179 for (i=0; i<NUM_RX_DESC; i++) {
1180 lp->rx_ring[i].status = 0; 1180 lp->rx_ring[i].status = 0;
1181 lp->rx_ring[i].des1 = cpu_to_le32(RX_BUFF_SZ); 1181 lp->rx_ring[i].des1 = cpu_to_le32(RX_BUFF_SZ);
@@ -1252,11 +1252,7 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev)
1252 mii_get_phy(dev); 1252 mii_get_phy(dev);
1253 } 1253 }
1254 1254
1255#ifndef __sparc_v9__
1256 printk(" and requires IRQ%d (provided by %s).\n", dev->irq, 1255 printk(" and requires IRQ%d (provided by %s).\n", dev->irq,
1257#else
1258 printk(" and requires IRQ%x (provided by %s).\n", dev->irq,
1259#endif
1260 ((lp->bus == PCI) ? "PCI BIOS" : "EISA CNFG")); 1256 ((lp->bus == PCI) ? "PCI BIOS" : "EISA CNFG"));
1261 } 1257 }
1262 1258
@@ -3627,7 +3623,7 @@ de4x5_alloc_rx_buff(struct net_device *dev, int index, int len)
3627 struct de4x5_private *lp = netdev_priv(dev); 3623 struct de4x5_private *lp = netdev_priv(dev);
3628 struct sk_buff *p; 3624 struct sk_buff *p;
3629 3625
3630#if !defined(__alpha__) && !defined(__powerpc__) && !defined(__sparc_v9__) && !defined(DE4X5_DO_MEMCPY) 3626#if !defined(__alpha__) && !defined(__powerpc__) && !defined(CONFIG_SPARC) && !defined(DE4X5_DO_MEMCPY)
3631 struct sk_buff *ret; 3627 struct sk_buff *ret;
3632 u_long i=0, tmp; 3628 u_long i=0, tmp;
3633 3629
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c
index e3774a522372..e9bf526ec534 100644
--- a/drivers/net/tulip/tulip_core.c
+++ b/drivers/net/tulip/tulip_core.c
@@ -36,8 +36,8 @@
36#include <asm/unaligned.h> 36#include <asm/unaligned.h>
37#include <asm/uaccess.h> 37#include <asm/uaccess.h>
38 38
39#ifdef __sparc__ 39#ifdef CONFIG_SPARC
40#include <asm/pbm.h> 40#include <asm/prom.h>
41#endif 41#endif
42 42
43static char version[] __devinitdata = 43static char version[] __devinitdata =
@@ -67,7 +67,7 @@ const char * const medianame[32] = {
67 67
68/* Set the copy breakpoint for the copy-only-tiny-buffer Rx structure. */ 68/* Set the copy breakpoint for the copy-only-tiny-buffer Rx structure. */
69#if defined(__alpha__) || defined(__arm__) || defined(__hppa__) \ 69#if defined(__alpha__) || defined(__arm__) || defined(__hppa__) \
70 || defined(__sparc__) || defined(__ia64__) \ 70 || defined(CONFIG_SPARC) || defined(__ia64__) \
71 || defined(__sh__) || defined(__mips__) 71 || defined(__sh__) || defined(__mips__)
72static int rx_copybreak = 1518; 72static int rx_copybreak = 1518;
73#else 73#else
@@ -91,7 +91,7 @@ static int rx_copybreak = 100;
91static int csr0 = 0x01A00000 | 0xE000; 91static int csr0 = 0x01A00000 | 0xE000;
92#elif defined(__i386__) || defined(__powerpc__) || defined(__x86_64__) 92#elif defined(__i386__) || defined(__powerpc__) || defined(__x86_64__)
93static int csr0 = 0x01A00000 | 0x8000; 93static int csr0 = 0x01A00000 | 0x8000;
94#elif defined(__sparc__) || defined(__hppa__) 94#elif defined(CONFIG_SPARC) || defined(__hppa__)
95/* The UltraSparc PCI controllers will disconnect at every 64-byte 95/* The UltraSparc PCI controllers will disconnect at every 64-byte
96 * crossing anyways so it makes no sense to tell Tulip to burst 96 * crossing anyways so it makes no sense to tell Tulip to burst
97 * any more than that. 97 * any more than that.
@@ -1315,7 +1315,7 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
1315 /* DM9102A has troubles with MRM & clear reserved bits 24:22, 20, 16, 7:1 */ 1315 /* DM9102A has troubles with MRM & clear reserved bits 24:22, 20, 16, 7:1 */
1316 if (tulip_uli_dm_quirk(pdev)) { 1316 if (tulip_uli_dm_quirk(pdev)) {
1317 csr0 &= ~0x01f100ff; 1317 csr0 &= ~0x01f100ff;
1318#if defined(__sparc__) 1318#if defined(CONFIG_SPARC)
1319 csr0 = (csr0 & ~0xff00) | 0xe000; 1319 csr0 = (csr0 & ~0xff00) | 0xe000;
1320#endif 1320#endif
1321 } 1321 }
@@ -1535,23 +1535,19 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
1535 Many PCI BIOSes also incorrectly report the IRQ line, so we correct 1535 Many PCI BIOSes also incorrectly report the IRQ line, so we correct
1536 that here as well. */ 1536 that here as well. */
1537 if (sum == 0 || sum == 6*0xff) { 1537 if (sum == 0 || sum == 6*0xff) {
1538#if defined(__sparc__) 1538#if defined(CONFIG_SPARC)
1539 struct pcidev_cookie *pcp = pdev->sysdata; 1539 struct device_node *dp = pci_device_to_OF_node(pdev);
1540 const unsigned char *addr;
1541 int len;
1540#endif 1542#endif
1541 eeprom_missing = 1; 1543 eeprom_missing = 1;
1542 for (i = 0; i < 5; i++) 1544 for (i = 0; i < 5; i++)
1543 dev->dev_addr[i] = last_phys_addr[i]; 1545 dev->dev_addr[i] = last_phys_addr[i];
1544 dev->dev_addr[i] = last_phys_addr[i] + 1; 1546 dev->dev_addr[i] = last_phys_addr[i] + 1;
1545#if defined(__sparc__) 1547#if defined(CONFIG_SPARC)
1546 if (pcp) { 1548 addr = of_get_property(dp, "local-mac-address", &len);
1547 unsigned char *addr; 1549 if (addr && len == 6)
1548 int len; 1550 memcpy(dev->dev_addr, addr, 6);
1549
1550 addr = of_get_property(pcp->prom_node,
1551 "local-mac-address", &len);
1552 if (addr && len == 6)
1553 memcpy(dev->dev_addr, addr, 6);
1554 }
1555#endif 1551#endif
1556#if defined(__i386__) || defined(__x86_64__) /* Patch up x86 BIOS bug. */ 1552#if defined(__i386__) || defined(__x86_64__) /* Patch up x86 BIOS bug. */
1557 if (last_irq) 1553 if (last_irq)
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c
index d74fa871de11..5b71ac78bca2 100644
--- a/drivers/net/tulip/winbond-840.c
+++ b/drivers/net/tulip/winbond-840.c
@@ -902,7 +902,7 @@ static void init_registers(struct net_device *dev)
902 } 902 }
903#elif defined(__powerpc__) || defined(__i386__) || defined(__alpha__) || defined(__ia64__) || defined(__x86_64__) 903#elif defined(__powerpc__) || defined(__i386__) || defined(__alpha__) || defined(__ia64__) || defined(__x86_64__)
904 i |= 0xE000; 904 i |= 0xE000;
905#elif defined(__sparc__) || defined (CONFIG_PARISC) 905#elif defined(CONFIG_SPARC) || defined (CONFIG_PARISC)
906 i |= 0x4800; 906 i |= 0x4800;
907#else 907#else
908#warning Processor architecture undefined 908#warning Processor architecture undefined
diff --git a/drivers/net/tulip/xircom_tulip_cb.c b/drivers/net/tulip/xircom_tulip_cb.c
index 696b3b8aac8e..f64172927377 100644
--- a/drivers/net/tulip/xircom_tulip_cb.c
+++ b/drivers/net/tulip/xircom_tulip_cb.c
@@ -65,7 +65,7 @@ static int rx_copybreak = 100;
65static int csr0 = 0x01A00000 | 0xE000; 65static int csr0 = 0x01A00000 | 0xE000;
66#elif defined(__powerpc__) 66#elif defined(__powerpc__)
67static int csr0 = 0x01B00000 | 0x8000; 67static int csr0 = 0x01B00000 | 0x8000;
68#elif defined(__sparc__) 68#elif defined(CONFIG_SPARC)
69static int csr0 = 0x01B00080 | 0x8000; 69static int csr0 = 0x01B00080 | 0x8000;
70#elif defined(__i386__) 70#elif defined(__i386__)
71static int csr0 = 0x01A00000 | 0x8000; 71static int csr0 = 0x01A00000 | 0x8000;