net/mlx4: When issuing commands use rwsem insteam of rw spinlocks
The mlx4 drivers use a read_lock while issuing commands, but
when a lot of commands are issued simultaneously, the mlx4
driver could sleep. In order to resolve this "sleep while holding
spin-lock" issue, we replace this spinlock with read-write
semaphore.
Fixes: 2393fac27a97 ('net/mlx4: Switching between sending
commands via polling and events may results
in hung tasks') Signed-off-by: Matan Barak <matanb@mellanox.com>
(Ported from Mellanox OFED 2.4)