Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758479AbXI0Qjp (ORCPT ); Thu, 27 Sep 2007 12:39:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756774AbXI0Qjg (ORCPT ); Thu, 27 Sep 2007 12:39:36 -0400 Received: from mo11.iij4u.or.jp ([210.138.174.79]:52295 "EHLO mo11.iij4u.or.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753753AbXI0Qjf (ORCPT ); Thu, 27 Sep 2007 12:39:35 -0400 Date: Fri, 28 Sep 2007 01:38:27 +0900 To: jens.axboe@oracle.com Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org Cc: fujita.tomonori@lab.ntt.co.jp Subject: [PATCH] x86-64: pci-gart iommu sg chaining zeroes wrong sg. From: FUJITA Tomonori Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20070928013550M.tomof@acm.org> X-Dispatcher: imput version 20050308(IM148) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1208 Lines: 34 This patch is for Jens' block tree (sg chaining branch). I don't have the hardware but this looks like a bug. --- From: FUJITA Tomonori Subject: [PATCH] x86-64: pci-gart iommu sg chaining zeroes a wrong sg's dma_length Needs to zero the end of the list. Signed-off-by: FUJITA Tomonori --- arch/x86_64/kernel/pci-gart.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c index 27b7db4..a4151a7 100644 --- a/arch/x86_64/kernel/pci-gart.c +++ b/arch/x86_64/kernel/pci-gart.c @@ -425,9 +425,10 @@ int gart_map_sg(struct device *dev, struct scatterlist *sg, int nents, int dir) if (dma_map_cont(start_sg, i - start, sgmap, pages, need) < 0) goto error; out++; + sgmap = sg_next(sgmap); flush_gart(); if (out < nents) - ps->dma_length = 0; + sgmap->dma_length = 0; return out; error: -- 1.5.2.4 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/