[PATCH 5.10 562/717] ASoC: AMD Raven/Renoir - fix the PCI probe (PCI revision)

2020-12-28 Thread Greg Kroah-Hartman
From: Jaroslav Kysela commit 55d8e6a85bce21f748c42eedea63681219f70523 upstream. The Raven and Renoir ACP can be distinguished by the PCI revision. Let's do the check very early, otherwise the wrong probe code can be run. Link:

Re: [PATCH net 1/1] stmmac: intel: Fix kernel panic on pci probe

2020-10-30 Thread Jakub Kicinski
On Thu, 29 Oct 2020 17:32:28 +0800 Wong Vee Khee wrote: > The commit "stmmac: intel: Adding ref clock 1us tic for LPI cntr" > introduced a regression which leads to the kernel panic duing loading > of the dwmac_intel module. > > Move the code block after pci resources is obtained. > > Fixes:

[PATCH net 1/1] stmmac: intel: Fix kernel panic on pci probe

2020-10-29 Thread Wong Vee Khee
The commit "stmmac: intel: Adding ref clock 1us tic for LPI cntr" introduced a regression which leads to the kernel panic duing loading of the dwmac_intel module. Move the code block after pci resources is obtained. Fixes: b4c5f83ae3f3 ("stmmac: intel: Adding ref clock 1us tic for LPI cntr") Cc:

[PATCH 4.19 08/92] PCI: Probe bridge window attributes once at enumeration-time

2020-08-20 Thread Greg Kroah-Hartman
From: Bjorn Helgaas commit 51c48b310183ab6ba5419edfc6a8de889cc04521 upstream. pci_bridge_check_ranges() determines whether a bridge supports the optional I/O and prefetchable memory windows and sets the flag bits in the bridge resources. This *could* be done once during enumeration except that

Re: [PATCH] PCI: Probe bridge window attributes once at enumeration-time

2019-02-10 Thread Michael S. Tsirkin
On Mon, Feb 11, 2019 at 01:57:20AM +, Xuyandong (Yandong Xu, Euler5) wrote: > > On Tue, Jan 29, 2019 at 05:02:26PM -0600, Bjorn Helgaas wrote: > > > On Tue, Jan 29, 2019 at 05:47:32PM -0500, Michael S. Tsirkin wrote: > > > > On Tue, Jan 29, 2019 at 04:43:33PM -0600, Bjorn Helgaas wrote: > > >

RE: [PATCH] PCI: Probe bridge window attributes once at enumeration-time

2019-02-10 Thread Xuyandong (Yandong Xu, Euler5)
> On Tue, Jan 29, 2019 at 05:02:26PM -0600, Bjorn Helgaas wrote: > > On Tue, Jan 29, 2019 at 05:47:32PM -0500, Michael S. Tsirkin wrote: > > > On Tue, Jan 29, 2019 at 04:43:33PM -0600, Bjorn Helgaas wrote: > > > > On Tue, Jan 22, 2019 at 01:02:54PM -0600, Bjorn Helgaas wrote: > > > > > From: Bjorn

Re: [PATCH] PCI: Probe bridge window attributes once at enumeration-time

2019-02-05 Thread Michael S. Tsirkin
On Tue, Jan 29, 2019 at 05:02:26PM -0600, Bjorn Helgaas wrote: > On Tue, Jan 29, 2019 at 05:47:32PM -0500, Michael S. Tsirkin wrote: > > On Tue, Jan 29, 2019 at 04:43:33PM -0600, Bjorn Helgaas wrote: > > > On Tue, Jan 22, 2019 at 01:02:54PM -0600, Bjorn Helgaas wrote: > > > > From: Bjorn Helgaas

Re: [PATCH] PCI: Probe bridge window attributes once at enumeration-time

2019-01-29 Thread Bjorn Helgaas
On Tue, Jan 29, 2019 at 05:47:32PM -0500, Michael S. Tsirkin wrote: > On Tue, Jan 29, 2019 at 04:43:33PM -0600, Bjorn Helgaas wrote: > > On Tue, Jan 22, 2019 at 01:02:54PM -0600, Bjorn Helgaas wrote: > > > From: Bjorn Helgaas > > > > > > pci_bridge_check_ranges() determines whether a bridge

Re: [PATCH] PCI: Probe bridge window attributes once at enumeration-time

2019-01-29 Thread Michael S. Tsirkin
On Tue, Jan 29, 2019 at 04:43:33PM -0600, Bjorn Helgaas wrote: > On Tue, Jan 22, 2019 at 01:02:54PM -0600, Bjorn Helgaas wrote: > > From: Bjorn Helgaas > > > > pci_bridge_check_ranges() determines whether a bridge supports the optional > > I/O and prefetchable memory windows and sets the flag

Re: [PATCH] PCI: Probe bridge window attributes once at enumeration-time

2019-01-29 Thread Bjorn Helgaas
On Tue, Jan 22, 2019 at 01:02:54PM -0600, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > pci_bridge_check_ranges() determines whether a bridge supports the optional > I/O and prefetchable memory windows and sets the flag bits in the bridge > resources. This *could* be done once during

[PATCH] PCI: Probe bridge window attributes once at enumeration-time

2019-01-22 Thread Bjorn Helgaas
From: Bjorn Helgaas pci_bridge_check_ranges() determines whether a bridge supports the optional I/O and prefetchable memory windows and sets the flag bits in the bridge resources. This *could* be done once during enumeration except that the resource allocation code completely clears the flag

[PATCH 4.14 31/45] ath10k: fix kernel panic issue during pci probe

2018-10-11 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Yu Wang commit 50e79e25250bf928369996277e85b00536b380c7 upstream. If device gone during chip reset, ar->normal_mode_fw.board is not initialized, but ath10k_debug_print_hwfw_info() will try to

[PATCH 4.14 31/45] ath10k: fix kernel panic issue during pci probe

2018-10-11 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Yu Wang commit 50e79e25250bf928369996277e85b00536b380c7 upstream. If device gone during chip reset, ar->normal_mode_fw.board is not initialized, but ath10k_debug_print_hwfw_info() will try to

[PATCH 4.9 20/35] ath10k: fix kernel panic issue during pci probe

2018-10-11 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Yu Wang commit 50e79e25250bf928369996277e85b00536b380c7 upstream. If device gone during chip reset, ar->normal_mode_fw.board is not initialized, but ath10k_debug_print_hwfw_info() will try to

[PATCH 4.9 20/35] ath10k: fix kernel panic issue during pci probe

2018-10-11 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Yu Wang commit 50e79e25250bf928369996277e85b00536b380c7 upstream. If device gone during chip reset, ar->normal_mode_fw.board is not initialized, but ath10k_debug_print_hwfw_info() will try to

Re: [PATCH] drivers/pci/probe: Move variable bridge inside ifdef

2018-07-23 Thread Bjorn Helgaas
On Sat, Jul 21, 2018 at 11:45:56PM +0200, Anders Roxell wrote: > When CONFIG_PCI_QUIRKS isn't enabled we get the warning below: > drivers/pci/probe.c: In function ‘pci_bus_read_dev_vendor_id’: > drivers/pci/probe.c:2221:18: warning: unused variable ‘bridge’ > [-Wunused-variable] > struct

Re: [PATCH] drivers/pci/probe: Move variable bridge inside ifdef

2018-07-23 Thread Bjorn Helgaas
On Sat, Jul 21, 2018 at 11:45:56PM +0200, Anders Roxell wrote: > When CONFIG_PCI_QUIRKS isn't enabled we get the warning below: > drivers/pci/probe.c: In function ‘pci_bus_read_dev_vendor_id’: > drivers/pci/probe.c:2221:18: warning: unused variable ‘bridge’ > [-Wunused-variable] > struct

[PATCH] drivers/pci/probe: Move variable bridge inside ifdef

2018-07-21 Thread Anders Roxell
When CONFIG_PCI_QUIRKS isn't enabled we get the warning below: drivers/pci/probe.c: In function ‘pci_bus_read_dev_vendor_id’: drivers/pci/probe.c:2221:18: warning: unused variable ‘bridge’ [-Wunused-variable] struct pci_dev *bridge = bus->self; ^~ Move the declaration of

[PATCH] drivers/pci/probe: Move variable bridge inside ifdef

2018-07-21 Thread Anders Roxell
When CONFIG_PCI_QUIRKS isn't enabled we get the warning below: drivers/pci/probe.c: In function ‘pci_bus_read_dev_vendor_id’: drivers/pci/probe.c:2221:18: warning: unused variable ‘bridge’ [-Wunused-variable] struct pci_dev *bridge = bus->self; ^~ Move the declaration of

Re: [PATCH v1 0/2] PCI: Probe for reset support earlier

2018-02-19 Thread Bjorn Helgaas
t; interfere with the driver by touching the device on its own. > > These patches move the probe to be earlier, during enumeration, before a > driver has a chance to claim the device. > > --- > > Bjorn Helgaas (2): > PCI: Probe for device reset support before driver claim

Re: [PATCH v1 0/2] PCI: Probe for reset support earlier

2018-02-19 Thread Bjorn Helgaas
t; interfere with the driver by touching the device on its own. > > These patches move the probe to be earlier, during enumeration, before a > driver has a chance to claim the device. > > --- > > Bjorn Helgaas (2): > PCI: Probe for device reset support before driver claim

Re: [PATCH v1 1/2] PCI: Probe for device reset support before driver claim

2018-02-19 Thread Rafael J. Wysocki
On Friday, February 16, 2018 11:50:11 PM CET Bjorn Helgaas wrote: > From: Bjorn Helgaas > > Previously we called pci_probe_reset_function() in this path: > > pci_sysfs_init # late_initcall > for_each_pci_dev(dev) >

Re: [PATCH v1 1/2] PCI: Probe for device reset support before driver claim

2018-02-19 Thread Rafael J. Wysocki
On Friday, February 16, 2018 11:50:11 PM CET Bjorn Helgaas wrote: > From: Bjorn Helgaas > > Previously we called pci_probe_reset_function() in this path: > > pci_sysfs_init # late_initcall > for_each_pci_dev(dev) > pci_create_sysfs_dev_files(dev) >

[PATCH v1 1/2] PCI: Probe for device reset support before driver claim

2018-02-16 Thread Bjorn Helgaas
From: Bjorn Helgaas Previously we called pci_probe_reset_function() in this path: pci_sysfs_init # late_initcall for_each_pci_dev(dev) pci_create_sysfs_dev_files(dev) pci_create_capabilities_sysfs(dev)

[PATCH v1 1/2] PCI: Probe for device reset support before driver claim

2018-02-16 Thread Bjorn Helgaas
From: Bjorn Helgaas Previously we called pci_probe_reset_function() in this path: pci_sysfs_init # late_initcall for_each_pci_dev(dev) pci_create_sysfs_dev_files(dev) pci_create_capabilities_sysfs(dev) pci_probe_reset_function

[PATCH v1 0/2] PCI: Probe for reset support earlier

2018-02-16 Thread Bjorn Helgaas
the probe to be earlier, during enumeration, before a driver has a chance to claim the device. --- Bjorn Helgaas (2): PCI: Probe for device reset support before driver claim PCI: Remove redundant probes for device reset support drivers/pci/pci-sysfs.c |3 +-- drivers/pci/pci.c

[PATCH v1 0/2] PCI: Probe for reset support earlier

2018-02-16 Thread Bjorn Helgaas
the probe to be earlier, during enumeration, before a driver has a chance to claim the device. --- Bjorn Helgaas (2): PCI: Probe for device reset support before driver claim PCI: Remove redundant probes for device reset support drivers/pci/pci-sysfs.c |3 +-- drivers/pci/pci.c

Re: [PATCH v4 0/4] PCI: arm64/powerpc: Fix parsing of linux,pci-probe-only

2015-09-17 Thread Bjorn Helgaas
On Thu, Sep 17, 2015 at 12:17 PM, Marc Zyngier wrote: > On 17/09/15 16:30, Bjorn Helgaas wrote: >> On Fri, Sep 04, 2015 at 05:50:07PM +0100, Marc Zyngier wrote: >>> The pci-host-generic driver parses the linux,pci-probe-only property, >>> and assumes that it wi

Re: [PATCH v4 0/4] PCI: arm64/powerpc: Fix parsing of linux,pci-probe-only

2015-09-17 Thread Marc Zyngier
On 17/09/15 16:30, Bjorn Helgaas wrote: > On Fri, Sep 04, 2015 at 05:50:07PM +0100, Marc Zyngier wrote: >> The pci-host-generic driver parses the linux,pci-probe-only property, >> and assumes that it will have a boolean parameter. >> >> Turns out that the Seattle DTS

Re: [PATCH v4 0/4] PCI: arm64/powerpc: Fix parsing of linux,pci-probe-only

2015-09-17 Thread Bjorn Helgaas
On Fri, Sep 04, 2015 at 05:50:07PM +0100, Marc Zyngier wrote: > The pci-host-generic driver parses the linux,pci-probe-only property, > and assumes that it will have a boolean parameter. > > Turns out that the Seattle DTS file has a naked "linux,pci-probe-only" &

Re: [PATCH v4 0/4] PCI: arm64/powerpc: Fix parsing of linux,pci-probe-only

2015-09-17 Thread Bjorn Helgaas
On Fri, Sep 04, 2015 at 05:50:07PM +0100, Marc Zyngier wrote: > The pci-host-generic driver parses the linux,pci-probe-only property, > and assumes that it will have a boolean parameter. > > Turns out that the Seattle DTS file has a naked "linux,pci-probe-only" &

Re: [PATCH v4 0/4] PCI: arm64/powerpc: Fix parsing of linux,pci-probe-only

2015-09-17 Thread Bjorn Helgaas
On Thu, Sep 17, 2015 at 12:17 PM, Marc Zyngier <marc.zyng...@arm.com> wrote: > On 17/09/15 16:30, Bjorn Helgaas wrote: >> On Fri, Sep 04, 2015 at 05:50:07PM +0100, Marc Zyngier wrote: >>> The pci-host-generic driver parses the linux,pci-probe-only property, >>&

Re: [PATCH v4 0/4] PCI: arm64/powerpc: Fix parsing of linux,pci-probe-only

2015-09-17 Thread Marc Zyngier
On 17/09/15 16:30, Bjorn Helgaas wrote: > On Fri, Sep 04, 2015 at 05:50:07PM +0100, Marc Zyngier wrote: >> The pci-host-generic driver parses the linux,pci-probe-only property, >> and assumes that it will have a boolean parameter. >> >> Turns out that the Seattle DTS

Re: [PATCH v4 2/4] PCI: pci-host-generic: Fix lookup of linux,pci-probe-only property

2015-09-07 Thread Will Deacon
>dev; > struct device_node *np = dev->of_node; > struct gen_pci *pci = devm_kzalloc(dev, sizeof(*pci), GFP_KERNEL); > @@ -225,13 +224,7 @@ static int gen_pci_probe(struct platform_device *pdev) > return -EINVAL; > } > > - pr

Re: [PATCH v4 3/4] powerpc: PCI: Fix lookup of linux,pci-probe-only property

2015-09-07 Thread Michael Ellerman
On Fri, 2015-09-04 at 17:50 +0100, Marc Zyngier wrote: > When find_and_init_phbs() looks for the probe-only property, it seems > to trust the firmware to be correctly written, and assumes that there > is a parameter to the property. > > It is conceivable that the firmware could not be that

Re: [PATCH v4 3/4] powerpc: PCI: Fix lookup of linux,pci-probe-only property

2015-09-07 Thread Michael Ellerman
On Fri, 2015-09-04 at 17:50 +0100, Marc Zyngier wrote: > When find_and_init_phbs() looks for the probe-only property, it seems > to trust the firmware to be correctly written, and assumes that there > is a parameter to the property. > > It is conceivable that the firmware could not be that

Re: [PATCH v4 2/4] PCI: pci-host-generic: Fix lookup of linux,pci-probe-only property

2015-09-07 Thread Will Deacon
truct device *dev = >dev; > struct device_node *np = dev->of_node; > struct gen_pci *pci = devm_kzalloc(dev, sizeof(*pci), GFP_KERNEL); > @@ -225,13 +224,7 @@ static int gen_pci_probe(struct platform_device *pdev) > return -EINVAL

Re: [PATCH v4 1/4] of/pci: Add of_pci_check_probe_only to parse "linux,pci-probe-only"

2015-09-04 Thread Rob Herring
On Fri, Sep 4, 2015 at 11:50 AM, Marc Zyngier wrote: > Both pci-host-generic and Pseries parse the "linux,pci-probe-only" > property to engage the PCI_PROBE_ONLY mode, and both have a subtle > bug that can be triggered if the property has no parameter. > > Provide a gen

Re: [PATCH v4 0/4] PCI: arm64/powerpc: Fix parsing of linux,pci-probe-only

2015-09-04 Thread Rob Herring
On Fri, Sep 4, 2015 at 11:50 AM, Marc Zyngier wrote: > The pci-host-generic driver parses the linux,pci-probe-only property, > and assumes that it will have a boolean parameter. > > Turns out that the Seattle DTS file has a naked "linux,pci-probe-only" > property,

[PATCH v4 1/4] of/pci: Add of_pci_check_probe_only to parse "linux,pci-probe-only"

2015-09-04 Thread Marc Zyngier
Both pci-host-generic and Pseries parse the "linux,pci-probe-only" property to engage the PCI_PROBE_ONLY mode, and both have a subtle bug that can be triggered if the property has no parameter. Provide a generic, safe implementation that can be used by both. Signed-off-by: Ma

[PATCH v4 2/4] PCI: pci-host-generic: Fix lookup of linux,pci-probe-only property

2015-09-04 Thread Marc Zyngier
struct platform_device *pdev) return -EINVAL; } - prop = of_get_property(of_chosen, "linux,pci-probe-only", NULL); - if (prop) { - if (*prop) - pci_add_flags(PCI_PROBE_ONLY); - else -

[PATCH v4 3/4] powerpc: PCI: Fix lookup of linux,pci-probe-only property

2015-09-04 Thread Marc Zyngier
be set via properties * in chosen. */ - if (of_chosen) { - const int *prop; - - prop = of_get_property(of_chosen, - "linux,pci-probe-only", NULL); - if (prop) { -

[PATCH v4 4/4] arm64: dts: Drop linux,pci-probe-only from the Seattle DTS

2015-09-04 Thread Marc Zyngier
The linux,pci-probe-only property mandates an argument to indicate whether or not to engage the "probe-only" mode, but the Seattle DTS just provides a naked property, which is illegal. Also, it turns out that the board is perfectly happy without probe-only, so let's drop this altogeth

[PATCH v4 0/4] PCI: arm64/powerpc: Fix parsing of linux,pci-probe-only

2015-09-04 Thread Marc Zyngier
The pci-host-generic driver parses the linux,pci-probe-only property, and assumes that it will have a boolean parameter. Turns out that the Seattle DTS file has a naked "linux,pci-probe-only" property, which leads to the driver dereferencing some unsuspecting memory location. Nothing

[PATCH v4 1/4] of/pci: Add of_pci_check_probe_only to parse "linux,pci-probe-only"

2015-09-04 Thread Marc Zyngier
Both pci-host-generic and Pseries parse the "linux,pci-probe-only" property to engage the PCI_PROBE_ONLY mode, and both have a subtle bug that can be triggered if the property has no parameter. Provide a generic, safe implementation that can be used by both. Signed-off-by: Ma

[PATCH v4 3/4] powerpc: PCI: Fix lookup of linux,pci-probe-only property

2015-09-04 Thread Marc Zyngier
E_ONLY and PCI_REASSIGN_ALL_BUS can be set via properties * in chosen. */ - if (of_chosen) { - const int *prop; - - prop = of_get_property(of_chosen, - "linux,pci-probe-only", NULL); -

[PATCH v4 2/4] PCI: pci-host-generic: Fix lookup of linux,pci-probe-only property

2015-09-04 Thread Marc Zyngier
en_pci_probe(struct platform_device *pdev) return -EINVAL; } - prop = of_get_property(of_chosen, "linux,pci-probe-only", NULL); - if (prop) { - if (*prop) - pci_add_flags(PCI_PROBE_ONLY)

[PATCH v4 0/4] PCI: arm64/powerpc: Fix parsing of linux,pci-probe-only

2015-09-04 Thread Marc Zyngier
The pci-host-generic driver parses the linux,pci-probe-only property, and assumes that it will have a boolean parameter. Turns out that the Seattle DTS file has a naked "linux,pci-probe-only" property, which leads to the driver dereferencing some unsuspecting memory location. Nothing

[PATCH v4 4/4] arm64: dts: Drop linux,pci-probe-only from the Seattle DTS

2015-09-04 Thread Marc Zyngier
The linux,pci-probe-only property mandates an argument to indicate whether or not to engage the "probe-only" mode, but the Seattle DTS just provides a naked property, which is illegal. Also, it turns out that the board is perfectly happy without probe-only, so let's drop this altogeth

Re: [PATCH v4 0/4] PCI: arm64/powerpc: Fix parsing of linux,pci-probe-only

2015-09-04 Thread Rob Herring
On Fri, Sep 4, 2015 at 11:50 AM, Marc Zyngier <marc.zyng...@arm.com> wrote: > The pci-host-generic driver parses the linux,pci-probe-only property, > and assumes that it will have a boolean parameter. > > Turns out that the Seattle DTS file has a naked "linux,pci-probe-

Re: [PATCH v4 1/4] of/pci: Add of_pci_check_probe_only to parse "linux,pci-probe-only"

2015-09-04 Thread Rob Herring
On Fri, Sep 4, 2015 at 11:50 AM, Marc Zyngier <marc.zyng...@arm.com> wrote: > Both pci-host-generic and Pseries parse the "linux,pci-probe-only" > property to engage the PCI_PROBE_ONLY mode, and both have a subtle > bug that can be triggered if the property has no paramet

Re: [PATCH v3 4/4] arm64: dts: Drop linux,pci-probe-only from the Seattle DTS

2015-09-03 Thread Suthikulpanit, Suravee
Hi Marc On 9/3/2015 7:16 PM, Marc Zyngier wrote: The linux,pci-probe-only property mandates an argument to indicate whether or not to engage the "probe-only" mode, but the Seattle DTS just provides a naked property, which is illegal. Also, it turns out that the board is perfectly hap

Re: [PATCH v3 1/4] of/pci: Add of_pci_check_probe_only to parse "linux,pci-probe-only"

2015-09-03 Thread Rob Herring
On Thu, Sep 3, 2015 at 7:16 AM, Marc Zyngier wrote: > Both pci-host-generic and Pseries parse the "linux,pci-probe-only" > property to engage the PCI_PROBE_ONLY mode, and both have a subtle > bug that can be triggered if the property has no parameter. > > Provide a gen

[PATCH v3 0/4] PCI: arm64/powerpc: Fix parsing of linux,pci-probe-only

2015-09-03 Thread Marc Zyngier
The pci-host-generic driver parses the linux,pci-probe-only property, and assumes that it will have a boolean parameter. Turns out that the Seattle DTS file has a naked "linux,pci-probe-only" property, which leads to the driver dereferencing some unsuspecting memory location. Nothing

[PATCH v3 4/4] arm64: dts: Drop linux,pci-probe-only from the Seattle DTS

2015-09-03 Thread Marc Zyngier
The linux,pci-probe-only property mandates an argument to indicate whether or not to engage the "probe-only" mode, but the Seattle DTS just provides a naked property, which is illegal. Also, it turns out that the board is perfectly happy without probe-only, so let's drop this altogethe

[PATCH v3 2/4] PCI: pci-host-generic: Fix lookup of linux,pci-probe-only property

2015-09-03 Thread Marc Zyngier
struct platform_device *pdev) return -EINVAL; } - prop = of_get_property(of_chosen, "linux,pci-probe-only", NULL); - if (prop) { - if (*prop) - pci_add_flags(PCI_PROBE_ONLY); - else -

[PATCH v3 1/4] of/pci: Add of_pci_check_probe_only to parse "linux,pci-probe-only"

2015-09-03 Thread Marc Zyngier
Both pci-host-generic and Pseries parse the "linux,pci-probe-only" property to engage the PCI_PROBE_ONLY mode, and both have a subtle bug that can be triggered if the property has no parameter. Provide a generic, safe implementation that can be used by both. Signed-off-by: Ma

[PATCH v3 3/4] powerpc: PCI: Fix lookup of linux,pci-probe-only property

2015-09-03 Thread Marc Zyngier
be set via properties * in chosen. */ - if (of_chosen) { - const int *prop; - - prop = of_get_property(of_chosen, - "linux,pci-probe-only", NULL); - if (prop) { -

Re: [PATCH v2 1/4] of/pci: Add of_pci_check_probe_only to parse "linux,pci-probe-only"

2015-09-03 Thread Marc Zyngier
On 02/09/15 23:23, Bjorn Helgaas wrote: > On Fri, Aug 14, 2015 at 04:08:10PM -0500, Rob Herring wrote: >> On Fri, Aug 14, 2015 at 11:19 AM, Marc Zyngier wrote: >>> Both pci-host-generic and Pseries parse the "linux,pci-probe-only" >>> to engage the PCI_PROBE_

Re: [PATCH v3 4/4] arm64: dts: Drop linux,pci-probe-only from the Seattle DTS

2015-09-03 Thread Suthikulpanit, Suravee
Hi Marc On 9/3/2015 7:16 PM, Marc Zyngier wrote: The linux,pci-probe-only property mandates an argument to indicate whether or not to engage the "probe-only" mode, but the Seattle DTS just provides a naked property, which is illegal. Also, it turns out that the board is perfectly hap

Re: [PATCH v3 1/4] of/pci: Add of_pci_check_probe_only to parse "linux,pci-probe-only"

2015-09-03 Thread Rob Herring
On Thu, Sep 3, 2015 at 7:16 AM, Marc Zyngier <marc.zyng...@arm.com> wrote: > Both pci-host-generic and Pseries parse the "linux,pci-probe-only" > property to engage the PCI_PROBE_ONLY mode, and both have a subtle > bug that can be triggered if the property has no paramet

Re: [PATCH v2 1/4] of/pci: Add of_pci_check_probe_only to parse "linux,pci-probe-only"

2015-09-03 Thread Marc Zyngier
On 02/09/15 23:23, Bjorn Helgaas wrote: > On Fri, Aug 14, 2015 at 04:08:10PM -0500, Rob Herring wrote: >> On Fri, Aug 14, 2015 at 11:19 AM, Marc Zyngier <marc.zyng...@arm.com> wrote: >>> Both pci-host-generic and Pseries parse the "linux,pci-probe-only" >

[PATCH v3 4/4] arm64: dts: Drop linux,pci-probe-only from the Seattle DTS

2015-09-03 Thread Marc Zyngier
The linux,pci-probe-only property mandates an argument to indicate whether or not to engage the "probe-only" mode, but the Seattle DTS just provides a naked property, which is illegal. Also, it turns out that the board is perfectly happy without probe-only, so let's drop this altogethe

[PATCH v3 2/4] PCI: pci-host-generic: Fix lookup of linux,pci-probe-only property

2015-09-03 Thread Marc Zyngier
en_pci_probe(struct platform_device *pdev) return -EINVAL; } - prop = of_get_property(of_chosen, "linux,pci-probe-only", NULL); - if (prop) { - if (*prop) - pci_add_flags(PCI_PROBE_ONLY)

[PATCH v3 3/4] powerpc: PCI: Fix lookup of linux,pci-probe-only property

2015-09-03 Thread Marc Zyngier
E_ONLY and PCI_REASSIGN_ALL_BUS can be set via properties * in chosen. */ - if (of_chosen) { - const int *prop; - - prop = of_get_property(of_chosen, - "linux,pci-probe-only", NULL); -

[PATCH v3 1/4] of/pci: Add of_pci_check_probe_only to parse "linux,pci-probe-only"

2015-09-03 Thread Marc Zyngier
Both pci-host-generic and Pseries parse the "linux,pci-probe-only" property to engage the PCI_PROBE_ONLY mode, and both have a subtle bug that can be triggered if the property has no parameter. Provide a generic, safe implementation that can be used by both. Signed-off-by: Ma

[PATCH v3 0/4] PCI: arm64/powerpc: Fix parsing of linux,pci-probe-only

2015-09-03 Thread Marc Zyngier
The pci-host-generic driver parses the linux,pci-probe-only property, and assumes that it will have a boolean parameter. Turns out that the Seattle DTS file has a naked "linux,pci-probe-only" property, which leads to the driver dereferencing some unsuspecting memory location. Nothing

Re: [PATCH v2 1/4] of/pci: Add of_pci_check_probe_only to parse "linux,pci-probe-only"

2015-09-02 Thread Bjorn Helgaas
On Fri, Aug 14, 2015 at 04:08:10PM -0500, Rob Herring wrote: > On Fri, Aug 14, 2015 at 11:19 AM, Marc Zyngier wrote: > > Both pci-host-generic and Pseries parse the "linux,pci-probe-only" > > to engage the PCI_PROBE_ONLY mode, and both have a subtle bug that > > c

Re: [PATCH v2 1/4] of/pci: Add of_pci_check_probe_only to parse "linux,pci-probe-only"

2015-09-02 Thread Bjorn Helgaas
On Fri, Aug 14, 2015 at 04:08:10PM -0500, Rob Herring wrote: > On Fri, Aug 14, 2015 at 11:19 AM, Marc Zyngier <marc.zyng...@arm.com> wrote: > > Both pci-host-generic and Pseries parse the "linux,pci-probe-only" > > to engage the PCI_PROBE_ONLY mode, and both

Re: [PATCH v2 2/4] PCI: pci-host-generic: Fix lookup of linux,pci-probe-only property

2015-08-17 Thread Will Deacon
On Fri, Aug 14, 2015 at 09:26:21PM +0100, Bjorn Helgaas wrote: > On Fri, Aug 14, 2015 at 11:43 AM, Will Deacon wrote: > > On Fri, Aug 14, 2015 at 05:40:51PM +0100, Bjorn Helgaas wrote: > >> Do we need support for pci-probe-only in pci-host-generic at all? > >> You

Re: [PATCH v2 2/4] PCI: pci-host-generic: Fix lookup of linux,pci-probe-only property

2015-08-17 Thread Will Deacon
On Fri, Aug 14, 2015 at 09:26:21PM +0100, Bjorn Helgaas wrote: On Fri, Aug 14, 2015 at 11:43 AM, Will Deacon will.dea...@arm.com wrote: On Fri, Aug 14, 2015 at 05:40:51PM +0100, Bjorn Helgaas wrote: Do we need support for pci-probe-only in pci-host-generic at all? You're removing the use

Re: [PATCH v2 1/4] of/pci: Add of_pci_check_probe_only to parse "linux,pci-probe-only"

2015-08-14 Thread Rob Herring
On Fri, Aug 14, 2015 at 11:19 AM, Marc Zyngier wrote: > Both pci-host-generic and Pseries parse the "linux,pci-probe-only" > to engage the PCI_PROBE_ONLY mode, and both have a subtle bug that > can be triggered if the property has no parameter. Humm, I bet we could break a lo

Re: [PATCH v2 2/4] PCI: pci-host-generic: Fix lookup of linux,pci-probe-only property

2015-08-14 Thread Bjorn Helgaas
> - const int *prop; >> > struct device *dev = >dev; >> > struct device_node *np = dev->of_node; >> > struct gen_pci *pci = devm_kzalloc(dev, sizeof(*pci), GFP_KERNEL); >> > @@ -225,13 +224,7 @@ static int gen_pci_

Re: [PATCH v2 2/4] PCI: pci-host-generic: Fix lookup of linux,pci-probe-only property

2015-08-14 Thread Alexander Graf
st int *prop; >>> struct device *dev = >dev; >>> struct device_node *np = dev->of_node; >>> struct gen_pci *pci = devm_kzalloc(dev, sizeof(*pci), GFP_KERNEL); >>> @@ -225,13 +224,7 @@ static int gen_pci_probe(struct platform_device *pdev) >&g

Re: [PATCH v2 2/4] PCI: pci-host-generic: Fix lookup of linux,pci-probe-only property

2015-08-14 Thread Will Deacon
>dev; > struct device_node *np = dev->of_node; > struct gen_pci *pci = devm_kzalloc(dev, sizeof(*pci), GFP_KERNEL); > @@ -225,13 +224,7 @@ static int gen_pci_probe(struct platform_device *pdev) > return -EINVAL; > } > > - pr

Re: [PATCH v2 2/4] PCI: pci-host-generic: Fix lookup of linux,pci-probe-only property

2015-08-14 Thread Will Deacon
vm_kzalloc(dev, sizeof(*pci), GFP_KERNEL); > > @@ -225,13 +224,7 @@ static int gen_pci_probe(struct platform_device *pdev) > > return -EINVAL; > > } > > > > - prop = of_get_property(of_chosen, "linux,pci-probe-only", NULL); > > - if (prop) {

Re: [PATCH v2 2/4] PCI: pci-host-generic: Fix lookup of linux,pci-probe-only property

2015-08-14 Thread Bjorn Helgaas
>dev; > struct device_node *np = dev->of_node; > struct gen_pci *pci = devm_kzalloc(dev, sizeof(*pci), GFP_KERNEL); > @@ -225,13 +224,7 @@ static int gen_pci_probe(struct platform_device *pdev) > return -EINVAL; > } > > - pr

[PATCH v2 0/4] PCI: arm64/powerpc: Fix parsing of linux,pci-probe-only

2015-08-14 Thread Marc Zyngier
The pci-host-generic driver parses the linux,pci-probe-only property, and assumes that it will have a boolean parameter. Turns out that the Seattle DTS file has a naked "linux,pci-probe-only" property, which leads to the driver dereferencing some unsuspecting memory location. Nothing

[PATCH v2 3/4] powerpc: PCI: Fix lookup of linux,pci-probe-only property

2015-08-14 Thread Marc Zyngier
be set via properties * in chosen. */ - if (of_chosen) { - const int *prop; - - prop = of_get_property(of_chosen, - "linux,pci-probe-only", NULL); - if (prop) { -

[PATCH v2 2/4] PCI: pci-host-generic: Fix lookup of linux,pci-probe-only property

2015-08-14 Thread Marc Zyngier
struct platform_device *pdev) return -EINVAL; } - prop = of_get_property(of_chosen, "linux,pci-probe-only", NULL); - if (prop) { - if (*prop) - pci_add_flags(PCI_PROBE_ONLY); - else -

[PATCH v2 4/4] arm64: dts: Drop linux,pci-probe-only from the Seattle DTS

2015-08-14 Thread Marc Zyngier
The linux,pci-probe-only property mandates an argument to indicate whether or not to engage the "probe-only" mode, but the Seattle DTS just provides a naked property, which is illegal. Also, it turns out that the board is perfectly happy without probe-only, so let's drop this altogethe

[PATCH v2 1/4] of/pci: Add of_pci_check_probe_only to parse "linux,pci-probe-only"

2015-08-14 Thread Marc Zyngier
Both pci-host-generic and Pseries parse the "linux,pci-probe-only" to engage the PCI_PROBE_ONLY mode, and both have a subtle bug that can be triggered if the property has no parameter. Provide a generic implementation that can be used by both. Signed-off-by: Marc Zyngier --

Re: [PATCH 2/3] powerpc: PCI: Fix lookup of linux,pci-probe-only property

2015-08-14 Thread Marc Zyngier
erpc/platforms/pseries/setup.c >> +++ b/arch/powerpc/platforms/pseries/setup.c >> @@ -490,14 +490,19 @@ static void __init find_and_init_phbs(void) >> */ >> if (of_chosen) { >> const int *prop; >> + int

Re: [PATCH 2/3] powerpc: PCI: Fix lookup of linux,pci-probe-only property

2015-08-14 Thread Bjorn Helgaas
id) >*/ > if (of_chosen) { > const int *prop; > + int len; > > prop = of_get_property(of_chosen, > - "linux,pci-probe-only", NULL); > +

[PATCH 3/3] arm64: dts: Drop linux,pci-probe-only from the Seattle DTS

2015-08-14 Thread Marc Zyngier
The linux,pci-probe-only property mandates an argument to indicate whether or not to engage the "probe-only" mode, but the Seattle DTS just provides a naked property, which is illegal. Also, it turns out that the board is perfectly happy without probe-only, so let's drop this altogethe

[PATCH 1/3] PCI: pci-host-generic: Fix lookup of linux,pci-probe-only property

2015-08-14 Thread Marc Zyngier
static int gen_pci_probe(struct platform_device *pdev) return -EINVAL; } - prop = of_get_property(of_chosen, "linux,pci-probe-only", NULL); + prop = of_get_property(of_chosen, "linux,pci-probe-only", ); if (prop) {

[PATCH 2/3] powerpc: PCI: Fix lookup of linux,pci-probe-only property

2015-08-14 Thread Marc Zyngier
x,pci-probe-only", NULL); + "linux,pci-probe-only", ); if (prop) { - if (*prop) - pci_add_flags(PCI_PROBE_ONLY); - else - pci_clear_

[PATCH 0/3] PCI: arm64/powerpc: Fix parsing of linux,pci-probe-only

2015-08-14 Thread Marc Zyngier
The pci-host-generic driver parses the linux,pci-probe-only property, and assumes that it will have a boolean parameter. Turns out that the Seattle DTS file has a naked "linux,pci-probe-only" property, which leads to the driver dereferencing some unsuspecting memory location. Nothing

[PATCH 0/3] PCI: arm64/powerpc: Fix parsing of linux,pci-probe-only

2015-08-14 Thread Marc Zyngier
The pci-host-generic driver parses the linux,pci-probe-only property, and assumes that it will have a boolean parameter. Turns out that the Seattle DTS file has a naked linux,pci-probe-only property, which leads to the driver dereferencing some unsuspecting memory location. Nothing really bad

[PATCH 3/3] arm64: dts: Drop linux,pci-probe-only from the Seattle DTS

2015-08-14 Thread Marc Zyngier
The linux,pci-probe-only property mandates an argument to indicate whether or not to engage the probe-only mode, but the Seattle DTS just provides a naked property, which is illegal. Also, it turns out that the board is perfectly happy without probe-only, so let's drop this altogether. Signed

[PATCH 2/3] powerpc: PCI: Fix lookup of linux,pci-probe-only property

2015-08-14 Thread Marc Zyngier
, - linux,pci-probe-only, NULL); + linux,pci-probe-only, len); if (prop) { - if (*prop) - pci_add_flags(PCI_PROBE_ONLY); - else - pci_clear_flags

[PATCH 1/3] PCI: pci-host-generic: Fix lookup of linux,pci-probe-only property

2015-08-14 Thread Marc Zyngier
); @@ -225,12 +226,16 @@ static int gen_pci_probe(struct platform_device *pdev) return -EINVAL; } - prop = of_get_property(of_chosen, linux,pci-probe-only, NULL); + prop = of_get_property(of_chosen, linux,pci-probe-only, len); if (prop) { - if (*prop

Re: [PATCH 2/3] powerpc: PCI: Fix lookup of linux,pci-probe-only property

2015-08-14 Thread Bjorn Helgaas
; + int len; prop = of_get_property(of_chosen, - linux,pci-probe-only, NULL); + linux,pci-probe-only, len); if (prop) { - if (*prop) - pci_add_flags

Re: [PATCH 2/3] powerpc: PCI: Fix lookup of linux,pci-probe-only property

2015-08-14 Thread Marc Zyngier
) */ if (of_chosen) { const int *prop; +int len; prop = of_get_property(of_chosen, -linux,pci-probe-only, NULL); +linux,pci-probe-only, len); if (prop) { -if (*prop

Re: [PATCH v2 2/4] PCI: pci-host-generic: Fix lookup of linux,pci-probe-only property

2015-08-14 Thread Bjorn Helgaas
; } - prop = of_get_property(of_chosen, linux,pci-probe-only, NULL); - if (prop) { - if (*prop) - pci_add_flags(PCI_PROBE_ONLY); - else - pci_clear_flags(PCI_PROBE_ONLY); - } + of_pci_check_probe_only(of_chosen); Do we

[PATCH v2 0/4] PCI: arm64/powerpc: Fix parsing of linux,pci-probe-only

2015-08-14 Thread Marc Zyngier
The pci-host-generic driver parses the linux,pci-probe-only property, and assumes that it will have a boolean parameter. Turns out that the Seattle DTS file has a naked linux,pci-probe-only property, which leads to the driver dereferencing some unsuspecting memory location. Nothing really bad

Re: [PATCH v2 2/4] PCI: pci-host-generic: Fix lookup of linux,pci-probe-only property

2015-08-14 Thread Will Deacon
(dev, sizeof(*pci), GFP_KERNEL); @@ -225,13 +224,7 @@ static int gen_pci_probe(struct platform_device *pdev) return -EINVAL; } - prop = of_get_property(of_chosen, linux,pci-probe-only, NULL); - if (prop) { - if (*prop

[PATCH v2 2/4] PCI: pci-host-generic: Fix lookup of linux,pci-probe-only property

2015-08-14 Thread Marc Zyngier
gen_pci_probe(struct platform_device *pdev) return -EINVAL; } - prop = of_get_property(of_chosen, linux,pci-probe-only, NULL); - if (prop) { - if (*prop) - pci_add_flags(PCI_PROBE_ONLY); - else

[PATCH v2 4/4] arm64: dts: Drop linux,pci-probe-only from the Seattle DTS

2015-08-14 Thread Marc Zyngier
The linux,pci-probe-only property mandates an argument to indicate whether or not to engage the probe-only mode, but the Seattle DTS just provides a naked property, which is illegal. Also, it turns out that the board is perfectly happy without probe-only, so let's drop this altogether. Signed

[PATCH v2 1/4] of/pci: Add of_pci_check_probe_only to parse linux,pci-probe-only

2015-08-14 Thread Marc Zyngier
Both pci-host-generic and Pseries parse the linux,pci-probe-only to engage the PCI_PROBE_ONLY mode, and both have a subtle bug that can be triggered if the property has no parameter. Provide a generic implementation that can be used by both. Signed-off-by: Marc Zyngier marc.zyng...@arm.com

  1   2   >