From: Keith Busch <kbusch@kernel.org> To: linux-block@vger.kernel.org, Omar Sandoval <osandov@fb.com> Cc: Keith Busch <kbusch@kernel.org>, Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com> Subject: [PATCH] common/rc: confirm pcie hotplug capabilities Date: Wed, 25 Nov 2020 07:49:52 -0800 Message-ID: <20201125154952.2871261-1-kbusch@kernel.org> (raw) It turns out some PCIe slots report hotplug surprise but are not hotplug capable. Despite the contridiction, the spec seems to allow that. The linux pciehp driver needs hotplug capable to bind to the slot, and the block/019 test requires hotplug surprise to handle the unannounced link-down. Verify both bits in the slot capabilities register are set. Reported-by: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com> Signed-off-by: Keith Busch <kbusch@kernel.org> --- common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/rc b/common/rc index 0d7a3cd..d396fb5 100644 --- a/common/rc +++ b/common/rc @@ -269,7 +269,7 @@ _require_test_dev_in_hotplug_slot() { local slt_cap slt_cap="$(setpci -s "${parent}" CAP_EXP+14.w)" - if [[ $((0x${slt_cap} & 0x20)) -eq 0 ]]; then + if [[ $((0x${slt_cap} & 0x60)) -ne 0x60 ]]; then SKIP_REASON="$TEST_DEV is not in a hot pluggable slot" return 1 fi -- 2.24.1
next reply index Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-25 15:49 Keith Busch [this message] 2020-12-02 1:39 ` Shinichiro Kawasaki 2021-01-04 22:55 ` Omar Sandoval
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=20201125154952.2871261-1-kbusch@kernel.org \ --to=kbusch@kernel.org \ --cc=linux-block@vger.kernel.org \ --cc=osandov@fb.com \ --cc=shinichiro.kawasaki@wdc.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: link
Linux-Block Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/linux-block/0 linux-block/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 linux-block linux-block/ https://lore.kernel.org/linux-block \ linux-block@vger.kernel.org public-inbox-index linux-block Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-block AGPL code for this site: git clone https://public-inbox.org/public-inbox.git