summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2003-05-13 00:53:33 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2003-05-13 00:53:33 +0000
commitd18250460d8c477fd93421dab8f419e52e333cbc (patch)
tree616ee74f9a9446a864b54c111df2293607c0054f /sys
parentc6ad99161beed710afbb7cf4442e610e16e9c4b7 (diff)
Don't report devices with incomplete implementations as OFFLINE.
Fixes frantzen@'s pentax digital camera. Suggested by Costa. ok csapuntz@ frantzen@.
Diffstat (limited to 'sys')
-rw-r--r--sys/scsi/sd_atapi.c9
1 files changed, 5 insertions, 4 deletions
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);