diff options
author | imp <imp@FreeBSD.org> | 2005-01-28 06:35:39 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-01-28 06:35:39 +0000 |
commit | 4abccfb679cd03048f9bc29b399ffe2c476600b6 (patch) | |
tree | 931736df79336496458651a5f1b50d51d6665a90 /sys/dev/cs | |
parent | 6fc560e600169133db20ce139e10497285229b21 (diff) | |
download | FreeBSD-src-4abccfb679cd03048f9bc29b399ffe2c476600b6.zip FreeBSD-src-4abccfb679cd03048f9bc29b399ffe2c476600b6.tar.gz |
For the PC Card implementation of the CS8920M that's in my IBM
EtherJet, the interrupt is selected in the eeprom based on the layout
of the PC Card board. Since this is encoded into the EEPROM, and has
no relationship to the IRQ that the pccard bridge routes the PC Card's
interrupt pin to.
As such, stop writing to that register. This gets my EtherJet working.
# The eeprom reading code appears to be totally wrong for my EtherJet
# card. This causes the card to bogusly detect the media options
# available.
Diffstat (limited to 'sys/dev/cs')
-rw-r--r-- | sys/dev/cs/if_cs.c | 3 | ||||
-rw-r--r-- | sys/dev/cs/if_cs_pccard.c | 6 | ||||
-rw-r--r-- | sys/dev/cs/if_csvar.h | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/cs/if_cs.c b/sys/dev/cs/if_cs.c index 4c501ad..e700cd4 100644 --- a/sys/dev/cs/if_cs.c +++ b/sys/dev/cs/if_cs.c @@ -467,7 +467,8 @@ cs_cs89x0_probe(device_t dev) } if (!error) { - cs_writereg(sc, pp_isaint, irq); + if (!(sc->flags & CS_NO_IRQ)) + cs_writereg(sc, pp_isaint, irq); } else { device_printf(dev, "Unknown or invalid irq\n"); return (ENXIO); diff --git a/sys/dev/cs/if_cs_pccard.c b/sys/dev/cs/if_cs_pccard.c index 29c6d7a..fad2a6f 100644 --- a/sys/dev/cs/if_cs_pccard.c +++ b/sys/dev/cs/if_cs_pccard.c @@ -80,11 +80,13 @@ cs_pccard_match(device_t dev) static int cs_pccard_probe(device_t dev) { + struct cs_softc *sc = device_get_softc(dev); int error; + sc->flags |= CS_NO_IRQ; error = cs_cs89x0_probe(dev); - cs_release_resources(dev); - return (error); + cs_release_resources(dev); + return (error); } static int diff --git a/sys/dev/cs/if_csvar.h b/sys/dev/cs/if_csvar.h index 2e2991a..ba1070e 100644 --- a/sys/dev/cs/if_csvar.h +++ b/sys/dev/cs/if_csvar.h @@ -57,6 +57,8 @@ struct cs_softc { struct resource* irq_res; /* resource for irq */ void* irq_handle; /* handle for irq handler */ + int flags; +#define CS_NO_IRQ 0x1 int nic_addr; /* Base IO address of card */ int send_cmd; int line_ctl; /* */ |