summaryrefslogtreecommitdiff
path: root/sys/dev/atapi
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1996-09-11 07:22:06 +0000
committerJason Downs <downsj@cvs.openbsd.org>1996-09-11 07:22:06 +0000
commitd1fba2275a85904b21b255bc2d12f21b528e0425 (patch)
treec0f984feb6e8d276252888ffc1f7a7037c3dd1e9 /sys/dev/atapi
parent5af517d895cf10921679112ec35befe68ed3bafe (diff)
Remove unneeded quirk, and only print drive capabilities if it appears the
device actually filled in the information.
Diffstat (limited to 'sys/dev/atapi')
-rw-r--r--sys/dev/atapi/acd.c27
-rw-r--r--sys/dev/atapi/atapiconf.c4
-rw-r--r--sys/dev/atapi/atapilink.h3
3 files changed, 17 insertions, 17 deletions
diff --git a/sys/dev/atapi/acd.c b/sys/dev/atapi/acd.c
index f650440807f..b90efd991aa 100644
--- a/sys/dev/atapi/acd.c
+++ b/sys/dev/atapi/acd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acd.c,v 1.12 1996/09/04 22:13:45 niklas Exp $ */
+/* $OpenBSD: acd.c,v 1.13 1996/09/11 07:22:03 downsj Exp $ */
/*
* Copyright (c) 1996 Manuel Bouyer. All rights reserved.
@@ -219,17 +219,20 @@ acdattach(parent, self, aux)
*/
cap = &acd->mode_page.page_cap;
- printf ("%s: ", self->dv_xname);
- if (cap->cur_speed != cap->max_speed)
- printf ("%d/", cap->cur_speed * 1000 / 1024);
- printf ("%dKb/sec", cap->max_speed * 1000 / 1024);
- if (cap->buf_size)
- printf (", %dKb cache", cap->buf_size);
- if (cap->format_cap & FORMAT_AUDIO_PLAY)
- printf (", audio play");
- if (cap->max_vol_levels)
- printf (", %d volume levels", cap->max_vol_levels);
- printf ("\n");
+ /* Don't print anything unless it looks valid. */
+ if (cap->cur_speed > 0) {
+ printf ("%s: ", self->dv_xname);
+ if (cap->cur_speed != cap->max_speed)
+ printf ("%d/", cap->cur_speed * 1000 / 1024);
+ printf ("%dKb/sec", cap->max_speed * 1000 / 1024);
+ if (cap->buf_size)
+ printf (", %dKb cache", cap->buf_size);
+ if (cap->format_cap & FORMAT_AUDIO_PLAY)
+ printf (", audio play");
+ if (cap->max_vol_levels)
+ printf (", %d volume levels", cap->max_vol_levels);
+ printf ("\n");
+ }
}
/*
diff --git a/sys/dev/atapi/atapiconf.c b/sys/dev/atapi/atapiconf.c
index 8a4b678e0f1..a4cca6ca76d 100644
--- a/sys/dev/atapi/atapiconf.c
+++ b/sys/dev/atapi/atapiconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atapiconf.c,v 1.9 1996/09/06 12:19:10 mickey Exp $ */
+/* $OpenBSD: atapiconf.c,v 1.10 1996/09/11 07:22:04 downsj Exp $ */
/*
* Copyright (c) 1996 Manuel Bouyer. All rights reserved.
@@ -99,8 +99,6 @@ struct atapi_quirk_inquiry_pattern atapi_quirk_inquiry_patterns[] = {
{ATAPI_DEVICE_TYPE_DAD, ATAPI_REMOVABLE,
"NEC CD-ROM DRIVE:260", "3.04", AQUIRK_CDROM},
/* NEC Multispin 2Vi */
- {ATAPI_DEVICE_TYPE_CD, ATAPI_REMOVABLE,
- "NEC CD-ROM DRIVE:273", "4.21", AQUIRK_TIMING},
{0, 0, NULL, NULL, 0} /* The End */
};
diff --git a/sys/dev/atapi/atapilink.h b/sys/dev/atapi/atapilink.h
index 7a9d344c82d..b3eb0d68b89 100644
--- a/sys/dev/atapi/atapilink.h
+++ b/sys/dev/atapi/atapilink.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: atapilink.h,v 1.7 1996/09/06 12:19:12 mickey Exp $ */
+/* $OpenBSD: atapilink.h,v 1.8 1996/09/11 07:22:05 downsj Exp $ */
/*
* Copyright (c) 1996 Manuel Bouyer. All rights reserved.
@@ -153,7 +153,6 @@ struct at_dev_link {
#define AQUIRK_CDROM 0x01 /* device is a CD-ROM */
#define AQUIRK_LITTLETOC 0x02 /* Audio TOC uses wrong byte order */
#define AQUIRK_NOCAPACITY 0x04 /* no READ_CD_CAPACITY command */
-#define AQUIRK_TIMING 0x08 /* timing problems */
void (*start) __P((void *)); /* device start routine */
int (*done) __P((void *)); /* device done routine */
};