diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-06-03 15:24:06 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-06-03 15:24:06 +0000 |
commit | b29aa26e76ea903911cfcbf39ed29279ac12232a (patch) | |
tree | 8d6b19448f514a7887f46375a8ea5aa69b5a823d /sys/scsi | |
parent | e78914d7cf14b7636b22bcc1fe4fd3c1dd2aa62e (diff) |
Cache a copy of the INQUIRY data obtained during device attachment in
the scsi_link structure. This is a more general solution than the
current inconsistant copying of fields into _softc structures. The
redundant fields in _softc's will be cleaned up later. The device
field will be used immediately to finish up the new mode sense code.
ok marco@
Diffstat (limited to 'sys/scsi')
-rw-r--r-- | sys/scsi/scsiconf.c | 3 | ||||
-rw-r--r-- | sys/scsi/scsiconf.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c index 09155b21e74..ce38e1ef2b6 100644 --- a/sys/scsi/scsiconf.c +++ b/sys/scsi/scsiconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.c,v 1.95 2005/05/07 16:24:46 krw Exp $ */ +/* $OpenBSD: scsiconf.c,v 1.96 2005/06/03 15:24:05 krw Exp $ */ /* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */ /* @@ -706,6 +706,7 @@ scsi_probedev(scsi, inqbuflun0, target, lun) * Save INQUIRY "flags" (SID_Linked, etc.) for low-level drivers. */ sc_link->inquiry_flags = inqbuf.flags; + memcpy(&sc_link->inqdata, &inqbuf, sizeof(sc_link->inqdata)); /* * note what BASIC type of device it is diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h index f60fd206e25..5d49c6f3081 100644 --- a/sys/scsi/scsiconf.h +++ b/sys/scsi/scsiconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.h,v 1.55 2005/05/28 06:16:33 krw Exp $ */ +/* $OpenBSD: scsiconf.h,v 1.56 2005/06/03 15:24:05 krw Exp $ */ /* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */ /* @@ -195,6 +195,7 @@ struct scsi_link { struct scsi_adapter *adapter; /* adapter entry points etc. */ void *adapter_softc; /* needed for call to foo_scsi_cmd */ u_char luns; + struct scsi_inquiry_data inqdata; /* copy of INQUIRY data from probe */ }; int scsiprint(void *, const char *); |