]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: set_intr_bits uses incorrect source for register modification
authorMichael J. Ruhl <michael.j.ruhl@intel.com>
Mon, 10 Sep 2018 14:54:04 +0000 (07:54 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 11 Sep 2018 17:33:13 +0000 (11:33 -0600)
commit9ec54c80585b01f8df20986680db4faa098f8a2d
treea860c7319e42e2973ca6ce7eddffc12b3236c14a
parent078a1f1408ccd826951eb1af0720532fed04ac9b
IB/hfi1: set_intr_bits uses incorrect source for register modification

HFI IRQ enable bits are not being set correctly.  Send context error and
DC IRQs are not being enabled correctly.  In addition, send context error
IRQs are not being delivered.

Because of this, send context errors are not being handled correctly when
they occur.

When setting the IRQ bits, if an IRQ range is used, and the last bit is on
a register boundary (bit 63), the calculated index for the final register
modification is incorrect (index + 1 vs. index).

The incorrect index calculation causes incorrect IRQ bits to be set.  In
this case the send context error IRQ is NOT enabled.

Fix by using the 'last' value rather than the counted 'src' value to
determine the final index to use.  This satisfies all cases.

Fixes: 1a1a1f68b8ff ("IB/hfi1: Rework the IRQ API to be more flexible")
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hfi1/chip.c