From: "Sean O. Stalley" <sean.stalley@intel.com>
To: Keith Busch <keith.busch@intel.com>
Cc: linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH 1/2] pci: add option to ignore slot capabilities
Date: Fri, 12 Aug 2016 17:03:58 -0700 [thread overview]
Message-ID: <20160813000358.GA20474@sean.stalley.intel.com> (raw)
In-Reply-To: <1470687542-30155-1-git-send-email-keith.busch@intel.com>
Hi Keith,
On Mon, Aug 08, 2016 at 02:19:01PM -0600, Keith Busch wrote:
> This adds flags to struct pci_dev that can be set to request ignoring
> attention and power indicators. This is in prepration for devices that
> advertise these capabilities, but do not support it.
>
> Signed-off-by: Keith Busch <keith.busch@intel.com>
> ---
> drivers/pci/hotplug/pciehp_hpc.c | 6 ++++++
> include/linux/pci.h | 2 ++
> 2 files changed, 8 insertions(+)
>
> diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
> index 08e84d6..3e6646c 100644
> --- a/drivers/pci/hotplug/pciehp_hpc.c
> +++ b/drivers/pci/hotplug/pciehp_hpc.c
> @@ -804,6 +804,12 @@ struct controller *pcie_init(struct pcie_device *dev)
> }
> ctrl->pcie = dev;
> pcie_capability_read_dword(pdev, PCI_EXP_SLTCAP, &slot_cap);
> +
> + if (pdev->ignore_aip)
> + slot_cap &= ~PCI_EXP_SLTCAP_AIP;
> + if (pdev->ignore_pip)
> + slot_cap &= ~PCI_EXP_SLTCAP_PIP;
> +
I think we should clear these bits after the ctrl_info() below.
If we clear it immediately, the ctrl_info() will report these bits as cleared,
even though they may be set in hardware.
I don't think we want to put a value into the log that differs from what hardware reports.
> ctrl->slot_cap = slot_cap;
> mutex_init(&ctrl->ctrl_lock);
> init_waitqueue_head(&ctrl->queue);
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index 9890906..d8bc530 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -308,6 +308,8 @@ struct pci_dev {
> powered on/off by the
> corresponding bridge */
> unsigned int ignore_hotplug:1; /* Ignore hotplug events */
> + unsigned int ignore_aip:1; /* Ignore attention indicator */
> + unsigned int ignore_pip:1; /* Ignore power indicator */
> unsigned int d3_delay; /* D3->D0 transition time in ms */
> unsigned int d3cold_delay; /* D3cold->D0 transition time in ms */
>
> --
> 2.7.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-08-13 0:12 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-08 20:19 [PATCH 1/2] pci: add option to ignore slot capabilities Keith Busch
2016-08-08 20:19 ` [PATCH 2/2] pci: Add ignore indicator quirk for devices Keith Busch
2016-08-15 17:40 ` Bjorn Helgaas
2016-08-15 19:23 ` Keith Busch
2016-08-15 19:50 ` Bjorn Helgaas
2016-08-15 22:35 ` Keith Busch
2016-08-16 3:03 ` Bjorn Helgaas
2016-08-17 21:37 ` Bjorn Helgaas
2016-08-17 23:09 ` Keith Busch
2016-08-18 19:56 ` Bjorn Helgaas
2016-08-18 22:46 ` Keith Busch
2016-08-22 16:55 ` Bjorn Helgaas
2016-08-22 21:15 ` Keith Busch
2016-08-23 13:39 ` Bjorn Helgaas
2016-08-23 17:10 ` Keith Busch
2016-08-23 17:14 ` Sinan Kaya
2016-08-23 19:23 ` Keith Busch
2016-08-23 19:52 ` Bjorn Helgaas
2016-08-23 20:44 ` Keith Busch
2016-08-23 20:02 ` Bjorn Helgaas
2016-08-24 17:33 ` Keith Busch
2016-08-13 0:03 ` Sean O. Stalley [this message]
2016-08-13 0:58 ` [PATCH 1/2] pci: add option to ignore slot capabilities Keith Busch
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=20160813000358.GA20474@sean.stalley.intel.com \
--to=sean.stalley@intel.com \
--cc=bhelgaas@google.com \
--cc=keith.busch@intel.com \
--cc=linux-pci@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 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.