]> git.ipfire.org Git - people/ms/linux.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:52:50 +0000 (14:52 -0800)
commit138fb06e30f72279f04b3ebf05846f2c3784c7ab
tree42955eaba076558cf1d682a8a741ed8360c84120
parent45e9f5c0267ddf44c42b424919654b601c5b773d
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