Files
twx-linux/drivers/scsi
Sreekanth Reddy d245874049 scsi: mpt3sas: Fix for block device of raid exists even after deleting raid disk
commit 6d3a56ed09 upstream.

While merging mpt3sas & mpt2sas code, we added the is_warpdrive check
condition on the wrong line

---------------------------------------------------------------------------
 scsih_target_alloc(struct scsi_target *starget)
                        sas_target_priv_data->handle = raid_device->handle;
                        sas_target_priv_data->sas_address = raid_device->wwid;
                        sas_target_priv_data->flags |= MPT_TARGET_FLAGS_VOLUME;
-                       raid_device->starget = starget;
+                       sas_target_priv_data->raid_device = raid_device;
+                       if (ioc->is_warpdrive)
+                               raid_device->starget = starget;
                }
                spin_unlock_irqrestore(&ioc->raid_device_lock, flags);
                return 0;
------------------------------------------------------------------------------

That check should be for the line sas_target_priv_data->raid_device =
raid_device;

Due to above hunk, we are not initializing raid_device's starget for
raid volumes, and so during raid disk deletion driver is not calling
scsi_remove_target() API as driver observes starget field of
raid_device's structure as NULL.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@broadcom.com>
Fixes: 7786ab6aff ("mpt3sas: Ported WarpDrive product SSS6200 support")
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-18 10:48:36 +01:00
..
2016-04-12 09:08:39 -07:00
…
2015-11-09 17:11:57 -08:00
…
2015-11-09 17:11:57 -08:00
2015-11-12 07:06:18 -05:00
2015-12-03 09:32:33 -08:00
…
2015-11-12 07:06:18 -05:00
2015-11-12 07:06:18 -05:00
…
…
…
…
…
…
2016-07-27 09:47:39 -07:00
…
…
…
…
…
…
…
…
2015-12-03 09:32:33 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-11-09 17:11:57 -08:00
…
…
2015-11-09 16:32:14 -08:00
…
…
…
…
2015-12-03 09:32:33 -08:00
2015-11-09 12:39:28 -05:00
2015-11-09 12:39:28 -05:00
…
…
…
…
…
…
…
…
2015-11-09 19:32:41 -05:00
…
…
2015-12-03 09:32:33 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2015-11-12 07:06:18 -05:00
…
…
…
…
…
…
2016-10-28 03:01:31 -04:00
2015-11-09 17:11:57 -08:00
…
…
…
2016-04-12 09:08:38 -07:00
…
…
2016-02-25 12:01:16 -08:00
…
2015-12-03 09:32:33 -08:00
…
2015-11-09 17:42:19 -08:00
…
…
…
…
…
…
…
…
…
…