[PATCH infiniband-diags 2/6] libibmad/dump.c: Add HDR support for PortInfo LinkSpeedExt* fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Per MgtWG comments #9364-9366

Signed-off-by: Hal Rosenstock <hal@xxxxxxxxxxxx>
---
 libibmad/src/dump.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/libibmad/src/dump.c b/libibmad/src/dump.c
index 1f41e62..98d5a34 100644
--- a/libibmad/src/dump.c
+++ b/libibmad/src/dump.c
@@ -336,6 +336,9 @@ void mad_dump_linkspeedext(char *buf, int bufsz, void *val, int valsz)
 	case 2:
 		snprintf(buf, bufsz, "25.78125 Gbps");
 		break;
+	case 4:
+		snprintf(buf, bufsz, "53.125 Gbps");
+		break;
 	default:
 		snprintf(buf, bufsz, "undefined (%d)", speed);
 		break;
@@ -355,13 +358,16 @@ static void dump_linkspeedext(char *buf, int bufsz, int speed)
 		n += snprintf(buf + n, bufsz - n, "14.0625 Gbps or ");
 	if (n < bufsz && speed & 0x2)
 		n += snprintf(buf + n, bufsz - n, "25.78125 Gbps or ");
+	if (n < bufsz && speed & 0x4)
+		n += snprintf(buf + n, bufsz - n, "53.125 Gbps or ");
+
 	if (n >= bufsz) {
 		if (bufsz > 3)
 			buf[n - 4] = '\0';
 		return;
 	}
 
-	if (speed >> 2) {
+	if (speed >> 3) {
 		n += snprintf(buf + n, bufsz - n, "undefined (%d)", speed);
 		return;
 	} else if (bufsz > 3)
-- 
2.8.4

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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux