Sync with sys/i386/isa/wd.c revision 1.164.

This commit is contained in:
KATO Takenori 1998-05-06 08:25:58 +00:00
parent cbf6f7d358
commit 9a84338c84
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=35774

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
* $Id: wd.c,v 1.51 1998/04/25 05:19:33 kato Exp $
* $Id: wd.c,v 1.52 1998/05/04 04:55:36 kato Exp $
*/
/* TODO:
@ -2279,7 +2279,7 @@ failed:
else if (wp->wdp_lbasize < 128*63*1024) { /* <=4.228 GB */
du->dk_dd.d_ntracks = 128;
}
else if (wp->wdp_lbasize < 128*63*1024) { /* <=8.422 GB */
else if (wp->wdp_lbasize < 255*63*1024) { /* <=8.422 GB */
du->dk_dd.d_ntracks = 255;
}
else { /* >8.422 GB */
@ -2298,6 +2298,11 @@ failed:
du->dk_dd.d_ntracks * du->dk_dd.d_nsectors;
du->dk_dd.d_secperunit =
du->dk_dd.d_secpercyl * du->dk_dd.d_ncylinders;
if (du->dk_dd.d_secperunit < wp->wdp_lbasize) {
du->dk_dd.d_secperunit = wp->wdp_lbasize;
du->dk_dd.d_ncylinders =
du->dk_dd.d_secperunit / du->dk_dd.d_secpercyl;
}
}
if (WDOPT_FORCEHD(du->cfg_flags)) {
du->dk_dd.d_ntracks = WDOPT_FORCEHD(du->cfg_flags);