Re: [PATCH v2 3/6] stmmac: pci: Make stmmac_pci_find_phy_addr truly generic
From: Andy Shevchenko
Date: Sat May 27 2017 - 09:25:46 EST
On Fri, May 26, 2017 at 7:07 PM, Jan Kiszka <jan.kiszka@xxxxxxxxxxx> wrote:
> Move the special case for the early Galileo firmware into
> quark_default_setup. This allows to use stmmac_pci_find_phy_addr for
> non-quark cases.
> ret = stmmac_pci_find_phy_addr(pdev, info);
> - if (ret < 0)
> - return ret;
> + if (ret < 0) {
> + /*
> + * Galileo boards with old firmware don't support DMI. We always
> + * use 1 here as PHY address, so at least the first found MAC
> + * controller would be probed.
> + */
> + if (!dmi_get_system_info(DMI_BOARD_NAME))
> + ret = 1;
> + else
> + return ret;
Perhaps
/* Return error to the caller on DMI enabled boards */
if (dmi_...)
return ret;
/*
* Comment goes here, I suppose.
*/
ret = 1;
> + }
--
With Best Regards,
Andy Shevchenko