Commit 3c1e0cca authored by Mark Haverkamp's avatar Mark Haverkamp Committed by James Bottomley

[SCSI] aacraid: optimize sg alloc

Received From Mark Salyzyn

Slight space and speed efficiency improvement.
Signed-off-by: default avatarMark Haverkamp <markh@osdl.org>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent edb527ce
...@@ -2218,15 +2218,15 @@ static unsigned long aac_build_sg(struct scsi_cmnd* scsicmd, struct sgmap* psg) ...@@ -2218,15 +2218,15 @@ static unsigned long aac_build_sg(struct scsi_cmnd* scsicmd, struct sgmap* psg)
} }
} }
else if(scsicmd->request_bufflen) { else if(scsicmd->request_bufflen) {
dma_addr_t addr; u32 addr;
addr = pci_map_single(dev->pdev, scsicmd->SCp.dma_handle = pci_map_single(dev->pdev,
scsicmd->request_buffer, scsicmd->request_buffer,
scsicmd->request_bufflen, scsicmd->request_bufflen,
scsicmd->sc_data_direction); scsicmd->sc_data_direction);
addr = scsicmd->SCp.dma_handle;
psg->count = cpu_to_le32(1); psg->count = cpu_to_le32(1);
psg->sg[0].addr = cpu_to_le32(addr); psg->sg[0].addr = cpu_to_le32(addr);
psg->sg[0].count = cpu_to_le32(scsicmd->request_bufflen); psg->sg[0].count = cpu_to_le32(scsicmd->request_bufflen);
scsicmd->SCp.dma_handle = addr;
byte_count = scsicmd->request_bufflen; byte_count = scsicmd->request_bufflen;
} }
return byte_count; return byte_count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment