Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fix from James Bottomley:
"One fix for SAS attached SATA CD-ROMs. It turns out that the libata
handling of CD devices relies on the SCSI error handler, so disable
async aborts (which don't start the error handler) for these devices"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: libsas: Disable asynchronous aborts for SATA devices

+15 -2
+15 -2
drivers/scsi/libsas/sas_scsi_host.c
··· 486 487 int sas_eh_abort_handler(struct scsi_cmnd *cmd) 488 { 489 - int res; 490 struct sas_task *task = TO_SAS_TASK(cmd); 491 struct Scsi_Host *host = cmd->device->host; 492 struct sas_internal *i = to_sas_internal(host->transportt); 493 494 if (!i->dft->lldd_abort_task) 495 return FAILED; 496 497 - res = i->dft->lldd_abort_task(task); 498 if (res == TMF_RESP_FUNC_SUCC || res == TMF_RESP_FUNC_COMPLETE) 499 return SUCCESS; 500
··· 486 487 int sas_eh_abort_handler(struct scsi_cmnd *cmd) 488 { 489 + int res = TMF_RESP_FUNC_FAILED; 490 struct sas_task *task = TO_SAS_TASK(cmd); 491 struct Scsi_Host *host = cmd->device->host; 492 + struct domain_device *dev = cmd_to_domain_dev(cmd); 493 struct sas_internal *i = to_sas_internal(host->transportt); 494 + unsigned long flags; 495 496 if (!i->dft->lldd_abort_task) 497 return FAILED; 498 499 + spin_lock_irqsave(host->host_lock, flags); 500 + /* We cannot do async aborts for SATA devices */ 501 + if (dev_is_sata(dev) && !host->host_eh_scheduled) { 502 + spin_unlock_irqrestore(host->host_lock, flags); 503 + return FAILED; 504 + } 505 + spin_unlock_irqrestore(host->host_lock, flags); 506 + 507 + if (task) 508 + res = i->dft->lldd_abort_task(task); 509 + else 510 + SAS_DPRINTK("no task to abort\n"); 511 if (res == TMF_RESP_FUNC_SUCC || res == TMF_RESP_FUNC_COMPLETE) 512 return SUCCESS; 513