Skip to contentSkip to conversation

kill the bnx2x pulse in the -rt tree

PATCH New Vernon Mauery 1 participant 1 message Oct 8, 2009 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kill the bnx2x pulse in the -rt tree

Remove pulse code from the bnx2x driver

We are still seeing pulse mismatch error messages while running daEth on the receiver. Here is another go that should fix it for sure. The pulse mismatch errors cause the interface to go out to lunch until the machine is rebooted.

Reasoning for this is from the driver maintainer, Eilon Greenstein:
A possible work around is to remove the pulse section from the timer - everything will work just fine without it. It is there to allow the FW to take control over the link incase the driver died unexpectedly, but since you are not using NCSI (or any other management protocol on this interface) - you don't really need it.

Built and tested against 2.6.31.1-rt12 kernel.

drivers/net/bnx2x_main.c +6 -0
diff -X dontdiff -Nuarp a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
@@ -4188,6 +4188,7 @@ static void bnx2x_timer(unsigned long da
 		rc = bnx2x_rx_int(fp, 1000);
 	}
 
+#ifndef CONFIG_PREEMPT_RT
 	if (!BP_NOMCP(bp)) {
 		int func = BP_FUNC(bp);
 		u32 drv_pulse;
@@ -4211,6 +4212,7 @@ static void bnx2x_timer(unsigned long da
 				  drv_pulse, mcp_pulse);
 		}
 	}
+#endif /* CONFIG_PREEMPT_RT */
 
 	if ((bp->state == BNX2X_STATE_OPEN) ||
 	    (bp->state == BNX2X_STATE_DISABLED))
@@ -6118,6 +6120,7 @@ static int bnx2x_init_hw(struct bnx2x *b
 		break;
 	}
 
+#ifndef CONFIG_PREEMPT_RT
 	if (!BP_NOMCP(bp)) {
 		int func = BP_FUNC(bp);
 
@@ -6128,6 +6131,7 @@ static int bnx2x_init_hw(struct bnx2x *b
 		DP(BNX2X_MSG_MCP, "drv_pulse 0x%x  func_stx 0x%x\n",
 		   bp->fw_drv_pulse_wr_seq, bp->func_stx);
 	} else
+#endif /* CONFIG_PREEMPT_RT */
 		bp->func_stx = 0;
 
 	/* this needs to be done before gunzip end */
@@ -7196,8 +7200,10 @@ static int bnx2x_nic_unload(struct bnx2x
 	bnx2x_netif_stop(bp, 1);
 
 	del_timer_sync(&bp->timer);
+#ifndef CONFIG_PREEMPT_RT
 	SHMEM_WR(bp, func_mb[BP_FUNC(bp)].drv_pulse_mb,
 		 (DRV_PULSE_ALWAYS_ALIVE | bp->fw_drv_pulse_wr_seq));
+#endif /* CONFIG_PREEMPT_RT */
 	bnx2x_stats_handle(bp, STATS_EVENT_STOP);
 
 	/* Release IRQs */