提交 0ff365f5 编写于 作者: D Don Brace 提交者: Martin K. Petersen

scsi: hpsa: correct logical volume removal

Suggested-by: NMartin Wilck <mwilck@suse.com>
Reviewed-by: NScott Benesh <scott.benesh@microsemi.com>
Reviewed-by: NScott Teel <scott.teel@microsemi.com>
Reviewed-by: NKevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: NDon Brace <don.brace@microsemi.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 9211a07f
......@@ -1882,6 +1882,12 @@ static void hpsa_remove_device(struct ctlr_info *h,
if (!h->scsi_host)
return;
/*
* Allow for commands to drain
*/
device->removed = 1;
hpsa_wait_for_outstanding_commands_for_dev(h, device);
if (is_logical_device(device)) { /* RAID */
sdev = scsi_device_lookup(h->scsi_host, device->bus,
device->target, device->lun);
......@@ -1899,9 +1905,6 @@ static void hpsa_remove_device(struct ctlr_info *h,
}
} else { /* HBA */
device->removed = 1;
hpsa_wait_for_outstanding_commands_for_dev(h, device);
hpsa_remove_sas_device(device);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册