aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/b100/b100_impl.cpp8
-rw-r--r--host/lib/usrp/b200/b200_impl.cpp8
-rw-r--r--host/lib/usrp/mpmd/mpmd_find.cpp12
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.cpp10
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.cpp5
-rw-r--r--host/lib/usrp/x300/x300_impl.cpp6
6 files changed, 13 insertions, 36 deletions
diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp
index 02a23ec38..4d72e4f04 100644
--- a/host/lib/usrp/b100/b100_impl.cpp
+++ b/host/lib/usrp/b100/b100_impl.cpp
@@ -44,15 +44,9 @@ 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"))
+ if (hint.has_key("addr") || hint.has_key("resource"))
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")
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index 139dd9362..7f250fd42 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -182,14 +182,8 @@ 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"))
+ if (hint_i.has_key("addr") || hint_i.has_key("resource"))
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:
diff --git a/host/lib/usrp/mpmd/mpmd_find.cpp b/host/lib/usrp/mpmd/mpmd_find.cpp
index 77f7486dd..5d5aab1ba 100644
--- a/host/lib/usrp/mpmd/mpmd_find.cpp
+++ b/host/lib/usrp/mpmd/mpmd_find.cpp
@@ -139,6 +139,9 @@ device_addrs_t mpmd_find_with_addrs(const device_addrs_t& hints)
device_addrs_t found_devices;
found_devices.reserve(hints.size());
for (const auto& hint : hints) {
+ if (hint.has_key("resource")) {
+ continue;
+ }
if (not(hint.has_key(xport::FIRST_ADDR_KEY) or hint.has_key(MGMT_ADDR_KEY))) {
UHD_LOG_DEBUG("MPMD FIND", "No address given in hint " << hint.to_string());
continue;
@@ -169,6 +172,9 @@ device_addrs_t mpmd_find_with_addrs(const device_addrs_t& hints)
device_addrs_t mpmd_find_with_bcast(const device_addr_t& hint)
{
device_addrs_t addrs;
+ if (hint.has_key("resource")) {
+ return addrs;
+ }
UHD_LOG_TRACE(
"MPMD FIND", "Broadcasting on all available interfaces to find MPM devices.");
std::vector<std::future<device_addrs_t>> task_list;
@@ -224,12 +230,6 @@ device_addrs_t mpmd_find(const device_addr_t& hint_)
return {};
}
}
- if (hint_.has_key_with_prefix("resource")) {
- UHD_LOG_TRACE(
- "MPMD FIND", "Returning early, PCIe is not support with mpm devices.");
- return {};
- }
-
UHD_LOG_TRACE("MPMD FIND", "Finding with " << hints.size() << " different hint(s).");
// Scenario 1): User gave us at least one address
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);
}
}
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index 8ca503aa9..c2514ae02 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -68,11 +68,8 @@ device_addrs_t usrp2_find(const device_addr_t& hint_)
// Return an empty list of addresses when a resource is specified,
// since a resource is intended for a different, non-USB, device.
- if (hint.has_key_with_prefix("resource")) {
- UHD_LOG_TRACE(
- "USRP2 FIND", "Returning early, PCIe is not supported with usrp2 devices.");
+ if (hint.has_key("resource"))
return usrp2_addrs;
- }
// if no address was specified, send a broadcast on each interface
if (not hint.has_key("addr")) {
diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp
index 663b951a1..fa8425fac 100644
--- a/host/lib/usrp/x300/x300_impl.cpp
+++ b/host/lib/usrp/x300/x300_impl.cpp
@@ -100,9 +100,7 @@ device_addrs_t x300_find(const device_addr_t& hint_)
return reply_addrs;
}
- bool has_resource_key = hint.has_key_with_prefix("resource");
-
- if (!has_resource_key) {
+ if (!hint.has_key("resource")) {
// otherwise, no address was specified, send a broadcast on each interface
for (const transport::if_addrs_t& if_addrs : transport::get_if_addrs()) {
// avoid the loopback device
@@ -137,7 +135,7 @@ device_addrs_t x300_find(const device_addr_t& hint_)
}
}
- device_addrs_t pcie_addrs = pcie_manager::find(hint, has_resource_key);
+ device_addrs_t pcie_addrs = pcie_manager::find(hint, hint.has_key("resource"));
if (not pcie_addrs.empty()) {
addrs.insert(addrs.end(), pcie_addrs.begin(), pcie_addrs.end());
}