From: "Vadivelan Mani" <daff_vadi@hotmail.com>
To: linux-mips@linux-mips.org
Subject: pci_alloc_consistent() usage
Date: Tue, 13 Jul 2004 18:31:01 +0530 [thread overview]
Message-ID: <BAY15-F223KfTpfpYea00005ca9@hotmail.com> (raw)
hi,
I'm writing a wireless driver which requires 8 transmit and 8 receive
buffers each of size 3KB approx.
These buffers should be in dma capable space.
I've allocated them using pci_alloc_consistent().
I've allocated 128KBytes just to make more space. I've got few doubts.
1. Can pci_alloc_consistent() be used to allocate memory upto 128KBytes?
If this is not possible, how much can it allocate?
2.) I would also like to know the exact use of this allocated space to
transmit or receive a packet.
During transmission i do the following. Plz correct me if i'm wrong because
i'm new to driver writing.
The device has a register which should be loaded with the transmit buffers
starting address.
I copy the packet coming from the Kernel in the form of sk_buff structure
into one of the transmit buffers that i've allocated using memcpy().
And i set the register in the device to initiate transmission of the packet.
Where does the dma transfer concept come in this?
There is no mention of the direction of data transfer in
pci_alloc_consistent().
I also assumed that allocating buffer in dma capable space was itself enough
to start dma transfers.
Since i do not have the device now i'm not able to test the code. But i
would like to write the code before i get the device.
Kindly help me in this.
thanking u in advance.
regards,
vadi.
_________________________________________________________________
Marriage by choice.... http://www.shaadi.com/ptnr.php?ptnr=hmltag Log onto
Shaadi.com
next reply other threads:[~2004-07-13 13:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-13 13:01 Vadivelan Mani [this message]
2004-07-13 19:29 ` pci_alloc_consistent() usage Ralf Baechle
-- strict thread matches above, loose matches on Subject: below --
2003-05-23 21:59 pci_alloc_consistent usage Wayne Gowcher
2003-05-27 9:17 ` Ralf Baechle
2003-05-27 10:07 ` Atsushi Nemoto
2003-05-27 10:53 ` Christoph Hellwig
2003-05-27 11:22 ` Ralf Baechle
2003-05-27 11:33 ` Christoph Hellwig
2003-05-27 11:45 ` Ralf Baechle
2003-05-28 1:30 ` Atsushi Nemoto
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=BAY15-F223KfTpfpYea00005ca9@hotmail.com \
--to=daff_vadi@hotmail.com \
--cc=linux-mips@linux-mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.