From: Jens Axboe <axboe@suse.de>
To: Craig Rich <craig_rich@sundanceti.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Scatter Gather List Questions
Date: Fri, 8 Feb 2002 10:36:15 +0100 [thread overview]
Message-ID: <20020208103615.N4942@suse.de> (raw)
In-Reply-To: <3C62FE47.6020708@sundanceti.com>
In-Reply-To: <3C62FE47.6020708@sundanceti.com>
On Thu, Feb 07 2002, Craig Rich wrote:
> One question I can start with is, how do you use pci_dma_sg?
>
> pci_map_sg(dev, sglist, nents, direction);
>
> I'm assuming I supply the dev and direction fields. How about the nents
Of course, dev being your pci device and direction the data direction --
PCI_DMA_TODEVICE etc, see linux/pci.h.
> field? Is that supposed to be the largest number of fragments I can
> handle (that's what I assumed.) Finally, the sglist argument has me
nents is the number if segments in the sglist you are supplying as well.
not the maximum number of entries the driver can handle.
> really confused. Do I have to create this structure in advance (and if
> so how) or is pci_map_sg supposed to simply give me a pointer back via
> the sglist argument (that's what I assumed, but that doesn't seem to be
> the case unless I'm doing something else wrong.)
No you have to allocate this structure yourself.
> Also, were in the source code is pci_map_sg located? I'll admit I'm not
> an expert at looking through the source code of an OS like Linux, but
> I'm frustrated by the fact that a simple grep of /usr/src/linux-2.4.2
> does not show where this function is coded.
You are not terribly good a grepping, it seems :-). The function is in
asm/pci.h, depending on the architecture you may have to look inside
arch/ for helpers too.
--
Jens Axboe
prev parent reply other threads:[~2002-02-08 9:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-07 22:23 Scatter Gather List Questions Craig Rich
2002-02-08 9:36 ` Jens Axboe [this message]
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=20020208103615.N4942@suse.de \
--to=axboe@suse.de \
--cc=craig_rich@sundanceti.com \
--cc=linux-kernel@vger.kernel.org \
/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