]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bnxt_en: Check hardware resources before enabling NTUPLE.
authorMichael Chan <mchan@broadcom.com>
Sun, 27 Dec 2015 23:19:24 +0000 (18:19 -0500)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 7 Jul 2016 00:36:41 +0000 (17:36 -0700)
commit2d501bf36f40e7065f16e7e8266e813e2f26d120
treed83dea87e30999d800d7d5f3bba1c3c559f05528
parent3ab6843e12d89f0ccfcc7cf76cdd6939586d13db
bnxt_en: Check hardware resources before enabling NTUPLE.

Orabug: 23221795

The hardware resources required to enable NTUPLE varies depending on
how many rx channels are configured.  We need to make sure we have the
resources before we enable NTUPLE.  Add bnxt_rfs_capable() to do the
checking.

In addition, we need to do the same checking in ndo_fix_features().  As
the rx channels are changed using ethtool -L, we call
netdev_update_features() to make the necessary adjustment for NTUPLE.

Calling netdev_update_features() in netif_running() state but before
calling bnxt_open_nic() would be a problem.  To make this work,
bnxt_set_features() has to be modified to test for BNXT_STATE_OPEN for
the true hardware state instead of checking netif_running().

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 2bcfa6f6e7cf867e4aa623f84caea4bc413d38c9)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c