]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
net: stmmac: update pci platform data to use phy_interface
authorVoon Weifeng <weifeng.voon@intel.com>
Fri, 7 Feb 2020 07:34:28 +0000 (15:34 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2020 12:37:25 +0000 (04:37 -0800)
[ Upstream commit 909c1dde67c433f1e4122f2619cbd8ac370fcf0a ]

The recent patch to support passive mode converter did not take care the
phy interface configuration in PCI platform data. Hence, converting all
the PCI platform data from plat->interface to plat->phy_interface as the
default mode is meant for PHY.

Fixes: 0060c8783330 ("net: stmmac: implement support for passive mode converters via dt")
Signed-off-by: Voon Weifeng <weifeng.voon@intel.com>
Tested-by: Tan, Tee Min <tee.min.tan@intel.com>
Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c

index 8237dbc3e9911ac2c79fba1193353f5cf0b68a6f..d2bc04dedd7c4bf8c4d2b566b1f14b91e487bf0e 100644 (file)
@@ -96,7 +96,7 @@ static int stmmac_default_data(struct pci_dev *pdev,
 
        plat->bus_id = 1;
        plat->phy_addr = 0;
-       plat->interface = PHY_INTERFACE_MODE_GMII;
+       plat->phy_interface = PHY_INTERFACE_MODE_GMII;
 
        plat->dma_cfg->pbl = 32;
        plat->dma_cfg->pblx8 = true;
@@ -220,7 +220,8 @@ static int ehl_sgmii_data(struct pci_dev *pdev,
 {
        plat->bus_id = 1;
        plat->phy_addr = 0;
-       plat->interface = PHY_INTERFACE_MODE_SGMII;
+       plat->phy_interface = PHY_INTERFACE_MODE_SGMII;
+
        return ehl_common_data(pdev, plat);
 }
 
@@ -233,7 +234,8 @@ static int ehl_rgmii_data(struct pci_dev *pdev,
 {
        plat->bus_id = 1;
        plat->phy_addr = 0;
-       plat->interface = PHY_INTERFACE_MODE_RGMII;
+       plat->phy_interface = PHY_INTERFACE_MODE_RGMII;
+
        return ehl_common_data(pdev, plat);
 }
 
@@ -261,7 +263,7 @@ static int tgl_sgmii_data(struct pci_dev *pdev,
 {
        plat->bus_id = 1;
        plat->phy_addr = 0;
-       plat->interface = PHY_INTERFACE_MODE_SGMII;
+       plat->phy_interface = PHY_INTERFACE_MODE_SGMII;
        return tgl_common_data(pdev, plat);
 }
 
@@ -361,7 +363,7 @@ static int quark_default_data(struct pci_dev *pdev,
 
        plat->bus_id = pci_dev_id(pdev);
        plat->phy_addr = ret;
-       plat->interface = PHY_INTERFACE_MODE_RMII;
+       plat->phy_interface = PHY_INTERFACE_MODE_RMII;
 
        plat->dma_cfg->pbl = 16;
        plat->dma_cfg->pblx8 = true;
@@ -418,7 +420,7 @@ static int snps_gmac5_default_data(struct pci_dev *pdev,
 
        plat->bus_id = 1;
        plat->phy_addr = -1;
-       plat->interface = PHY_INTERFACE_MODE_GMII;
+       plat->phy_interface = PHY_INTERFACE_MODE_GMII;
 
        plat->dma_cfg->pbl = 32;
        plat->dma_cfg->pblx8 = true;