diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/atapi/acd.c | 4 | ||||
-rw-r--r-- | sys/dev/atapi/atapiconf.c | 37 | ||||
-rw-r--r-- | sys/dev/atapi/atapilink.h | 3 |
3 files changed, 27 insertions, 17 deletions
diff --git a/sys/dev/atapi/acd.c b/sys/dev/atapi/acd.c index 7e959c7444b..86ab68930d5 100644 --- a/sys/dev/atapi/acd.c +++ b/sys/dev/atapi/acd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acd.c,v 1.24 1997/06/15 02:37:59 downsj Exp $ */ +/* $OpenBSD: acd.c,v 1.25 1997/06/24 05:29:53 downsj Exp $ */ /* * Copyright (c) 1996 Manuel Bouyer. All rights reserved. @@ -125,7 +125,6 @@ int acd_pause __P((struct acd_softc *, int)); void acdminphys __P((struct buf*)); u_long acd_size __P((struct acd_softc*, int)); int acddone __P((void *)); -#ifndef XXX int acdlock __P((struct acd_softc *)); void acdunlock __P((struct acd_softc *)); int acdopen __P((dev_t, int, int)); @@ -136,7 +135,6 @@ int acdioctl __P((dev_t, u_long, caddr_t, int, struct proc *)); int acd_reset __P((struct acd_softc *)); int acdsize __P((dev_t)); int acddump __P((dev_t, daddr_t, caddr_t, size_t)); -#endif int acd_get_mode __P((struct acd_softc *, struct atapi_mode_data *, int, int, int)); int acd_set_mode __P((struct acd_softc *, struct atapi_mode_data *, int)); diff --git a/sys/dev/atapi/atapiconf.c b/sys/dev/atapi/atapiconf.c index b5cfb5e94a9..b343bc4eda2 100644 --- a/sys/dev/atapi/atapiconf.c +++ b/sys/dev/atapi/atapiconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atapiconf.c,v 1.14 1997/06/15 02:38:01 downsj Exp $ */ +/* $OpenBSD: atapiconf.c,v 1.15 1997/06/24 05:29:54 downsj Exp $ */ /* * Copyright (c) 1996 Manuel Bouyer. All rights reserved. @@ -93,17 +93,25 @@ struct atapi_quirk_inquiry_pattern { }; struct atapi_quirk_inquiry_pattern atapi_quirk_inquiry_patterns[] = { + /* GoldStar 8X */ {ATAPI_DEVICE_TYPE_CD, ATAPI_REMOVABLE, - "GCD-R580B", "1.00", AQUIRK_LITTLETOC},/* GoldStar 8X */ - + "GCD-R580B", "1.00", AQUIRK_LITTLETOC}, + /* NEC Multispin 2Vi */ {ATAPI_DEVICE_TYPE_DAD, ATAPI_REMOVABLE, "NEC CD-ROM DRIVE:260", "3.04", AQUIRK_CDROM}, - /* NEC Multispin 2Vi */ + /* NEC 273 */ + {ATAPI_DEVICE_TYPE_CD, ATAPI_REMOVABLE, + "NEC CD-ROM DRIVE:273", "4.21", AQUIRK_NOTUR}, + /* Sanyo 6x */ + {ATAPI_DEVICE_TYPE_CD, ATAPI_REMOVABLE, + "SANYO CRD-256P", "1.02", AQUIRK_NOCAPACITY}, + /* Acer Notelight 370 */ {ATAPI_DEVICE_TYPE_CD, ATAPI_REMOVABLE, "UJDCD8730", "1.14", AQUIRK_NODOORLOCK}, - /* Acer Notelight 370 */ - - {0, 0, NULL, NULL, 0} /* The End */ + /* ALPS CD changer */ + {ATAPI_DEVICE_TYPE_CD, ATAPI_REMOVABLE, + "ALPS ELECTRIC CO.,LTD. DC544C", "SW03D", AQUIRK_NOTUR}, + {0, 0, NULL, NULL, 0} }; int @@ -529,13 +537,16 @@ atapi_test_unit_ready(ad_link, flags) ATAPI_DEBUG_FCTN_PRINT(("atapi_test_unit_ready: ")); - bzero(&cmd, sizeof(cmd)); - cmd.opcode = ATAPI_TEST_UNIT_READY; - - ret = atapi_exec_cmd(ad_link, &cmd, sizeof(cmd), 0, 0, 0, flags); - + /* Device doesn't support TUR! */ + if (ad_link->quirks & AQUIRK_NOTUR) + ret = 0; + else { + bzero(&cmd, sizeof(cmd)); + cmd.opcode = ATAPI_TEST_UNIT_READY; + ret = atapi_exec_cmd(ad_link, &cmd, sizeof(cmd), 0, 0, 0, + flags); + } ATAPI_DEBUG_FCTN_PRINT(("atapi_test_unit_ready: ret %d\n", ret)); - return ret; } diff --git a/sys/dev/atapi/atapilink.h b/sys/dev/atapi/atapilink.h index 3ada476e06d..c9cdb14989b 100644 --- a/sys/dev/atapi/atapilink.h +++ b/sys/dev/atapi/atapilink.h @@ -1,4 +1,4 @@ -/* $OpenBSD: atapilink.h,v 1.9 1997/06/06 23:43:07 provos Exp $ */ +/* $OpenBSD: atapilink.h,v 1.10 1997/06/24 05:29:54 downsj Exp $ */ /* * Copyright (c) 1996 Manuel Bouyer. All rights reserved. @@ -154,6 +154,7 @@ struct at_dev_link { #define AQUIRK_LITTLETOC 0x02 /* Audio TOC uses wrong byte order */ #define AQUIRK_NOCAPACITY 0x04 /* no READ_CD_CAPACITY command */ #define AQUIRK_NODOORLOCK 0x08 /* can't lock the door */ +#define AQUIRK_NOTUR 0x10 /* no TEST_UNIT_READY command */ void (*start) __P((void *)); /* device start routine */ int (*done) __P((void *)); /* device done routine */ }; |