public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: Ira Weiny <weiny2-i2BcT+NCU+M@public.gmane.org>
Cc: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH] libibmad: Add support for PortInfo CapabilityMask2
Date: Mon, 15 Aug 2011 16:39:14 -0400	[thread overview]
Message-ID: <4E4983F2.8010902@dev.mellanox.co.il> (raw)


Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
diff --git a/include/infiniband/mad.h b/include/infiniband/mad.h
index 6d65a29..25c1141 100644
--- a/include/infiniband/mad.h
+++ b/include/infiniband/mad.h
@@ -772,6 +772,7 @@ enum MAD_FIELDS {
 	/*
 	 * More PortInfo fields
 	 */
+	IB_PORT_CAPMASK2_F,
 	IB_PORT_LINK_SPEED_EXT_ACTIVE_F,
 	IB_PORT_LINK_SPEED_EXT_SUPPORTED_F,
 	IB_PORT_LINK_SPEED_EXT_ENABLED_F,
diff --git a/src/dump.c b/src/dump.c
index 29fb742..581f044 100644
--- a/src/dump.c
+++ b/src/dump.c
@@ -561,6 +563,8 @@ void mad_dump_portcapmask(char *buf, int bufsz, void *val, int valsz)
 			     "\t\t\t\tIsPkeySwitchExternalPortTrapSupported\n");
 	if (mask & (1 << 14))
 		s += sprintf(s, "\t\t\t\tIsExtendedSpeedsSupported\n");
+	if (mask & (1 << 15))
+		s += sprintf(s, "\t\t\t\tIsCapabilityMask2Supported\n");
 	if (mask & (1 << 16))
 		s += sprintf(s, "\t\t\t\tIsCommunicatonManagementSupported\n");
 	if (mask & (1 << 17))
@@ -762,8 +766,7 @@ void mad_dump_portinfo(char *buf, int bufsz, void *val, int valsz)
 
 	cnt = _dump_fields(buf, bufsz, val, IB_PORT_FIRST_F, IB_PORT_LAST_F);
 	_dump_fields(buf + cnt, bufsz - cnt, val,
-		     IB_PORT_LINK_SPEED_EXT_ACTIVE_F,
-		     IB_PORT_LINK_SPEED_EXT_LAST_F);
+		     IB_PORT_CAPMASK2_F, IB_PORT_LINK_SPEED_EXT_LAST_F);
 }
 
 void mad_dump_portstates(char *buf, int bufsz, void *val, int valsz)
diff --git a/src/fields.c b/src/fields.c
index 7e5ac7d..45c07dd 100644
--- a/src/fields.c
+++ b/src/fields.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2004-2009 Voltaire Inc.  All rights reserved.
  * Copyright (c) 2009 HNR Consulting.  All rights reserved.
- * Copyright (c) 2009-2010 Mellanox Technologies LTD.  All rights reserved.
+ * Copyright (c) 2009-2011 Mellanox Technologies LTD.  All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
@@ -529,6 +529,7 @@ static const ib_field_t ib_mad_f[] = {
 	/*
 	 * More PortInfo fields
 	 */
+	{BITSOFFS(480, 16), "CapabilityMask2", mad_dump_hex},
 	{BITSOFFS(496, 4), "LinkSpeedExtActive", mad_dump_linkspeedext},
 	{BITSOFFS(500, 4), "LinkSpeedExtSupported", mad_dump_linkspeedextsup},
 	{BITSOFFS(507, 5), "LinkSpeedExtEnabled", mad_dump_linkspeedexten},
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2011-08-15 20:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-15 20:39 Hal Rosenstock [this message]
     [not found] ` <4E4983F2.8010902-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2011-08-18 17:50   ` [PATCH] libibmad: Add support for PortInfo CapabilityMask2 Ira Weiny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E4983F2.8010902@dev.mellanox.co.il \
    --to=hal-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=weiny2-i2BcT+NCU+M@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox