diff options
author | Christoph Hellwig <hch@lst.de> | 2006-06-03 07:21:13 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-06-06 11:07:25 -0400 |
commit | 5d5ff44fe6775ccb922fd1f7d478b2ba9ca95068 (patch) | |
tree | d8569caefe1cb5ecced30929ef98d3e1fe642425 /drivers/scsi/aacraid/aachba.c | |
parent | e4a082c7c1f9a7b11fece6918e7ee5519b39ac46 (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/aacraid/aachba.c')
-rw-r--r-- | drivers/scsi/aacraid/aachba.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index be8dde4c0f0c..e4b38f896cbd 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c | |||
@@ -961,7 +961,7 @@ static void io_callback(void *context, struct fib * fibptr) | |||
961 | 961 | ||
962 | if(scsicmd->use_sg) | 962 | if(scsicmd->use_sg) |
963 | pci_unmap_sg(dev->pdev, | 963 | pci_unmap_sg(dev->pdev, |
964 | (struct scatterlist *)scsicmd->buffer, | 964 | (struct scatterlist *)scsicmd->request_buffer, |
965 | scsicmd->use_sg, | 965 | scsicmd->use_sg, |
966 | scsicmd->sc_data_direction); | 966 | scsicmd->sc_data_direction); |
967 | else if(scsicmd->request_bufflen) | 967 | else if(scsicmd->request_bufflen) |
@@ -1919,7 +1919,7 @@ static void aac_srb_callback(void *context, struct fib * fibptr) | |||
1919 | 1919 | ||
1920 | if(scsicmd->use_sg) | 1920 | if(scsicmd->use_sg) |
1921 | pci_unmap_sg(dev->pdev, | 1921 | pci_unmap_sg(dev->pdev, |
1922 | (struct scatterlist *)scsicmd->buffer, | 1922 | (struct scatterlist *)scsicmd->request_buffer, |
1923 | scsicmd->use_sg, | 1923 | scsicmd->use_sg, |
1924 | scsicmd->sc_data_direction); | 1924 | scsicmd->sc_data_direction); |
1925 | else if(scsicmd->request_bufflen) | 1925 | else if(scsicmd->request_bufflen) |