diff options
author | Jakub Pawlak <jakub.pawlak@intel.com> | 2016-10-10 15:14:56 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-11-15 22:16:41 +0100 |
commit | d9ac4555fb2bcd6b794aaa0b39acad81111d9f42 (patch) | |
tree | 6f0db0c542352bcba065d2ba3281603d775d12ca /drivers/infiniband/hw/hfi1/pio.c | |
parent | IB/hfi1: Remove redundant sysfs irq affinity entry (diff) | |
download | linux-d9ac4555fb2bcd6b794aaa0b39acad81111d9f42.tar.xz linux-d9ac4555fb2bcd6b794aaa0b39acad81111d9f42.zip |
IB/hfi1: Fix integrity check flags default values
Prevent setting up integrity check flags when module is loaded
with NO_INTEGRITY capability.
Reviewed-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Jakub Pawlak <jakub.pawlak@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/pio.c')
-rw-r--r-- | drivers/infiniband/hw/hfi1/pio.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/infiniband/hw/hfi1/pio.c b/drivers/infiniband/hw/hfi1/pio.c index 50a3a36d9363..d89b8745d4c1 100644 --- a/drivers/infiniband/hw/hfi1/pio.c +++ b/drivers/infiniband/hw/hfi1/pio.c @@ -668,19 +668,12 @@ void sc_set_cr_threshold(struct send_context *sc, u32 new_threshold) void set_pio_integrity(struct send_context *sc) { struct hfi1_devdata *dd = sc->dd; - u64 reg = 0; u32 hw_context = sc->hw_context; int type = sc->type; - /* - * No integrity checks if HFI1_CAP_NO_INTEGRITY is set, or if - * we're snooping. - */ - if (likely(!HFI1_CAP_IS_KSET(NO_INTEGRITY)) && - dd->hfi1_snoop.mode_flag != HFI1_PORT_SNOOP_MODE) - reg = hfi1_pkt_default_send_ctxt_mask(dd, type); - - write_kctxt_csr(dd, hw_context, SC(CHECK_ENABLE), reg); + write_kctxt_csr(dd, hw_context, + SC(CHECK_ENABLE), + hfi1_pkt_default_send_ctxt_mask(dd, type)); } static u32 get_buffers_allocated(struct send_context *sc) |