staging/rdma/hfi1: Correctly set RcvCtxtCtrl register
authorMitko Haralanov <mitko.haralanov@intel.com>
Wed, 3 Feb 2016 22:32:49 +0000 (14:32 -0800)
committerDoug Ledford <dledford@redhat.com>
Fri, 11 Mar 2016 01:37:50 +0000 (20:37 -0500)
commit566c157cbd2113a18bfc40170de16227357434d7
treec716911b2a7ddd605ff84fa7bb160380e61db07a
parent11d2b114cdebd9b520de573d74c70fb04c2771cc
staging/rdma/hfi1: Correctly set RcvCtxtCtrl register

The RcvCtxtCtrl register was being incorrectly set upon context
initialization and clean up resulting, in many cases, of contexts using
settings from previous contexts' initialization. This resulted in bad
and unexpected behavior. This was especially important for the TailUpd
bit, which requires special handling and if set incorrectly could lead
to severely degraded performance.

This patch fixes the handling of the RcvCtxtCtrl register, ensuring that
each context gets initialized with settings applicable only for that
context. It also ensures the proper setting for the TailUpd bit by
setting it to either 0 or 1 (as needed by the context's configuration)
explicitly.

Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/staging/rdma/hfi1/chip.c
drivers/staging/rdma/hfi1/file_ops.c
drivers/staging/rdma/hfi1/init.c