Commit 8a769c65 authored by David S. Miller's avatar David S. Miller

Merge branch 'stmmac-intel-Fixes-and-cleanups-after-dwmac-intel-split'

Andy Shevchenko says:

====================
stmmac: intel: Fixes and cleanups after dwmac-intel split

Seems the split of dwmac-intel didn't go well and on top of that new
functionality in the driver has not been properly tested.

Patch 1 fixes a nasty kernel crash due to missed error handling.
Patches 2 and 3 fix the incorrect split (clock and PCI bar handling).

Patch 4 converts driver to use new PCI IRQ allocation API.

The rest is a set of clean ups that may have been done in the initial
submission.

Series has been tested on couple of Elkhart Lake platforms with different
behaviour of ethernet hardware.

Changelog v3:
- added the cover letter (David)
- appended separate fix as a first patch
- marked patches 2 and 3 with Fixes tag
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents fe4f961e 29e0c2f3
...@@ -30,6 +30,6 @@ obj-$(CONFIG_DWMAC_GENERIC) += dwmac-generic.o ...@@ -30,6 +30,6 @@ obj-$(CONFIG_DWMAC_GENERIC) += dwmac-generic.o
stmmac-platform-objs:= stmmac_platform.o stmmac-platform-objs:= stmmac_platform.o
dwmac-altr-socfpga-objs := altr_tse_pcs.o dwmac-socfpga.o dwmac-altr-socfpga-objs := altr_tse_pcs.o dwmac-socfpga.o
obj-$(CONFIG_DWMAC_INTEL) += dwmac-intel.o obj-$(CONFIG_STMMAC_PCI) += stmmac-pci.o
obj-$(CONFIG_STMMAC_PCI) += stmmac-pci.o obj-$(CONFIG_DWMAC_INTEL) += dwmac-intel.o
stmmac-pci-objs:= stmmac_pci.o stmmac-pci-objs:= stmmac_pci.o
...@@ -4991,7 +4991,7 @@ int stmmac_dvr_probe(struct device *device, ...@@ -4991,7 +4991,7 @@ int stmmac_dvr_probe(struct device *device,
priv->plat->bsp_priv); priv->plat->bsp_priv);
if (ret < 0) if (ret < 0)
return ret; goto error_serdes_powerup;
} }
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
...@@ -5000,6 +5000,8 @@ int stmmac_dvr_probe(struct device *device, ...@@ -5000,6 +5000,8 @@ int stmmac_dvr_probe(struct device *device,
return ret; return ret;
error_serdes_powerup:
unregister_netdev(ndev);
error_netdev_register: error_netdev_register:
phylink_destroy(priv->phylink); phylink_destroy(priv->phylink);
error_phy_setup: error_phy_setup:
......
...@@ -217,15 +217,10 @@ static int stmmac_pci_probe(struct pci_dev *pdev, ...@@ -217,15 +217,10 @@ static int stmmac_pci_probe(struct pci_dev *pdev,
*/ */
static void stmmac_pci_remove(struct pci_dev *pdev) static void stmmac_pci_remove(struct pci_dev *pdev)
{ {
struct net_device *ndev = dev_get_drvdata(&pdev->dev);
struct stmmac_priv *priv = netdev_priv(ndev);
int i; int i;
stmmac_dvr_remove(&pdev->dev); stmmac_dvr_remove(&pdev->dev);
if (priv->plat->stmmac_clk)
clk_unregister_fixed_rate(priv->plat->stmmac_clk);
for (i = 0; i < PCI_STD_NUM_BARS; i++) { for (i = 0; i < PCI_STD_NUM_BARS; i++) {
if (pci_resource_len(pdev, i) == 0) if (pci_resource_len(pdev, i) == 0)
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment