cxgb4: Fix uld_send() for ctrl pkts
authorArjun V <arjun@chelsio.com>
Thu, 2 Feb 2017 07:13:29 +0000 (12:43 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Feb 2017 16:04:32 +0000 (11:04 -0500)
commit0d4b729dac35bb265533c79b554578a5ec6df384
treed0ef95577db29d8607ca822a1dc1fad0ab37d324
parent86bc8b310f1f323ccc9a311933e35d3442473034
cxgb4: Fix uld_send() for ctrl pkts

Without any uld being loaded, uld_txq_info[] will be NULL. uld_send()
is also used for sending control work requests(for eg: setting filter)
that dont require any ulds to be loaded. Hence move uld_txq_info[]
assignment after ctrl_xmit().

Also added a NULL check for uld_txq_info[].

Fixes: 94cdb8bb993a (cxgb4: Add support for dynamic allocation
       of resources for ULD).
Signed-off-by: Arjun V <arjun@chelsio.com>
Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/sge.c