From d18250460d8c477fd93421dab8f419e52e333cbc Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Tue, 13 May 2003 00:53:33 +0000 Subject: Don't report devices with incomplete implementations as OFFLINE. Fixes frantzen@'s pentax digital camera. Suggested by Costa. ok csapuntz@ frantzen@. --- sys/scsi/sd_atapi.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sys') diff --git a/sys/scsi/sd_atapi.c b/sys/scsi/sd_atapi.c index 6eb8efddd74..af2eac71f16 100644 --- a/sys/scsi/sd_atapi.c +++ b/sys/scsi/sd_atapi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd_atapi.c,v 1.2 2002/03/14 01:27:13 millert Exp $ */ +/* $OpenBSD: sd_atapi.c,v 1.3 2003/05/13 00:53:32 krw Exp $ */ /* $NetBSD: sd_atapi.c,v 1.3 1998/08/31 22:28:07 cgd Exp $ */ /* @@ -101,14 +101,15 @@ sd_atapibus_get_parms(sd, dp, flags) case ATAPI_CAP_DESC_CODE_FORMATTED: break; + case ATAPI_CAP_DESC_CODE_NONE: + return SDGP_RESULT_OFFLINE; + default: #ifdef DIAGNOSTIC printf("%s: strange capacity descriptor byte5 0x%x\n", sd->sc_dev.dv_xname, (u_int)descp->byte5); #endif - /* FALLTHROUGH */ - case ATAPI_CAP_DESC_CODE_NONE: - return SDGP_RESULT_OFFLINE; + break; } dp->disksize = _4btol(descp->nblks); -- cgit v1.2.3