mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
[SCSI] pmcraid: fix to avoid twice scsi_dma_unmap for a command
For a particular driver error condition, driver was doing double scsi_dma_unmaps. Driver was calling scsi_dma_unmap in pmcraid_error_handler and return 0. This pmcraid_error_handler is called by pmcraid_io_done which will do scsi_dma_unmap again when it has return 0 from pmcraid_error_handler. Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
parent
3b9c212a5c
commit
a70757ba9a
1 changed files with 3 additions and 5 deletions
|
@ -2483,14 +2483,12 @@ static int pmcraid_error_handler(struct pmcraid_cmd *cmd)
|
|||
sense_copied = 1;
|
||||
}
|
||||
|
||||
if (RES_IS_GSCSI(res->cfg_entry)) {
|
||||
if (RES_IS_GSCSI(res->cfg_entry))
|
||||
pmcraid_cancel_all(cmd, sense_copied);
|
||||
} else if (sense_copied) {
|
||||
else if (sense_copied)
|
||||
pmcraid_erp_done(cmd);
|
||||
return 0;
|
||||
} else {
|
||||
else
|
||||
pmcraid_request_sense(cmd);
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue