devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] drivers: net: xgene: Fix backward compatibility of newer firmware with older kernel
@ 2015-03-03 19:39 Iyappan Subramanian
       [not found] ` <1425411581-25463-1-git-send-email-isubramanian-qTEPVZfXA3Y@public.gmane.org>
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Iyappan Subramanian @ 2015-03-03 19:39 UTC (permalink / raw)
  To: davem, netdev, devicetree
  Cc: linux-arm-kernel, mlangsdo, patches, Iyappan Subramanian

Kernel 3.17 driver supports only RGMII ethernet interface.
Since the Tianocore DT contains same compatibility string for RGMII,
SGMII based 1G and XFI based 10G interfaces, crash happens when probe called
on SGMII based 1G and XFI based 10G interface.

This patch fixes the backward compatibility of the older driver with the
newer firmware by making the binding unique so that the older driver won't
recognize the non-supported interfaces.

v2: Address comments from v1
* updated cover letter subject line with net: xgene
* Documentation: formatted compatible string values as list

v1:
* Initial version
---

Iyappan Subramanian (3):
  Documentation: dts: Update compatible field description for APM X-Gene
  dtb: change binding name to match with newer firmware DT
  drivers: net: xgene: fix new firmware backward compatibility with
    older driver

 Documentation/devicetree/bindings/net/apm-xgene-enet.txt | 5 ++++-
 arch/arm64/boot/dts/apm/apm-storm.dtsi                   | 4 ++--
 drivers/net/ethernet/apm/xgene/xgene_enet_main.c         | 4 ++++
 3 files changed, 10 insertions(+), 3 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 1/3] Documentation: dts: Update compatible field description for APM X-Gene
       [not found] ` <1425411581-25463-1-git-send-email-isubramanian-qTEPVZfXA3Y@public.gmane.org>
@ 2015-03-03 19:39   ` Iyappan Subramanian
  0 siblings, 0 replies; 5+ messages in thread
From: Iyappan Subramanian @ 2015-03-03 19:39 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q, netdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	mlangsdo-H+wXaHxf7aLQT0dZR+AlfA, patches-qTEPVZfXA3Y,
	Iyappan Subramanian, Keyur Chudgar

Signed-off-by: Iyappan Subramanian <isubramanian-qTEPVZfXA3Y@public.gmane.org>
Signed-off-by: Keyur Chudgar <kchudgar-qTEPVZfXA3Y@public.gmane.org>
Tested-by: Mark Langsdorf <mlangsdo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 Documentation/devicetree/bindings/net/apm-xgene-enet.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/net/apm-xgene-enet.txt b/Documentation/devicetree/bindings/net/apm-xgene-enet.txt
index cfcc527..6151999 100644
--- a/Documentation/devicetree/bindings/net/apm-xgene-enet.txt
+++ b/Documentation/devicetree/bindings/net/apm-xgene-enet.txt
@@ -4,7 +4,10 @@ Ethernet nodes are defined to describe on-chip ethernet interfaces in
 APM X-Gene SoC.
 
 Required properties for all the ethernet interfaces:
-- compatible: Should be "apm,xgene-enet"
+- compatible: Should state binding information from the following list,
+  - "apm,xgene-enet":    RGMII based 1G interface
+  - "apm,xgene1-sgenet": SGMII based 1G interface
+  - "apm,xgene1-xgenet": XFI based 10G interface
 - reg: Address and length of the register set for the device. It contains the
   information of registers in the same order as described by reg-names
 - reg-names: Should contain the register set names
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 2/3] dtb: change binding name to match with newer firmware DT
  2015-03-03 19:39 [PATCH v2 0/3] drivers: net: xgene: Fix backward compatibility of newer firmware with older kernel Iyappan Subramanian
       [not found] ` <1425411581-25463-1-git-send-email-isubramanian-qTEPVZfXA3Y@public.gmane.org>
@ 2015-03-03 19:39 ` Iyappan Subramanian
  2015-03-03 19:39 ` [PATCH v2 3/3] drivers: net: xgene: fix new firmware backward compatibility with older driver Iyappan Subramanian
  2015-03-04 20:54 ` [PATCH v2 0/3] drivers: net: xgene: Fix backward compatibility of newer firmware with older kernel David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Iyappan Subramanian @ 2015-03-03 19:39 UTC (permalink / raw)
  To: davem, netdev, devicetree
  Cc: linux-arm-kernel, mlangsdo, patches, Iyappan Subramanian,
	Keyur Chudgar

This patch fixes the backward compatibility of the older driver with the
newer firmware by making the binding unique so that the older driver won't
recognize the non-supported interfaces.

The new bindings are in sync with the newer firmware.

Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: Keyur Chudgar <kchudgar@apm.com>
Tested-by: Mark Langsdorf <mlangsdo@redhat.com>
---
 arch/arm64/boot/dts/apm/apm-storm.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/apm/apm-storm.dtsi b/arch/arm64/boot/dts/apm/apm-storm.dtsi
index f1ad9c2..a857794 100644
--- a/arch/arm64/boot/dts/apm/apm-storm.dtsi
+++ b/arch/arm64/boot/dts/apm/apm-storm.dtsi
@@ -622,7 +622,7 @@
 		};
 
 		sgenet0: ethernet@1f210000 {
-			compatible = "apm,xgene-enet";
+			compatible = "apm,xgene1-sgenet";
 			status = "disabled";
 			reg = <0x0 0x1f210000 0x0 0xd100>,
 			      <0x0 0x1f200000 0x0 0Xc300>,
@@ -636,7 +636,7 @@
 		};
 
 		xgenet: ethernet@1f610000 {
-			compatible = "apm,xgene-enet";
+			compatible = "apm,xgene1-xgenet";
 			status = "disabled";
 			reg = <0x0 0x1f610000 0x0 0xd100>,
 			      <0x0 0x1f600000 0x0 0Xc300>,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 3/3] drivers: net: xgene: fix new firmware backward compatibility with older driver
  2015-03-03 19:39 [PATCH v2 0/3] drivers: net: xgene: Fix backward compatibility of newer firmware with older kernel Iyappan Subramanian
       [not found] ` <1425411581-25463-1-git-send-email-isubramanian-qTEPVZfXA3Y@public.gmane.org>
  2015-03-03 19:39 ` [PATCH v2 2/3] dtb: change binding name to match with newer firmware DT Iyappan Subramanian
@ 2015-03-03 19:39 ` Iyappan Subramanian
  2015-03-04 20:54 ` [PATCH v2 0/3] drivers: net: xgene: Fix backward compatibility of newer firmware with older kernel David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Iyappan Subramanian @ 2015-03-03 19:39 UTC (permalink / raw)
  To: davem, netdev, devicetree
  Cc: linux-arm-kernel, mlangsdo, patches, Iyappan Subramanian,
	Keyur Chudgar

This patch fixes the backward compatibile of the older driver with the
newer firmware by making the binding unique so that the older driver won't
recognize the non-supported interfaces.

Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: Keyur Chudgar <kchudgar@apm.com>
Tested-by: Mark Langsdorf <mlangsdo@redhat.com>
---
 drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
index 4de62b2..635a83b 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
@@ -1025,6 +1025,8 @@ static int xgene_enet_remove(struct platform_device *pdev)
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id xgene_enet_acpi_match[] = {
 	{ "APMC0D05", },
+	{ "APMC0D30", },
+	{ "APMC0D31", },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, xgene_enet_acpi_match);
@@ -1033,6 +1035,8 @@ MODULE_DEVICE_TABLE(acpi, xgene_enet_acpi_match);
 #ifdef CONFIG_OF
 static struct of_device_id xgene_enet_of_match[] = {
 	{.compatible = "apm,xgene-enet",},
+	{.compatible = "apm,xgene1-sgenet",},
+	{.compatible = "apm,xgene1-xgenet",},
 	{},
 };
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 0/3] drivers: net: xgene: Fix backward compatibility of newer firmware with older kernel
  2015-03-03 19:39 [PATCH v2 0/3] drivers: net: xgene: Fix backward compatibility of newer firmware with older kernel Iyappan Subramanian
                   ` (2 preceding siblings ...)
  2015-03-03 19:39 ` [PATCH v2 3/3] drivers: net: xgene: fix new firmware backward compatibility with older driver Iyappan Subramanian
@ 2015-03-04 20:54 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2015-03-04 20:54 UTC (permalink / raw)
  To: isubramanian; +Cc: netdev, devicetree, linux-arm-kernel, mlangsdo, patches

From: Iyappan Subramanian <isubramanian@apm.com>
Date: Tue,  3 Mar 2015 11:39:38 -0800

> Kernel 3.17 driver supports only RGMII ethernet interface.
> Since the Tianocore DT contains same compatibility string for RGMII,
> SGMII based 1G and XFI based 10G interfaces, crash happens when probe called
> on SGMII based 1G and XFI based 10G interface.
> 
> This patch fixes the backward compatibility of the older driver with the
> newer firmware by making the binding unique so that the older driver won't
> recognize the non-supported interfaces.
> 
> v2: Address comments from v1
> * updated cover letter subject line with net: xgene
> * Documentation: formatted compatible string values as list
> 
> v1:
> * Initial version

Series applied, thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-04 20:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-03 19:39 [PATCH v2 0/3] drivers: net: xgene: Fix backward compatibility of newer firmware with older kernel Iyappan Subramanian
     [not found] ` <1425411581-25463-1-git-send-email-isubramanian-qTEPVZfXA3Y@public.gmane.org>
2015-03-03 19:39   ` [PATCH v2 1/3] Documentation: dts: Update compatible field description for APM X-Gene Iyappan Subramanian
2015-03-03 19:39 ` [PATCH v2 2/3] dtb: change binding name to match with newer firmware DT Iyappan Subramanian
2015-03-03 19:39 ` [PATCH v2 3/3] drivers: net: xgene: fix new firmware backward compatibility with older driver Iyappan Subramanian
2015-03-04 20:54 ` [PATCH v2 0/3] drivers: net: xgene: Fix backward compatibility of newer firmware with older kernel David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).