diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-02 15:51:38 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-02 15:51:38 -0500 |
| commit | 6598b60fd56ba5e915a001cc4e307880a94d19ae (patch) | |
| tree | 3cf5e13b9bfdc6d953cf3f3bf374458a4855550c | |
| parent | ae9458d6a0956aa21cb49e1251e35a8d4dacbe6e (diff) | |
| parent | 5fcf500058d5f06720302c5ce138c7bca93f7655 (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
ieee1394: sbp2: fix bogus s/g access change
| -rw-r--r-- | drivers/ieee1394/sbp2.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index 2b889d91e673..28e155a9e2a5 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c | |||
| @@ -1465,10 +1465,9 @@ static void sbp2_prep_command_orb_sg(struct sbp2_command_orb *orb, | |||
| 1465 | orb->misc |= ORB_SET_DIRECTION(orb_direction); | 1465 | orb->misc |= ORB_SET_DIRECTION(orb_direction); |
| 1466 | 1466 | ||
| 1467 | /* special case if only one element (and less than 64KB in size) */ | 1467 | /* special case if only one element (and less than 64KB in size) */ |
| 1468 | if ((scsi_use_sg == 1) && | 1468 | if (scsi_use_sg == 1 && sg->length <= SBP2_MAX_SG_ELEMENT_LENGTH) { |
| 1469 | (sg_dma_len(sg) <= SBP2_MAX_SG_ELEMENT_LENGTH)) { | ||
| 1470 | 1469 | ||
| 1471 | cmd->dma_size = sg_dma_len(sg); | 1470 | cmd->dma_size = sg->length; |
| 1472 | cmd->dma_type = CMD_DMA_PAGE; | 1471 | cmd->dma_type = CMD_DMA_PAGE; |
| 1473 | cmd->cmd_dma = dma_map_page(hi->host->device.parent, | 1472 | cmd->cmd_dma = dma_map_page(hi->host->device.parent, |
| 1474 | sg_page(sg), sg->offset, | 1473 | sg_page(sg), sg->offset, |
