summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1999-01-18 07:55:02 +0000
committerjulian <julian@FreeBSD.org>1999-01-18 07:55:02 +0000
commitac7ffa4b3b3eb19d1ebe4c6d7437b8924541bede (patch)
tree16f51206c5993000056004528a90c54475464f6f /sys
parenta5617fae2a7cfdff00e9145562c91afa658ad87c (diff)
downloadFreeBSD-src-ac7ffa4b3b3eb19d1ebe4c6d7437b8924541bede.zip
FreeBSD-src-ac7ffa4b3b3eb19d1ebe4c6d7437b8924541bede.tar.gz
From inspection, ISA interrupts were completely broken..
revert some of the old ISA code. (I can't test this but I'm working on the file.)
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/sr/if_sr.c21
-rw-r--r--sys/dev/sr/if_sr_isa.c21
-rw-r--r--sys/i386/isa/if_sr.c21
3 files changed, 60 insertions, 3 deletions
diff --git a/sys/dev/sr/if_sr.c b/sys/dev/sr/if_sr.c
index f655599..4dfa40d 100644
--- a/sys/dev/sr/if_sr.c
+++ b/sys/dev/sr/if_sr.c
@@ -27,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_sr.c,v 1.17 1998/12/16 18:42:38 phk Exp $
+ * $Id: if_sr.c,v 1.18 1999/01/12 01:17:00 eivind Exp $
*/
/*
@@ -269,6 +269,7 @@ struct sr_hardc *srattach_pci(int unit, vm_offset_t plx_vaddr,
vm_offset_t sca_vaddr);
void srintr_hc(struct sr_hardc *hc);
+static ointhand2_t srintr;
static int srattach(struct sr_hardc *hc);
static void sr_xmit(struct sr_softc *sc);
static void srstart(struct ifnet *ifp);
@@ -571,6 +572,8 @@ srattach_isa(struct isa_device *id)
u_char mar;
struct sr_hardc *hc = &sr_hardc[id->id_unit];
+ id->id_ointr = srintr;
+
outb(hc->iobase + SR_PCR, inb(hc->iobase + SR_PCR) | SR_PCR_SCARUN);
outb(hc->iobase + SR_PSR, inb(hc->iobase + SR_PSR) | SR_PSR_EN_SCA_DMA);
outb(hc->iobase + SR_MCR,
@@ -856,6 +859,22 @@ srattach(struct sr_hardc *hc)
return 1;
}
+/*
+ * Get the ISA interrupts
+ */
+void
+srintr(void * cookie)
+{
+ struct sr_hardc *hc;
+
+ hc = &sr_hardc[unit];
+ srintr_hc(hc);
+ return;
+}
+
+/*
+ * PCI interrupts come straight here
+ */
void
srintr_hc(struct sr_hardc *hc)
{
diff --git a/sys/dev/sr/if_sr_isa.c b/sys/dev/sr/if_sr_isa.c
index f655599..4dfa40d 100644
--- a/sys/dev/sr/if_sr_isa.c
+++ b/sys/dev/sr/if_sr_isa.c
@@ -27,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_sr.c,v 1.17 1998/12/16 18:42:38 phk Exp $
+ * $Id: if_sr.c,v 1.18 1999/01/12 01:17:00 eivind Exp $
*/
/*
@@ -269,6 +269,7 @@ struct sr_hardc *srattach_pci(int unit, vm_offset_t plx_vaddr,
vm_offset_t sca_vaddr);
void srintr_hc(struct sr_hardc *hc);
+static ointhand2_t srintr;
static int srattach(struct sr_hardc *hc);
static void sr_xmit(struct sr_softc *sc);
static void srstart(struct ifnet *ifp);
@@ -571,6 +572,8 @@ srattach_isa(struct isa_device *id)
u_char mar;
struct sr_hardc *hc = &sr_hardc[id->id_unit];
+ id->id_ointr = srintr;
+
outb(hc->iobase + SR_PCR, inb(hc->iobase + SR_PCR) | SR_PCR_SCARUN);
outb(hc->iobase + SR_PSR, inb(hc->iobase + SR_PSR) | SR_PSR_EN_SCA_DMA);
outb(hc->iobase + SR_MCR,
@@ -856,6 +859,22 @@ srattach(struct sr_hardc *hc)
return 1;
}
+/*
+ * Get the ISA interrupts
+ */
+void
+srintr(void * cookie)
+{
+ struct sr_hardc *hc;
+
+ hc = &sr_hardc[unit];
+ srintr_hc(hc);
+ return;
+}
+
+/*
+ * PCI interrupts come straight here
+ */
void
srintr_hc(struct sr_hardc *hc)
{
diff --git a/sys/i386/isa/if_sr.c b/sys/i386/isa/if_sr.c
index f655599..4dfa40d 100644
--- a/sys/i386/isa/if_sr.c
+++ b/sys/i386/isa/if_sr.c
@@ -27,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_sr.c,v 1.17 1998/12/16 18:42:38 phk Exp $
+ * $Id: if_sr.c,v 1.18 1999/01/12 01:17:00 eivind Exp $
*/
/*
@@ -269,6 +269,7 @@ struct sr_hardc *srattach_pci(int unit, vm_offset_t plx_vaddr,
vm_offset_t sca_vaddr);
void srintr_hc(struct sr_hardc *hc);
+static ointhand2_t srintr;
static int srattach(struct sr_hardc *hc);
static void sr_xmit(struct sr_softc *sc);
static void srstart(struct ifnet *ifp);
@@ -571,6 +572,8 @@ srattach_isa(struct isa_device *id)
u_char mar;
struct sr_hardc *hc = &sr_hardc[id->id_unit];
+ id->id_ointr = srintr;
+
outb(hc->iobase + SR_PCR, inb(hc->iobase + SR_PCR) | SR_PCR_SCARUN);
outb(hc->iobase + SR_PSR, inb(hc->iobase + SR_PSR) | SR_PSR_EN_SCA_DMA);
outb(hc->iobase + SR_MCR,
@@ -856,6 +859,22 @@ srattach(struct sr_hardc *hc)
return 1;
}
+/*
+ * Get the ISA interrupts
+ */
+void
+srintr(void * cookie)
+{
+ struct sr_hardc *hc;
+
+ hc = &sr_hardc[unit];
+ srintr_hc(hc);
+ return;
+}
+
+/*
+ * PCI interrupts come straight here
+ */
void
srintr_hc(struct sr_hardc *hc)
{
OpenPOWER on IntegriCloud