From: Bjorn Helgaas <bhelgaas@google.com>
To: Rajat Jain <rajatxjain@gmail.com>
Cc: Rajat Jain <rajatjain@juniper.net>,
	Rajat Jain <rajatjain.linux@gmail.com>,
	Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	Yijing Wang <wangyijing@huawei.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Yinghai Lu <yhlu.kernel@gmail.com>,
	Guenter Roeck <groeck@juniper.net>,
	Yinghai Lu <yinghai@kernel.org>
Subject: Re: [PATCH v3 4/8] pciehp: Don't disable the link permanently, during removal
Date: Mon, 13 Jan 2014 10:38:44 -0700	[thread overview]
Message-ID: <CAErSpo72KZ-a2OSQLWoK71GCgwBt676XZdGt4tEYm-6UYnLmPw@mail.gmail.com> (raw)
In-Reply-To: <CAA93t1pwLNeCXPXOO1yTPiREVP=sos1bwpob=VnLhSm_zocEkw@mail.gmail.com>
On Mon, Jan 13, 2014 at 1:30 AM, Rajat Jain <rajatxjain@gmail.com> wrote:
> Yinghai: I am trying to understand what exactly is this platform bug
> and how to add a quirk such that this platform remains unaffected. Can
> you please help me by suggesting how to decide if this is _the_
> platform that has the bug (the pcie repeater).
>
> Bjorn: It seems to be that identification of this platform will be out
> PCI code (since the bug seems to be in a pcie repeater chip which is
> not a PCI device visible to SW). So even if we find a way to identify
> this platform (e.g DMI) , I doubt if you'd want me to add that in the
> pciehp code (which is platform independent so far). At best, the only
> way out I can see is to provide a knob from the pciehp, that can be
> use by the platform code to either enable or disable the link state
> hotplug. It could go back towards using a module parameter like
> pciehp_use_link_events. Please suggest.
>
> The only other way I can think of, is that I can remove the debug
> message altogether (Link up / Link down). (Or the user can change the
> verbosity).
I think it's perfectly fine to add a DMI-based quirk in pciehp.  Yes,
it's a bit ugly, but that's just the nature of working around hardware
defects.  Identify the platform, emit a diagnostic ("disabling link
state because platform may be buggy"), enable the workaround.  That
seems better than requiring the user to figure out what hardware he
has and whether it has a defect.
I would also be OK with adding a pciehp module parameter to explicitly
enable or disable the workaround if that seems necessary.  I just want
the common case of correctly working hardware to work without any
switches.
Removing or rate-limiting the link up/down debug message is also fine with me.
Bjorn
     prev parent reply	other threads:[~2014-01-13 17:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-17 20:06 [PATCH v3 4/8] pciehp: Don't disable the link permanently, during removal Rajat Jain
2013-12-18  1:02 ` Bjorn Helgaas
2013-12-18  3:20   ` Rajat Jain
2013-12-18  3:40     ` Guenter Roeck
2013-12-18  4:06       ` Rajat Jain
2013-12-18  5:14     ` Yinghai Lu
2013-12-18  6:17       ` Rajat Jain
2013-12-18  6:50         ` Yinghai Lu
2014-01-05 17:53   ` Rajat Jain
2014-01-07  0:03     ` Bjorn Helgaas
2014-01-07 18:20       ` Rajat Jain
2014-01-09 20:45         ` Rajat Jain
2014-01-09 20:58           ` Bjorn Helgaas
2014-01-13  8:30             ` Rajat Jain
2014-01-13 17:38               ` 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=CAErSpo72KZ-a2OSQLWoK71GCgwBt676XZdGt4tEYm-6UYnLmPw@mail.gmail.com \
    --to=bhelgaas@google.com \
    --cc=alex.williamson@redhat.com \
    --cc=groeck@juniper.net \
    --cc=kaneshige.kenji@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rajatjain.linux@gmail.com \
    --cc=rajatjain@juniper.net \
    --cc=rajatxjain@gmail.com \
    --cc=wangyijing@huawei.com \
    --cc=yhlu.kernel@gmail.com \
    --cc=yinghai@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;
as well as URLs for NNTP newsgroup(s).