diff options
author | Ira Weiny <ira.weiny@intel.com> | 2017-09-26 16:00:37 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-09-27 17:34:13 +0200 |
commit | aadd7020b5903e353c53b69090335e993b27d9d8 (patch) | |
tree | 8864a543a0bdf0dea8c3baaef3b03eff4cfb2279 /drivers/infiniband/hw/hfi1/sdma.c | |
parent | IB/hfi1: Update HFI to use the latest PCI API (diff) | |
download | linux-aadd7020b5903e353c53b69090335e993b27d9d8.tar.xz linux-aadd7020b5903e353c53b69090335e993b27d9d8.zip |
IB/hfi1: Set default_desc1 just one time
There is no reason to set the default descriptor flag on every SDMA
engine initialization.
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@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/sdma.c')
-rw-r--r-- | drivers/infiniband/hw/hfi1/sdma.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/hfi1/sdma.c b/drivers/infiniband/hw/hfi1/sdma.c index 6781bcdb10b3..e7df7794c97e 100644 --- a/drivers/infiniband/hw/hfi1/sdma.c +++ b/drivers/infiniband/hw/hfi1/sdma.c @@ -1392,6 +1392,13 @@ int sdma_init(struct hfi1_devdata *dd, u8 port) return ret; idle_cnt = ns_to_cclock(dd, idle_cnt); + if (idle_cnt) + dd->default_desc1 = + SDMA_DESC1_HEAD_TO_HOST_FLAG; + else + dd->default_desc1 = + SDMA_DESC1_INT_REQ_FLAG; + if (!sdma_desct_intr) sdma_desct_intr = SDMA_DESC_INTR; @@ -1436,13 +1443,6 @@ int sdma_init(struct hfi1_devdata *dd, u8 port) sde->tail_csr = get_kctxt_csr_addr(dd, this_idx, SD(TAIL)); - if (idle_cnt) - dd->default_desc1 = - SDMA_DESC1_HEAD_TO_HOST_FLAG; - else - dd->default_desc1 = - SDMA_DESC1_INT_REQ_FLAG; - tasklet_init(&sde->sdma_hw_clean_up_task, sdma_hw_clean_up_task, (unsigned long)sde); |