From: Jan Andersson <jan.andersson@ieee.org>
To: wli@holomorphy.com
Cc: linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org
Subject: [PATCH] sparc32: add offset in pci_map_sg()
Date: Thu, 28 Dec 2006 18:44:59 +0100 [thread overview]
Message-ID: <20061228184459.1c51a33b@localhost.localdomain> (raw)
From: Jan Andersson jan.andersson@ieee.org
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 <jan.andersson@ieee.org>
---
diff -uprN a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
--- a/arch/sparc/kernel/ioport.c 2006-12-28 15:00:46.000000000 +0100
+++ b/arch/sparc/kernel/ioport.c 2006-12-28 16:22:40.000000000 +0100
@@ -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++;
}
reply other threads:[~2006-12-28 17:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061228184459.1c51a33b@localhost.localdomain \
--to=jan.andersson@ieee.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sparclinux@vger.kernel.org \
--cc=wli@holomorphy.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®