]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: mpt3sas: Call sas_remove_host before removing the target devices
authorSuganath Prabu <suganath-prabu.subramani@broadcom.com>
Wed, 31 Oct 2018 13:23:35 +0000 (18:53 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 19:02:05 +0000 (20:02 +0100)
commitafa44e049fa3fa10b4ec99e56f8c5229306ba03f
treebfc32e1f31381b8ba50d8475ecf3dcaef5044c7a
parent42a16a31d1ec69051e156c9561be8ac7ce2f2742
scsi: mpt3sas: Call sas_remove_host before removing the target devices

[ Upstream commit dc730212e8a378763cb182b889f90c8101331332 ]

Call sas_remove_host() before removing the target devices in the driver's
.remove() callback function(i.e. during driver unload time).  So that
driver can provide a way to allow SYNC CACHE, START STOP unit commands
etc. (which are issued from SML) to the target drives during driver unload
time.

Once sas_remove_host() is called before removing the target drives then
driver can just clean up the resources allocated for target devices and no
need to call sas_port_delete_phy(), sas_port_delete() API's as these API's
internally called from sas_remove_host().

Signed-off-by: Suganath Prabu <suganath-prabu.subramani@broadcom.com>
Reviewed-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/mpt3sas/mpt3sas_scsih.c
drivers/scsi/mpt3sas/mpt3sas_transport.c