> +static void igc_wait_for_lmvp_mac_passthrough(struct pci_dev *pdev,
> +                                           struct igc_hw *hw)
> +{
> +     u8 addr[ETH_ALEN] __aligned(2);
> +     u32 orig_ral, orig_rah;
> +     u32 ral, rah;
> +     int i;
> +
> +     if (!igc_is_lmvp_device(pdev))
> +             return;
> +
> +     igc_read_rar0(hw, addr, &orig_ral, &orig_rah);
> +
> +     for (i = 0; i < 100; i++) {
> +             msleep(100);
> +             igc_read_rar0(hw, addr, &ral, &rah);
> +             if ((ral != orig_ral || rah != orig_rah) &&
> +                 is_valid_ether_addr(addr))
> +                     return;
> +     }

Please use one of the helpers from iopoll.h

       Andrew

Reply via email to