/* returns SUCCESS if it successfully received a message acknowledgement  */
static s32 igb_poll_for_ack(struct e1000_hw *hw, u16 mbx_id)
/* returns SUCCESS if it successfully received a message acknowledgement  */
static s32 igb_poll_for_ack(struct e1000_hw *hw, u16 mbx_id)
{
	struct e1000_mbx_info *mbx = &hw->mbx;
	int countdown = mbx->timeout;
	if (!countdown || !mbx->ops.check_for_ack)
		goto out;
	while (countdown && mbx->ops.check_for_ack(hw, mbx_id)) {
		countdown--;
		if (!countdown)
			break;
		udelay(mbx->usec_delay);
	}
	if (!countdown)
		mbx->timeout = 0;
out:
	return countdown ? 0 : -E1000_ERR_MBX;
}