Deleted Added
full compact
33c33
< /*$FreeBSD: head/sys/dev/e1000/e1000_mbx.c 286833 2015-08-16 20:13:58Z sbruno $*/
---
> /*$FreeBSD: head/sys/dev/e1000/e1000_mbx.c 295323 2016-02-05 17:14:37Z erj $*/
428a429
> int count = 10;
432,433c433,435
< /* Take ownership of the buffer */
< E1000_WRITE_REG(hw, E1000_V2PMAILBOX(0), E1000_V2PMAILBOX_VFU);
---
> do {
> /* Take ownership of the buffer */
> E1000_WRITE_REG(hw, E1000_V2PMAILBOX(0), E1000_V2PMAILBOX_VFU);
435,437c437,443
< /* reserve mailbox for vf use */
< if (e1000_read_v2p_mailbox(hw) & E1000_V2PMAILBOX_VFU)
< ret_val = E1000_SUCCESS;
---
> /* reserve mailbox for vf use */
> if (e1000_read_v2p_mailbox(hw) & E1000_V2PMAILBOX_VFU) {
> ret_val = E1000_SUCCESS;
> break;
> }
> usec_delay(1000);
> } while (count-- > 0);
641a648
> int count = 10;
645,646c652,655
< /* Take ownership of the buffer */
< E1000_WRITE_REG(hw, E1000_P2VMAILBOX(vf_number), E1000_P2VMAILBOX_PFU);
---
> do {
> /* Take ownership of the buffer */
> E1000_WRITE_REG(hw, E1000_P2VMAILBOX(vf_number),
> E1000_P2VMAILBOX_PFU);
648,651c657,664
< /* reserve mailbox for vf use */
< p2v_mailbox = E1000_READ_REG(hw, E1000_P2VMAILBOX(vf_number));
< if (p2v_mailbox & E1000_P2VMAILBOX_PFU)
< ret_val = E1000_SUCCESS;
---
> /* reserve mailbox for pf use */
> p2v_mailbox = E1000_READ_REG(hw, E1000_P2VMAILBOX(vf_number));
> if (p2v_mailbox & E1000_P2VMAILBOX_PFU) {
> ret_val = E1000_SUCCESS;
> break;
> }
> usec_delay(1000);
> } while (count-- > 0);
653a667
>