From 08aa52e9e8f1a849b8ba002ad1d4a9383e65e08c Mon Sep 17 00:00:00 2001 From: weingart Date: Thu, 17 Apr 1997 19:03:20 +0000 Subject: [PATCH] Fix error handling from bios & typo. --- sys/arch/i386/stand/libsa/biosdev.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/sys/arch/i386/stand/libsa/biosdev.c b/sys/arch/i386/stand/libsa/biosdev.c index e02b7d641e9..696a37611d8 100644 --- a/sys/arch/i386/stand/libsa/biosdev.c +++ b/sys/arch/i386/stand/libsa/biosdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: biosdev.c,v 1.7 1997/04/15 20:50:35 mickey Exp $ */ +/* $OpenBSD: biosdev.c,v 1.8 1997/04/17 19:03:20 weingart Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -290,7 +290,7 @@ biosstrategy(void *devdata, int rw, else n = nsect - i; - /* use a bounce buffer to not to cross 64k DMA boundary */ + /* use a bounce buffer to not cross 64k DMA boundary */ if ((((u_int32_t)buf) & ~0xffff) != (((u_int32_t)buf + n * DEV_BSIZE) & ~0xffff)) { bb = alloc(n * DEV_BSIZE); @@ -308,14 +308,20 @@ biosstrategy(void *devdata, int rw, : bioswrite(bd->biosdev, cyl, hd, sect, n, bb); switch (error) { - case 0x06: /* disk changed */ - printf ("disk changed\n"); - default: - continue; - + case 0x00: /* No errors */ case 0x11: /* ECC corrected */ error = 0; break; + + default: +#ifdef BIOS_DEBUG + if (debug) { + for (p = bd_errors; p < &bd_errors[bd_nents] && + p->bd_id != error; p++); + printf("\nBIOS error %x (%s)\n", p->bd_id, p->msg); + } +#endif + continue; } } -- 2.20.1