aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp1
diff options
context:
space:
mode:
authormichael-west <michael.west@ettus.com>2021-02-06 14:34:19 -0800
committerAaron Rossetto <aaron.rossetto@ni.com>2021-02-11 07:16:48 -0600
commit13f1dc28f162c74cc0eac6673d3c12d5195238d1 (patch)
tree84ebc1d923efe5d6d61e035e7d17c2f236d29fb8 /host/lib/usrp/usrp1
parent910db73c9aa9446479f00a4e90521a213568bffa (diff)
downloaduhd-13f1dc28f162c74cc0eac6673d3c12d5195238d1.tar.gz
uhd-13f1dc28f162c74cc0eac6673d3c12d5195238d1.tar.bz2
uhd-13f1dc28f162c74cc0eac6673d3c12d5195238d1.zip
mpmd: Skip find if "resource" key is specified
MPM devices were being discovered when trying to locate PCIe connected devices. Adding filter to exclude them if the "resource" key is specified in the device address arguments. Replaces "lib: disable non pcie types in find with resource" to reduce impact to older devices and remove API change. Signed-off-by: michael-west <michael.west@ettus.com>
Diffstat (limited to 'host/lib/usrp/usrp1')
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp
index 37bd4a4a2..d86bf6d56 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.cpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.cpp
@@ -47,15 +47,9 @@ static device_addrs_t usrp1_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"))
+ if (hint.has_key("addr") || hint.has_key("resource"))
return usrp1_addrs;
- if (hint.has_key_with_prefix("resource")) {
- UHD_LOG_TRACE(
- "USRP1 FIND", "Returning early, PCIe is not supported with usrp1 devices.");
- return usrp1_addrs;
- }
-
uint16_t vid, pid;
if (hint.has_key("vid") && hint.has_key("pid") && hint.has_key("type")
@@ -127,7 +121,7 @@ static device_addrs_t usrp1_find(const device_addr_t& hint)
// this is a found usrp1 when the hint serial and name match or blank
if ((not hint.has_key("name") or hint["name"] == new_addr["name"])
and (not hint.has_key("serial")
- or hint["serial"] == new_addr["serial"])) {
+ or hint["serial"] == new_addr["serial"])) {
usrp1_addrs.push_back(new_addr);
}
}