Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152852738
D19176.id124498.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D19176.id124498.diff
View Options
diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c
--- a/sys/dev/ixgbe/if_ix.c
+++ b/sys/dev/ixgbe/if_ix.c
@@ -3679,7 +3679,8 @@
/* Update DMA coalescing config */
ixgbe_config_dmac(sc);
/* should actually be negotiated value */
- iflib_link_state_change(ctx, LINK_STATE_UP, IF_Gbps(10));
+ iflib_link_state_change(ctx, LINK_STATE_UP,
+ ixgbe_link_speed_to_baudrate(adapter->link_speed));
if (sc->feat_en & IXGBE_FEATURE_SRIOV)
ixgbe_ping_all_vfs(sc);
diff --git a/sys/dev/ixgbe/if_ixv.c b/sys/dev/ixgbe/if_ixv.c
--- a/sys/dev/ixgbe/if_ixv.c
+++ b/sys/dev/ixgbe/if_ixv.c
@@ -937,7 +937,7 @@
"Full Duplex");
sc->link_active = true;
iflib_link_state_change(ctx, LINK_STATE_UP,
- IF_Gbps(10));
+ ixgbe_link_speed_to_baudrate(adapter->link_speed));
}
} else { /* Link down */
if (sc->link_active == true) {
diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h
--- a/sys/dev/ixgbe/ixgbe.h
+++ b/sys/dev/ixgbe/ixgbe.h
@@ -530,6 +530,8 @@
return (status);
}
+uint64_t ixgbe_link_speed_to_baudrate(ixgbe_link_speed speed);
+
/* Shared Prototypes */
int ixgbe_allocate_queues(struct ixgbe_softc *);
diff --git a/sys/dev/ixgbe/ixgbe_osdep.c b/sys/dev/ixgbe/ixgbe_osdep.c
--- a/sys/dev/ixgbe/ixgbe_osdep.c
+++ b/sys/dev/ixgbe/ixgbe_osdep.c
@@ -76,3 +76,36 @@
((struct ixgbe_softc *)hw->back)->osdep.mem_bus_space_handle,
reg + (offset << 2), val);
}
+
+uint64_t
+ixgbe_link_speed_to_baudrate(ixgbe_link_speed speed)
+{
+ uint64_t baudrate;
+
+ switch (speed) {
+ case IXGBE_LINK_SPEED_10GB_FULL:
+ baudrate = IF_Gbps(10);
+ break;
+ case IXGBE_LINK_SPEED_5GB_FULL:
+ baudrate = IF_Gbps(5);
+ break;
+ case IXGBE_LINK_SPEED_2_5GB_FULL:
+ baudrate = IF_Mbps(2500);
+ break;
+ case IXGBE_LINK_SPEED_1GB_FULL:
+ baudrate = IF_Gbps(1);
+ break;
+ case IXGBE_LINK_SPEED_100_FULL:
+ baudrate = IF_Mbps(100);
+ break;
+ case IXGBE_LINK_SPEED_10_FULL:
+ baudrate = IF_Mbps(10);
+ break;
+ case IXGBE_LINK_SPEED_UNKNOWN:
+ default:
+ baudrate = 0;
+ break;
+ }
+
+ return baudrate;
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 18, 12:42 PM (10 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31719902
Default Alt Text
D19176.id124498.diff (2 KB)
Attached To
Mode
D19176: ix, ixv: Update link status with autonegotiated baudrate value
Attached
Detach File
Event Timeline
Log In to Comment