mirror of https://gitee.com/openkylin/linux.git
SCSI fixes on 20180119
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. Signed-off-by: James E.J. Bottomley <jejb@linux.vnet.ibm.com> -----BEGIN PGP SIGNATURE----- iQJaBAABCABEFiEERylv2ugWAYZdTacQBWvsc5kRk3gFAlpibTgmHGphbWVzLmJv dHRvbWxleUBoYW5zZW5wYXJ0bmVyc2hpcC5jb20ACgkQBWvsc5kRk3h26Q//dPkL pddipZ2IdnEZ3FPqI6hHgxevoOzhLvl7gNHXnGnxMQT6A65AAVFm1bPaBAgVH+4g aF2pQ9rjY0o+fszpUSIM+W8YpQFOIVEBsIzFbHubHRuKZ8cq6yPFJyWIySmOZU1S /6UjIeyYjjS0vySU5VoCPVdRupHDRSIw0Hgp1xuEslt5eV2clPFbZC9Ec1+N0wmX Iv1JmvRO4MZrG0nmSp30kln1SvL9zwz1TkfIYI0y/YnBdFHi/EBGe/9D/hBrZFkk uGlpVJX6jtqIIlC/4KIVXPeOCgdEWGpFeC39sQrDt7/H+hg9UkXcyzNT6CsE7gsg uh1oyBE7+xIgc6oVoEcGfK/NZ2ALwicV4sbIk7kh4K0GJIW5FY3j53DzSe8FWLm5 CQGLEIGcqild9SHtOQmp5i3yX3nVHK8cM6+icbtvMTKNCnVimQM408mz0r418RpE BeKAzXZ5K7xUxZUFTLExbMQe2aOq0cy5wwZzPJEYqH4dko9Q7YbUISGWuXoSQ46Q mjAR4j/B2LRQRAthzf2JHmhmKe6qGqV0AH6yB020FhcECcz1pAiDm30oYcRXCCSp CVElL5xFtdEQyJLz4t1cXfncmwmZ4h4pm0naO3yOWKj4O1FWFIRXfObaQ44hAdn2 brxu+ewMIGyBSy1d8erhjzvzl1rRIw4qLUCQMHc= =g/Cs -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
8dd903d2cf
|
@ -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 New Issue