]> git.baikalelectronics.ru Git - kernel.git/commit
be2net: fix qnq mode detection on VFs
authorSuresh Reddy <suresh.reddy@emulex.com>
Mon, 23 Jun 2014 11:11:29 +0000 (16:41 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Jun 2014 21:46:54 +0000 (14:46 -0700)
commitbb922355c7445ac2f269a40762ec5e5e95352b41
treeb6f9b4b5ad7340381c9fb8666b62a386b07ffd4f
parent325e93df4d2c201a7a371668a5cc9f4c2f9fc7d0
be2net: fix qnq mode detection on VFs

The driver (on PF or VF) needs to detect if the function is in qnq mode for
a HW hack in be_rx_compl_get() to work.

The driver queries this information using the GET_PROFILE_CONFIG cmd
(since the commit below can caused this regression.) But this cmd is not
available on VFs and so the VFs fail to detect qnq mode. This causes
vlan traffic to not work.

The fix is to use the the adapter->function_mode value queried via
QUERY_FIRMWARE_CONFIG cmd on both PFs and VFs to detect the qnq mode.

Also QNQ_MODE was incorrectly named FLEX10_MODE; correcting that too as the
fix reads much better with the name change.

Fixes: 3411a8fa7 ("refactor multi-channel config code for Skyhawk-R chip")
Signed-off-by: Suresh Reddy <Suresh.Reddy@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be.h
drivers/net/ethernet/emulex/benet/be_cmds.h
drivers/net/ethernet/emulex/benet/be_main.c