cxgb4: Don't assume FW_PORT_CMD reply is always port info msg
authorHariprasad Shenai <hariprasad@chelsio.com>
Tue, 26 Apr 2016 14:40:28 +0000 (20:10 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Apr 2016 17:23:57 +0000 (13:23 -0400)
commit23853a0a9a7621922a21759eeed8c5bc09c71c54
tree81e94b31e47ffae1c38c212390f556be6b6054a7
parent134491fdc319037f37adc5f8ec51093e5cd5ada1
cxgb4: Don't assume FW_PORT_CMD reply is always port info msg

The firmware can send a set of asynchronous replies through FW_PORT_CMD
with DCBX information when that's negotiated with the Link Peer. The old
code always assumed that a FW_PORT_CMD reply was always a Get Port
Information message. This change conditionalizes the code to only handle
the Get Port Information messages and throws a warning if we don't
understand what we've been given.

Also refactor t4_handle_fw_rpl() so that core functionality performed by
t4_handle_get_port_info() for a specified port.

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