aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-scsi.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2006-06-03 07:21:13 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-06-06 11:07:25 -0400
commit5d5ff44fe6775ccb922fd1f7d478b2ba9ca95068 (patch)
treed8569caefe1cb5ecced30929ef98d3e1fe642425 /drivers/scsi/libata-scsi.c
parente4a082c7c1f9a7b11fece6918e7ee5519b39ac46 (diff)
[SCSI] fix up request buffer reference in various scsi drivers
Various scsi drivers use scsi_cmnd.buffer and scsi_cmnd.bufflen in their queuecommand functions. Those fields are internal storage for the midlayer only and are used to restore the original payload after request_buffer and request_bufflen have been overwritten for EH. Using the buffer and bufflen fields means they do very broken things in error handling. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r--drivers/scsi/libata-scsi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index a0289ec3e283..994015726ec8 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -2310,7 +2310,7 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc, const u8 *scsicmd)
2310#endif 2310#endif
2311 } 2311 }
2312 2312
2313 qc->nbytes = cmd->bufflen; 2313 qc->nbytes = cmd->request_bufflen;
2314 2314
2315 return 0; 2315 return 0;
2316} 2316}
@@ -2500,7 +2500,7 @@ ata_scsi_pass_thru(struct ata_queued_cmd *qc, const u8 *scsicmd)
2500 * TODO: find out if we need to do more here to 2500 * TODO: find out if we need to do more here to
2501 * cover scatter/gather case. 2501 * cover scatter/gather case.
2502 */ 2502 */
2503 qc->nsect = cmd->bufflen / ATA_SECT_SIZE; 2503 qc->nsect = cmd->request_bufflen / ATA_SECT_SIZE;
2504 2504
2505 return 0; 2505 return 0;
2506 2506