]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
megaraid_sas: fix the problem of non-existing VD exposed to host
authorSumit.Saxena@avagotech.com <Sumit.Saxena@avagotech.com>
Mon, 5 Jan 2015 14:36:08 +0000 (20:06 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Mar 2015 22:57:24 +0000 (14:57 -0800)
commita9d100ed9918346a16172dfb7940d739525d1c27
tree6275f4b2712ba122c806517b5896532b77438e6c
parent628de19983617462b1714218a66ff94f10cd2cda
megaraid_sas: fix the problem of non-existing VD exposed to host

commit ab2f0608e16d64a23a2dcc8d83b966a0e0a281f3 upstream.

This patch will address the issue of SCSI device created at OS level for
non existing VD. ldTgtIdtoLd[] array has size 256 for Extended VD firmware
and 128 for legacy firmware. Accessing indices beyond array size (OS will
send TUR, INQUIRY.. commands upto device index 255), may return valid LD
value and that particular SCSI command will be SUCCESS and creating SCSI
device for non existing target(VD).

For legacy firmware (64 VD firmware), invalidates LD (by setting LD value
to 0xff) in LdTgtIdtoLd[] array for device index beyond 127, so that
invalid LD(0xff) value should be returned beyond device index beyond 127.

Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com>
Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/megaraid/megaraid_sas_fp.c
drivers/scsi/megaraid/megaraid_sas_fusion.c