Skip to contentSkip to conversation

ethtool: Fix switch on port type

PATCH Applied Ben Hutchings 2 participants 2 messages Dec 1, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ethtool: Fix switch on port type

The new port type cases in commit 6e0512c 'ethtool: Add Direct Attach to the available connector ports' were somehow inserted into the switch on duplex type, not on port type. Move them to the correct place.

---
 ethtool.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
ethtool.c +6 -6
index df02e91..10dfc80 100644
@@ -965,12 +965,6 @@ static int dump_ecmd(struct ethtool_cmd *ep)
 	case DUPLEX_FULL:
 		fprintf(stdout, "Full\n");
 		break;
-	case PORT_DA:
-		fprintf(stdout, "Direct Attach Copper\n");
-		break;
-	case PORT_NONE:
-		fprintf(stdout, "None\n");
-		break;
 	default:
 		fprintf(stdout, "Unknown! (%i)\n", ep->duplex);
 		break;
@@ -993,6 +987,12 @@ static int dump_ecmd(struct ethtool_cmd *ep)
 	case PORT_FIBRE:
 		fprintf(stdout, "FIBRE\n");
 		break;
+	case PORT_DA:
+		fprintf(stdout, "Direct Attach Copper\n");
+		break;
+	case PORT_NONE:
+		fprintf(stdout, "None\n");
+		break;
 	case PORT_OTHER:
 		fprintf(stdout, "Other\n");
 		break;
Signature · 6 lines
1.5.5

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
Applied
#1 lore raw
Quoted 9 lines · Ben Hutchings

The new port type cases in commit 6e0512c 'ethtool: Add Direct Attach to the available connector ports' were somehow inserted into the switch on duplex type, not on port type. Move them to the correct place.

---
  ethtool.c |   12 ++++++------
  1 files changed, 6 insertions(+), 6 deletions(-)

ouch - one of the downsides of git happily merging away without complaint.

applied