mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: Mateusz Berezecki <mateuszb@gmail.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: Re[2]: net_device + pci_dev question
Date: Mon, 28 Nov 2005 22:03:38 +0100	[thread overview]
Message-ID: <1133211819.2824.82.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <1653628458.20051128215644@gmail.com>

On Mon, 2005-11-28 at 21:56 +0100, Mateusz Berezecki wrote:
> Hello Arjan,
> 
> On 27th november 2005 (22:25:13) you wrote:
> 
> > On Sun, 2005-11-27 at 20:58 +0100, Mateusz Berezecki wrote:
> >> Hello List!
> >> 
> >> Having only net_device pointer is it possible to retrieve associated pci_dev
> >> pointer basing on this information only?
> 
> > what do you need it for?
> 
> for pci_alloc_consistent() which takes pci_dev as a first argument to
> allocate contiguous memory block for DMA transfers. I just realized

oh it's *your own* netdev...

that makes things a lot easier ;)

it's custom to have driver private data per net dev
(see netdev_priv() to get it, alloc_etherdev() takes the size of it as
argument). It's custom to make that private data a struct in which you
can store the pci device pointer yourself, as well as any other per card
data that you need to store


  reply	other threads:[~2005-11-28 21:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-27 19:58 Mateusz Berezecki
2005-11-27 21:25 ` Arjan van de Ven
2005-11-28 20:56   ` Re[2]: " Mateusz Berezecki
2005-11-28 21:03     ` Arjan van de Ven [this message]
2005-11-28 21:08       ` Re[4]: " Mateusz Berezecki

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=1133211819.2824.82.camel@laptopd505.fenrus.org \
    --to=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mateuszb@gmail.com \
    --cc=netdev@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

all inboxes | Powered by JetHome®