Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 593e4d4a authored by Joachim Fenkes's avatar Joachim Fenkes Committed by Roland Dreier
Browse files

IB/ehca: Use default value for Local CA ACK Delay if FW returns 0



Some firmware versions report a Local CA ACK Delay of 0.  In that
case, return a more sensible default value of 12 (-> 16 msec) instead.

Signed-off-by: default avatarJoachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 5b673b71
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -114,7 +114,9 @@ int ehca_query_device(struct ib_device *ibdev, struct ib_device_attr *props)
	}
	}


	props->max_pkeys           = 16;
	props->max_pkeys           = 16;
	props->local_ca_ack_delay  = min_t(u8, rblock->local_ca_ack_delay, 255);
	/* Some FW versions say 0 here; insert sensible value in that case */
	props->local_ca_ack_delay  = rblock->local_ca_ack_delay ?
		min_t(u8, rblock->local_ca_ack_delay, 255) : 12;
	props->max_raw_ipv6_qp     = limit_uint(rblock->max_raw_ipv6_qp);
	props->max_raw_ipv6_qp     = limit_uint(rblock->max_raw_ipv6_qp);
	props->max_raw_ethy_qp     = limit_uint(rblock->max_raw_ethy_qp);
	props->max_raw_ethy_qp     = limit_uint(rblock->max_raw_ethy_qp);
	props->max_mcast_grp       = limit_uint(rblock->max_mcast_grp);
	props->max_mcast_grp       = limit_uint(rblock->max_mcast_grp);