[PATCH infiniband-diags] saquery.c: Fix handling of cpi and ClassPortInfo options

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

 



Need to check if query_type is CLASS_PORT_INFO
in order to handle saquery [cpi | ClassPortInfo].
Otherwise, it just dumps ClassPortInfo attribute
as all 0s.

Note that saquery -c works fine because it
set command to SAQUERY_CMD_CLASS_PORT_INFO.

Signed-off-by: Hal Rosenstock <hal@xxxxxxxxxxxx>
---
diff --git a/src/saquery.c b/src/saquery.c
index 0f39064..1af3401 100644
--- a/src/saquery.c
+++ b/src/saquery.c
@@ -1869,6 +1869,7 @@ int main(int argc, char **argv)
 		params.dlid = get_lid(h, dst_lid);
 
 	if (command == SAQUERY_CMD_CLASS_PORT_INFO ||
+	    query_type == CLASS_PORT_INFO ||
 	    query_type == IB_SA_ATTR_SWITCHINFORECORD)
 		sa_cpi_required = 1;
 
--
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