From c95e192ba77fb69554ffcdd343adbd2941b825cd Mon Sep 17 00:00:00 2001 From: KATO Takenori Date: Sat, 29 Jan 2000 04:42:49 +0000 Subject: [PATCH] Synced with sys/i386/isa/wd.c rev 1.218. --- sys/pc98/pc98/wd.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/pc98/pc98/wd.c b/sys/pc98/pc98/wd.c index 49dfe3cf3d15..83aa52ad7a2f 100644 --- a/sys/pc98/pc98/wd.c +++ b/sys/pc98/pc98/wd.c @@ -1985,6 +1985,14 @@ wdgetctlr(struct disk *du) du->dk_dd.d_ncylinders = du->dk_dd.d_secperunit / du->dk_dd.d_secpercyl; } + if (du->dk_dd.d_ncylinders > 0x10000 && !(du->cfg_flags & WDOPT_LBA)) { + du->dk_dd.d_ncylinders = 0x10000; + du->dk_dd.d_secperunit = du->dk_dd.d_secpercyl * + du->dk_dd.d_ncylinders; + printf( + "wd%d: cannot handle %d total sectors; truncating to %lu\n", + du->dk_lunit, wp->wdp_lbasize, du->dk_dd.d_secperunit); + } #if 0 du->dk_dd.d_partitions[RAW_PART].p_size = du->dk_dd.d_secperunit; /* dubious ... */