]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx4: Fix incorrect cq flushing in error state
authorAriel Nahum <arieln@mellanox.com>
Sun, 9 Aug 2015 08:16:27 +0000 (11:16 +0300)
committerDoug Ledford <dledford@redhat.com>
Sun, 30 Aug 2015 22:12:23 +0000 (18:12 -0400)
commit3003906b9fabd7870268cf0560040c0c7f277bfb
treedc2b3967fb1f0f8574405a324bcbf836fd48b8f0
parentb98ea4dd06c2ab610186e143c06ded0a738ed649
IB/mlx4: Fix incorrect cq flushing in error state

When handling a device internal error, the driver is responsible to
drain the completion queue with flush errors.

In case a completion queue was assigned to multiple send queues, the
driver iterates over the send queues and generates flush errors of
inflight wqes. The driver must correctly pass the wc array with an
offset as a result of the previous send queue iteration. Not doing so
will overwrite previously set completions and return a wrong number
of polled completions which includes ones which were not correctly set.

Fixes: 21244f74d385 (IB/mlx4: Reset flow support for IB kernel ULPs)
Signed-off-by: Ariel Nahum <arieln@mellanox.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Cc: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx4/cq.c