diff mbox

[16/27] UBUNTU: SAUCE: phylib: Minimum hack to get the generic 10G PHY driver to work with 10G "fixed-link"s

Message ID 21eb4fde97ebff3488b19c2fdfd6ffe4469d6b56.1339455422.git.bcollins@ubuntu.com
State New
Headers show

Commit Message

Benjamin Collins Oct. 27, 2009, 9:55 p.m. UTC
This patch is being maintained and will eventually be merged upstream by
Freescale directly. The powerpc-e500mc flavour uses this.

Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
---
 drivers/net/phy/fixed.c |    8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox

Patch

diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c
index 633680d..65e106b 100644
--- a/drivers/net/phy/fixed.c
+++ b/drivers/net/phy/fixed.c
@@ -5,6 +5,7 @@ 
  *         Anton Vorontsov <avorontsov@ru.mvista.com>
  *
  * Copyright (c) 2006-2007 MontaVista Software, Inc.
+ * Copyright 2009 Freescale Semiconductor, Inc.
  *
  * This program is free software; you can redistribute  it and/or modify it
  * under  the terms of  the GNU General  Public License as published by the
@@ -17,6 +18,7 @@ 
 #include <linux/platform_device.h>
 #include <linux/list.h>
 #include <linux/mii.h>
+#include <linux/mdio.h>
 #include <linux/phy.h>
 #include <linux/phy_fixed.h>
 #include <linux/err.h>
@@ -55,6 +57,9 @@  static int fixed_phy_update_regs(struct fixed_phy *fp)
 		bmcr |= BMCR_FULLDPLX;
 
 		switch (fp->status.speed) {
+		case 10000:
+			fp->regs[MDIO_STAT2] = MDIO_STAT2_DEVPRST_VAL;
+			break;
 		case 1000:
 			bmsr |= BMSR_ESTATEN;
 			bmcr |= BMCR_SPEED1000;
@@ -75,6 +80,9 @@  static int fixed_phy_update_regs(struct fixed_phy *fp)
 		}
 	} else {
 		switch (fp->status.speed) {
+		case 10000:
+			fp->regs[MDIO_STAT2] = MDIO_STAT2_DEVPRST_VAL;
+			break;
 		case 1000:
 			bmsr |= BMSR_ESTATEN;
 			bmcr |= BMCR_SPEED1000;