diff options
author | 2001-10-08 01:25:06 +0000 | |
---|---|---|
committer | 2001-10-08 01:25:06 +0000 | |
commit | 0e16f1c01d8ab0e8c847ca6fb8a402aea5c65eb6 (patch) | |
tree | b2afb73a8f08d2a1a2566eea921ad890fd9cf7ba /sys/dev/ic/siop.c | |
parent | permit changing of rdsetroot (diff) | |
download | wireguard-openbsd-0e16f1c01d8ab0e8c847ca6fb8a402aea5c65eb6.tar.xz wireguard-openbsd-0e16f1c01d8ab0e8c847ca6fb8a402aea5c65eb6.zip |
Complete (I hope) the changes to siop that make it pay attention
to the quirks table.
These latest changes, triggered by problems Dan Weeks was having
and developed with a lot of testing by Dan, should ensure that
siop is a) using the quirks of the correct LUN during wide/sync
negotiations and b) calling siop_add_dev() for all LUN's which
return valid information from an INQUIRY command.
Diffstat (limited to 'sys/dev/ic/siop.c')
-rw-r--r-- | sys/dev/ic/siop.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/dev/ic/siop.c b/sys/dev/ic/siop.c index da327c0cba5..f57b087b33e 100644 --- a/sys/dev/ic/siop.c +++ b/sys/dev/ic/siop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: siop.c,v 1.13 2001/08/26 02:39:05 krw Exp $ */ +/* $OpenBSD: siop.c,v 1.14 2001/10/08 01:25:06 krw Exp $ */ /* $NetBSD: siop.c,v 1.39 2001/02/11 18:04:49 bouyer Exp $ */ /* @@ -1376,9 +1376,16 @@ siop_scsicmd(xs) siop_intr(sc); if (xs->flags & ITSDONE) { if ((xs->cmd->opcode == INQUIRY) - && (xs->error == XS_NOERROR) - && (sc->targets[target]->status == TARST_PROBING)) - sc->targets[target]->status = TARST_ASYNC; + && (xs->error == XS_NOERROR)) { + error = ((struct scsi_inquiry_data *)xs->data)->device & SID_QUAL; + if (error != SID_QUAL_BAD_LU) { + if (sc->targets[target]->status == TARST_PROBING) + sc->targets[target]->status = TARST_ASYNC; + /* Can't do lun 0 here, because flags not set yet */ + if (lun > 0) + siop_add_dev(sc, target, lun); + } + } break; } delay(1000); |