Commit 72fb70f5 authored by Michael J. Ruhl's avatar Michael J. Ruhl Committed by Doug Ledford

IB/hfi1: Correct MulticastMask/CollectiveMask info to SMA output

The FM uses the values of MulticastMask and CollectiveMask to
determine the number of bits for net masks. The current values of
0 and 0 are incorrect.  The values should be 4 and 1.  Updated the
necessary code to reflect the specified values.
Reviewed-by: default avatarSebastian Sanchez <sebastian.sanchez@intel.com>
Signed-off-by: default avatarMichael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 20c7840a
...@@ -338,6 +338,15 @@ struct diag_pkt { ...@@ -338,6 +338,15 @@ struct diag_pkt {
#define HFI1_BECN_MASK 1 #define HFI1_BECN_MASK 1
#define HFI1_BECN_SMASK BIT(HFI1_BECN_SHIFT) #define HFI1_BECN_SMASK BIT(HFI1_BECN_SHIFT)
/**
* 0xF8 - 4 bits of multicast range and 1 bit for collective range
* Example: For 24 bit LID space,
* Multicast range: 0xF00000 to 0xF7FFFF
* Collective range: 0xF80000 to 0xFFFFFE
*/
#define HFI1_MCAST_NR 0x4 /* Number of top bits set */
#define HFI1_COLLECTIVE_NR 0x1 /* Number of bits after MCAST_NR */
#define HFI1_PSM_IOC_BASE_SEQ 0x0 #define HFI1_PSM_IOC_BASE_SEQ 0x0
static inline __u64 rhf_to_cpu(const __le32 *rbuf) static inline __u64 rhf_to_cpu(const __le32 *rbuf)
......
...@@ -706,6 +706,11 @@ static int __subn_get_opa_portinfo(struct opa_smp *smp, u32 am, u8 *data, ...@@ -706,6 +706,11 @@ static int __subn_get_opa_portinfo(struct opa_smp *smp, u32 am, u8 *data,
pi->opa_cap_mask = cpu_to_be16(OPA_CAP_MASK3_IsSharedSpaceSupported | pi->opa_cap_mask = cpu_to_be16(OPA_CAP_MASK3_IsSharedSpaceSupported |
OPA_CAP_MASK3_IsEthOnFabricSupported); OPA_CAP_MASK3_IsEthOnFabricSupported);
/* Driver does not support mcast/collective configuration */
pi->opa_cap_mask &=
cpu_to_be16(~OPA_CAP_MASK3_IsAddrRangeConfigSupported);
pi->collectivemask_multicastmask = ((HFI1_COLLECTIVE_NR & 0x7)
<< 3 | (HFI1_MCAST_NR & 0x7));
/* HFI supports a replay buffer 128 LTPs in size */ /* HFI supports a replay buffer 128 LTPs in size */
pi->replay_depth.buffer = 0x80; pi->replay_depth.buffer = 0x80;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment