]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ata/libata-core.c
SG: Change sg_set_page() to take length and offset argument
[linux-2.6-omap-h63xx.git] / drivers / ata / libata-core.c
index 2d147b51c9786d0b3bce7583e5cbcb697393add0..b5f7c5913062ed0458330e084099d0cd0923d2f7 100644 (file)
@@ -4689,8 +4689,8 @@ static int ata_sg_setup(struct ata_queued_cmd *qc)
                 * data in this function or read data in ata_sg_clean.
                 */
                offset = lsg->offset + lsg->length - qc->pad_len;
-               sg_set_page(psg, nth_page(sg_page(lsg), offset >> PAGE_SHIFT));
-               psg->offset = offset_in_page(offset);
+               sg_set_page(psg, nth_page(sg_page(lsg), offset >> PAGE_SHIFT),
+                               qc->pad_len, offset_in_page(offset));
 
                if (qc->tf.flags & ATA_TFLAG_WRITE) {
                        void *addr = kmap_atomic(sg_page(psg), KM_IRQ0);