Commit 485acc2c authored by David S. Miller's avatar David S. Miller

Merge branch 'xgene'

Iyappan Subramanian says:

====================
drivers: net: xgene: Fix backward compatibility of newer firmware with older kernel

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
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 9145736d ecadf4e7
...@@ -4,7 +4,10 @@ Ethernet nodes are defined to describe on-chip ethernet interfaces in ...@@ -4,7 +4,10 @@ Ethernet nodes are defined to describe on-chip ethernet interfaces in
APM X-Gene SoC. APM X-Gene SoC.
Required properties for all the ethernet interfaces: 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 - 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 information of registers in the same order as described by reg-names
- reg-names: Should contain the register set names - reg-names: Should contain the register set names
......
...@@ -622,7 +622,7 @@ menetphy: menetphy@3 { ...@@ -622,7 +622,7 @@ menetphy: menetphy@3 {
}; };
sgenet0: ethernet@1f210000 { sgenet0: ethernet@1f210000 {
compatible = "apm,xgene-enet"; compatible = "apm,xgene1-sgenet";
status = "disabled"; status = "disabled";
reg = <0x0 0x1f210000 0x0 0xd100>, reg = <0x0 0x1f210000 0x0 0xd100>,
<0x0 0x1f200000 0x0 0Xc300>, <0x0 0x1f200000 0x0 0Xc300>,
...@@ -636,7 +636,7 @@ sgenet0: ethernet@1f210000 { ...@@ -636,7 +636,7 @@ sgenet0: ethernet@1f210000 {
}; };
xgenet: ethernet@1f610000 { xgenet: ethernet@1f610000 {
compatible = "apm,xgene-enet"; compatible = "apm,xgene1-xgenet";
status = "disabled"; status = "disabled";
reg = <0x0 0x1f610000 0x0 0xd100>, reg = <0x0 0x1f610000 0x0 0xd100>,
<0x0 0x1f600000 0x0 0Xc300>, <0x0 0x1f600000 0x0 0Xc300>,
......
...@@ -1025,6 +1025,8 @@ static int xgene_enet_remove(struct platform_device *pdev) ...@@ -1025,6 +1025,8 @@ static int xgene_enet_remove(struct platform_device *pdev)
#ifdef CONFIG_ACPI #ifdef CONFIG_ACPI
static const struct acpi_device_id xgene_enet_acpi_match[] = { static const struct acpi_device_id xgene_enet_acpi_match[] = {
{ "APMC0D05", }, { "APMC0D05", },
{ "APMC0D30", },
{ "APMC0D31", },
{ } { }
}; };
MODULE_DEVICE_TABLE(acpi, xgene_enet_acpi_match); MODULE_DEVICE_TABLE(acpi, xgene_enet_acpi_match);
...@@ -1033,6 +1035,8 @@ MODULE_DEVICE_TABLE(acpi, xgene_enet_acpi_match); ...@@ -1033,6 +1035,8 @@ MODULE_DEVICE_TABLE(acpi, xgene_enet_acpi_match);
#ifdef CONFIG_OF #ifdef CONFIG_OF
static struct of_device_id xgene_enet_of_match[] = { static struct of_device_id xgene_enet_of_match[] = {
{.compatible = "apm,xgene-enet",}, {.compatible = "apm,xgene-enet",},
{.compatible = "apm,xgene1-sgenet",},
{.compatible = "apm,xgene1-xgenet",},
{}, {},
}; };
......
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