net/enic: fix crash when changing number of queues
authorJohn Daley <johndale@cisco.com>
Sun, 10 Jul 2016 21:15:30 +0000 (14:15 -0700)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 15 Jul 2016 21:37:13 +0000 (23:37 +0200)
commit954828b8be39f3b77a1869f0371bc9d759b075de
treed4f91f129525891fb6fdb46fdeff737da506fc05
parent0473ffe33832b8803f2653bc97eaa094b30ee5bb
net/enic: fix crash when changing number of queues

The check that all Tx and Rx queues were set up was not
adequate when reconfiguring with a different number of
queues. Only the number of completion queues (CQs) was
being used to make the determination, but the CQ array
is shared between the underlying Rx and Tx queues.

Check that the internal Rx, Tx and CQs are all set up
before completing port configuration.

Fixes: fefed3d1e62c ("enic: new driver")

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Nelson Escobar <neescoba@cisco.com>
drivers/net/enic/enic_ethdev.c