aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTony Battersby <tonyb@cybernetics.com>2007-11-12 10:00:44 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-11 19:22:44 -0500
commit25d7c363f2663fe399e623c9bd819258c9760bdc (patch)
treec03867708e9f66e236163e81913cdd1c516e9f12 /include
parentf28cd7cf8f696eafe42d1632b5a306fbf784d3cd (diff)
[SCSI] move single_lun flag from scsi_device to scsi_target
Some SCSI tape medium changers that need the BLIST_SINGLELUN flag have the medium changer at one LUN and the tape drive at a different LUN. The inquiry string of the tape drive may be different from that of the medium changer. In order for single_lun to be effective, every scsi_device under a given scsi_target must have it set. This means that there needs to be a blacklist entry for BOTH the medium changer AND the tape drive, which is impractical because some medium changers may be paired with a variety of different tape drive models. It makes more sense to put the single_lun flag in scsi_target instead of scsi_device, which causes every device at a given target ID to inherit the single_lun flag from one LUN. This makes it possible to blacklist just the medium changer and not the tape drive. Signed-off-by: Tony Battersby <tonyb@cybernetics.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'include')
-rw-r--r--include/scsi/scsi_device.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 6c2d80b36aa1..45bb12b54175 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -122,9 +122,6 @@ struct scsi_device {
122 unsigned tagged_supported:1; /* Supports SCSI-II tagged queuing */ 122 unsigned tagged_supported:1; /* Supports SCSI-II tagged queuing */
123 unsigned simple_tags:1; /* simple queue tag messages are enabled */ 123 unsigned simple_tags:1; /* simple queue tag messages are enabled */
124 unsigned ordered_tags:1;/* ordered queue tag messages are enabled */ 124 unsigned ordered_tags:1;/* ordered queue tag messages are enabled */
125 unsigned single_lun:1; /* Indicates we should only allow I/O to
126 * one of the luns for the device at a
127 * time. */
128 unsigned was_reset:1; /* There was a bus reset on the bus for 125 unsigned was_reset:1; /* There was a bus reset on the bus for
129 * this device */ 126 * this device */
130 unsigned expecting_cc_ua:1; /* Expecting a CHECK_CONDITION/UNIT_ATTN 127 unsigned expecting_cc_ua:1; /* Expecting a CHECK_CONDITION/UNIT_ATTN
@@ -202,6 +199,9 @@ struct scsi_target {
202 unsigned int id; /* target id ... replace 199 unsigned int id; /* target id ... replace
203 * scsi_device.id eventually */ 200 * scsi_device.id eventually */
204 unsigned int create:1; /* signal that it needs to be added */ 201 unsigned int create:1; /* signal that it needs to be added */
202 unsigned int single_lun:1; /* Indicates we should only
203 * allow I/O to one of the luns
204 * for the device at a time. */
205 unsigned int pdt_1f_for_no_lun; /* PDT = 0x1f */ 205 unsigned int pdt_1f_for_no_lun; /* PDT = 0x1f */
206 /* means no lun present */ 206 /* means no lun present */
207 207