• Brian King's avatar
    [SCSI] ipr: Fix for oops following SATA request sense · 24d6f2b5
    Brian King authored
    This patch fixes a problem discovered on a system with some
    bad SATA devices attached. If a command to a SATAPI device
    times out and the device gets reset as part of error recovery,
    its possible that ipr will set err_mask to indicate a device
    error has occurred. If this happens, a request sense will get
    issued by libata. Since scsi core thinks this scsi command is
    now completed, because the device reset handler completed successfully,
    scsi core will free the associated scsi command, which may
    cause an oops when that request sense is completed later
    by ipr. This patch ensures that any commands that get aborted
    as a result of a device reset set err_mask appropriately so
    that the request sense does not get sent.
    Signed-off-by: default avatarBrian King <brking@linux.vnet.ibm.com>
    Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
    24d6f2b5
ipr.c 207 KB