aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1994-04-13 10:15:34 +0000
committerDavid Greenman <dg@FreeBSD.org>1994-04-13 10:15:34 +0000
commit04c17e6881a990ea883a8a68b915652a75bfdce3 (patch)
treede694abb4b6562a6873105b9a599ec96aa3d8baa
parent70ff255979dfdd09289f5f61a1eb8a4133e43eaf (diff)
downloadsrc-04c17e6881a990ea883a8a68b915652a75bfdce3.tar.gz
src-04c17e6881a990ea883a8a68b915652a75bfdce3.zip
Add delays after changing from 8/16 - 16/8 bit mode and after enabling/
disabling the shared memory. The 83C790 needs these or it does bad things.
Notes
Notes: svn path=/head/; revision=1358
-rw-r--r--sys/dev/ed/if_ed.c43
-rw-r--r--sys/i386/isa/if_ed.c43
2 files changed, 60 insertions, 26 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index d9a723294321..84047e20441c 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -16,7 +16,7 @@
*/
/*
- * $Id: if_ed.c,v 1.35 1994/03/02 05:50:01 davidg Exp $
+ * $Id: if_ed.c,v 1.36 1994/04/10 20:06:26 davidg Exp $
*/
#include "ed.h"
@@ -527,6 +527,7 @@ ed_probe_WD80x3(isa_dev)
if (sc->is790) {
sc->wd_laar_proto = inb(sc->asic_addr + ED_WD_LAAR);
outb(sc->asic_addr + ED_WD_LAAR, ED_WD_LAAR_M16EN);
+ (void) inb(0x84);
} else {
outb(sc->asic_addr + ED_WD_LAAR, (sc->wd_laar_proto =
ED_WD_LAAR_L16EN | ED_WD_LAAR_M16EN |
@@ -556,9 +557,11 @@ ed_probe_WD80x3(isa_dev)
/*
* Disable 16 bit access to shared memory
*/
- if (isa16bit)
+ if (isa16bit) {
outb(sc->asic_addr + ED_WD_LAAR, (sc->wd_laar_proto &=
~ED_WD_LAAR_M16EN));
+ (void) inb(0x84);
+ }
return(0);
}
@@ -571,10 +574,11 @@ ed_probe_WD80x3(isa_dev)
* memory. and 2) so that other 8 bit devices with shared
* memory can be used in this 128k region, too.
*/
- if (isa16bit)
+ if (isa16bit) {
outb(sc->asic_addr + ED_WD_LAAR, (sc->wd_laar_proto &=
~ED_WD_LAAR_M16EN));
-
+ (void) inb(0x84);
+ }
}
return (ED_WD_IO_PORTS);
@@ -1456,8 +1460,12 @@ outloop:
case ED_VENDOR_WD_SMC: {
outb(sc->asic_addr + ED_WD_LAAR,
(sc->wd_laar_proto | ED_WD_LAAR_M16EN));
- if (sc->is790)
- outb(sc->asic_addr + ED_WD_MSR, ED_WD_MSR_MENB);
+ (void) inb(0x84);
+ if (sc->is790) {
+ outb(sc->asic_addr + ED_WD_MSR, ED_WD_MSR_MENB);
+ (void) inb(0x84);
+ }
+ (void) inb(0x84);
break;
}
}
@@ -1480,8 +1488,11 @@ outloop:
break;
case ED_VENDOR_WD_SMC: {
outb(sc->asic_addr + ED_WD_LAAR, sc->wd_laar_proto);
- if (sc->is790)
- outb(sc->asic_addr + ED_WD_MSR, 0x00);
+ (void) inb(0x84);
+ if (sc->is790) {
+ outb(sc->asic_addr + ED_WD_MSR, 0x00);
+ (void) inb(0x84);
+ }
break;
}
}
@@ -1839,9 +1850,12 @@ edintr(unit)
outb(sc->asic_addr + ED_WD_LAAR,
(sc->wd_laar_proto |=
ED_WD_LAAR_M16EN));
- if (sc->is790)
- outb(sc->asic_addr + ED_WD_MSR,
- ED_WD_MSR_MENB);
+ (void) inb(0x84);
+ if (sc->is790) {
+ outb(sc->asic_addr + ED_WD_MSR,
+ ED_WD_MSR_MENB);
+ (void) inb(0x84);
+ }
}
ed_rint (unit);
@@ -1853,8 +1867,11 @@ edintr(unit)
outb(sc->asic_addr + ED_WD_LAAR,
(sc->wd_laar_proto &=
~ED_WD_LAAR_M16EN));
- if (sc->is790)
- outb(sc->asic_addr + ED_WD_MSR, 0x00);
+ (void) inb(0x84);
+ if (sc->is790) {
+ outb(sc->asic_addr + ED_WD_MSR, 0x00);
+ (void) inb(0x84);
+ }
}
}
}
diff --git a/sys/i386/isa/if_ed.c b/sys/i386/isa/if_ed.c
index d9a723294321..84047e20441c 100644
--- a/sys/i386/isa/if_ed.c
+++ b/sys/i386/isa/if_ed.c
@@ -16,7 +16,7 @@
*/
/*
- * $Id: if_ed.c,v 1.35 1994/03/02 05:50:01 davidg Exp $
+ * $Id: if_ed.c,v 1.36 1994/04/10 20:06:26 davidg Exp $
*/
#include "ed.h"
@@ -527,6 +527,7 @@ ed_probe_WD80x3(isa_dev)
if (sc->is790) {
sc->wd_laar_proto = inb(sc->asic_addr + ED_WD_LAAR);
outb(sc->asic_addr + ED_WD_LAAR, ED_WD_LAAR_M16EN);
+ (void) inb(0x84);
} else {
outb(sc->asic_addr + ED_WD_LAAR, (sc->wd_laar_proto =
ED_WD_LAAR_L16EN | ED_WD_LAAR_M16EN |
@@ -556,9 +557,11 @@ ed_probe_WD80x3(isa_dev)
/*
* Disable 16 bit access to shared memory
*/
- if (isa16bit)
+ if (isa16bit) {
outb(sc->asic_addr + ED_WD_LAAR, (sc->wd_laar_proto &=
~ED_WD_LAAR_M16EN));
+ (void) inb(0x84);
+ }
return(0);
}
@@ -571,10 +574,11 @@ ed_probe_WD80x3(isa_dev)
* memory. and 2) so that other 8 bit devices with shared
* memory can be used in this 128k region, too.
*/
- if (isa16bit)
+ if (isa16bit) {
outb(sc->asic_addr + ED_WD_LAAR, (sc->wd_laar_proto &=
~ED_WD_LAAR_M16EN));
-
+ (void) inb(0x84);
+ }
}
return (ED_WD_IO_PORTS);
@@ -1456,8 +1460,12 @@ outloop:
case ED_VENDOR_WD_SMC: {
outb(sc->asic_addr + ED_WD_LAAR,
(sc->wd_laar_proto | ED_WD_LAAR_M16EN));
- if (sc->is790)
- outb(sc->asic_addr + ED_WD_MSR, ED_WD_MSR_MENB);
+ (void) inb(0x84);
+ if (sc->is790) {
+ outb(sc->asic_addr + ED_WD_MSR, ED_WD_MSR_MENB);
+ (void) inb(0x84);
+ }
+ (void) inb(0x84);
break;
}
}
@@ -1480,8 +1488,11 @@ outloop:
break;
case ED_VENDOR_WD_SMC: {
outb(sc->asic_addr + ED_WD_LAAR, sc->wd_laar_proto);
- if (sc->is790)
- outb(sc->asic_addr + ED_WD_MSR, 0x00);
+ (void) inb(0x84);
+ if (sc->is790) {
+ outb(sc->asic_addr + ED_WD_MSR, 0x00);
+ (void) inb(0x84);
+ }
break;
}
}
@@ -1839,9 +1850,12 @@ edintr(unit)
outb(sc->asic_addr + ED_WD_LAAR,
(sc->wd_laar_proto |=
ED_WD_LAAR_M16EN));
- if (sc->is790)
- outb(sc->asic_addr + ED_WD_MSR,
- ED_WD_MSR_MENB);
+ (void) inb(0x84);
+ if (sc->is790) {
+ outb(sc->asic_addr + ED_WD_MSR,
+ ED_WD_MSR_MENB);
+ (void) inb(0x84);
+ }
}
ed_rint (unit);
@@ -1853,8 +1867,11 @@ edintr(unit)
outb(sc->asic_addr + ED_WD_LAAR,
(sc->wd_laar_proto &=
~ED_WD_LAAR_M16EN));
- if (sc->is790)
- outb(sc->asic_addr + ED_WD_MSR, 0x00);
+ (void) inb(0x84);
+ if (sc->is790) {
+ outb(sc->asic_addr + ED_WD_MSR, 0x00);
+ (void) inb(0x84);
+ }
}
}
}