提交 faf32978 编写于 作者: J Jesse Brandeburg 提交者: Jeff Kirsher

i40e: make warning less verbose

The driver is un-necessarily printing a warning that is only marginally
useful to the user.  Make the warning only print if extended driver
string printing is enabled, other messages related to a reset event
will still continue to print.

Change-ID: I5e8beca6516a2f176cd2e72b0ac2b3b909e6c953
Signed-off-by: NJesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: NJim Young <jamesx.m.young@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 94128516
...@@ -6148,8 +6148,8 @@ static void i40e_handle_mdd_event(struct i40e_pf *pf) ...@@ -6148,8 +6148,8 @@ static void i40e_handle_mdd_event(struct i40e_pf *pf)
I40E_GL_MDET_TX_EVENT_SHIFT; I40E_GL_MDET_TX_EVENT_SHIFT;
u8 queue = (reg & I40E_GL_MDET_TX_QUEUE_MASK) >> u8 queue = (reg & I40E_GL_MDET_TX_QUEUE_MASK) >>
I40E_GL_MDET_TX_QUEUE_SHIFT; I40E_GL_MDET_TX_QUEUE_SHIFT;
dev_info(&pf->pdev->dev, if (netif_msg_tx_err(pf))
"Malicious Driver Detection event 0x%02x on TX queue %d pf number 0x%02x vf number 0x%02x\n", dev_info(&pf->pdev->dev, "Malicious Driver Detection event 0x%02x on TX queue %d pf number 0x%02x vf number 0x%02x\n",
event, queue, pf_num, vf_num); event, queue, pf_num, vf_num);
wr32(hw, I40E_GL_MDET_TX, 0xffffffff); wr32(hw, I40E_GL_MDET_TX, 0xffffffff);
mdd_detected = true; mdd_detected = true;
...@@ -6162,8 +6162,8 @@ static void i40e_handle_mdd_event(struct i40e_pf *pf) ...@@ -6162,8 +6162,8 @@ static void i40e_handle_mdd_event(struct i40e_pf *pf)
I40E_GL_MDET_RX_EVENT_SHIFT; I40E_GL_MDET_RX_EVENT_SHIFT;
u8 queue = (reg & I40E_GL_MDET_RX_QUEUE_MASK) >> u8 queue = (reg & I40E_GL_MDET_RX_QUEUE_MASK) >>
I40E_GL_MDET_RX_QUEUE_SHIFT; I40E_GL_MDET_RX_QUEUE_SHIFT;
dev_info(&pf->pdev->dev, if (netif_msg_rx_err(pf))
"Malicious Driver Detection event 0x%02x on RX queue %d of function 0x%02x\n", dev_info(&pf->pdev->dev, "Malicious Driver Detection event 0x%02x on RX queue %d of function 0x%02x\n",
event, queue, func); event, queue, func);
wr32(hw, I40E_GL_MDET_RX, 0xffffffff); wr32(hw, I40E_GL_MDET_RX, 0xffffffff);
mdd_detected = true; mdd_detected = true;
...@@ -6173,17 +6173,13 @@ static void i40e_handle_mdd_event(struct i40e_pf *pf) ...@@ -6173,17 +6173,13 @@ static void i40e_handle_mdd_event(struct i40e_pf *pf)
reg = rd32(hw, I40E_PF_MDET_TX); reg = rd32(hw, I40E_PF_MDET_TX);
if (reg & I40E_PF_MDET_TX_VALID_MASK) { if (reg & I40E_PF_MDET_TX_VALID_MASK) {
wr32(hw, I40E_PF_MDET_TX, 0xFFFF); wr32(hw, I40E_PF_MDET_TX, 0xFFFF);
dev_info(&pf->pdev->dev, dev_info(&pf->pdev->dev, "TX driver issue detected, PF reset issued\n");
"MDD TX event is for this function 0x%08x, requesting PF reset.\n",
reg);
pf_mdd_detected = true; pf_mdd_detected = true;
} }
reg = rd32(hw, I40E_PF_MDET_RX); reg = rd32(hw, I40E_PF_MDET_RX);
if (reg & I40E_PF_MDET_RX_VALID_MASK) { if (reg & I40E_PF_MDET_RX_VALID_MASK) {
wr32(hw, I40E_PF_MDET_RX, 0xFFFF); wr32(hw, I40E_PF_MDET_RX, 0xFFFF);
dev_info(&pf->pdev->dev, dev_info(&pf->pdev->dev, "RX driver issue detected, PF reset issued\n");
"MDD RX event is for this function 0x%08x, requesting PF reset.\n",
reg);
pf_mdd_detected = true; pf_mdd_detected = true;
} }
/* Queue belongs to the PF, initiate a reset */ /* Queue belongs to the PF, initiate a reset */
...@@ -6200,14 +6196,16 @@ static void i40e_handle_mdd_event(struct i40e_pf *pf) ...@@ -6200,14 +6196,16 @@ static void i40e_handle_mdd_event(struct i40e_pf *pf)
if (reg & I40E_VP_MDET_TX_VALID_MASK) { if (reg & I40E_VP_MDET_TX_VALID_MASK) {
wr32(hw, I40E_VP_MDET_TX(i), 0xFFFF); wr32(hw, I40E_VP_MDET_TX(i), 0xFFFF);
vf->num_mdd_events++; vf->num_mdd_events++;
dev_info(&pf->pdev->dev, "MDD TX event on VF %d\n", i); dev_info(&pf->pdev->dev, "TX driver issue detected on VF %d\n",
i);
} }
reg = rd32(hw, I40E_VP_MDET_RX(i)); reg = rd32(hw, I40E_VP_MDET_RX(i));
if (reg & I40E_VP_MDET_RX_VALID_MASK) { if (reg & I40E_VP_MDET_RX_VALID_MASK) {
wr32(hw, I40E_VP_MDET_RX(i), 0xFFFF); wr32(hw, I40E_VP_MDET_RX(i), 0xFFFF);
vf->num_mdd_events++; vf->num_mdd_events++;
dev_info(&pf->pdev->dev, "MDD RX event on VF %d\n", i); dev_info(&pf->pdev->dev, "RX driver issue detected on VF %d\n",
i);
} }
if (vf->num_mdd_events > I40E_DEFAULT_NUM_MDD_EVENTS_ALLOWED) { if (vf->num_mdd_events > I40E_DEFAULT_NUM_MDD_EVENTS_ALLOWED) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册