Commit 6f3a72d6 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] non-MII 3c59x fix

From: Marc Zyngier <mzyngier@freesurf.fr>

The following patch tries to fix a small bug that crept in at some
point during 2.5.

None of my 3c592 or 3c597 would work if I didn't force media
type. Instead, it would try to probe MII, looking for a suitable
transceiver, and finaly give up, because these cards really do not
have any sort of MII... :

  EISA: Probing bus 0 at Intel Corp. 82375EB
  EISA: Mainboard DEC5000 detected.
  EISA: slot 2 : ADP0001 detected.
  EISA: slot 3 : ADP7771 detected.
  EISA: slot 4 : DPTA401 detected.
  EISA: slot 5 : TCM5920 detected.
  3c59x: Donald Becker and others. www.scyld.com/network/vortex.html
  00:05: 3Com EISA 3c592 EISA 10Mbps Demon/Vortex at 0x5000. Vers LK1.1.19
    ***WARNING*** No MII transceivers found!
  EISA: Detected 4 cards.

With the enclosed patch, it just works, at least on my setup (3c592 on
Alpha, and 3c597 on x86). I haven't been able to test it didn't break
cards with MII, because I do not have such cards in my test boxes...

The patch also removes two useless EISA-only #define I introduced some
time ago.
parent 482a9473
......@@ -480,10 +480,8 @@ static struct vortex_chip_info {
} vortex_info_tbl[] __devinitdata = {
{"3c590 Vortex 10Mbps",
PCI_USES_IO|PCI_USES_MASTER, IS_VORTEX, 32, },
#define EISA_3C592_OFFSET 1 /* Offset of this entry for vortex_eisa_init */
{"3c592 EISA 10Mbps Demon/Vortex", /* AKPM: from Don's 3c59x_cb.c 0.49H */
PCI_USES_IO|PCI_USES_MASTER, IS_VORTEX, 32, },
#define EISA_3C597_OFFSET 2 /* Offset of this entry for vortex_eisa_init */
{"3c597 EISA Fast Demon/Vortex", /* AKPM: from Don's 3c59x_cb.c 0.49H */
PCI_USES_IO|PCI_USES_MASTER, IS_VORTEX, 32, },
{"3c595 Vortex 100baseTx",
......@@ -953,8 +951,8 @@ static int vortex_resume (struct pci_dev *pdev)
#ifdef CONFIG_EISA
static struct eisa_device_id vortex_eisa_ids[] = {
{ "TCM5920", EISA_3C592_OFFSET },
{ "TCM5970", EISA_3C597_OFFSET },
{ "TCM5920", CH_3C592 },
{ "TCM5970", CH_3C597 },
{ "" }
};
......@@ -1366,7 +1364,7 @@ static int __devinit vortex_probe1(struct device *gendev,
} else
dev->if_port = vp->default_media;
if ((vp->available_media & 0x4b) || (vci->drv_flags & HAS_NWAY) ||
if ((vp->available_media & 0x40) || (vci->drv_flags & HAS_NWAY) ||
dev->if_port == XCVR_MII || dev->if_port == XCVR_NWAY) {
int phy, phy_idx = 0;
EL3WINDOW(4);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment