diff options
author | np <np@FreeBSD.org> | 2013-05-13 20:00:03 +0000 |
---|---|---|
committer | np <np@FreeBSD.org> | 2013-05-13 20:00:03 +0000 |
commit | 5e7d97123b572c5bcb7ba0e3102e779bf9190e9c (patch) | |
tree | 71e03442ee7788a615e734a66d001b52893213d4 | |
parent | 7c58f64221b07cdb6be02a0c2279374bc904068c (diff) | |
download | FreeBSD-src-5e7d97123b572c5bcb7ba0e3102e779bf9190e9c.zip FreeBSD-src-5e7d97123b572c5bcb7ba0e3102e779bf9190e9c.tar.gz |
Deal correctly with 40G ports that don't have any transceiver plugged
in. Do not claim that they have unknown tranceivers.
MFC after: 3 days
-rw-r--r-- | sys/dev/cxgbe/t4_main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 0812f80..0cb318c 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -2616,12 +2616,19 @@ build_medialist(struct port_info *pi) ifmedia_add(media, m | IFM_40G_SR4, data, NULL); ifmedia_set(media, m | IFM_40G_SR4); break; + case FW_PORT_MOD_TYPE_TWINAX_PASSIVE: case FW_PORT_MOD_TYPE_TWINAX_ACTIVE: ifmedia_add(media, m | IFM_40G_CR4, data, NULL); ifmedia_set(media, m | IFM_40G_CR4); break; + case FW_PORT_MOD_TYPE_NONE: + m &= ~IFM_FDX; + ifmedia_add(media, m | IFM_NONE, data, NULL); + ifmedia_set(media, m | IFM_NONE); + break; + default: device_printf(pi->dev, "unknown port_type (%d), mod_type (%d)\n", |