Patchwork [1/2] niu: fix PHY template choice for 10G copper

login
register
mail settings
Submitter Constantin Baranov
Date Feb. 17, 2009, 11:43 a.m.
Message ID <20090217154323.580fcb2f.baranov@mercdev.com>
Download mbox | patch
Permalink /patch/23249/
State Accepted
Delegated to: David Miller
Headers show

Comments

Constantin Baranov - Feb. 17, 2009, 11:43 a.m.
Fixed a typo in niu_determine_phy_disposition() which resulted in
phy_template_1g_copper being selected for 10G/copper configuration.

Signed-off-by: Constantin Baranov <baranov@mercdev.com>
---
While working on support of link speed setting I discovered this piece
of code which seemed pretty strange to me. I believe this to be just a
typo. With its current state the code for 10G/copper card initialization
will likely be broken by the second patch alone (as it changes the way
the 1G card is initialized), this is why I'm submitting these two
patches together. I was unable to find any 10G/copper Neptune cards
available for testing, so I'm asking for the help of the community.

Can anyone on the list confirm that the current driver works for
10G/copper? This would be much appreciated.

David, could you please clarify which is the correct way to initialize
10G/copper card? If I'm wrong, and 1G code must really work with 10G
cards, could you please describe which would be the best way to separate
1G and 10G branches in the xcvr_init_1g() and link_status_1g() routines?

 drivers/net/niu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 0c0b752..15c9e5f 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -2456,7 +2456,7 @@  static int niu_determine_phy_disposition(struct niu *np)
 
 		case NIU_FLAGS_10G:
 			/* 10G copper */
-			tp = &phy_template_1g_copper;
+			tp = &phy_template_10g_copper;
 			break;
 
 		case NIU_FLAGS_FIBER: