[kernel] r14892 - in dists/trunk/linux-2.6/debian: . patches/bugfix/all patches/series
Ben Hutchings
benh at alioth.debian.org
Tue Jan 5 03:14:06 UTC 2010
Author: benh
Date: Tue Jan 5 03:14:04 2010
New Revision: 14892
Log:
dmfe/tulip: Let dmfe handle DM910x except for SPARC on-board chips (Closes: #515533)
Added:
dists/trunk/linux-2.6/debian/patches/bugfix/all/dmfe-tulip-Let-dmfe-handle-DM910x-except-SPARC-onboard.patch
Modified:
dists/trunk/linux-2.6/debian/changelog
dists/trunk/linux-2.6/debian/patches/series/4
Modified: dists/trunk/linux-2.6/debian/changelog
==============================================================================
--- dists/trunk/linux-2.6/debian/changelog Tue Jan 5 03:12:36 2010 (r14891)
+++ dists/trunk/linux-2.6/debian/changelog Tue Jan 5 03:14:04 2010 (r14892)
@@ -7,6 +7,8 @@
(Closes: #563036)
* via-velocity: Give RX descriptors to the NIC later on open or MTU change
(Closes: #508527)
+ * dmfe/tulip: Let dmfe handle DM910x except for SPARC on-board chips
+ (Closes: #515533)
[ maximilian attems ]
* topconfig set CAN_EMS_USB, BT_MRVL, BT_MRVL_SDIO, BE2ISCSI, SCSI_PMCRAID,
Added: dists/trunk/linux-2.6/debian/patches/bugfix/all/dmfe-tulip-Let-dmfe-handle-DM910x-except-SPARC-onboard.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/bugfix/all/dmfe-tulip-Let-dmfe-handle-DM910x-except-SPARC-onboard.patch Tue Jan 5 03:14:04 2010 (r14892)
@@ -0,0 +1,131 @@
+From 42d0b8e38a1f545c7893e57fea2a14bc59b8a6df Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <ben at 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
+
+The Davicom DM9100 and DM9102 chips are used on the motherboards of
+some SPARC systems (supported by the tulip driver) and also in PCI
+expansion cards (supported by the dmfe driver). There is no
+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.
+---
+ drivers/net/tulip/Kconfig | 4 ++++
+ drivers/net/tulip/dmfe.c | 17 +++++++++++++++++
+ drivers/net/tulip/tulip_core.c | 32 +++++++++++++++++++++++++-------
+ 3 files changed, 46 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/net/tulip/Kconfig b/drivers/net/tulip/Kconfig
+index 1cc8cf4..516713f 100644
+--- a/drivers/net/tulip/Kconfig
++++ b/drivers/net/tulip/Kconfig
+@@ -101,6 +101,10 @@ config TULIP_NAPI_HW_MITIGATION
+
+ If in doubt, say Y.
+
++config TULIP_DM910X
++ def_bool y
++ depends on TULIP && SPARC
++
+ config DE4X5
+ 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
+--- 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,
+ if (!printed_version++)
+ printk(version);
+
++ /*
++ * SPARC on-board DM910x chips should be handled by the main
++ * tulip driver, except for early DM9100s.
++ */
++#ifdef CONFIG_TULIP_DM910X
++ 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);
++
++ if (dp && of_get_property(dp, "local-mac-address", NULL)) {
++ printk(KERN_INFO DRV_NAME
++ ": skipping on-board DM910x (use tulip)\n");
++ return -ENODEV;
++ }
++ }
++#endif
++
+ /* Init network device */
+ dev = alloc_etherdev(sizeof(*db));
+ if (dev == NULL)
+diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c
+index 0fa3140..595777d 100644
+--- a/drivers/net/tulip/tulip_core.c
++++ b/drivers/net/tulip/tulip_core.c
+@@ -196,9 +196,13 @@ struct tulip_chip_table tulip_tbl[] = {
+ | HAS_NWAY | HAS_PCI_MWI, tulip_timer, tulip_media_task },
+
+ /* DM910X */
++#ifdef CONFIG_TULIP_DM910X
+ { "Davicom DM9102/DM9102A", 128, 0x0001ebef,
+ HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM | HAS_ACPI,
+ tulip_timer, tulip_media_task },
++#else
++ { NULL },
++#endif
+
+ /* RS7112 */
+ { "Conexant LANfinity", 256, 0x0001ebef,
+@@ -228,8 +232,10 @@ static struct pci_device_id tulip_pci_tbl[] = {
+ { 0x1259, 0xa120, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
+ { 0x11F6, 0x9881, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMPEX9881 },
+ { 0x8086, 0x0039, PCI_ANY_ID, PCI_ANY_ID, 0, 0, I21145 },
++#ifdef CONFIG_TULIP_DM910X
+ { 0x1282, 0x9100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DM910X },
+ { 0x1282, 0x9102, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DM910X },
++#endif
+ { 0x1113, 0x1216, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
+ { 0x1113, 0x1217, PCI_ANY_ID, PCI_ANY_ID, 0, 0, MX98715 },
+ { 0x1113, 0x9511, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET },
+@@ -1299,18 +1305,30 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
+ }
+
+ /*
+- * Early DM9100's need software CRC and the DMFE driver
++ * DM910x chips should be handled by the dmfe driver, except
++ * on-board chips on SPARC systems. Also, early DM9100s need
++ * software CRC which only the dmfe driver supports.
+ */
+
+- if (pdev->vendor == 0x1282 && pdev->device == 0x9100)
+- {
+- /* Read Chip revision */
+- if (pdev->revision < 0x30)
+- {
+- printk(KERN_ERR PFX "skipping early DM9100 with Crc bug (use dmfe)\n");
++#ifdef CONFIG_TULIP_DM910X
++ if (chip_idx == DM910X) {
++ struct device_node *dp;
++
++ if (pdev->vendor == 0x1282 && pdev->device == 0x9100 &&
++ pdev->revision < 0x30) {
++ printk(KERN_INFO PFX
++ "skipping early DM9100 with Crc bug (use dmfe)\n");
++ return -ENODEV;
++ }
++
++ dp = pci_device_to_OF_node(pdev);
++ if (!(dp && of_get_property(dp, "local-mac-address", NULL))) {
++ printk(KERN_INFO PFX
++ "skipping DM910x expansion card (use dmfe)\n");
+ return -ENODEV;
+ }
+ }
++#endif
+
+ /*
+ * Looks for early PCI chipsets where people report hangs
+--
+1.6.5.7
+
Modified: dists/trunk/linux-2.6/debian/patches/series/4
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/series/4 Tue Jan 5 03:12:36 2010 (r14891)
+++ dists/trunk/linux-2.6/debian/patches/series/4 Tue Jan 5 03:14:04 2010 (r14892)
@@ -1,3 +1,4 @@
+ bugfix/all/modules-Skip-empty-section-notes.patch
+ features/arm/early-printk.patch
+ bugfix/all/via-velocity-give-rx-descriptors-later.patch
++ bugfix/all/dmfe-tulip-Let-dmfe-handle-DM910x-except-SPARC-onboard.patch
More information about the Kernel-svn-changes
mailing list