Commit 4c2d518695338801110bc166eece6aa02822b0b4

Authored by Hariprasad Shenai
Committed by David S. Miller
1 parent 8d609725d4

cxgb4: Fill in supported link mode for SFP modules

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 6 additions and 2 deletions Side-by-side Diff

drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
... ... @@ -2442,9 +2442,13 @@
2442 2442 SUPPORTED_10000baseKR_Full | SUPPORTED_1000baseKX_Full |
2443 2443 SUPPORTED_10000baseKX4_Full;
2444 2444 else if (type == FW_PORT_TYPE_FIBER_XFI ||
2445   - type == FW_PORT_TYPE_FIBER_XAUI || type == FW_PORT_TYPE_SFP)
  2445 + type == FW_PORT_TYPE_FIBER_XAUI || type == FW_PORT_TYPE_SFP) {
2446 2446 v |= SUPPORTED_FIBRE;
2447   - else if (type == FW_PORT_TYPE_BP40_BA)
  2447 + if (caps & FW_PORT_CAP_SPEED_1G)
  2448 + v |= SUPPORTED_1000baseT_Full;
  2449 + if (caps & FW_PORT_CAP_SPEED_10G)
  2450 + v |= SUPPORTED_10000baseT_Full;
  2451 + } else if (type == FW_PORT_TYPE_BP40_BA)
2448 2452 v |= SUPPORTED_40000baseSR4_Full;
2449 2453  
2450 2454 if (caps & FW_PORT_CAP_ANEG)