From 8fea36aa81195d758a29067141afdc4becefe5ae Mon Sep 17 00:00:00 2001 From: Steven Koo Date: Thu, 24 Sep 2020 13:05:34 -0500 Subject: lib: disable non pcie types in find with resource mpmd find doesn't respect the "resource" arg hint and can be detected when "resource" is set. This results in incorrect device selection when using PCIe. This change adds detection for "resource" as a prefix in the device hints for mpmd and the other devices. --- host/lib/usrp/b100/b100_impl.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'host/lib/usrp/b100/b100_impl.cpp') diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp index 4d72e4f04..02a23ec38 100644 --- a/host/lib/usrp/b100/b100_impl.cpp +++ b/host/lib/usrp/b100/b100_impl.cpp @@ -44,9 +44,15 @@ static device_addrs_t b100_find(const device_addr_t& hint) // Return an empty list of addresses when an address or resource is specified, // since an address and resource is intended for a different, non-USB, device. - if (hint.has_key("addr") || hint.has_key("resource")) + if (hint.has_key("addr")) return b100_addrs; + if (hint.has_key_with_prefix("resource")) { + UHD_LOG_TRACE( + "B100 FIND", "Returning early, PCIe is not supported with b100 devices."); + return b100_addrs; + } + uint16_t vid, pid; if (hint.has_key("vid") && hint.has_key("pid") && hint.has_key("type") -- cgit v1.2.3