diff options
author | Jeff Garzik <jgarzik@pretzel.yyz.us> | 2005-06-18 13:21:24 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-06-18 13:21:24 -0400 |
commit | f9d1fe9630b94007902987c39d19f04dc6256eac (patch) | |
tree | 1fbe757adc72469ddbc3c1e4132392164b2e0271 /drivers/scsi/libata-core.c | |
parent | 54258a8a2e81b11e486068f1cfab9fe4746b8420 (diff) | |
parent | 9ee1c939d1cb936b1f98e8d81aeffab57bae46ab (diff) |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r-- | drivers/scsi/libata-core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 84c4770e5bb4..36b401fee1f1 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -2607,7 +2607,6 @@ static void __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes) | |||
2607 | next_sg: | 2607 | next_sg: |
2608 | sg = &qc->sg[qc->cursg]; | 2608 | sg = &qc->sg[qc->cursg]; |
2609 | 2609 | ||
2610 | next_page: | ||
2611 | page = sg->page; | 2610 | page = sg->page; |
2612 | offset = sg->offset + qc->cursg_ofs; | 2611 | offset = sg->offset + qc->cursg_ofs; |
2613 | 2612 | ||
@@ -2615,6 +2614,7 @@ next_page: | |||
2615 | page = nth_page(page, (offset >> PAGE_SHIFT)); | 2614 | page = nth_page(page, (offset >> PAGE_SHIFT)); |
2616 | offset %= PAGE_SIZE; | 2615 | offset %= PAGE_SIZE; |
2617 | 2616 | ||
2617 | /* don't overrun current sg */ | ||
2618 | count = min(sg->length - qc->cursg_ofs, bytes); | 2618 | count = min(sg->length - qc->cursg_ofs, bytes); |
2619 | 2619 | ||
2620 | /* don't cross page boundaries */ | 2620 | /* don't cross page boundaries */ |
@@ -2639,8 +2639,6 @@ next_page: | |||
2639 | kunmap(page); | 2639 | kunmap(page); |
2640 | 2640 | ||
2641 | if (bytes) { | 2641 | if (bytes) { |
2642 | if (qc->cursg_ofs < sg->length) | ||
2643 | goto next_page; | ||
2644 | goto next_sg; | 2642 | goto next_sg; |
2645 | } | 2643 | } |
2646 | } | 2644 | } |