]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/ocrdma: Initialize stats resources in the driver before ib device registration.
authorSelvin Xavier <selvin.xavier@broadcom.com>
Fri, 5 Feb 2016 14:36:37 +0000 (20:06 +0530)
committerDoug Ledford <dledford@redhat.com>
Fri, 5 Feb 2016 20:14:27 +0000 (15:14 -0500)
commit4fce31d3fc69dd71562dca120b0c07daf0ea59ed
tree5726300e584bfa0b6bc8b003cda389cbc7ed8165
parent8dd297445abaed4788ec14864510945ee472b8b9
RDMA/ocrdma: Initialize stats resources in the driver before ib device registration.

In the latest kernel, process_mad hook of the driver can be invoked as
soon as device is registered. In this hook, ocrdma driver is issuing a
command to get the stats counters from the HW. This is triggering system
crash since the statistics command resources are not allocated by the driver.
Changing the sequence of initialization to avoid this crash.

Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/ocrdma/ocrdma_main.c
drivers/infiniband/hw/ocrdma/ocrdma_stats.c
drivers/infiniband/hw/ocrdma/ocrdma_stats.h