From: Jens Axboe <axboe@suse.de>
To: Mark Lobo <ntdeveloper2002@yahoo.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: Bounce buffer usage
Date: Mon, 4 Nov 2002 09:21:44 +0100 [thread overview]
Message-ID: <20021104082144.GA13587@suse.de> (raw)
In-Reply-To: <20021103221029.7908.qmail@web80304.mail.yahoo.com>
On Sun, Nov 03 2002, Mark Lobo wrote:
> Now in the initiator driver, all what I get is a
> request buffer address. To actually use the above API,
> I need the page address, and that I get from
> virt_to_page ( as described in the bounce buffer patch
> doc) So I dont need a virt_to_page call to get the
> page address? I dont understand how I can use
> this --> "struct page *page = buffer->page;"? In that
> case, what gets passed down to the initiator in the
> "no scatter gather" case is some kind of structure?
> Dont I need to do "struct page *page =
> virt_to_page(buffer);"?
For drivers that deal with highmem, you are getting sg setup even for a
single segment. It would indeed be possible to send down a virtual
address for non-sg, if the original page didn't reside in highmem. In
that case, yes all you would have to do is
page = virt_to_page(buf);
offset = ((unsigned long) buf) & ~PAGE_MASK;
to get the remaining data you need. However, most drivers typically do
if (command->use_sg)
nr_entries = pci_map_page() sg list
else
pci_map_single() virtual address
--
Jens Axboe
next prev parent reply other threads:[~2002-11-04 8:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-29 20:32 DC390 Deadlock in DataIn Klaus Fuerstberger
2002-10-30 0:08 ` 2.4.9 2.4.18 diff Mark Lobo
2002-10-30 2:04 ` Douglas Gilbert
2002-11-01 0:16 ` Bounce buffer usage Mark Lobo
2002-11-01 7:48 ` Jens Axboe
2002-11-01 18:55 ` Mark Lobo
2002-11-02 9:12 ` Jens Axboe
2002-11-03 22:10 ` Mark Lobo
2002-11-04 8:21 ` Jens Axboe [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-11-01 15:40 Infante, Jon
2002-11-01 16:01 ` Jens Axboe
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=20021104082144.GA13587@suse.de \
--to=axboe@suse.de \
--cc=linux-scsi@vger.kernel.org \
--cc=ntdeveloper2002@yahoo.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;
as well as URLs for NNTP newsgroup(s).