diff options
author | Mark Haverkamp <markh@osdl.org> | 2006-05-10 12:12:05 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-05-20 10:21:57 -0400 |
commit | 3c1e0cca9469bd19590ade25f6d9f94da2710d5b (patch) | |
tree | bdfab89960048e1df4a2b6978cf1cd1a188dc5a2 | |
parent | edb527ce35b0c86e72ed518af255f02e1cecb3b7 (diff) |
[SCSI] aacraid: optimize sg alloc
Received From Mark Salyzyn
Slight space and speed efficiency improvement.
Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r-- | drivers/scsi/aacraid/aachba.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 642a3b4e5937..5d2989754c9f 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c | |||
@@ -2218,15 +2218,15 @@ static unsigned long aac_build_sg(struct scsi_cmnd* scsicmd, struct sgmap* psg) | |||
2218 | } | 2218 | } |
2219 | } | 2219 | } |
2220 | else if(scsicmd->request_bufflen) { | 2220 | else if(scsicmd->request_bufflen) { |
2221 | dma_addr_t addr; | 2221 | u32 addr; |
2222 | addr = pci_map_single(dev->pdev, | 2222 | scsicmd->SCp.dma_handle = pci_map_single(dev->pdev, |
2223 | scsicmd->request_buffer, | 2223 | scsicmd->request_buffer, |
2224 | scsicmd->request_bufflen, | 2224 | scsicmd->request_bufflen, |
2225 | scsicmd->sc_data_direction); | 2225 | scsicmd->sc_data_direction); |
2226 | addr = scsicmd->SCp.dma_handle; | ||
2226 | psg->count = cpu_to_le32(1); | 2227 | psg->count = cpu_to_le32(1); |
2227 | psg->sg[0].addr = cpu_to_le32(addr); | 2228 | psg->sg[0].addr = cpu_to_le32(addr); |
2228 | psg->sg[0].count = cpu_to_le32(scsicmd->request_bufflen); | 2229 | psg->sg[0].count = cpu_to_le32(scsicmd->request_bufflen); |
2229 | scsicmd->SCp.dma_handle = addr; | ||
2230 | byte_count = scsicmd->request_bufflen; | 2230 | byte_count = scsicmd->request_bufflen; |
2231 | } | 2231 | } |
2232 | return byte_count; | 2232 | return byte_count; |