linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Ran Shalit <ranshalit@gmail.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: Emulate pci deviceID/vendor for driver debug ?
Date: Tue, 2 Feb 2016 09:58:19 -0600	[thread overview]
Message-ID: <20160202155819.GA25306@localhost> (raw)
In-Reply-To: <CAJ2oMhKMcwX+5SUR6_jANqVu-F9nbmx5+k8G+wym6BvVuH3uoQ@mail.gmail.com>

Hi Ran,

On Tue, Feb 02, 2016 at 01:39:29PM +0200, Ran Shalit wrote:
> Hello,
> 
> Is there some simple way - just for debug purpose - to make the kernel
> think that the driver matches the board/vendor , so that the driver
> will be called ?
> I don't have the real harware yet (even not a pci physical interface
> for any card), but wanted to start debugging some template driver.

If you haven't seen it already, Linux Device Drivers should answer
many of your questions, and it's freely available online:
https://lwn.net/Kernel/LDD3/

If you write a template driver, you can put whatever vendor/device IDs
you want in the pci_device_id table, and then the driver will match
the device you care about.  You might have to disable the driver (or
unload the driver module) that normally claims the device.

Bjorn

      reply	other threads:[~2016-02-02 15:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02 11:39 Emulate pci deviceID/vendor for driver debug ? Ran Shalit
2016-02-02 15:58 ` Bjorn Helgaas [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=20160202155819.GA25306@localhost \
    --to=helgaas@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=ranshalit@gmail.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).