]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net/mlx4: When issuing commands use rwsem insteam of rw spinlocks
authorMatan Barak <matanb@mellanox.com>
Tue, 23 Sep 2014 08:56:50 +0000 (11:56 +0300)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 7 Jul 2015 21:45:23 +0000 (14:45 -0700)
commit7eeae4b5510ae0841d0b85d7322313c3dbcc1f5b
tree9c84927f6c13af44caa37a4209cd7c67aaf5067b
parent21c887c6d37e0673cdac0ddcf22fbe080ec8adbf
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)

Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
drivers/net/ethernet/mellanox/mlx4/cmd.c
drivers/net/ethernet/mellanox/mlx4/mlx4.h