Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 179106
b: refs/heads/master
c: 4d90706
h: refs/heads/master
v: v3
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Jan 8, 2010
1 parent 8ec381d commit deafb58
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6837e895cbfd5ce8a717f112e927d2815f341e54
refs/heads/master: 4d907069bc1b745f4abd4745c332d33098e733b8
4 changes: 4 additions & 0 deletions trunk/drivers/net/tulip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 21 additions & 0 deletions trunk/drivers/net/tulip/dmfe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -377,6 +381,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)
Expand Down
32 changes: 25 additions & 7 deletions trunk/drivers/net/tulip/tulip_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 },
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit deafb58

Please sign in to comment.