From: "Jari Hämäläinen" <nuumiofi@gmail.com> To: Shawn Lin <shawn.lin@rock-chips.com>, Heiko Stuebner <heiko@sntech.de> Cc: "Jari Hämäläinen" <nuumiofi@gmail.com>, linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org, "Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>, "Rob Herring" <robh@kernel.org>, "Bjorn Helgaas" <bhelgaas@google.com> Subject: [RFC PATCH 0/3] provide workaround for Rockchip PCIe bus scan crash with optional delay Date: Thu, 31 Dec 2020 14:52:11 +0200 [thread overview] Message-ID: <20201231125214.25733-1-nuumiofi@gmail.com> (raw) Hello all, This RFC patch provides a workaround for Rockchip PCIe controller crashes with some devices when PCIe bus is scanned. Both command line parameter and device tree property are included as ways to set the delay. I'm sending this as RFC because I don't know which approach, command line and/or device tree, would be the best considering this is a workaround, not a proper fix. I feel that at least command line parameter should be provided as it's easy to edit by end user. Device tree property could be seen as a way for disto maintainer to provide sane or safe default with kernel but it also extends the change to touch more files which makes it harder to clean up if a proper fix to this is found. Also, I've set delay to 1100 ms for RockPro64 in patch 3 as an example of safe default. If new device tree property support is accepted maybe the actual device tree should be left unmodified or delay set to 0 ms so that users not needing the delay are not affected in any way. Patch 1 adds the workaround code. Kernel parameter documentation is also included. Devices used in testing and a log excerpt are included in changelog. In addition to devices needing the delay, tested and listed in patch 1 following devices that do not need the delay were tested with no delay and 1000 ms delay and no regression was observed: - Marvell 88SE9215 and 88SE9230 based SATA controllers - Samsung 970 EVO Plus NVMe drive Patches 2 and 3 add dt-bindings and the new property to RockPro64 device as an example. All comments about the workaround itself if it's applicable and about both command line + device tree or only command line approaches are welcome. Best regards, Jari Hämäläinen Jari Hämäläinen (3): PCI: rockchip: provide workaround for bus scan crash with optional delay dt-bindings: PCI: rockchip: document bus-scan-delay-ms workaround property arm64: dts: rockchip: use bus-scan-delay-ms workaround with RockPro64 PCIe .../admin-guide/kernel-parameters.txt | 8 ++++++++ .../bindings/pci/rockchip-pcie-host.txt | 3 +++ .../boot/dts/rockchip/rk3399-rockpro64.dtsi | 1 + drivers/pci/controller/pcie-rockchip-host.c | 18 ++++++++++++++++++ drivers/pci/controller/pcie-rockchip.c | 5 +++++ drivers/pci/controller/pcie-rockchip.h | 2 ++ 6 files changed, 37 insertions(+) base-commit: 5c8fe583cce542aa0b84adc939ce85293de36e5e -- 2.29.2
WARNING: multiple messages have this Message-ID (diff)
From: "Jari Hämäläinen" <nuumiofi@gmail.com> To: Shawn Lin <shawn.lin@rock-chips.com>, Heiko Stuebner <heiko@sntech.de> Cc: "Rob Herring" <robh@kernel.org>, "Jari Hämäläinen" <nuumiofi@gmail.com>, linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org, "Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>, "Bjorn Helgaas" <bhelgaas@google.com> Subject: [RFC PATCH 0/3] provide workaround for Rockchip PCIe bus scan crash with optional delay Date: Thu, 31 Dec 2020 14:52:11 +0200 [thread overview] Message-ID: <20201231125214.25733-1-nuumiofi@gmail.com> (raw) Hello all, This RFC patch provides a workaround for Rockchip PCIe controller crashes with some devices when PCIe bus is scanned. Both command line parameter and device tree property are included as ways to set the delay. I'm sending this as RFC because I don't know which approach, command line and/or device tree, would be the best considering this is a workaround, not a proper fix. I feel that at least command line parameter should be provided as it's easy to edit by end user. Device tree property could be seen as a way for disto maintainer to provide sane or safe default with kernel but it also extends the change to touch more files which makes it harder to clean up if a proper fix to this is found. Also, I've set delay to 1100 ms for RockPro64 in patch 3 as an example of safe default. If new device tree property support is accepted maybe the actual device tree should be left unmodified or delay set to 0 ms so that users not needing the delay are not affected in any way. Patch 1 adds the workaround code. Kernel parameter documentation is also included. Devices used in testing and a log excerpt are included in changelog. In addition to devices needing the delay, tested and listed in patch 1 following devices that do not need the delay were tested with no delay and 1000 ms delay and no regression was observed: - Marvell 88SE9215 and 88SE9230 based SATA controllers - Samsung 970 EVO Plus NVMe drive Patches 2 and 3 add dt-bindings and the new property to RockPro64 device as an example. All comments about the workaround itself if it's applicable and about both command line + device tree or only command line approaches are welcome. Best regards, Jari Hämäläinen Jari Hämäläinen (3): PCI: rockchip: provide workaround for bus scan crash with optional delay dt-bindings: PCI: rockchip: document bus-scan-delay-ms workaround property arm64: dts: rockchip: use bus-scan-delay-ms workaround with RockPro64 PCIe .../admin-guide/kernel-parameters.txt | 8 ++++++++ .../bindings/pci/rockchip-pcie-host.txt | 3 +++ .../boot/dts/rockchip/rk3399-rockpro64.dtsi | 1 + drivers/pci/controller/pcie-rockchip-host.c | 18 ++++++++++++++++++ drivers/pci/controller/pcie-rockchip.c | 5 +++++ drivers/pci/controller/pcie-rockchip.h | 2 ++ 6 files changed, 37 insertions(+) base-commit: 5c8fe583cce542aa0b84adc939ce85293de36e5e -- 2.29.2 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip
next reply other threads:[~2020-12-31 12:57 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-31 12:52 Jari Hämäläinen [this message] 2020-12-31 12:52 ` [RFC PATCH 0/3] provide workaround for Rockchip PCIe bus scan crash with optional delay Jari Hämäläinen 2020-12-31 12:52 ` [RFC PATCH 1/3] PCI: rockchip: provide workaround for " Jari Hämäläinen 2020-12-31 12:52 ` Jari Hämäläinen 2021-01-01 17:37 ` Bjorn Helgaas 2021-01-01 17:37 ` Bjorn Helgaas 2021-01-02 13:43 ` Jari Hämäläinen 2021-01-02 13:43 ` Jari Hämäläinen 2021-01-24 6:39 ` Jari Hämäläinen 2021-01-24 6:39 ` Jari Hämäläinen 2021-01-25 18:08 ` Robin Murphy 2021-01-25 18:08 ` Robin Murphy 2020-12-31 12:52 ` [RFC PATCH 2/3] dt-bindings: PCI: rockchip: document bus-scan-delay-ms workaround property Jari Hämäläinen 2020-12-31 12:52 ` Jari Hämäläinen 2020-12-31 12:52 ` [RFC PATCH 3/3] arm64: dts: rockchip: use bus-scan-delay-ms workaround with RockPro64 PCIe Jari Hämäläinen 2020-12-31 12:52 ` Jari Hämäläinen
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=20201231125214.25733-1-nuumiofi@gmail.com \ --to=nuumiofi@gmail.com \ --cc=bhelgaas@google.com \ --cc=heiko@sntech.de \ --cc=linux-pci@vger.kernel.org \ --cc=linux-rockchip@lists.infradead.org \ --cc=lorenzo.pieralisi@arm.com \ --cc=robh@kernel.org \ --cc=shawn.lin@rock-chips.com \ /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: linkBe 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.