From: Lendacky, Thomas <Thomas.Lendacky@amd.com>
Date: Mon, 14 Jul 2014 19:05:46 +0000 (-0500)
Subject: phy: Expand phy speed/duplex settings array
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3e7077067e80cdded012b7db19b7aae33ceb01e9;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git

phy: Expand phy speed/duplex settings array

Expand the phy speed/duplex settings array to support more
than just baseT features. This change adds entries to support
the following additional speed/duplex/media types:
	SUPPORTED_10000baseKR_Full
	SUPPORTED_10000baseKX4_Full
	SUPPORTED_2500baseX_Full
	SUPPORTED_1000baseKX_Full

Additionally, it changes the 10GbE baseT entry from using the
hardcoded value 10000 to the SPEED_10000 define.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index f7c61812ea4a..e56e269a6eb3 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -138,10 +138,30 @@ struct phy_setting {
 /* A mapping of all SUPPORTED settings to speed/duplex */
 static const struct phy_setting settings[] = {
 	{
-		.speed = 10000,
+		.speed = SPEED_10000,
+		.duplex = DUPLEX_FULL,
+		.setting = SUPPORTED_10000baseKR_Full,
+	},
+	{
+		.speed = SPEED_10000,
+		.duplex = DUPLEX_FULL,
+		.setting = SUPPORTED_10000baseKX4_Full,
+	},
+	{
+		.speed = SPEED_10000,
 		.duplex = DUPLEX_FULL,
 		.setting = SUPPORTED_10000baseT_Full,
 	},
+	{
+		.speed = SPEED_2500,
+		.duplex = DUPLEX_FULL,
+		.setting = SUPPORTED_2500baseX_Full,
+	},
+	{
+		.speed = SPEED_1000,
+		.duplex = DUPLEX_FULL,
+		.setting = SUPPORTED_1000baseKX_Full,
+	},
 	{
 		.speed = SPEED_1000,
 		.duplex = DUPLEX_FULL,