From 9a84338c84c5aef9fd323a6e804e36f4fdebee1a Mon Sep 17 00:00:00 2001 From: KATO Takenori Date: Wed, 6 May 1998 08:25:58 +0000 Subject: [PATCH] Sync with sys/i386/isa/wd.c revision 1.164. --- sys/pc98/pc98/wd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/pc98/pc98/wd.c b/sys/pc98/pc98/wd.c index 6a6d3034c638..bc909cacc235 100644 --- a/sys/pc98/pc98/wd.c +++ b/sys/pc98/pc98/wd.c @@ -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 @@ wdgetctlr(struct disk *du) 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 @@ wdgetctlr(struct disk *du) 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);