Fix dmfe/tulip patch so dmfe will build on SPARC

svn path=/dists/trunk/linux-2.6/; revision=14894
This commit is contained in:
Ben Hutchings 2010-01-07 12:42:46 +00:00
parent c1978c3140
commit 7df958c5d1
1 changed files with 19 additions and 6 deletions

View File

@ -1,4 +1,4 @@
From 42d0b8e38a1f545c7893e57fea2a14bc59b8a6df Mon Sep 17 00:00:00 2001
From 46d885d4ee0ee63806d8a0b43368b99c451dcbe9 Mon Sep 17 00:00:00 2001
From: Ben Hutchings <ben@decadent.org.uk>
Date: Tue, 29 Dec 2009 17:21:05 +0100
Subject: [PATCH] dmfe/tulip: Let dmfe handle DM910x except for SPARC on-board chips
@ -10,11 +10,13 @@ difference in the PCI device ids for the two different configurations,
so these drivers both claim the device ids. However, it is possible
to distinguish the two configurations by the presence of Open Firmware
properties for them, so we do that.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/net/tulip/Kconfig | 4 ++++
drivers/net/tulip/dmfe.c | 17 +++++++++++++++++
drivers/net/tulip/dmfe.c | 21 +++++++++++++++++++++
drivers/net/tulip/tulip_core.c | 32 +++++++++++++++++++++++++-------
3 files changed, 46 insertions(+), 7 deletions(-)
3 files changed, 50 insertions(+), 7 deletions(-)
diff --git a/drivers/net/tulip/Kconfig b/drivers/net/tulip/Kconfig
index 1cc8cf4..516713f 100644
@ -32,10 +34,21 @@ index 1cc8cf4..516713f 100644
tristate "Generic DECchip & DIGITAL EtherWORKS PCI/EISA"
depends on PCI || EISA
diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c
index ad63621..b2273a1 100644
index ad63621..6f44ebf 100644
--- a/drivers/net/tulip/dmfe.c
+++ b/drivers/net/tulip/dmfe.c
@@ -377,6 +377,23 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
@@ -92,6 +92,10 @@
#include <asm/uaccess.h>
#include <asm/irq.h>
+#ifdef CONFIG_TULIP_DM910X
+#include <linux/of.h>
+#endif
+
/* Board/System/Debug information/definition ---------------- */
#define PCI_DM9132_ID 0x91321282 /* Davicom DM9132 ID */
@@ -377,6 +381,23 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
if (!printed_version++)
printk(version);
@ -44,7 +57,7 @@ index ad63621..b2273a1 100644
+ * tulip driver, except for early DM9100s.
+ */
+#ifdef CONFIG_TULIP_DM910X
+ if (ent->driver_data == PCI_DM9100_ID && pdev->revision >= 0x30 ||
+ if ((ent->driver_data == PCI_DM9100_ID && pdev->revision >= 0x30) ||
+ ent->driver_data == PCI_DM9102_ID) {
+ struct device_node *dp = pci_device_to_OF_node(pdev);
+