Signed-off-by: Ira Weiny <[email protected]>
---
 src/iblinkinfo.c    |   20 ++++++++++----------
 src/ibqueryerrors.c |   18 +++++++++---------
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/src/iblinkinfo.c b/src/iblinkinfo.c
index 00c7bc0..0a652ba 100644
--- a/src/iblinkinfo.c
+++ b/src/iblinkinfo.c
@@ -153,17 +153,17 @@ void print_port(ibnd_node_t * node, ibnd_port_t * port, 
char *out_prefix)
        /* C14-24.2.1 states that a down port allows for invalid data to be
         * returned for all PortInfo components except PortState and
         * PortPhysicalState */
-       if (!espeed) {
-               if (fdr10)
-                       sprintf(speed, "10.0 Gbps (FDR10)");
-               else
-                       mad_dump_val(IB_PORT_LINK_SPEED_ACTIVE_F, speed,
-                                    64, &ispeed);
-       } else
-               mad_dump_val(IB_PORT_LINK_SPEED_EXT_ACTIVE_F, speed,
-                            64, &espeed);
-
        if (istate != IB_LINK_DOWN) {
+               if (!espeed) {
+                       if (fdr10)
+                               sprintf(speed, "10.0 Gbps (FDR10)");
+                       else
+                               mad_dump_val(IB_PORT_LINK_SPEED_ACTIVE_F, speed,
+                                            64, &ispeed);
+               } else
+                       mad_dump_val(IB_PORT_LINK_SPEED_EXT_ACTIVE_F, speed,
+                                    64, &espeed);
+
                n = snprintf(link_str, 256, "(%3s %18s %6s/%8s)",
                     mad_dump_val(IB_PORT_LINK_WIDTH_ACTIVE_F, width, 64,
                                  &iwidth),
diff --git a/src/ibqueryerrors.c b/src/ibqueryerrors.c
index e070baf..eded6a8 100644
--- a/src/ibqueryerrors.c
+++ b/src/ibqueryerrors.c
@@ -203,17 +203,17 @@ static void print_port_config(char *node_name, 
ibnd_node_t * node, int portnum)
        /* C14-24.2.1 states that a down port allows for invalid data to be
         * returned for all PortInfo components except PortState and
         * PortPhysicalState */
-       if (!espeed) {
-               if (fdr10)
-                       sprintf(speed, "10.0 Gbps (FDR10)");
-               else
-                       mad_dump_val(IB_PORT_LINK_SPEED_ACTIVE_F, speed,
-                                    64, &ispeed);
-       } else
-               mad_dump_val(IB_PORT_LINK_SPEED_EXT_ACTIVE_F, speed,
+       if (istate != IB_LINK_DOWN) {
+               if (!espeed) {
+                       if (fdr10)
+                               sprintf(speed, "10.0 Gbps (FDR10)");
+                       else
+                               mad_dump_val(IB_PORT_LINK_SPEED_ACTIVE_F, speed,
+                                            64, &ispeed);
+               } else
+                       mad_dump_val(IB_PORT_LINK_SPEED_EXT_ACTIVE_F, speed,
                             64, &espeed);
 
-       if (istate != IB_LINK_DOWN) {
                snprintf(link_str, 256, "(%3s %18s %6s/%8s)",
                         mad_dump_val(IB_PORT_LINK_WIDTH_ACTIVE_F, width, 64, 
&iwidth),
                         speed,
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to