Commit 3eef38a1 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Martin K. Petersen

scsi: aic79xx: Restore modes when exiting ahd_linux_queue_abort_cmd()

ahd_linux_queue_abort_cmd() calls ahd_save_modes() without calling
ahd_restore_modes() before exiting.

Link: https://lore.kernel.org/r/20200714160301.4482-1-hare@suse.deSigned-off-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 1eb81df5
...@@ -2143,7 +2143,7 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd) ...@@ -2143,7 +2143,7 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd)
u_int last_phase; u_int last_phase;
u_int saved_scsiid; u_int saved_scsiid;
u_int cdb_byte; u_int cdb_byte;
int retval; int retval = SUCCESS;
int was_paused; int was_paused;
int paused; int paused;
int wait; int wait;
...@@ -2181,8 +2181,7 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd) ...@@ -2181,8 +2181,7 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd)
* so we must not still own the command. * so we must not still own the command.
*/ */
scmd_printk(KERN_INFO, cmd, "Is not an active device\n"); scmd_printk(KERN_INFO, cmd, "Is not an active device\n");
retval = SUCCESS; goto done;
goto no_cmd;
} }
/* /*
...@@ -2195,7 +2194,7 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd) ...@@ -2195,7 +2194,7 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd)
if (pending_scb == NULL) { if (pending_scb == NULL) {
scmd_printk(KERN_INFO, cmd, "Command not found\n"); scmd_printk(KERN_INFO, cmd, "Command not found\n");
goto no_cmd; goto done;
} }
if ((pending_scb->flags & SCB_RECOVERY_SCB) != 0) { if ((pending_scb->flags & SCB_RECOVERY_SCB) != 0) {
...@@ -2203,7 +2202,7 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd) ...@@ -2203,7 +2202,7 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd)
* We can't queue two recovery actions using the same SCB * We can't queue two recovery actions using the same SCB
*/ */
retval = FAILED; retval = FAILED;
goto done; goto done;
} }
/* /*
...@@ -2218,7 +2217,7 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd) ...@@ -2218,7 +2217,7 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd)
if ((pending_scb->flags & SCB_ACTIVE) == 0) { if ((pending_scb->flags & SCB_ACTIVE) == 0) {
scmd_printk(KERN_INFO, cmd, "Command already completed\n"); scmd_printk(KERN_INFO, cmd, "Command already completed\n");
goto no_cmd; goto done;
} }
printk("%s: At time of recovery, card was %spaused\n", printk("%s: At time of recovery, card was %spaused\n",
...@@ -2235,7 +2234,6 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd) ...@@ -2235,7 +2234,6 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd)
printk("%s:%d:%d:%d: Cmd aborted from QINFIFO\n", printk("%s:%d:%d:%d: Cmd aborted from QINFIFO\n",
ahd_name(ahd), cmd->device->channel, ahd_name(ahd), cmd->device->channel,
cmd->device->id, (u8)cmd->device->lun); cmd->device->id, (u8)cmd->device->lun);
retval = SUCCESS;
goto done; goto done;
} }
...@@ -2332,17 +2330,10 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd) ...@@ -2332,17 +2330,10 @@ ahd_linux_queue_abort_cmd(struct scsi_cmnd *cmd)
} else { } else {
scmd_printk(KERN_INFO, cmd, "Unable to deliver message\n"); scmd_printk(KERN_INFO, cmd, "Unable to deliver message\n");
retval = FAILED; retval = FAILED;
goto done;
} }
no_cmd:
/* ahd_restore_modes(ahd, saved_modes);
* Our assumption is that if we don't have the command, no
* recovery action was required, so we return success. Again,
* the semantics of the mid-layer recovery engine are not
* well defined, so this may change in time.
*/
retval = SUCCESS;
done: done:
if (paused) if (paused)
ahd_unpause(ahd); ahd_unpause(ahd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment