Commit:     5336940dd8b11180a0340ba886db62f728377d19
Parent:     9335432959111c982c74177521305e6a3fb600a3
Author:     FUJITA Tomonori <[EMAIL PROTECTED]>
AuthorDate: Fri Oct 26 13:56:24 2007 +0200
Committer:  Jens Axboe <[EMAIL PROTECTED]>
CommitDate: Mon Oct 29 09:18:03 2007 +0100

    x86: fix pci-gart failure handling
    blk_rq_map_sg doesn't initialize sg->dma_address/length to zero
    anymore. Some low level drivers reuse sg lists without initializing so
    IOMMUs might get non-zero dma_address/length. If map_sg fails, we need
    pass the number of the mapped entries to gart_unmap_sg.
    Signed-off-by: FUJITA Tomonori <[EMAIL PROTECTED]>
    Signed-off-by: Jens Axboe <[EMAIL PROTECTED]>
 arch/x86/kernel/pci-gart_64.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
index ae7e016..79b514b 100644
--- a/arch/x86/kernel/pci-gart_64.c
+++ b/arch/x86/kernel/pci-gart_64.c
@@ -435,7 +435,7 @@ static int gart_map_sg(struct device *dev, struct 
scatterlist *sg, int nents,
-       gart_unmap_sg(dev, sg, nents, dir);
+       gart_unmap_sg(dev, sg, out, dir);
        /* When it was forced or merged try again in a dumb way */
        if (force_iommu || iommu_merge) {
                out = dma_map_sg_nonforce(dev, sg, nents, dir);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to