From f2e00b9cf62798cdb45fa7618dbb572ef762cd7d Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Fri, 27 Feb 2009 17:35:43 +0900 Subject: [PATCH] --- yaml --- r: 132041 b: refs/heads/master c: 5825627c9463581fd9e70f8285685889ae5bb9bb h: refs/heads/master i: 132039: a784171a169a2303aae1cad65dfc5e0f43a37271 v: v3 --- [refs] | 2 +- trunk/drivers/ata/libata-core.c | 4 ++-- trunk/include/linux/libata.h | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index dba74cd63c83..bdc6757fa60a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e7d3ef13d52a126438f687a1a32da65ff926ed57 +refs/heads/master: 5825627c9463581fd9e70f8285685889ae5bb9bb diff --git a/trunk/drivers/ata/libata-core.c b/trunk/drivers/ata/libata-core.c index 9fbf0595f3d4..5e324cea3019 100644 --- a/trunk/drivers/ata/libata-core.c +++ b/trunk/drivers/ata/libata-core.c @@ -4612,7 +4612,7 @@ void ata_sg_clean(struct ata_queued_cmd *qc) VPRINTK("unmapping %u sg elements\n", qc->n_elem); if (qc->n_elem) - dma_unmap_sg(ap->dev, sg, qc->n_elem, dir); + dma_unmap_sg(ap->dev, sg, qc->orig_n_elem, dir); qc->flags &= ~ATA_QCFLAG_DMAMAP; qc->sg = NULL; @@ -4727,7 +4727,7 @@ static int ata_sg_setup(struct ata_queued_cmd *qc) return -1; DPRINTK("%d sg elements mapped\n", n_elem); - + qc->orig_n_elem = qc->n_elem; qc->n_elem = n_elem; qc->flags |= ATA_QCFLAG_DMAMAP; diff --git a/trunk/include/linux/libata.h b/trunk/include/linux/libata.h index dd818c7decd7..fbf064e13ad5 100644 --- a/trunk/include/linux/libata.h +++ b/trunk/include/linux/libata.h @@ -530,6 +530,7 @@ struct ata_queued_cmd { unsigned long flags; /* ATA_QCFLAG_xxx */ unsigned int tag; unsigned int n_elem; + unsigned int orig_n_elem; int dma_dir;