From 72578dfa5ac09bd6f378eae39338769ffc5a9cf9 Mon Sep 17 00:00:00 2001 From: KATO Takenori Date: Thu, 4 Mar 1999 10:48:14 +0000 Subject: [PATCH] When SCSI IDs are not contiguous, the loader could not find correct unit number for da device. This commit fixes this problem. Submitted by: IMAI Takeshi --- sys/boot/pc98/libpc98/biosdisk.c | 10 +++++++--- sys/boot/pc98/loader/main.c | 13 +++++++------ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/sys/boot/pc98/libpc98/biosdisk.c b/sys/boot/pc98/libpc98/biosdisk.c index cef10b8a7b9..453c0b4d535 100644 --- a/sys/boot/pc98/libpc98/biosdisk.c +++ b/sys/boot/pc98/libpc98/biosdisk.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: biosdisk.c,v 1.23 1999/01/25 23:07:02 rnordier Exp $ + * $Id: biosdisk.c,v 1.1 1999/02/03 08:39:09 kato Exp $ */ /* @@ -173,8 +173,12 @@ bd_init(void) bdinfo[nbdinfo].bd_flags = (unit & 0xf0) == 0x90 ? BD_FLOPPY : 0; /* XXX add EDD probes */ - if (!bd_int13probe(&bdinfo[nbdinfo])) - break; + if (!bd_int13probe(&bdinfo[nbdinfo])){ + if ((unit & 0xf0) == 0xa0 && (unit & 0x0f) < 6) + continue; /* Target IDs are not contiguous. */ + else + break; + } if (bdinfo[nbdinfo].bd_flags & BD_FLOPPY){ bdinfo[nbdinfo].bd_drive = 'A' + (unit & 0xf); diff --git a/sys/boot/pc98/loader/main.c b/sys/boot/pc98/loader/main.c index 8ee752af821..8655dbfb8a0 100644 --- a/sys/boot/pc98/loader/main.c +++ b/sys/boot/pc98/loader/main.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: main.c,v 1.14 1998/11/02 23:28:11 msmith Exp $ + * $Id: main.c,v 1.1 1999/02/03 08:39:09 kato Exp $ */ /* @@ -164,11 +164,12 @@ extract_currdev(void) * and we are not booting from the lowest-numbered disk type * (ie. SCSI when IDE also exists). */ -#ifdef PC98 - if (major == 6) - biosdev = 0x30 + B_UNIT(initial_bootdev); - else - biosdev = (major << 3) + 0x80 + B_UNIT(initial_bootdev); +#ifdef PC98 + if ((biosdev == 0) && (B_TYPE(initial_bootdev) != 2)) /* biosdev doesn't match major */ + if (B_TYPE(initial_bootdev) == 6) + biosdev = 0x30 + B_UNIT(initial_bootdev); + else + biosdev = (major << 3) + 0x80 + B_UNIT(initial_bootdev); #else if ((biosdev == 0) && (B_TYPE(initial_bootdev) != 2)) /* biosdev doesn't match major */ biosdev = 0x80 + B_UNIT(initial_bootdev); /* assume harddisk */