Re: [PATCH RFC v2 1/4] PCI: hotplug: Add support for disabling in-band presence

From: Lukas Wunner
Date: Thu Feb 21 2019 - 02:19:51 EST


On Tue, Feb 19, 2019 at 07:20:27PM -0600, Alexandru Gagniuc wrote:
> @@ -846,6 +846,9 @@ struct controller *pcie_init(struct pcie_device *dev)
> if (pdev->is_thunderbolt)
> slot_cap |= PCI_EXP_SLTCAP_NCCS;
>
> + if (pdev->no_in_band_presence)
> + ctrl->inband_presence_disabled = 1;
> +
> ctrl->slot_cap = slot_cap;
> mutex_init(&ctrl->ctrl_lock);
> mutex_init(&ctrl->state_lock);

The above hunk belongs in patch 4.


> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -413,6 +413,7 @@ struct pci_dev {
> unsigned int non_compliant_bars:1; /* Broken BARs; ignore them */
> unsigned int is_probed:1; /* Device probing in progress */
> unsigned int link_active_reporting:1;/* Device capable of reporting link active */
> + unsigned int no_in_band_presence:1; /* Device does not report in-band presence */
> unsigned int no_vf_scan:1; /* Don't scan for VFs after IOV enablement */
> pci_dev_flags_t dev_flags;
> atomic_t enable_cnt; /* pci_enable_device has been called */

Same here.

Thanks,

Lukas