Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull SCSI fixes from James Bottomley:
"Two small fixes.

One prevents timeouts on mpt3sas when trying to use the secure erase
protocol which causes the erase protocol to be aborted. The second is
a regression in a prior fix which causes all commands to abort during
PCI extended error recovery, which is incorrect because PCI EEH is
independent from what's happening on the FC transport"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: qla2xxx: do not abort all commands in the adapter during EEH recovery
scsi: mpt3sas: Fix secure erase premature termination

+27 -9
+14 -1
drivers/scsi/mpt3sas/mpt3sas_scsih.c
··· 4010 4010 SAM_STAT_CHECK_CONDITION; 4011 4011 } 4012 4012 4013 - 4013 + static inline bool ata_12_16_cmd(struct scsi_cmnd *scmd) 4014 + { 4015 + return (scmd->cmnd[0] == ATA_12 || scmd->cmnd[0] == ATA_16); 4016 + } 4014 4017 4015 4018 /** 4016 4019 * scsih_qcmd - main scsi request entry point ··· 4040 4037 4041 4038 if (ioc->logging_level & MPT_DEBUG_SCSI) 4042 4039 scsi_print_command(scmd); 4040 + 4041 + /* 4042 + * Lock the device for any subsequent command until command is 4043 + * done. 4044 + */ 4045 + if (ata_12_16_cmd(scmd)) 4046 + scsi_internal_device_block(scmd->device); 4043 4047 4044 4048 sas_device_priv_data = scmd->device->hostdata; 4045 4049 if (!sas_device_priv_data || !sas_device_priv_data->sas_target) { ··· 4622 4612 scmd = _scsih_scsi_lookup_get_clear(ioc, smid); 4623 4613 if (scmd == NULL) 4624 4614 return 1; 4615 + 4616 + if (ata_12_16_cmd(scmd)) 4617 + scsi_internal_device_unblock(scmd->device, SDEV_RUNNING); 4625 4618 4626 4619 mpi_request = mpt3sas_base_get_msg_frame(ioc, smid); 4627 4620
+13 -8
drivers/scsi/qla2xxx/qla_os.c
··· 1456 1456 for (cnt = 1; cnt < req->num_outstanding_cmds; cnt++) { 1457 1457 sp = req->outstanding_cmds[cnt]; 1458 1458 if (sp) { 1459 - /* Get a reference to the sp and drop the lock. 1460 - * The reference ensures this sp->done() call 1461 - * - and not the call in qla2xxx_eh_abort() - 1462 - * ends the SCSI command (with result 'res'). 1459 + /* Don't abort commands in adapter during EEH 1460 + * recovery as it's not accessible/responding. 1463 1461 */ 1464 - sp_get(sp); 1465 - spin_unlock_irqrestore(&ha->hardware_lock, flags); 1466 - qla2xxx_eh_abort(GET_CMD_SP(sp)); 1467 - spin_lock_irqsave(&ha->hardware_lock, flags); 1462 + if (!ha->flags.eeh_busy) { 1463 + /* Get a reference to the sp and drop the lock. 1464 + * The reference ensures this sp->done() call 1465 + * - and not the call in qla2xxx_eh_abort() - 1466 + * ends the SCSI command (with result 'res'). 1467 + */ 1468 + sp_get(sp); 1469 + spin_unlock_irqrestore(&ha->hardware_lock, flags); 1470 + qla2xxx_eh_abort(GET_CMD_SP(sp)); 1471 + spin_lock_irqsave(&ha->hardware_lock, flags); 1472 + } 1468 1473 req->outstanding_cmds[cnt] = NULL; 1469 1474 sp->done(vha, sp, res); 1470 1475 }