From: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
To: jejb@kernel.org, hch@infradead.org
Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
Sathya.Prakash@broadcom.com, linux-kernel@vger.kernel.org,
suganath-prabu.subramani@broadcom.com,
chaitra.basappa@broadcom.com, stable@vger.kernel.org,
Sreekanth Reddy <Sreekanth.Reddy@broadcom.com>
Subject: [PATCH RESEND] mpt3sas: Fix for block device of raid exists even after deleting raid disk
Date: Fri, 28 Oct 2016 10:09:12 +0530 [thread overview]
Message-ID: <1477629552-27404-1-git-send-email-Sreekanth.Reddy@broadcom.com> (raw)
While merging mpt3sas & mpt2sas code, we posted below patch for WarpDrive
support,
mpt3sas: Ported WarpDrive product SSS6200 support
commit id is 7786ab6aff
In this patch and in the below hunk, we have added 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;
------------------------------------------------------------------------------
Actually that check should be for below 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>
Cc: <stable@vger.kernel.org>
---
drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 981be7b..618c9df8 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -1279,9 +1279,9 @@ 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;
- sas_target_priv_data->raid_device = raid_device;
if (ioc->is_warpdrive)
- raid_device->starget = starget;
+ sas_target_priv_data->raid_device = raid_device;
+ raid_device->starget = starget;
}
spin_unlock_irqrestore(&ioc->raid_device_lock, flags);
return 0;
--
2.4.3
next reply other threads:[~2016-10-28 4:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-28 4:39 Sreekanth Reddy [this message]
2016-11-01 13:49 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1477629552-27404-1-git-send-email-Sreekanth.Reddy@broadcom.com \
--to=sreekanth.reddy@broadcom.com \
--cc=Sathya.Prakash@broadcom.com \
--cc=chaitra.basappa@broadcom.com \
--cc=hch@infradead.org \
--cc=jejb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stable@vger.kernel.org \
--cc=suganath-prabu.subramani@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®