Commit 6eadb0b3 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'smc-r-fixes'



Guangguan Wang says:

====================
Two fixes for SMC-R
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 88e69af0 f5146e3e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1662,6 +1662,7 @@ void smcr_port_add(struct smc_ib_device *smcibdev, u8 ibport)
{
	struct smc_link_group *lgr, *n;

	spin_lock_bh(&smc_lgr_list.lock);
	list_for_each_entry_safe(lgr, n, &smc_lgr_list.list, list) {
		struct smc_link *link;

@@ -1680,6 +1681,7 @@ void smcr_port_add(struct smc_ib_device *smcibdev, u8 ibport)
		if (link)
			smc_llc_add_link_local(link);
	}
	spin_unlock_bh(&smc_lgr_list.lock);
}

/* link is down - switch connections to alternate link,
+2 −1
Original line number Diff line number Diff line
@@ -243,8 +243,9 @@ while (0)
#define SMC_STAT_SERV_SUCC_INC(net, _ini) \
do { \
	typeof(_ini) i = (_ini); \
	bool is_v2 = (i->smcd_version & SMC_V2); \
	bool is_smcd = (i->is_smcd); \
	u8 version = is_smcd ? i->smcd_version : i->smcr_version; \
	bool is_v2 = (version & SMC_V2); \
	typeof(net->smc.smc_stats) smc_stats = (net)->smc.smc_stats; \
	if (is_v2 && is_smcd) \
		this_cpu_inc(smc_stats->smc[SMC_TYPE_D].srv_v2_succ_cnt); \