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

Commit c8ba4ad0 authored by Suresh Reddy's avatar Suresh Reddy Committed by David S. Miller
Browse files

be2net: restrict MODIFY_EQ_DELAY cmd to a max of 8 EQs



Issuing this cmd for more than 8 EQs does not have the intended effect
even on BEx and Skyhawk-R.

This patch fixes this by issuing this cmd for upto 8 EQs at a time.
Signed-off-by: default avatarSuresh Reddy <Suresh.Reddy@emulex.com>

Signed-off-by: default avatarSathya Perla <sathya.perla@emulex.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 435452aa
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -1902,16 +1902,12 @@ int be_cmd_modify_eqd(struct be_adapter *adapter, struct be_set_eqd *set_eqd,
{
	int num_eqs, i = 0;

	if (lancer_chip(adapter) && num > 8) {
	while (num) {
		num_eqs = min(num, 8);
		__be_cmd_modify_eqd(adapter, &set_eqd[i], num_eqs);
		i += num_eqs;
		num -= num_eqs;
	}
	} else {
		__be_cmd_modify_eqd(adapter, set_eqd, num);
	}

	return 0;
}