[SCSI] move single_lun flag from scsi_device to scsi_target
authorTony Battersby <tonyb@cybernetics.com>
Mon, 12 Nov 2007 15:00:44 +0000 (10:00 -0500)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Sat, 12 Jan 2008 00:22:44 +0000 (18:22 -0600)
commit25d7c363f2663fe399e623c9bd819258c9760bdc
treec03867708e9f66e236163e81913cdd1c516e9f12
parentf28cd7cf8f696eafe42d1632b5a306fbf784d3cd
[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>
drivers/scsi/scsi_lib.c
drivers/scsi/scsi_scan.c
include/scsi/scsi_device.h