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

Commit 0583d521 authored by Matt Carlson's avatar Matt Carlson Committed by David S. Miller
Browse files

tg3: Disable multivec mode for 1 MSIX vector



For single vector MSI-X allocations, we do not want to enable
multivector modes.  This patch makes the necessary corrections.

Signed-off-by: default avatarMatt Carlson <mcarlson@broadcom.com>
Reviewed-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bf933c80
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -8322,7 +8322,8 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
	tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl);
	tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl);
	udelay(100);
	udelay(100);


	if (tp->tg3_flags2 & TG3_FLG2_USING_MSIX) {
	if ((tp->tg3_flags2 & TG3_FLG2_USING_MSIX) &&
		tp->irq_cnt > 1) {
		val = tr32(MSGINT_MODE);
		val = tr32(MSGINT_MODE);
		val |= MSGINT_MODE_MULTIVEC_EN | MSGINT_MODE_ENABLE;
		val |= MSGINT_MODE_MULTIVEC_EN | MSGINT_MODE_ENABLE;
		tw32(MSGINT_MODE, val);
		tw32(MSGINT_MODE, val);
@@ -9062,7 +9063,8 @@ static void tg3_ints_init(struct tg3 *tp)


	if (tp->tg3_flags2 & TG3_FLG2_USING_MSI_OR_MSIX) {
	if (tp->tg3_flags2 & TG3_FLG2_USING_MSI_OR_MSIX) {
		u32 msi_mode = tr32(MSGINT_MODE);
		u32 msi_mode = tr32(MSGINT_MODE);
		if (tp->tg3_flags2 & TG3_FLG2_USING_MSIX)
		if ((tp->tg3_flags2 & TG3_FLG2_USING_MSIX) &&
		    tp->irq_cnt > 1)
			msi_mode |= MSGINT_MODE_MULTIVEC_EN;
			msi_mode |= MSGINT_MODE_MULTIVEC_EN;
		tw32(MSGINT_MODE, msi_mode | MSGINT_MODE_ENABLE);
		tw32(MSGINT_MODE, msi_mode | MSGINT_MODE_ENABLE);
	}
	}