projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
compaq changes
[unix-history]
/
usr
/
src
/
sys
/
i386
/
isa
/
wd.c
diff --git
a/usr/src/sys/i386/isa/wd.c
b/usr/src/sys/i386/isa/wd.c
index
a4aeefc
..
9a3450e
100644
(file)
--- a/
usr/src/sys/i386/isa/wd.c
+++ b/
usr/src/sys/i386/isa/wd.c
@@
-7,7
+7,7
@@
*
* %sccs.include.386.c%
*
*
* %sccs.include.386.c%
*
- * @(#)wd.c 5.
4
(Berkeley) %G%
+ * @(#)wd.c 5.
5
(Berkeley) %G%
*/
#include "wd.h"
*/
#include "wd.h"
@@
-360,7
+360,7
@@
loop:
/* Set up the SDH register (select drive). */
outb(wdc+wd_sdh, WDSD_IBM | (unit<<4) | (head & 0xf));
/* Set up the SDH register (select drive). */
outb(wdc+wd_sdh, WDSD_IBM | (unit<<4) | (head & 0xf));
- while ((inb(wdc+wd_
altst
s) & WDCS_READY) == 0) ;
+ while ((inb(wdc+wd_
statu
s) & WDCS_READY) == 0) ;
/*if (bp->b_flags & B_FORMAT)
wr(wdc+wd_command, WDCC_FORMAT);
/*if (bp->b_flags & B_FORMAT)
wr(wdc+wd_command, WDCC_FORMAT);
@@
-377,7
+377,7
@@
loop:
if (bp->b_flags & B_READ) return;
/* Ready to send data? */
if (bp->b_flags & B_READ) return;
/* Ready to send data? */
- while ((inb(wdc+wd_
altst
s) & WDCS_DRQ) == 0)
+ while ((inb(wdc+wd_
statu
s) & WDCS_DRQ) == 0)
nulldev(); /* So compiler won't optimize out */
/* ASSUMES CONTIGUOUS MEMORY */
nulldev(); /* So compiler won't optimize out */
/* ASSUMES CONTIGUOUS MEMORY */
@@
-430,6
+430,8
@@
static wd_haderror;
}
if (status & (WDCS_ERR | WDCS_ECCCOR)) {
wd_errstat = inb(wdc+wd_error); /* save error status */
}
if (status & (WDCS_ERR | WDCS_ECCCOR)) {
wd_errstat = inb(wdc+wd_error); /* save error status */
+outb(wdc+wd_command, WDCC_RESTORE);
+while (inb(wdc+wd_status)&WDCS_BUSY);
#ifdef WDDEBUG
printf("status %x error %x\n", status, wd_errstat);
#endif
#ifdef WDDEBUG
printf("status %x error %x\n", status, wd_errstat);
#endif
@@
-666,7
+668,7
@@
wdcontrol(bp)
return(0);
case RECAL:
return(0);
case RECAL:
- if ((stat = inb(wdc+wd_
altst
s)) & WDCS_ERR) {
+ if ((stat = inb(wdc+wd_
statu
s)) & WDCS_ERR) {
printf("wd%d: recal", du->dk_unit);
if (unit == 0) {
printf(": status %b error %b\n",
printf("wd%d: recal", du->dk_unit);
if (unit == 0) {
printf(": status %b error %b\n",