summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Robinson <pbrobinson@gmail.com>2015-07-21 11:11:21 +0100
committerPeter Robinson <pbrobinson@gmail.com>2015-07-21 11:11:21 +0100
commitd2064a30f24284d142fa0db3773ff719c0f6b557 (patch)
tree8348effc8a289285953c8a6a44171249495d8f7d
parent6e946a4d948ae841fb59345d69148d4c20d0ac83 (diff)
downloadkernel-d2064a30f24284d142fa0db3773ff719c0f6b557.tar.gz
kernel-d2064a30f24284d142fa0db3773ff719c0f6b557.tar.xz
kernel-d2064a30f24284d142fa0db3773ff719c0f6b557.zip
Fix stmmac eth driver (AllWinner, other ARM, and other devices)
-rw-r--r--0001-stmmac-fix-setting-of-driver-data-in-stmmac_dvr_prob.patch33
-rw-r--r--kernel.spec6
2 files changed, 39 insertions, 0 deletions
diff --git a/0001-stmmac-fix-setting-of-driver-data-in-stmmac_dvr_prob.patch b/0001-stmmac-fix-setting-of-driver-data-in-stmmac_dvr_prob.patch
new file mode 100644
index 000000000..5b5a2d375
--- /dev/null
+++ b/0001-stmmac-fix-setting-of-driver-data-in-stmmac_dvr_prob.patch
@@ -0,0 +1,33 @@
+From 9e3197f80ac597912808f8ad07ba727c7fdafc50 Mon Sep 17 00:00:00 2001
+From: Peter Robinson <pbrobinson@gmail.com>
+Date: Tue, 21 Jul 2015 09:49:19 +0100
+Subject: [PATCH] stmmac: fix setting of driver data in stmmac_dvr_probe
+
+Commit 803f8fc46274b ("stmmac: move driver data setting into
+stmmac_dvr_probe") mistakenly set priv and not priv->dev as
+driver data. This meant that the remove, resume and suspend
+callbacks that fetched and tried to use this data would most
+likely explode. Fix the issue by using the correct variable.
+
+Fixes: 803f8fc46274b ("stmmac: move driver data setting into stmmac_dvr_probe")
+Signed-off-by: Joachim Eastwood <manabian@xxxxxxxxx>
+---
+ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+index 50f7a7a..864b476 100644
+--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
++++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+@@ -2843,7 +2843,7 @@ int stmmac_dvr_probe(struct device *device,
+ if (res->mac)
+ memcpy(priv->dev->dev_addr, res->mac, ETH_ALEN);
+
+- dev_set_drvdata(device, priv);
++ dev_set_drvdata(device, priv->dev);
+
+ /* Verify driver arguments */
+ stmmac_verify_args();
+--
+2.4.6
+
diff --git a/kernel.spec b/kernel.spec
index 1b820e900..e03a88ec0 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -598,6 +598,9 @@ Patch503: drm-i915-turn-off-wc-mmaps.patch
Patch504: kdbus.patch
+# http://www.spinics.net/lists/netdev/msg336243.html
+Patch505: 0001-stmmac-fix-setting-of-driver-data-in-stmmac_dvr_prob.patch
+
# END OF PATCH DEFINITIONS
%endif
@@ -2033,6 +2036,9 @@ fi
#
#
%changelog
+* Tue Jul 21 2015 Peter Robinson <pbrobinson@fedoraproject.org>
+- Fix stmmac eth driver (AllWinner, other ARM, and other devices)
+
* Mon Jul 20 2015 Josh Boyer <jwboyer@fedoraproject.org> - 4.2.0-0.rc3.git0.1
- Linux v4.2-rc3