]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] Don't add scsi_device for devices that return PQ=1, PDT=0x1f
authordave wysochanski <davidw@netapp.com>
Wed, 9 Aug 2006 18:56:32 +0000 (14:56 -0400)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Sat, 19 Aug 2006 20:37:40 +0000 (13:37 -0700)
commit35fd1c24adf05345c4f8c99fb51a7b2d6906d7c0
tree11ad36484d5a891a2455d876dfd9cf6fd82f51f3
parentf8cb5cdf9212d83cf0affd1f6c76924792944ef6
[SCSI] Don't add scsi_device for devices that return PQ=1, PDT=0x1f

Some targets may return slight variations of PQ and PDT to indicate
no LUN mapped.  USB UFI setting PDT=0x1f but having reserved bits for
PQ is one example, and NetApp targets returning PQ=1 and PDT=0x1f is
another.  Both instances seem like reasonable responses according to
SPC-3 and UFI specs.

The current scsi_probe_and_add_lun() code adds a scsi_device
for targets that return PQ=1 and PDT=0x1f.  This causes LUNs of type
"UNKNOWN" to show up in /proc/scsi/scsi when no LUNs are mapped.
In addition, subsequent rescans fail to recognize LUNs that may be
added on the target, unless preceded by a write to the delete attribute
of the "UNKNOWN" LUN.

This patch addresses this problem by skipping over the scsi_add_lun()
when PQ=1,PDT=0x1f is encountered, and just returns
SCSI_SCAN_TARGET_PRESENT.

Signed-off-by: Dave Wysochanski <davidw@netapp.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/scsi_scan.c