diff options
author | Steven Koo <steven.koo@ni.com> | 2020-09-24 13:05:34 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2020-10-05 12:02:05 -0500 |
commit | 8fea36aa81195d758a29067141afdc4becefe5ae (patch) | |
tree | 4f0d411d872355726b7a88c6632a7646425c2587 /host/lib/usrp/b200/b200_impl.cpp | |
parent | 75fe86a92bfbd037545afdafd2677f390eccefa5 (diff) | |
download | uhd-8fea36aa81195d758a29067141afdc4becefe5ae.tar.gz uhd-8fea36aa81195d758a29067141afdc4becefe5ae.tar.bz2 uhd-8fea36aa81195d758a29067141afdc4becefe5ae.zip |
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.
Diffstat (limited to 'host/lib/usrp/b200/b200_impl.cpp')
-rw-r--r-- | host/lib/usrp/b200/b200_impl.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index 7f250fd42..139dd9362 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -182,8 +182,14 @@ static device_addrs_t b200_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. for (device_addr_t hint_i : separate_device_addr(hint)) { - if (hint_i.has_key("addr") || hint_i.has_key("resource")) + if (hint_i.has_key("addr")) return b200_addrs; + + if (hint.has_key_with_prefix("resource")) { + UHD_LOG_TRACE( + "B200 FIND", "Returning early, PCIe is not supported with b200 devices."); + return b200_addrs; + } } // Important note: |