]> git.baikalelectronics.ru Git - kernel.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)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 7 Nov 2018 01:16:01 +0000 (20:16 -0500)
commitf4a0ef2162bbbf52d1491548201df262e7e7c0a4
treef14cecb37c6fd07f1e934aa90c5d216d4b3e93d7
parent520e6457b86ee98f78bd50855354427c7d5a366e
scsi: mpt3sas: Call sas_remove_host before removing the target devices

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>
drivers/scsi/mpt3sas/mpt3sas_scsih.c
drivers/scsi/mpt3sas/mpt3sas_transport.c