diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2019-09-19 17:48:22 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2019-09-19 17:48:22 +0000 |
commit | f46f1d03786635298fd1c87b8b36463f261ee951 (patch) | |
tree | e7916793f6a0138430832f04b1264fb660c08ed8 /sys | |
parent | e6953af708ab48096f23818a34cac8ef22b96063 (diff) |
Introduce and use convenience SID_REPOONSE_FORMAT() define.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/scsi/safte.c | 4 | ||||
-rw-r--r-- | sys/scsi/scsiconf.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sys/scsi/safte.c b/sys/scsi/safte.c index 41405aa4105..395f4d4a41c 100644 --- a/sys/scsi/safte.c +++ b/sys/scsi/safte.c @@ -1,4 +1,4 @@ -/* $OpenBSD: safte.c,v 1.56 2019/09/01 15:03:32 krw Exp $ */ +/* $OpenBSD: safte.c,v 1.57 2019/09/19 17:48:21 krw Exp $ */ /* * Copyright (c) 2005 David Gwynne <dlg@openbsd.org> @@ -125,7 +125,7 @@ safte_match(struct device *parent, void *match, void *aux) if ((inq->device & SID_TYPE) != T_PROCESSOR || SID_ANSII_REV(inq) != SCSI_REV_2 || - (inq->response_format & SID_ANSII) != 2) + SID_RESPONSE_FORMAT(inq) != 2) return (0); length = inq->additional_length + SAFTE_EXTRA_OFFSET; diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h index 134a3941d04..6b21846f3f2 100644 --- a/sys/scsi/scsiconf.h +++ b/sys/scsi/scsiconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.h,v 1.172 2019/09/01 15:03:32 krw Exp $ */ +/* $OpenBSD: scsiconf.h,v 1.173 2019/09/19 17:48:21 krw Exp $ */ /* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */ /* @@ -524,6 +524,7 @@ int scsi_activate(struct scsibus_softc *, int, int, int); struct scsi_link * scsi_get_link(struct scsibus_softc *, int, int); #define SID_ANSII_REV(x) ((x)->version & SID_ANSII) +#define SID_RESPONSE_FORMAT(x) ((x)->response_format & SID_RESPONSE_DATA_FMT) #define SCSI_REV_0 0x00 /* No conformance to any standard. */ #define SCSI_REV_1 0x01 /* (Obsolete) SCSI-1 in olden times. */ |