diff options
author | dyson <dyson@FreeBSD.org> | 1996-07-27 19:01:10 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1996-07-27 19:01:10 +0000 |
commit | 19e4b9aada028e7525b1cf1528c8527d4ee6930e (patch) | |
tree | edb9f5f082b08166ebad6400089d292dc1df7dea /sys | |
parent | 48e897bb4eab0ed69fa719d996cb7611391cfeec (diff) | |
download | FreeBSD-src-19e4b9aada028e7525b1cf1528c8527d4ee6930e.zip FreeBSD-src-19e4b9aada028e7525b1cf1528c8527d4ee6930e.tar.gz |
Move a couple of the initialization commands to the right place. Multi
sector mode was not getting re-initialized when needed.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/i386/isa/wd.c | 52 |
1 files changed, 24 insertions, 28 deletions
diff --git a/sys/i386/isa/wd.c b/sys/i386/isa/wd.c index 09ae4f0..81d5384 100644 --- a/sys/i386/isa/wd.c +++ b/sys/i386/isa/wd.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)wd.c 7.2 (Berkeley) 5/9/91 - * $Id: wd.c,v 1.111 1996/07/21 09:28:50 phk Exp $ + * $Id: wd.c,v 1.112 1996/07/23 21:51:46 phk Exp $ */ /* TODO: @@ -1444,6 +1444,29 @@ wdsetctlr(struct disk *du) wderror((struct buf *)NULL, du, "wdsetctlr failed"); return (1); } + + /* + * The config option flags low 8 bits define the maximum multi-block + * transfer size. If the user wants the maximum that the drive + * is capable of, just set the low bits of the config option to + * 0x00ff. + */ + if ((du->cfg_flags & WDOPT_MULTIMASK) != 0 && (du->dk_multi > 1)) { + if (du->dk_multi > (du->cfg_flags & WDOPT_MULTIMASK)) + du->dk_multi = du->cfg_flags & WDOPT_MULTIMASK; + if (wdcommand(du, 0, 0, 0, du->dk_multi, WDCC_SET_MULTI)) { + du->dk_multi = 1; + } + } else { + du->dk_multi = 1; + } + +#ifdef NOTYET +/* set read caching and write caching */ + wdcommand(du, 0, 0, 0, WDFEA_RCACHE, WDCC_FEATURES); + wdcommand(du, 0, 0, 0, WDFEA_WCACHE, WDCC_FEATURES); +#endif + return (0); } @@ -1643,33 +1666,6 @@ failed: du->dk_dd.d_subtype |= DSTYPE_GEOMETRY; #endif - /* - * find out the drives maximum multi-block transfer capability - */ - du->dk_multi = wp->wdp_nsecperint & 0xff; - - /* - * The config option flags low 8 bits define the maximum multi-block - * transfer size. If the user wants the maximum that the drive - * is capable of, just set the low bits of the config option to - * 0x00ff. - */ - if ((flags & WDOPT_MULTIMASK) != 0 && (du->dk_multi > 1)) { - if (du->dk_multi > (flags & WDOPT_MULTIMASK)) - du->dk_multi = flags & WDOPT_MULTIMASK; - if (wdcommand(du, 0, 0, 0, du->dk_multi, WDCC_SET_MULTI)) { - du->dk_multi = 1; - } - } else { - du->dk_multi = 1; - } - -#ifdef NOTYET -/* set read caching and write caching */ - wdcommand(du, 0, 0, 0, WDFEA_RCACHE, WDCC_FEATURES); - wdcommand(du, 0, 0, 0, WDFEA_WCACHE, WDCC_FEATURES); -#endif - return (0); } |