Bug 213845 - [PATCH] bxe(4) boots with no capabilities enabled
Summary: [PATCH] bxe(4) boots with no capabilities enabled
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.0-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: Sean Bruno
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-10-28 08:13 UTC by Paul Herman
Modified: 2017-04-05 19:42 UTC (History)
2 users (show)

See Also:
sbruno: mfc-stable11?
sbruno: mfc-stable10?
sbruno: mfc-stable9?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Herman 2016-10-28 08:13:58 UTC
bxe cards boot with no hardware capabilities (i.e. RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4...) enabled. "ifconfig -m bxe0" correctly displays what NIC is capable of, but no options are enabled.

This is a problem because, for example, "ifconfig vlanmtu" is not allowed to be changed by the driver and consequently all cloned vlan devices end up with an MTU of 1496 by default.  The bug was introduced when the driver was updated to use if_setcapabilities().

CURRENT is also affected. 10 isn't. Suggested patch against 11.0-STABLE below.

bxe0: <QLogic NetXtreme II BCM57810 10GbE (B0) BXE v:1.78.89

FreeBSD rt2-gerdc1.cgn.cleverbridge.com 11.0-STABLE FreeBSD 11.0-STABLE #1 r308000M: Thu Oct 27 17:29:07 CEST 2016     root@rt2-gerdc1.cgn.cleverbridge.com:/usr/obj/usr/src/sys/rt2-gerdc1  amd64


Index: sys/dev/bxe/bxe.c
===================================================================
--- sys/dev/bxe/bxe.c   (revision 308000)
+++ sys/dev/bxe/bxe.c   (working copy)
@@ -12691,6 +12691,7 @@
          IFCAP_WOL_MAGIC);
 #endif
     if_setcapabilitiesbit(ifp, capabilities, 0); /* XXX */
+    if_setcapenable(ifp, if_getcapabilities(ifp));
     if_setbaudrate(ifp, IF_Gbps(10));
 /* XXX */
     if_setsendqlen(ifp, sc->tx_ring_size);
Comment 1 commit-hook freebsd_committer 2016-11-05 16:18:04 UTC
A commit references this bug:

Author: sbruno
Date: Sat Nov  5 16:17:08 UTC 2016
New revision: 308343
URL: https://svnweb.freebsd.org/changeset/base/308343

Log:
  r266979 missed a call to enable capabilities of the hw leading to an
  inability to enable features of the device.

  PR:             213845
  Submitted by:   pherman@frenchfries.net
  MFC after:      1 week

Changes:
  head/sys/dev/bxe/bxe.c
Comment 2 Vinícius Zavam freebsd_committer 2017-04-05 08:23:57 UTC
Will it be merged into STABLE/11 (and STABLE/10)? MFC appreciated.
Patch works just fine in production environment running STABLE/11.
Comment 3 commit-hook freebsd_committer 2017-04-05 19:34:00 UTC
A commit references this bug:

Author: sbruno
Date: Wed Apr  5 19:33:04 UTC 2017
New revision: 316539
URL: https://svnweb.freebsd.org/changeset/base/316539

Log:
  MFC r308343

  r266979 missed a call to enable capabilities of the hw leading to an
  inability to enable features of the device.

  PR:             213845

Changes:
_U  stable/11/
  stable/11/sys/dev/bxe/bxe.c
Comment 4 Sean Bruno freebsd_committer 2017-04-05 19:42:07 UTC
MFC'd to stable/11.

stable/10 did not get an MFC of the changes that required this update, will not be MFC'd to stable/10