IB/hfi1: Correctly clear the pkey
authorMichael J. Ruhl <michael.j.ruhl@intel.com>
Thu, 4 May 2017 12:15:03 +0000 (05:15 -0700)
committerDoug Ledford <dledford@redhat.com>
Thu, 4 May 2017 23:31:46 +0000 (19:31 -0400)
commit637a9a7febf8b48d2ac1916f34d639aa81998a8a
treeb026c81565c19b9543f3103bb061fe989d919ec7
parent5fbded483c699823a7cca001a5c27ddc4d73370f
IB/hfi1: Correctly clear the pkey

In the close path the context is removed from the device array, and then
the clear pkey function is called.  The pkey function trys to get the
context from the device array, but because it was removed the clearing
does not occur.

Rework pkey clear function to work as expected.  Update the function
variable to reflect the correct size and name of the hw_context.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@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: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/chip.c
drivers/infiniband/hw/hfi1/chip.h
drivers/infiniband/hw/hfi1/file_ops.c
drivers/infiniband/hw/hfi1/vnic_main.c