cxgb4: Reset dcb state machine and tx queue prio only if dcb is enabled
authorHariprasad Shenai <hariprasad@chelsio.com>
Thu, 5 May 2016 05:35:39 +0000 (11:05 +0530)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 May 2016 19:12:54 +0000 (15:12 -0400)
commit218d48e701f08a71df57c410e596e30b3285bd25
tree1ba722feabd11873d7dc63e4a41a3647b73345af
parent5113bfdbc63845402eec7f419204d22283c9cd4c
cxgb4: Reset dcb state machine and tx queue prio only if dcb is enabled

When cxgb4 is enabled with CONFIG_CHELSIO_T4_DCB set, VI enable command
gets called with DCB enabled. But when we have a back to back setup with
DCB enabled on one side and non-DCB on the Peer side. Firmware doesn't
send any DCB_L2_CFG, and DCB priority is never set for Tx queue.
But driver resets the queue priority and state machine whenever there
is a link down, this patch fixes it by adding a check to reset only if
cxgb4_dcb_enabled() returns true.

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c