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

Commit 94824f3d authored by Michael Chan's avatar Michael Chan Committed by David S. Miller
Browse files

cnic: Fix crash during bnx2x MTU change.



cnic_service_bnx2x() irq handler can be called during chip reset from
MTU change.  Need to check that the cnic's device state is up before
handling the irq.

Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 04b1a223
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -2334,13 +2334,13 @@ static int cnic_service_bnx2x(void *data, void *status_blk)
	struct cnic_local *cp = dev->cnic_priv;
	u16 prod = cp->kcq_prod_idx & MAX_KCQ_IDX;

	if (likely(test_bit(CNIC_F_CNIC_UP, &dev->flags))) {
		prefetch(cp->status_blk.bnx2x);
		prefetch(&cp->kcq[KCQ_PG(prod)][KCQ_IDX(prod)]);

	if (likely(test_bit(CNIC_F_CNIC_UP, &dev->flags)))
		tasklet_schedule(&cp->cnic_irq_task);

		cnic_chk_pkt_rings(cp);
	}

	return 0;
}