diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2008-06-14 01:57:52 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2008-06-14 01:57:52 +0000 |
commit | 53f32be0d196692eb0327d2085fe996a2f2af31b (patch) | |
tree | 388774e191530cc6edd8770c7357a08ff95c6007 /sys | |
parent | 5655f80930c2fea67e04b23ae09a0d45e2dd6f2d (diff) |
Nuke ADEV_NOTUR, always issue TEST UNIT READY to clear out power-up
errors before issuing INQUIRY. Fixes Sony YE-Data floppy drive and
probably other devices at the cost of possibly breaking some 10 year
old CD-ROM drives. Un-special cases mvme68k which was forcing these
initial TURs.
Now wait for the inevitable weird USB device that breaks to surface.
ok marco@ deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/scsi/scsi_base.c | 5 | ||||
-rw-r--r-- | sys/scsi/scsiconf.c | 10 | ||||
-rw-r--r-- | sys/scsi/scsiconf.h | 3 |
3 files changed, 4 insertions, 14 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index 849fad9463f..20e8ccee5ec 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_base.c,v 1.125 2008/06/13 04:27:08 krw Exp $ */ +/* $OpenBSD: scsi_base.c,v 1.126 2008/06/14 01:57:51 krw Exp $ */ /* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */ /* @@ -298,9 +298,6 @@ scsi_test_unit_ready(struct scsi_link *sc_link, int retries, int flags) { struct scsi_test_unit_ready scsi_cmd; - if (sc_link->quirks & ADEV_NOTUR) - return (0); - bzero(&scsi_cmd, sizeof(scsi_cmd)); scsi_cmd.opcode = TEST_UNIT_READY; diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c index 411f816d200..9313d2a035f 100644 --- a/sys/scsi/scsiconf.c +++ b/sys/scsi/scsiconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.c,v 1.131 2008/05/26 17:58:40 kettenis Exp $ */ +/* $OpenBSD: scsiconf.c,v 1.132 2008/06/14 01:57:51 krw Exp $ */ /* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */ /* @@ -544,8 +544,6 @@ const struct scsi_quirk_inquiry_pattern scsi_quirk_patterns[] = { /* ATAPI device quirks */ {{T_CDROM, T_REMOV, - "ALPS ELECTRIC CO.,LTD. DC544C", "", "SW03D"}, ADEV_NOTUR}, - {{T_CDROM, T_REMOV, "CR-2801TE", "", "1.07"}, ADEV_NOSENSE}, {{T_CDROM, T_REMOV, "CREATIVECD3630E", "", "AC101"}, ADEV_NOSENSE}, @@ -560,8 +558,6 @@ const struct scsi_quirk_inquiry_pattern scsi_quirk_patterns[] = { {{T_CDROM, T_REMOV, "Memorex CRW-2642", "", "1.0g"}, ADEV_NOSENSE}, {{T_CDROM, T_REMOV, - "NEC CD-ROM DRIVE:273", "", "4.21"}, ADEV_NOTUR}, - {{T_CDROM, T_REMOV, "SANYO CRD-256P", "", "1.02"}, ADEV_NOCAPACITY}, {{T_CDROM, T_REMOV, "SANYO CRD-254P", "", "1.02"}, ADEV_NOCAPACITY}, @@ -751,14 +747,12 @@ scsi_probedev(struct scsibus_softc *scsi, int target, int lun) sc_link->flags |= scsidebug_level; #endif /* SCSIDEBUG */ -#if defined(mvme68k) if (lun == 0) { - /* XXX some drivers depend on this */ + /* Clear any outstanding errors. */ scsi_test_unit_ready(sc_link, TEST_READY_RETRIES, scsi_autoconf | SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_NOT_READY | SCSI_IGNORE_MEDIA_CHANGE); } -#endif /* Now go ask the device all about itself. */ rslt = scsi_inquire(sc_link, &inqbuf, scsi_autoconf | SCSI_SILENT); diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h index 3429f94a09a..1f6c4dfd10d 100644 --- a/sys/scsi/scsiconf.h +++ b/sys/scsi/scsiconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.h,v 1.91 2008/06/13 04:27:08 krw Exp $ */ +/* $OpenBSD: scsiconf.h,v 1.92 2008/06/14 01:57:51 krw Exp $ */ /* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */ /* @@ -169,7 +169,6 @@ struct scsi_link { #define ADEV_NOSENSE 0x0200 /* No request sense - ATAPI */ #define ADEV_LITTLETOC 0x0400 /* little-endian TOC - ATAPI */ #define ADEV_NOCAPACITY 0x0800 /* no READ CD CAPACITY */ -#define ADEV_NOTUR 0x1000 /* No TEST UNIT READY */ #define ADEV_NODOORLOCK 0x2000 /* can't lock door */ #define SDEV_ONLYBIG 0x4000 /* always use READ_BIG and WRITE_BIG */ struct scsi_device *device; /* device entry points etc. */ |