提交 b22f687d 编写于 作者: P Pete Wyckoff 提交者: James Bottomley

[SCSI] set resid in scsi_io_completion() even for check condition

Some targets can return both valid data and sense information.
Always update the request data_len from the SCSI command residual.
Callers should interpret sense data to determine what parts of the
data are valid in case of a CHECK CONDITION status.
Signed-off-by: NPete Wyckoff <pw@osc.edu>
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 a52decaf
......@@ -848,8 +848,8 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes)
memcpy(req->sense, cmd->sense_buffer, len);
req->sense_len = len;
}
} else
req->data_len = cmd->resid;
}
req->data_len = cmd->resid;
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册