diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-18 15:08:35 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-18 15:08:35 -0700 |
commit | 2af170dd241810212cbdbdc802ba7d39e3fb23b9 (patch) | |
tree | 3d16719aa102444337f161c457502704a4967a53 /drivers/scsi | |
parent | ab08ed1770140ebcf1be1657087689832b755874 (diff) | |
parent | 3be6cbd73f74b4a3da82cc7d6e1688a4ae595fc7 (diff) |
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
[libata] kill ata_sg_is_last()
Update libata driver for bf548 atapi controller against the 2.6.24 tree.
libata-sff: Correct use of check_status()
drivers/ata: add support to Freescale 3.0Gbps SATA Controller
pata_acpi: fix build breakage if !CONFIG_PM
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/ipr.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index b41dfb539021..c316a0bcae6c 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -5134,6 +5134,7 @@ static void ipr_build_ata_ioadl(struct ipr_cmnd *ipr_cmd, u32 ioadl_flags = 0; struct ipr_ioarcb *ioarcb = &ipr_cmd->ioarcb; struct ipr_ioadl_desc *ioadl = ipr_cmd->ioadl; + struct ipr_ioadl_desc *last_ioadl = NULL; int len = qc->nbytes + qc->pad_len; struct scatterlist *sg; @@ -5156,11 +5157,13 @@ static void ipr_build_ata_ioadl(struct ipr_cmnd *ipr_cmd, ata_for_each_sg(sg, qc) { ioadl->flags_and_data_len = cpu_to_be32(ioadl_flags | sg_dma_len(sg)); ioadl->address = cpu_to_be32(sg_dma_address(sg)); - if (ata_sg_is_last(sg, qc)) - ioadl->flags_and_data_len |= cpu_to_be32(IPR_IOADL_FLAGS_LAST); - else - ioadl++; + + last_ioadl = ioadl; + ioadl++; } + + if (likely(last_ioadl)) + last_ioadl->flags_and_data_len |= cpu_to_be32(IPR_IOADL_FLAGS_LAST); } /** |