Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175606
b: refs/heads/master
c: fef45f4
h: refs/heads/master
v: v3
  • Loading branch information
Alexander Duyck authored and David S. Miller committed Dec 12, 2009
1 parent 94f1709 commit 20b7671
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ceb0c77e573bb208e282ce9af973a07ab79791e2
refs/heads/master: fef45f4ce221fc110f70716a00f40be697c5b254
22 changes: 13 additions & 9 deletions trunk/drivers/net/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4608,8 +4608,14 @@ static void igb_rcv_msg_from_vf(struct igb_adapter *adapter, u32 vf)

retval = igb_read_mbx(hw, msgbuf, E1000_VFMAILBOX_SIZE, vf);

if (retval)
if (retval) {
/* if receive failed revoke VF CTS stats and restart init */
dev_err(&pdev->dev, "Error receiving message from VF\n");
vf_data->flags &= ~IGB_VF_FLAG_CTS;
if (!time_after(jiffies, vf_data->last_nack + (2 * HZ)))
return;
goto out;
}

/* this is a message we already processed, do nothing */
if (msgbuf[0] & (E1000_VT_MSGTYPE_ACK | E1000_VT_MSGTYPE_NACK))
Expand All @@ -4626,12 +4632,10 @@ static void igb_rcv_msg_from_vf(struct igb_adapter *adapter, u32 vf)
}

if (!(vf_data->flags & IGB_VF_FLAG_CTS)) {
msgbuf[0] = E1000_VT_MSGTYPE_NACK;
if (time_after(jiffies, vf_data->last_nack + (2 * HZ))) {
igb_write_mbx(hw, msgbuf, 1, vf);
vf_data->last_nack = jiffies;
}
return;
if (!time_after(jiffies, vf_data->last_nack + (2 * HZ)))
return;
retval = -1;
goto out;
}

switch ((msgbuf[0] & 0xFFFF)) {
Expand All @@ -4656,14 +4660,14 @@ static void igb_rcv_msg_from_vf(struct igb_adapter *adapter, u32 vf)
break;
}

msgbuf[0] |= E1000_VT_MSGTYPE_CTS;
out:
/* notify the VF of the results of what it sent us */
if (retval)
msgbuf[0] |= E1000_VT_MSGTYPE_NACK;
else
msgbuf[0] |= E1000_VT_MSGTYPE_ACK;

msgbuf[0] |= E1000_VT_MSGTYPE_CTS;

igb_write_mbx(hw, msgbuf, 1, vf);
}

Expand Down

0 comments on commit 20b7671

Please sign in to comment.