net/mlx4: Switching between sending commands via polling and events may results in hung tasks
When switching between those methonds of sending commands, it's
possbile that a task will keep waiting for the polling sempahore,
but may never be able to acquire it.
This is due to mlx4_cmd_use_events which "down"s the
sempahore back to 0.
Reproducing it involves in sending commands while changing
between mlx4_cmd_use_polling and mlx4_cmd_use_events.
Signed-off-by: Matan Barak <matanb@mellanox.com>
(Ported from Mellanox OFED 2.4)