From 859356d03b700c5469898c34ca5a5f270cadfe02 Mon Sep 17 00:00:00 2001 From: tsutsui Date: Mon, 19 Nov 2001 22:50:00 +0000 Subject: [PATCH] Add a new quirk value PQUIRK_CAP_SYNC for SCSI1 devices which support sync transfers, and set PERIPH_CAP_SYNC for them in scsi_probe_device(). As per discussion on tech-kern. --- sys/dev/scsipi/scsiconf.c | 9 +++++++-- sys/dev/scsipi/scsipiconf.h | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sys/dev/scsipi/scsiconf.c b/sys/dev/scsipi/scsiconf.c index 51877f3538a2..7de5e70237d4 100644 --- a/sys/dev/scsipi/scsiconf.c +++ b/sys/dev/scsipi/scsiconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: scsiconf.c,v 1.169 2001/11/19 16:54:20 soren Exp $ */ +/* $NetBSD: scsiconf.c,v 1.170 2001/11/19 22:50:00 tsutsui Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.169 2001/11/19 16:54:20 soren Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.170 2001/11/19 22:50:00 tsutsui Exp $"); #include #include @@ -561,6 +561,8 @@ const struct scsi_quirk_inquiry_pattern scsi_quirk_patterns[] = { "SEAGATE ", "ST15150N ", ""}, PQUIRK_NOTAG}, {{T_DIRECT, T_FIXED, "SEAGATE ", "ST19171", ""}, PQUIRK_NOMODESENSE}, + {{T_DIRECT, T_FIXED, + "SEAGATE ", "ST32430N", ""}, PQUIRK_CAP_SYNC}, {{T_DIRECT, T_FIXED, "SEAGATE ", "ST34501FC ", ""}, PQUIRK_NOMODESENSE}, {{T_DIRECT, T_FIXED, @@ -838,6 +840,9 @@ scsi_probe_device(sc, target, lun) periph->periph_cap |= PERIPH_CAP_SFTRESET; if ((inqbuf.flags3 & SID_RelAdr) != 0) periph->periph_cap |= PERIPH_CAP_RELADR; + } else { + if (quirks & PQUIRK_CAP_SYNC) + periph->periph_cap |= PERIPH_CAP_SYNC; } /* diff --git a/sys/dev/scsipi/scsipiconf.h b/sys/dev/scsipi/scsipiconf.h index dd25a9ba5308..71a714f63c44 100644 --- a/sys/dev/scsipi/scsipiconf.h +++ b/sys/dev/scsipi/scsipiconf.h @@ -1,4 +1,4 @@ -/* $NetBSD: scsipiconf.h,v 1.63 2001/11/18 17:22:43 tsutsui Exp $ */ +/* $NetBSD: scsipiconf.h,v 1.64 2001/11/19 22:50:00 tsutsui Exp $ */ /*- * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -448,6 +448,7 @@ struct scsipi_periph { #define PQUIRK_NO_FLEX_PAGE 0x00020000 /* does not support flex geom page */ #define PQUIRK_NOBIGMODESENSE 0x00040000 /* has no big mode-sense op */ +#define PQUIRK_CAP_SYNC 0x00080000 /* SCSI1 device with sync op */ /*