]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: megaraid_sas: unload flag should be set after scsi_remove_host is called
authorShivasharan S <shivasharan.srikanteshwara@broadcom.com>
Fri, 5 Jan 2018 13:27:41 +0000 (05:27 -0800)
committerJack Vogel <jack.vogel@oracle.com>
Thu, 8 Mar 2018 02:44:10 +0000 (18:44 -0800)
commit9b3f963e030263b332c557a17eda88a8c2617817
tree78e7a9104ad59499de6ca53b39ed02884adac614
parent6fddf07cdc82fe0661713c4ee75d98e2dfe783f8
scsi: megaraid_sas: unload flag should be set after scsi_remove_host is called

Issue - Driver returns DID_NO_CONNECT when unload is in progress,
indicated using instance->unload flag. In case of dynamic unload of
driver, this flag is set before calling scsi_remove_host(). While doing
manual driver unload, user will see lots of prints for Sync Cache
command with DID_NO_CONNECT status.

Fix - Set the instance->unload flag after scsi_remove_host(). Allow
device removal process to be completed and do not block any command
before that.  SCSI commands (like SYNC_CACHE) are received (as part of
scsi_remove_host) by driver during unload will be submitted further down
to the drives.

Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Orabug: 27625001
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/megaraid/megaraid_sas_base.c