mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-27 22:51:31 +00:00
scsi: libsas: Disable asynchronous aborts for SATA devices
commitc9f926000f
upstream. Handling CD-ROM devices from libsas is decidedly odd, as libata relies on SCSI EH to be started to figure out that no medium is present. So we cannot do asynchronous aborts for SATA devices. Fixes:909657615d
("scsi: libsas: allow async aborts") Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Yves-Alexis Perez <corsac@debian.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
25b13c2f4f
commit
edd0a403a1
1 changed files with 15 additions and 2 deletions
|
@ -486,15 +486,28 @@ static int sas_queue_reset(struct domain_device *dev, int reset_type,
|
|||
|
||||
int sas_eh_abort_handler(struct scsi_cmnd *cmd)
|
||||
{
|
||||
int res;
|
||||
int res = TMF_RESP_FUNC_FAILED;
|
||||
struct sas_task *task = TO_SAS_TASK(cmd);
|
||||
struct Scsi_Host *host = cmd->device->host;
|
||||
struct domain_device *dev = cmd_to_domain_dev(cmd);
|
||||
struct sas_internal *i = to_sas_internal(host->transportt);
|
||||
unsigned long flags;
|
||||
|
||||
if (!i->dft->lldd_abort_task)
|
||||
return FAILED;
|
||||
|
||||
res = i->dft->lldd_abort_task(task);
|
||||
spin_lock_irqsave(host->host_lock, flags);
|
||||
/* We cannot do async aborts for SATA devices */
|
||||
if (dev_is_sata(dev) && !host->host_eh_scheduled) {
|
||||
spin_unlock_irqrestore(host->host_lock, flags);
|
||||
return FAILED;
|
||||
}
|
||||
spin_unlock_irqrestore(host->host_lock, flags);
|
||||
|
||||
if (task)
|
||||
res = i->dft->lldd_abort_task(task);
|
||||
else
|
||||
SAS_DPRINTK("no task to abort\n");
|
||||
if (res == TMF_RESP_FUNC_SUCC || res == TMF_RESP_FUNC_COMPLETE)
|
||||
return SUCCESS;
|
||||
|
||||
|
|
Loading…
Reference in a new issue