diff --git a/drivers/scsi/libsas/sas_init.c b/drivers/scsi/libsas/sas_init.c index 90cce34cb6f5e20a671e5b8d1b160dda5cf0cf41..4df73d69bb3c554cd0eac9636697f6168b3e36ac 100644 --- a/drivers/scsi/libsas/sas_init.c +++ b/drivers/scsi/libsas/sas_init.c @@ -127,12 +127,13 @@ int sas_register_ha(struct sas_ha_struct *sas_ha) int sas_unregister_ha(struct sas_ha_struct *sas_ha) { + sas_unregister_ports(sas_ha); + if (sas_ha->lldd_max_execute_num > 1) { sas_shutdown_queue(sas_ha); + sas_ha->lldd_max_execute_num = 1; } - sas_unregister_ports(sas_ha); - return 0; }