summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorMark Haverkamp <markh@osdl.org>2006-05-10 09:12:05 -0700
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-05-20 09:21:57 -0500
commit3c1e0cca9469bd19590ade25f6d9f94da2710d5b (patch)
treebdfab89960048e1df4a2b6978cf1cd1a188dc5a2 /drivers/scsi
parentedb527ce35b0c86e72ed518af255f02e1cecb3b7 (diff)
downloadlinux-3c1e0cca9469bd19590ade25f6d9f94da2710d5b.tar.gz
linux-3c1e0cca9469bd19590ade25f6d9f94da2710d5b.tar.bz2
linux-3c1e0cca9469bd19590ade25f6d9f94da2710d5b.zip
[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>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/aacraid/aachba.c6
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)
}
}
else if(scsicmd->request_bufflen) {
- dma_addr_t addr;
- addr = pci_map_single(dev->pdev,
+ u32 addr;
+ scsicmd->SCp.dma_handle = pci_map_single(dev->pdev,
scsicmd->request_buffer,
scsicmd->request_bufflen,
scsicmd->sc_data_direction);
+ addr = scsicmd->SCp.dma_handle;
psg->count = cpu_to_le32(1);
psg->sg[0].addr = cpu_to_le32(addr);
psg->sg[0].count = cpu_to_le32(scsicmd->request_bufflen);
- scsicmd->SCp.dma_handle = addr;
byte_count = scsicmd->request_bufflen;
}
return byte_count;