linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Prarit Bhargava <prarit@redhat.com>
Cc: linux-pci@vger.kernel.org, Myron Stowe <mstowe@redhat.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Bjorn Helgaas <bhelgaas@google.com>,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH] pci-driver: Add driver load messages
Date: Tue, 26 Jan 2021 08:39:35 +0200	[thread overview]
Message-ID: <20210126063935.GC1053290@unreal> (raw)
In-Reply-To: <20210125194138.1103155-1-prarit@redhat.com>

On Mon, Jan 25, 2021 at 02:41:38PM -0500, Prarit Bhargava wrote:
> There are two situations where driver load messages are helpful.
>
> 1) Some drivers silently load on devices and debugging driver or system
> failures in these cases is difficult.  While some drivers (networking
> for example) may not completely initialize when the PCI driver probe() function
> has returned, it is still useful to have some idea of driver completion.

Sorry, probably it is me, but I don't understand this use case.
Are you adding global to whole kernel command line boot argument to debug
what and when?

During boot:
If device success, you will see it in /sys/bus/pci/[drivers|devices]/*.
If device fails, you should get an error from that device (fix the
device to return an error), or something immediately won't work and
you won't see it in sysfs.

During run:
We have many other solutions to get debug prints during run, for example
tracing, which is possible to toggle dynamically.

Right now, my laptop will print 34 prints on boot and endless amount during
day-to-day usage.

➜  kernel git:(rdma-next) ✗ lspci |wc -l
34

>
> 2) Storage and Network device vendors have relatively short lives for
> some of their hardware.  Some devices may continue to function but are
> problematic due to out-of-date firmware or other issues.  Maintaining
> a database of the hardware is out-of-the-question in the kernel as it would
> require constant updating.  Outputting a message in the log would allow
> different OSes to determine if the problem hardware was truly supported or not.

And rely on some dmesg output as a true source of supported/not supported and
making this ABI which needs knob in command line. ?

>
> Add optional driver load messages from the PCI core that indicates which
> driver was loaded, on which slot, and on which device.

Why don't you add simple pr_debug(..) without any knob? You will be able
to enable/disable it through dynamic prints facility.

Thanks

  reply	other threads:[~2021-01-26  6:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 19:41 [PATCH] pci-driver: Add driver load messages Prarit Bhargava
2021-01-26  6:39 ` Leon Romanovsky [this message]
2021-01-26 12:54   ` Prarit Bhargava
2021-01-26 13:14     ` Leon Romanovsky
2021-01-26 13:42       ` Prarit Bhargava
2021-01-26 13:53         ` Leon Romanovsky
2021-01-26 14:05           ` Prarit Bhargava
2021-01-26 15:12             ` Bjorn Helgaas
2021-01-29 18:38               ` Prarit Bhargava
2021-02-18 18:36               ` Prarit Bhargava
2021-02-18 19:06                 ` Bjorn Helgaas
2021-03-04 14:42                   ` Prarit Bhargava
2021-03-04 15:50                     ` Bjorn Helgaas
2021-03-05 18:20                       ` Prarit Bhargava
  -- strict thread matches above, loose matches on Subject: below --
2021-01-25 19:21 Prarit Bhargava

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=20210126063935.GC1053290@unreal \
    --to=leon@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mstowe@redhat.com \
    --cc=prarit@redhat.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).