Re: [PATCH] pci: Rename pci_dev->untrusted to pci_dev->external

2021-04-20 Thread Bjorn Helgaas
On Tue, Apr 20, 2021 at 07:10:06AM +0100, Christoph Hellwig wrote: > On Mon, Apr 19, 2021 at 05:30:49PM -0700, Rajat Jain wrote: > > The current flag name "untrusted" is not correct as it is populated > > using the firmware property "external-facing" for the parent ports. In > > other words, the

Re: [PATCH] PCI: acpiphp: Fixed coding style

2021-04-16 Thread Bjorn Helgaas
On Mon, Mar 01, 2021 at 12:51:45PM +0530, chakravarthikulkarni wrote: > In this commit fixed coding style for braces and comments. > > Signed-off-by: chakravarthikulkarni Applied to pci/hotplug for v5.13, thanks! I dropped the comment change because it's really one comment that should remain

Re: [v9,2/7] PCI: Export pci_pio_to_address() for module use

2021-04-16 Thread Bjorn Helgaas
this should be EXPORT_SYMBOL_GPL(), I can make this change > but this requires Bjorn's ACK to go upstream (Bjorn, it is my fault, > it was assigned to me on patchwork, now updated, please have a look). Yep, looks good to me, and I agree it should be EXPORT_SYMBOL_GPL(). Acked-by: Bjorn Helgaas > > > > > > unsigned long __weak pci_address_to_pio(phys_addr_t address) > > > { > > > -- > > > 2.25.1 > > >

Re: [v9,0/7] PCI: mediatek: Add new generation controller support

2021-04-16 Thread Bjorn Helgaas
On Wed, Mar 24, 2021 at 11:05:03AM +0800, Jianjun Wang wrote: > These series patches add pcie-mediatek-gen3.c and dt-bindings file to > support new generation PCIe controller. Incidental: b4 doesn't work on this thread, I suspect because the usual subject line format is: [PATCH v9 9/7]

Re: [PATCH V4] PCI: Add MCFG quirks for Tegra194 host controllers

2021-04-16 Thread Bjorn Helgaas
On Fri, Apr 16, 2021 at 07:15:37PM +0530, Vidya Sagar wrote: > The PCIe controller in Tegra194 SoC is not completely ECAM-compliant. > With the current hardware design limitations in place, ECAM can be enabled > only for one controller (C5 controller to be precise) with bus numbers > starting from

Re: [PATCH] PCI: shpchp: remove unused function

2021-04-16 Thread Bjorn Helgaas
On Thu, Apr 15, 2021 at 04:30:22PM +0800, Jiapeng Chong wrote: > Fix the following clang warning: > > drivers/pci/hotplug/shpchp_hpc.c:177:20: warning: unused function > 'shpc_writeb' [-Wunused-function]. > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong Applied to pci/hotplug for

Re: QCA6174 pcie wifi: Add pci quirks

2021-04-14 Thread Bjorn Helgaas
[+cc Alex] On Fri, Apr 09, 2021 at 11:26:33AM +0200, Ingmar Klein wrote: > Edit: Retry, as I did not consider, that my mail-client would make this > party html. > > Dear maintainers, > I recently encountered an issue on my Proxmox server system, that > includes a Qualcomm QCA6174 m.2 PCIe wifi

Re: [PATCH -next] PCI: Use DEFINE_SPINLOCK() for spinlock

2021-04-14 Thread Bjorn Helgaas
On Tue, Apr 06, 2021 at 08:06:37PM +0800, Huang Guobin wrote: > From: Guobin Huang > > spinlock can be initialized automatically with DEFINE_SPINLOCK() > rather than explicitly calling spin_lock_init(). > > Reported-by: Hulk Robot > Signed-off-by: Guobin Huang Applied to pci/hotplug for

Re: [PATCH] PCI: Add PCI_EXP_DEVCTL_PAYLOAD_* macros

2021-04-14 Thread Bjorn Helgaas
On Tue, Apr 13, 2021 at 10:39:16AM +0200, Pali Rohár wrote: > On Monday 12 April 2021 14:27:40 Bjorn Helgaas wrote: > > On Mon, Apr 12, 2021 at 02:46:02PM +0200, Pali Rohár wrote: > > > Define new PCI_EXP_DEVCTL_PAYLOAD_* macros in linux/pci_regs.h header file > > > f

Re: [PATCH 1/1] s390/pci: expose a PCI device's UID as its index

2021-04-14 Thread Bjorn Helgaas
no conflict and we can just expose the UID under the "index" > attribute whenever UID Uniqueness Checking is active and get systemd's > interface naming support for free. > > Signed-off-by: Niklas Schnelle > Acked-by: Viktor Mihajlovski This seems like a nice solution to

Re: [PATCH v10 3/3] PCI: uniphier: Add misc interrupt handler to invoke PME and AER

2021-04-14 Thread Bjorn Helgaas
On Sat, Apr 10, 2021 at 01:22:18AM +0900, Kunihiko Hayashi wrote: > This patch adds misc interrupt handler to detect and invoke PME/AER event. > > In UniPhier PCIe controller, PME/AER signals are assigned to the same > signal as MSI by the internal logic. These signals should be detected by > the

Re: [PATCH v2 7/8] cxl/port: Introduce cxl_port objects

2021-04-13 Thread Bjorn Helgaas
On Thu, Apr 08, 2021 at 07:13:38PM -0700, Dan Williams wrote: > Hi Bjorn, thanks for taking a look. > > On Thu, Apr 8, 2021 at 3:42 PM Bjorn Helgaas wrote: > > > > [+cc Greg, Rafael, Matthew: device model questions] > > > > Hi Dan, > > > > On Thu, A

Re: Device driver location for the PCIe root port's DMA engine

2021-04-13 Thread Bjorn Helgaas
On Tue, Apr 13, 2021 at 11:42:15PM +0530, Vidya Sagar wrote: > On 4/13/2021 3:23 AM, Bjorn Helgaas wrote: > > The existing port services (AER, DPC, hotplug, etc) are things the > > device advertises via the PCI Capabilities defined by the generic PCIe > > spec, and in m

Re: Device driver location for the PCIe root port's DMA engine

2021-04-12 Thread Bjorn Helgaas
[+cc Matthew for portdrv comment] On Mon, Apr 12, 2021 at 10:31:02PM +0530, Vidya Sagar wrote: > Hi > I'm starting this mail to seek advice on the best approach to be taken to > add support for the driver of the PCIe root port's DMA engine. > To give some background, Tegra194's PCIe IPs are

Re: [PATCH] PCI: Add PCI_EXP_DEVCTL_PAYLOAD_* macros

2021-04-12 Thread Bjorn Helgaas
On Mon, Apr 12, 2021 at 02:46:02PM +0200, Pali Rohár wrote: > Define new PCI_EXP_DEVCTL_PAYLOAD_* macros in linux/pci_regs.h header file > for Max Payload Size. Macros are defined in the same style as existing > macros PCI_EXP_DEVCTL_READRQ_* macros. > > Signed-off-by: Pali Rohár > --- >

Re: [PATCH] PCI: Delay after FLR of Intel DC P4510 NVMe

2021-04-09 Thread Bjorn Helgaas
On Thu, Apr 08, 2021 at 07:05:27PM +, Raphael Norwitz wrote: > Like the Intel DC P3700 NVMe, the Intel P4510 NVMe exhibits a timeout > failure when the driver tries to interact with the device to soon after > an FLR. The same reset quirk the P3700 uses also resolves the failure > for the

Re: [PATCH v2 7/8] cxl/port: Introduce cxl_port objects

2021-04-08 Thread Bjorn Helgaas
[+cc Greg, Rafael, Matthew: device model questions] Hi Dan, On Thu, Apr 01, 2021 at 07:31:20AM -0700, Dan Williams wrote: > Once the cxl_root is established then other ports in the hierarchy can > be attached. The cxl_port object, unlike cxl_root that is associated > with host bridges, is

Re: [PATCH 3/4] docs: Add documentation for HiSilicon PTT device driver

2021-04-08 Thread Bjorn Helgaas
On Thu, Apr 08, 2021 at 09:22:52PM +0800, Yicong Yang wrote: > On 2021/4/8 2:55, Bjorn Helgaas wrote: > > On Tue, Apr 06, 2021 at 08:45:53PM +0800, Yicong Yang wrote: > >> +On Kunpeng 930 SoC, the PCIe root complex is composed of several > >> +PCIe cores. > &g

Re: [PATCH v2] ACPI / hotplug / PCI: fix memory leak in enable_slot()

2021-04-08 Thread Bjorn Helgaas
returns a PCI device. > > Signed-off-by: Feilong Lin > Signed-off-by: Zhiqiang Liu Applied with Rafael's reviewed-by to pci/hotplug for v5.13, thanks! > -- > v2: rewrite subject and commit log as suggested by Bjorn Helgaas. > --- > drivers/pci/hotplug/acpiphp_glue.c |

Re: [PATCH v2] ACPI / hotplug / PCI: fix memory leak in enable_slot()

2021-04-08 Thread Bjorn Helgaas
eak. > > > > Fix it by calling pci_dev_put() to decrement its reference count after that > > pci_get_slot() returns a PCI device. > > > > Signed-off-by: Feilong Lin > > Signed-off-by: Zhiqiang Liu > > -- > > v2: rewrite subject and commit log as sugge

Re: [PATCH 3/4] docs: Add documentation for HiSilicon PTT device driver

2021-04-07 Thread Bjorn Helgaas
Move important info in the subject earlier, e.g., docs: Add HiSilicon PTT device documentation On Tue, Apr 06, 2021 at 08:45:53PM +0800, Yicong Yang wrote: > Document the introduction and usage of HiSilicon PTT device driver. > > Signed-off-by: Yicong Yang > --- >

Re: [PATCH] PCI: dwc: Change the inheritance between the abstracted structures

2021-04-06 Thread Bjorn Helgaas
On Tue, Apr 06, 2021 at 05:28:25PM +0800, Zhiqiang Hou wrote: > From: Hou Zhiqiang > > Currently the core struct dw_pcie includes both struct pcie_port > and dw_pcie_ep and the RC and EP platform drivers directly > includes the dw_pcie. So it results in a RC or EP platform driver > has 2

Re: [PATCH v1 3/7] PCI: New Primary to Sideband (P2SB) bridge support library

2021-04-01 Thread Bjorn Helgaas
On Thu, Apr 01, 2021 at 09:23:04PM +0300, Andy Shevchenko wrote: > On Thu, Apr 01, 2021 at 11:42:56AM -0500, Bjorn Helgaas wrote: > > On Thu, Apr 01, 2021 at 06:45:02PM +0300, Andy Shevchenko wrote: > > > On Tue, Mar 09, 2021 at 09:42:52AM +0100, Henning Schild wrote: > > &

Re: [PATCH v1 3/7] PCI: New Primary to Sideband (P2SB) bridge support library

2021-04-01 Thread Bjorn Helgaas
On Thu, Apr 01, 2021 at 06:45:02PM +0300, Andy Shevchenko wrote: > On Tue, Mar 09, 2021 at 09:42:52AM +0100, Henning Schild wrote: > > Am Mon, 8 Mar 2021 19:42:21 -0600 > > schrieb Bjorn Helgaas : > > > On Mon, Mar 08, 2021 at 09:16:50PM +0200, Andy Shevchenko wrote: >

Re: [PATCH] PCI: ACPI: PM: Fix debug message in acpi_pci_set_power_state()

2021-03-31 Thread Bjorn Helgaas
On Thu, Mar 25, 2021 at 07:57:51PM +0100, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > If PCI_D3cold is passed to acpi_pci_set_power_state() as the second > argument and there is no ACPI D3cold support for the given device, > the debug message printed by that function will state that

Re: [PATCH v2 04/15] ACPI: table: replace __attribute__((packed)) by __packed

2021-03-31 Thread Bjorn Helgaas
On Wed, Mar 31, 2021 at 11:55:08PM +0800, Zhang Rui wrote: > ... > From e18c942855e2f51e814d057fff4dd951cd0d0907 Mon Sep 17 00:00:00 2001 > From: Zhang Rui > Date: Wed, 31 Mar 2021 20:34:13 +0800 > Subject: [PATCH] ACPI: tables: FPDT: Fix 64bit alignment issue > > Some of the 64bit items in

Re: [PATCH] PCI: xgene: fix a mistake about cfg address

2021-03-30 Thread Bjorn Helgaas
On Sun, Mar 28, 2021 at 10:41:18PM +0800, Dejin Zheng wrote: > It has a wrong modification to the xgene driver by the commit > e2dcd20b1645a. it use devm_platform_ioremap_resource_byname() to > simplify codes and remove the res variable, But the following code > needs to use this res variable, So

Re: [PATCH] PCI: Try to find two continuous regions for child resource

2021-03-29 Thread Bjorn Helgaas
On Mon, Mar 29, 2021 at 04:47:59PM +0800, Kai-Heng Feng wrote: > Built-in grahpics on HP EliteDesk 805 G6 doesn't work because graphics > can't get the BAR it needs: > [0.611504] pci_bus :00: root bus resource [mem > 0x1002020-0x100303f window] > [0.611505] pci_bus :00:

Re: [PATCH] PCI: Remove pci_try_set_mwi

2021-03-28 Thread Bjorn Helgaas
On Sun, Mar 28, 2021 at 12:04:35AM +0100, Heiner Kallweit wrote: > On 26.03.2021 22:26, Bjorn Helgaas wrote: > > [+cc Randy, Andrew (though I'm sure you have zero interest in this > > ancient question :))] > > > > On Wed, Dec 09, 2020 at 09:31:21AM +0100, Heiner Kallw

Re: [PATCH] PCI: Remove pci_try_set_mwi

2021-03-26 Thread Bjorn Helgaas
On Fri, Mar 26, 2021 at 11:42:46PM +0200, Andy Shevchenko wrote: > On Fri, Mar 26, 2021 at 04:26:55PM -0500, Bjorn Helgaas wrote: > > [+cc Randy, Andrew (though I'm sure you have zero interest in this > > ancient question :))] > > > > On Wed, Dec 09, 2020 at 09:31:

Re: [PATCH] PCI: Remove pci_try_set_mwi

2021-03-26 Thread Bjorn Helgaas
[+cc Randy, Andrew (though I'm sure you have zero interest in this ancient question :))] On Wed, Dec 09, 2020 at 09:31:21AM +0100, Heiner Kallweit wrote: > pci_set_mwi() and pci_try_set_mwi() do exactly the same, just that the > former one is declared as __must_check. However also some callers of

Re: [PATCH v3 6/6] PCI: brcmstb: Check return value of clk_prepare_enable()

2021-03-26 Thread Bjorn Helgaas
On Fri, Mar 26, 2021 at 03:19:04PM -0400, Jim Quinlan wrote: > The check was missing on PCIe resume. "PCIe resume" isn't really a thing, per se. PCI/PCIe gives us device power states (D0, D3hot, etc), and Linux power management builds suspend/resume on top of those. Maybe: Check for failure

Re: [PATCH v3 3/6] PCI: brcmstb: Do not turn off regulators if EP can wake up

2021-03-26 Thread Bjorn Helgaas
On Fri, Mar 26, 2021 at 03:19:01PM -0400, Jim Quinlan wrote: > If any downstream device may wake up during S2/S3 suspend, we do not want > to turn off its power when suspending. > > Signed-off-by: Jim Quinlan > --- > drivers/pci/controller/pcie-brcmstb.c | 58 +++ > 1

Re: [PATCH v3 2/6] PCI: brcmstb: Add control of EP voltage regulators

2021-03-26 Thread Bjorn Helgaas
On Fri, Mar 26, 2021 at 03:19:00PM -0400, Jim Quinlan wrote: > Control of EP regulators by the RC is needed because of the chicken-and-egg Can you expand "EP"? Not sure if this refers to "endpoint" or something else. If this refers to a device in a slot, I guess it isn't necessarily a PCIe

Re: [PATCH] PCI: Allow drivers to claim exclusive access to config regions

2021-03-26 Thread Bjorn Helgaas
lspci output if any configuration > register in the request is exclusive. Instead skip the actual > configuration cycle on a per-access basis and return all f's as if the > read had failed. > > Cc: Bjorn Helgaas > Cc: Greg Kroah-Hartman > Cc: Jonathan Cameron > Signed-off-by

Re: [PATCH 2/4] PCI: j721e: Add PCI legacy interrupt support for J721E

2021-03-25 Thread Bjorn Helgaas
I'd promote J721E earlier in subject so it doesn't get truncated, e.g., PCI: j721e: Add J721E PCI legacy interrupt support On Thu, Mar 25, 2021 at 02:39:34PM +0530, Kishon Vijay Abraham I wrote: > +static void j721e_pcie_legacy_irq_handler(struct irq_desc *desc) > +{ > + int i; > +

Re: [PATCH] PCI: dwc: Move forward the iATU detection process

2021-03-25 Thread Bjorn Helgaas
;PCI: dwc: Detect number of iATU windows") Link: https://lore.kernel.org/r/20210125044803.4310-1-zhiqiang@nxp.com Tested-by: Kunihiko Hayashi Signed-off-by: Hou Zhiqiang Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Cc: sta...@vger.kernel.org # v

Re: [PATCH v5 1/4] PCI: Introduce pcim_alloc_irq_vectors()

2021-03-23 Thread Bjorn Helgaas
) is a device-managed function. > > Suggested-by: Andy Shevchenko > Signed-off-by: Dejin Zheng Acked-by: Bjorn Helgaas Let me know if you'd like me to take the series. > --- > v4 -> v5: > - Remove the check of enable device in pcim_alloc_irq_vectors() >

Re: [PATCH] PCI: hotplug: fix null-ptr-dereferencd in cpcihp error path

2021-03-23 Thread Bjorn Helgaas
On Sun, Mar 21, 2021 at 01:51:08AM -0400, Tong Zhang wrote: > There is an issue in the error path, which cpci_thread may remain NULL. > Calling kthread_stop(cpci_thread) will trigger a BUG(). > It is better to check whether the thread is really created and started > before stop it. > > [

Re: [RESEND PATCH V6 2/2] PCI: sprd: Add support for Unisoc SoCs' PCIe controller

2021-03-23 Thread Bjorn Helgaas
On Mon, Mar 22, 2021 at 05:18:31PM +0800, Chunyan Zhang wrote: > From: Hongtao Wu > > This series adds PCIe controller driver for Unisoc SoCs. > This controller is based on DesignWare PCIe IP. > > Signed-off-by: Hongtao Wu > Signed-off-by: Chunyan Zhang > --- >

Re: [PATCH] pci: fix memory leak when virtio pci hotplug

2021-03-23 Thread Bjorn Helgaas
On Sun, Mar 21, 2021 at 11:29:30PM +0800, Zhiqiang Liu wrote: > From: Feilong Lin > > Repeated hot-plugging of pci devices for a virtual > machine driven by virtio, we found that there is a > leak in kmalloc-4k, which was confirmed as the memory > of the pci_device structure. Then we found out

Re: [PATCH RESEND] PCI: dwc: Fix MSI not work after resume

2021-03-23 Thread Bjorn Helgaas
[-cc Dilip (mail to him bounced)] On Tue, Mar 23, 2021 at 11:01:15AM +0800, Jisheng Zhang wrote: > On Mon, 22 Mar 2021 20:24:41 -0500 Bjorn Helgaas wrote: > > > > [+cc Kishon, Richard, Lucas, Dilip] > > > > On Mon, Mar 01, 2021 at 11:10:31AM +0800, Jisheng Zhang

Re: [PATCH RESEND] PCI: dwc: Fix MSI not work after resume

2021-03-22 Thread Bjorn Helgaas
[+cc Kishon, Richard, Lucas, Dilip] On Mon, Mar 01, 2021 at 11:10:31AM +0800, Jisheng Zhang wrote: > After we move dw_pcie_msi_init() into core -- dw_pcie_host_init(), the > MSI stops working after resume. Because dw_pcie_host_init() is only > called once during probe. To fix this issue, we move

Re: [PATCH] PCI: dwc: Move forward the iATU detection process

2021-03-22 Thread Bjorn Helgaas
On Mon, Jan 25, 2021 at 12:48:03PM +0800, Zhiqiang Hou wrote: > From: Hou Zhiqiang > > In the dw_pcie_ep_init(), it depends on the detected iATU region > numbers to allocate the in/outbound window management bit map. > It fails after the commit 281f1f99cf3a ("PCI: dwc: Detect number > of iATU

Re: [RFC 1/2] arm64: PCI: Allow use arch-specific pci sysdata

2021-03-19 Thread Bjorn Helgaas
[+cc Arnd (author of 37d6a0a6f470 ("PCI: Add pci_register_host_bridge() interface"), which I think would make my idea below possible), Marc (IRQ domains maintainer)] On Sat, Mar 20, 2021 at 12:19:55AM +0800, Boqun Feng wrote: > Currently, if an architecture selects CONFIG_PCI_DOMAINS_GENERIC, the

Re: [RFC 0/2] PCI: Introduce pci_ops::use_arch_sysdata

2021-03-19 Thread Bjorn Helgaas
On Sat, Mar 20, 2021 at 12:19:54AM +0800, Boqun Feng wrote: > Hi Bjorn, > > I'm currently working on virtual PCI support for Hyper-V ARM64 guests. > Similar to virtual PCI on x86 Hyper-V guests, the PCI root bus is not > probed via ACPI (or of), it's probed from Hyper-V VMbus, therefore it Prime

Re: [PATCH 4/4] PCI/sysfs: Allow userspace to query and set device reset mechanism

2021-03-19 Thread Bjorn Helgaas
On Fri, Mar 19, 2021 at 02:59:47PM +0200, Leon Romanovsky wrote: > On Thu, Mar 18, 2021 at 07:34:56PM +0100, Enrico Weigelt, metux IT consult > wrote: > > On 18.03.21 18:22, Leon Romanovsky wrote: > > > > > Which email client do you use? Your responses are grouped as > > > one huge block

Re: [v5] PCI: Add reset quirk for Huawei Intelligent NIC virtual function

2021-03-18 Thread Bjorn Helgaas
On Tue, Mar 16, 2021 at 10:08:47PM +0800, Chiqijun wrote: > When multiple VFs do FLR at the same time, the firmware is > processed serially, resulting in some VF FLRs being delayed more > than 100ms, when the virtual machine restarts and the device > driver is loaded, the firmware is doing the

Re: [PATCH RESEND] PCI: dwc: Fix MSI not work after resume

2021-03-18 Thread Bjorn Helgaas
On Mon, Mar 01, 2021 at 11:10:31AM +0800, Jisheng Zhang wrote: > After we move dw_pcie_msi_init() into core -- dw_pcie_host_init(), the > MSI stops working after resume. Because dw_pcie_host_init() is only > called once during probe. To fix this issue, we move dw_pcie_msi_init() > to

Re: [PATCH 2/2] PCI: Revoke mappings like devmem

2021-03-13 Thread Bjorn Helgaas
th approach support ioport mmap through a > special pfn range and not through magic pte attributes. Aliasing is > therefore not a problem. > > The only difference in access checks left is that sysfs PCI mmap does > not check for CAP_RAWIO. I'm not really sure whether that should be &g

Re: [PATCH v1 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered

2021-03-12 Thread Bjorn Helgaas
On Fri, Mar 12, 2021 at 02:11:03PM -0800, Kuppuswamy, Sathyanarayanan wrote: > On 3/12/21 1:33 PM, Bjorn Helgaas wrote: > > On Mon, Mar 08, 2021 at 10:34:10PM -0800, > > sathyanarayanan.kuppusw...@linux.intel.com wrote: > > > From: Kuppuswamy Sathyanaraya

Re: [PATCH 03/44] PCI: remove synclink entries from pci_ids

2021-03-12 Thread Bjorn Helgaas
ri Slaby Applied with Krzysztof's reviewed-by to pci/misc for v5.13, thanks! > Cc: Bjorn Helgaas > Cc: linux-...@vger.kernel.org > --- > include/linux/pci_ids.h | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h &g

Re: [PATCH v1 1/1] PCI: pciehp: Skip DLLSC handling if DPC is triggered

2021-03-12 Thread Bjorn Helgaas
[+cc Lukas, pciehp expert] On Mon, Mar 08, 2021 at 10:34:10PM -0800, sathyanarayanan.kuppusw...@linux.intel.com wrote: > From: Kuppuswamy Sathyanarayanan > > When hotplug and DPC are both enabled on a Root port or > Downstream Port, during DPC events that cause a DLLSC link > down/up events,

Re: [PATCH v3] PCI: Add quirk for preventing bus reset on TI C667X

2021-03-12 Thread Bjorn Helgaas
On Mon, Mar 08, 2021 at 02:21:30PM +, Antti Järvinen wrote: > Some TI KeyStone C667X devices do no support bus/hot reset. Its PCIESS > automatically disables LTSSM when secondary bus reset is received and > device stops working. Prevent bus reset by adding quirk_no_bus_reset to > the device.

Re: [RFC PATCH v2 02/11] PCI/P2PDMA: Avoid pci_get_slot() which sleeps

2021-03-12 Thread Bjorn Helgaas
On Thu, Mar 11, 2021 at 04:31:32PM -0700, Logan Gunthorpe wrote: > In order to use upstream_bridge_distance_warn() from a dma_map function, > it must not sleep. However, pci_get_slot() takes the pci_bus_sem so it > might sleep. > > In order to avoid this, try to get the host bridge's device from

Re: [RFC PATCH v2 01/11] PCI/P2PDMA: Pass gfp_mask flags to upstream_bridge_distance_warn()

2021-03-12 Thread Bjorn Helgaas
c call to use a passed in gfp_mask and don't print that > message if the buffer fails to be allocated. > > Signed-off-by: Logan Gunthorpe Acked-by: Bjorn Helgaas > --- > drivers/pci/p2pdma.c | 21 +++-- > 1 file changed, 11 insertions(+), 10 deletions(-) > &g

Re: [PATCH 02/17] cfi: add __cficanonical

2021-03-12 Thread Bjorn Helgaas
> indirect calls in instrumented code without tripping CFI checks. > > Signed-off-by: Sami Tolvanen If you need it: Acked-by: Bjorn Helgaas# pci.h > --- > include/linux/compiler-clang.h | 1 + > include/linux/compiler_types.h | 4 > include/linux/init.h |

Re: [PATCH 1/3] PCI: controller: al: select CONFIG_PCI_ECAM

2021-03-11 Thread Bjorn Helgaas
On Wed, Mar 10, 2021 at 10:02:55PM +0100, Arnd Bergmann wrote: > On Wed, Mar 10, 2021 at 8:32 PM Bjorn Helgaas wrote: > > > > On Mon, Mar 08, 2021 at 04:24:46PM +0100, Arnd Bergmann wrote: > > > From: Arnd Bergmann > > > > > > Compile-testing this dri

Re: [PATCH] MAINTAINERS: Update PCI patchwork to kernel.org instance

2021-03-11 Thread Bjorn Helgaas
On Thu, Mar 11, 2021 at 03:12:23PM -0600, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > We now use the kernel.org patchwork instance. Update the links in > MAINTAINERS. > > Signed-off-by: Bjorn Helgaas I put this on for-linus for v5.12. > --- > MAINTAINERS | 4 +

[PATCH] MAINTAINERS: Update PCI patchwork to kernel.org instance

2021-03-11 Thread Bjorn Helgaas
From: Bjorn Helgaas We now use the kernel.org patchwork instance. Update the links in MAINTAINERS. Signed-off-by: Bjorn Helgaas --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index d92f85ca831d..a3c2e930b3d5 100644

Re: [PATCH v2] PCI/ASPM: Disable ASPM when save/restore PCI state

2021-03-11 Thread Bjorn Helgaas
On Thu, Jan 28, 2021 at 03:52:42PM +, Victor Ding wrote: > Certain PCIe devices (e.g. GL9750) have high penalties (e.g. high Port > T_POWER_ON) when exiting L1 but enter L1 aggressively. As a result, > such devices enter and exit L1 frequently during pci_save_state and > pci_restore_state;

Re: [PATCH] PCI: Add AMD RV2 based APUs, such as 3015Ce, to D3hot to D3 quirk table.

2021-03-11 Thread Bjorn Helgaas
[+cc Daniel, Mika (author, reviewer of 3030df209aa8] On Thu, Mar 11, 2021 at 10:11:35AM +0530, Shirish S wrote: > From: Julian Schroeder > > This allows for an extra 10ms for the state transition. > Currently only AMD PCO based APUs are covered by this table. I'm really glad to see this coming

Re: [PATCH v3 1/1] PCI/RCEC: Fix RCiEP capable devices RCEC association

2021-03-10 Thread Bjorn Helgaas
On Mon, Feb 22, 2021 at 09:17:17AM +0800, Qiuxu Zhuo wrote: > Function rcec_assoc_rciep() incorrectly used "rciep->devfn" (a single > byte encoding the device and function number) as the device number to > check whether the corresponding bit was set in the RCiEPBitmap of the > RCEC (Root Complex

Re: [PATCH 1/3] PCI: controller: al: select CONFIG_PCI_ECAM

2021-03-10 Thread Bjorn Helgaas
On Mon, Mar 08, 2021 at 04:24:46PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > Compile-testing this driver without ECAM support results in a link > failure: > > ld.lld: error: undefined symbol: pci_ecam_map_bus > >>> referenced by pcie-al.c > >>>

Re: [PATCH 00/13] PCI: MSI: Getting rid of msi_controller, and other cleanups

2021-03-10 Thread Bjorn Helgaas
uot;quirks"? In the 03/13 commit log, s/appaling/appalling/ :) In the patch, it sounds like the MSI capture address change might be separable into its own patch? If it were separate, it would be easier to see the problem/fix and watch for it elsewhere. Acked-by: Bjorn Helgaas

Re: [patch 12/14] PCI: hv: Use tasklet_disable_in_atomic()

2021-03-09 Thread Bjorn Helgaas
> Signed-off-by: Thomas Gleixner > Cc: "K. Y. Srinivasan" > Cc: Haiyang Zhang > Cc: Stephen Hemminger > Cc: Wei Liu > Cc: Lorenzo Pieralisi > Cc: Rob Herring > Cc: Bjorn Helgaas > Cc: linux-hyp...@vger.kernel.org > Cc: linux-...@vger.kernel.org Acked-b

Re: [PATCH v1 3/7] PCI: New Primary to Sideband (P2SB) bridge support library

2021-03-08 Thread Bjorn Helgaas
On Mon, Mar 08, 2021 at 09:16:50PM +0200, Andy Shevchenko wrote: > On Mon, Mar 08, 2021 at 12:52:12PM -0600, Bjorn Helgaas wrote: > > On Mon, Mar 08, 2021 at 02:20:16PM +0200, Andy Shevchenko wrote: > > > From: Jonathan Yong > > > > > > There is already one

Re: [PATCH v4 2/2] nPCI: brcmstb: Use reset/rearm instead of deassert/assert

2021-03-08 Thread Bjorn Helgaas
If you update this, please fix the s/nPCI: /PCI: / in the subject On Mon, Mar 08, 2021 at 02:50:37PM -0500, Jim Quinlan wrote: > The Brcmstb PCIe RC uses a reset control "rescal" for certain chips. This > reset implements a "pulse reset" so it matches more the reset/rearm > calls instead of the

Re: [PATCH v1 3/7] PCI: New Primary to Sideband (P2SB) bridge support library

2021-03-08 Thread Bjorn Helgaas
On Mon, Mar 08, 2021 at 02:20:16PM +0200, Andy Shevchenko wrote: > From: Jonathan Yong > > There is already one and at least one more user is coming which > requires an access to Primary to Sideband bridge (P2SB) in order to > get IO or MMIO bar hidden by BIOS. Create a library to access P2SB >

Re: [PATCH V3 2/2] PCI: Add MCFG quirks for Tegra194 host controllers

2021-03-05 Thread Bjorn Helgaas
[+cc Krzysztof for .bus_shift below] This is [2/2] but I don't see a [1/2]. Is there something missing? On Sat, Jan 11, 2020 at 12:45:00AM +0530, Vidya Sagar wrote: > The PCIe controller in Tegra194 SoC is not completely ECAM-compliant. > With the current hardware design limitations in place,

Re: [PATCH] PCI: tegra: Disable PTM capabilities for EP mode

2021-03-05 Thread Bjorn Helgaas
On Fri, Mar 05, 2021 at 01:42:34PM +0530, Om Prakash Singh wrote: > PCIe EP compliance expect PTM capabilities (ROOT_CAPABLE, RES_CAPABLE, > CLK_GRAN) to be disabled. I guess this is just enforcing the PCIe spec requirements that only Root Ports, RCRBs, and Switches are allowed to set the PTM

Re: [PATCH 3/3] PCI: Convert rtw88 power cycle quirk to shutdown quirk

2021-03-04 Thread Bjorn Helgaas
[+cc Rafael, linux-pm] On Thu, Mar 04, 2021 at 02:07:18PM +0800, Kai-Heng Feng wrote: > On Sat, Feb 27, 2021 at 2:17 AM Bjorn Helgaas wrote: > > On Fri, Feb 26, 2021 at 02:31:31PM +0100, Heiner Kallweit wrote: > > > On 26.02.2021 13:18, Kai-Heng Feng wrote: > > > >

Re: [RFC PATCH 5/6] PCI: designware: Add SiFive FU740 PCIe host controller driver

2021-03-04 Thread Bjorn Helgaas
Make the subject like this: PCI: fu740: Add SiFive FU740 PCIe host controller driver since you're adding a "fu740" driver, not a "designware" driver. Future commits will then look like: PCI: fu740: ... On Tue, Mar 02, 2021 at 06:59:16PM +0800, Greentime Hu wrote: > From: Paul Walmsley >

Re: RFC: sysfs node for Secondary PCI bus reset (PCIe Hot Reset)

2021-03-01 Thread Bjorn Helgaas
[+cc Alex, reset expert] On Mon, Mar 01, 2021 at 06:12:21PM +0100, Pali Rohár wrote: > Hello! > > PCIe card can be reset via in-band Hot Reset signal which can be > triggered by PCIe bridge via Secondary Bus Reset bit in PCI config > space. > > Kernel already exports sysfs node "reset" for

Re: [PATCH 3/3] PCI: Convert rtw88 power cycle quirk to shutdown quirk

2021-02-26 Thread Bjorn Helgaas
On Fri, Feb 26, 2021 at 02:31:31PM +0100, Heiner Kallweit wrote: > On 26.02.2021 13:18, Kai-Heng Feng wrote: > > On Fri, Feb 26, 2021 at 8:10 PM Heiner Kallweit > > wrote: > >> > >> On 26.02.2021 08:12, Kalle Valo wrote: > >>> Kai-Heng Feng writes: > >>> > Now we have a generic D3 shutdown

Re: [PATCH 1/2] PCI: controller: thunder: fix compile testing

2021-02-25 Thread Bjorn Helgaas
On Thu, Feb 25, 2021 at 09:44:12AM -0800, Kuppuswamy, Sathyanarayanan wrote: > On 2/25/21 6:37 AM, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > Compile-testing these drivers is currently broken. Enabling > > it causes a couple of build failures though: > > > >

[GIT PULL v2] PCI changes for v5.12

2021-02-25 Thread Bjorn Helgaas
@bjorn-Precision-5520 Enumeration: - Remove unnecessary locking around _OSC (Bjorn Helgaas) - Clarify message about _OSC failure (Bjorn Helgaas) - Remove notification of PCIe bandwidth changes (Bjorn Helgaas) - Tidy checking

Re: [GIT PULL] PCI changes for v5.12

2021-02-24 Thread Bjorn Helgaas
On Wed, Feb 24, 2021 at 11:21:44AM -0800, Linus Torvalds wrote: > On Wed, Feb 24, 2021 at 11:03 AM Bjorn Helgaas wrote: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git > > tags/pci-v5.12-changes > > I pulled this, but I'm now unpulling

Re: linux-next: Signed-off-by missing for commit in the pci tree

2021-02-24 Thread Bjorn Helgaas
On Thu, Feb 25, 2021 at 07:21:31AM +1100, Stephen Rothwell wrote: > Hi all, > > Commits > > 557fb5faf4ca ("PCI: qcom: Add support for ddrss_sf_tbu clock") > 3d0e5cf9c062 ("dt-bindings: PCI: qcom: Document ddrss_sf_tbu clock for > sm8250") > > are missing a Signed-off-by from their

[GIT PULL] PCI changes for v5.12

2021-02-24 Thread Bjorn Helgaas
to 2bd36c391515cba855b8db8ae5708154f1082b8e: Merge branch 'remotes/lorenzo/pci/misc' (2021-02-24 11:17:05 -0600) Enumeration: - Remove unnecessary locking around _OSC (Bjorn Helgaas) - Clarify message about _OSC failure (Bjorn Helgaas

Re: [PATCH] PCI: hotplug: Remove unused function pointer typedef acpiphp_callback

2021-02-18 Thread Bjorn Helgaas
On Tue, Feb 16, 2021 at 10:38:40AM +0800, Chen Lin wrote: > From: Chen Lin > > Remove the 'acpiphp_callback' typedef as it is not used. > > Signed-off-by: Chen Lin Applied to pci/hotplug for v5.12, thanks! > --- > drivers/pci/hotplug/acpiphp.h |3 --- > 1 file changed, 3 deletions(-) >

Re: [PATCH v7 04/15] PCI: Add pci_find_vsec_capability() to find a specific VSEC

2021-02-18 Thread Bjorn Helgaas
d by the vendor which aren't standard > or shared between vendors. > > Signed-off-by: Gustavo Pimentel Beautiful, thanks! Acked-by: Bjorn Helgaas > --- > drivers/pci/pci.c | 30 ++ > include/linux/pci.h | 1 + > 2 files changed, 31 inserti

Re: [v4] PCI: Avoid unsync of LTR mechanism configuration

2021-02-18 Thread Bjorn Helgaas
On Thu, Feb 04, 2021 at 05:51:25PM +0800, mingchuang.q...@mediatek.com wrote: > From: Mingchuang Qiao > > In bus scan flow, the "LTR Mechanism Enable" bit of DEVCTL2 register is > configured in pci_configure_ltr(). If device and bridge both support LTR > mechanism, the "LTR Mechanism Enable" bit

Re: [PATCH] PCI: Fix memory leak in pci_register_io_range()

2021-02-17 Thread Bjorn Helgaas
On Tue, Feb 02, 2021 at 11:03:32AM +0100, Geert Uytterhoeven wrote: > Kmemleak reports: > > unreferenced object 0xc328de40 (size 64): > comm "kworker/1:1", pid 21, jiffies 4294938212 (age 1484.670s) > hex dump (first 32 bytes): > 00 00 00 00 00 00 00 00 e0 d8 fc eb 00 00

Re: [PATCH v6 04/15] PCI: Add pci_find_vsec_capability() to find a specific VSEC

2021-02-17 Thread Bjorn Helgaas
[+cc Krzysztof, since he commented on a previous version] [+cc Lukas, who previously proposed exactly what I suggest below, sorry for repeating. I think Lukas was right to propose passing in the vendor ID because it makes it easier to read the caller.] When you post new versions of a series,

Re: [PATCH] PCI: quirk for preventing bus reset on TI C667X

2021-02-17 Thread Bjorn Helgaas
On Thu, Jan 21, 2021 at 05:55:47PM -0600, Bjorn Helgaas wrote: > On Tue, Jan 12, 2021 at 03:36:43PM +, Antti Järvinen wrote: > > TI C667X does not support bus/hot reset. > > See https://e2e.ti.com/support/processors/f/791/t/954382 > > You can cite the URL as th

Re: [PATCH] PCI : check if type 0 devices have all BARs of size zero

2021-02-16 Thread Bjorn Helgaas
On Tue, Feb 16, 2021 at 07:52:08AM +, Wasim Khan wrote: > > -Original Message- > > From: Bjorn Helgaas > > Sent: Tuesday, February 16, 2021 2:43 AM > > To: Wasim Khan (OSS) > > Cc: bhelg...@google.com; linux-...@vger.kernel.org; linux- > >

Re: [PATCH] PCI : check if type 0 devices have all BARs of size zero

2021-02-15 Thread Bjorn Helgaas
On Fri, Feb 12, 2021 at 11:08:56AM +0100, Wasim Khan wrote: > From: Wasim Khan > > Log a message if all BARs of type 0 devices are of > size zero. This can help detecting type 0 devices > not reporting BAR size correctly. I could be missing something, but I don't think we can do this. I would

Re: [PATCH] PCI: Run platform power transition on initial D0 entry

2021-02-10 Thread Bjorn Helgaas
[+cc Rafael, linux-pm] On Thu, Feb 04, 2021 at 11:06:40PM +0100, Maximilian Luz wrote: > On some devices and platforms, the initial platform power state is not > in sync with the power state of the PCI device. > > pci_enable_device_flags() updates the state of a PCI device by reading > from the

Re: [PATCH 2/2] PCI: Revoke mappings like devmem

2021-02-10 Thread Bjorn Helgaas
/Both approaches/ s/pfn/PFN/ s/pte/PTE/ > The only difference in access checks left is that sysfs PCI mmap does > not check for CAP_RAWIO. I'm not really sure whether that should be > added or not. > > Acked-by: Bjorn Helgaas > Reviewed-by: Dan Williams > Signed-off-by: Danie

Re: [PATCH] PCI: Also set up legacy files only after sysfs init

2021-02-10 Thread Bjorn Helgaas
; > v2: Improve commit message (Bjorn) > > Signed-off-by: Daniel Vetter Acked-by: Bjorn Helgaas I wish we weren't extending a known-racy mechanism to do this, but at least we're not *adding* a brand new race. > Cc: Stephen Rothwell > Cc: Jason Gunthorpe > Cc: Kees Cook >

Re: [PATCH] checkpatch: add warning for non-lore mailing list URLs

2021-02-10 Thread Bjorn Helgaas
On Wed, Feb 10, 2021 at 12:22:35AM -0800, Kees Cook wrote: > On Thu, Dec 17, 2020 at 04:50:41PM -0800, Joe Perches wrote: > > On Thu, 2020-12-17 at 17:56 -0600, Bjorn Helgaas wrote: > > > From: Bjorn Helgaas > > > > > > The lkml.org, marc.info, spinics.net,

Re: [PATCH] PCI: Use subdir-ccflags-* to inherit debug flag

2021-02-09 Thread Bjorn Helgaas
vers/pci/. Add -DDEBUG to CFLAGS for all files below drivers/pci/ so CONFIG_PCI_DEBUG applies to the entire hierarchy. [bhelgaas: commit log] Link: https://lore.kernel.org/r/1612438215-33105-1-git-send-email-yangyic...@hisilicon.com Signed-off-by: Junhao He S

Re: [PATCHv2] PCI: Add Silicom Denmark vendor ID

2021-02-09 Thread Bjorn Helgaas
On Mon, Feb 08, 2021 at 04:01:57PM +0100, Martin Hundebøll wrote: > Update pci_ids.h with the vendor ID for Silicom Denmark. The define is > going to be referenced in driver(s) for FPGA accelerated smart NICs. > > Signed-off-by: Martin Hundebøll Applied to pci/misc for v5.12 with reviewed-by

Re: [RESEND v4 1/6] misc: Add Synopsys DesignWare xData IP driver

2021-02-09 Thread Bjorn Helgaas
On Tue, Feb 09, 2021 at 03:28:16PM +, Gustavo Pimentel wrote: > On Mon, Feb 8, 2021 at 22:53:54, Krzysztof Wilczyński > wrote: > > [...] > > > Thanks for your review. I will wait for a couple of days, before sending > > > a new version of this patch series based on your feedback. > > > >

Re: [PATCH v4 15/15] dmaengine: dw-edma: Add pcim_iomap_table return checker

2021-02-08 Thread Bjorn Helgaas
[+cc Krzysztof] >From reading the subject, I thought you were adding a function to check the return values, i.e., a "checker." But you're really adding "checks" :) On Wed, Feb 03, 2021 at 10:58:06PM +0100, Gustavo Pimentel wrote: > Detected by CoverityScan CID 16555 ("Dereference null return")

Re: [PATCH 2/4] hwmon: Use subdir-ccflags-* to inherit debug flag

2021-02-05 Thread Bjorn Helgaas
ctories. > > > > Suggested-by: Bjorn Helgaas > > Signed-off-by: Junhao He > > Signed-off-by: Yicong Yang > > What problem does this fix ? Maybe I am missing it, but I don't see > DEBUG being used in a subdirectory of drivers/hwmon. It's my fault for raising th

Re: [PATCH 1/2] PCI/AER: Disable AER interrupt during suspend

2021-02-04 Thread Bjorn Helgaas
[+cc Alex] On Thu, Jan 28, 2021 at 12:09:37PM +0800, Kai-Heng Feng wrote: > On Thu, Jan 28, 2021 at 4:51 AM Bjorn Helgaas wrote: > > On Thu, Jan 28, 2021 at 01:31:00AM +0800, Kai-Heng Feng wrote: > > > Commit 50310600ebda ("iommu/vt-d: Enable PCI ACS for platform opt in &

[GIT PULL] PCI fixes for v5.11

2021-02-04 Thread Bjorn Helgaas
to 40fb68c7725aee024ed99ad38504f5d25820c6f0: Revert "PCI/ASPM: Save/restore L1SS Capability for suspend/resume" (2021-01-27 10:12:43 -0600) PCI fixes: - Revert ASPM suspend/resume fix that regressed NVMe devices (Bjorn

Re: [PATCH 1/2] PCI: also set up legacy files only after sysfs init

2021-02-04 Thread Bjorn Helgaas
me Glisse > Cc: Jan Kara > Cc: Dan Williams > Cc: Greg Kroah-Hartman > Cc: linux...@kvack.org > Cc: linux-arm-ker...@lists.infradead.org > Cc: linux-samsung-...@vger.kernel.org > Cc: linux-me...@vger.kernel.org > Cc: Bjorn Helgaas > Cc: linux-...@vger.kernel.org > --

  1   2   3   4   5   6   7   8   9   10   >