Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751137AbXAFCeV (ORCPT ); Fri, 5 Jan 2007 21:34:21 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751148AbXAFCd5 (ORCPT ); Fri, 5 Jan 2007 21:33:57 -0500 Received: from 216-99-217-87.dsl.aracnet.com ([216.99.217.87]:53913 "EHLO sous-sol.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751136AbXAFCdt (ORCPT ); Fri, 5 Jan 2007 21:33:49 -0500 Message-Id: <20070106023541.777137000@sous-sol.org> References: <20070106022753.334962000@sous-sol.org> User-Agent: quilt/0.45-1 Date: Fri, 05 Jan 2007 18:28:30 -0800 From: Chris Wright To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , torvalds@osdl.org, akpm@osdl.org, alan@lxorguk.ukuu.org.uk, David Miller , Jan Andersson , William Lee Irwin III Subject: [patch 37/50] sparc32: add offset in pci_map_sg() Content-Disposition: inline; filename=sparc32-add-offset-in-pci_map_sg.patch Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1401 Lines: 39 -stable review patch. If anyone has any objections, please let us know. ------------------ From: Jan Andersson Add sg->offset to sg->dvma_address in pci_map_sg() on sparc32. Without the offset, transfers to buffers that do not begin on a page boundary will not work as expected. Signed-off-by: Jan Andersson Cc: "David S. Miller" Cc: William Lee Irwin III Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Chris Wright --- arch/sparc/kernel/ioport.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- linux-2.6.19.1.orig/arch/sparc/kernel/ioport.c +++ linux-2.6.19.1/arch/sparc/kernel/ioport.c @@ -728,7 +728,8 @@ int pci_map_sg(struct pci_dev *hwdev, st /* IIep is write-through, not flushing. */ for (n = 0; n < nents; n++) { BUG_ON(page_address(sg->page) == NULL); - sg->dvma_address = virt_to_phys(page_address(sg->page)); + sg->dvma_address = + virt_to_phys(page_address(sg->page)) + sg->offset; sg->dvma_length = sg->length; sg++; } -- - 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/