Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 2 Feb 2008 20:51:38 +0000 (07:51 +1100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 2 Feb 2008 20:51:38 +0000 (07:51 +1100)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  ieee1394: sbp2: fix bogus s/g access change

drivers/ieee1394/sbp2.c

index 2b889d91e673d3fa7d073f40763ef3de7faad629..28e155a9e2a5a6bc8e424e2e1dc235f94fac2c26 100644 (file)
@@ -1465,10 +1465,9 @@ static void sbp2_prep_command_orb_sg(struct sbp2_command_orb *orb,
        orb->misc |= ORB_SET_DIRECTION(orb_direction);
 
        /* special case if only one element (and less than 64KB in size) */
-       if ((scsi_use_sg == 1) &&
-           (sg_dma_len(sg) <= SBP2_MAX_SG_ELEMENT_LENGTH)) {
+       if (scsi_use_sg == 1 && sg->length <= SBP2_MAX_SG_ELEMENT_LENGTH) {
 
-               cmd->dma_size = sg_dma_len(sg);
+               cmd->dma_size = sg->length;
                cmd->dma_type = CMD_DMA_PAGE;
                cmd->cmd_dma = dma_map_page(hi->host->device.parent,
                                            sg_page(sg), sg->offset,