aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/qib/qib_iba7322.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_iba7322.c')
-rw-r--r--drivers/infiniband/hw/qib/qib_iba7322.c41
1 files changed, 20 insertions, 21 deletions
diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c
index ef97b71c8f7d..f32b4628e991 100644
--- a/drivers/infiniband/hw/qib/qib_iba7322.c
+++ b/drivers/infiniband/hw/qib/qib_iba7322.c
@@ -6429,6 +6429,7 @@ static int qib_init_7322_variables(struct qib_devdata *dd)
6429 unsigned features, pidx, sbufcnt; 6429 unsigned features, pidx, sbufcnt;
6430 int ret, mtu; 6430 int ret, mtu;
6431 u32 sbufs, updthresh; 6431 u32 sbufs, updthresh;
6432 resource_size_t vl15off;
6432 6433
6433 /* pport structs are contiguous, allocated after devdata */ 6434 /* pport structs are contiguous, allocated after devdata */
6434 ppd = (struct qib_pportdata *)(dd + 1); 6435 ppd = (struct qib_pportdata *)(dd + 1);
@@ -6677,29 +6678,27 @@ static int qib_init_7322_variables(struct qib_devdata *dd)
6677 qib_7322_config_ctxts(dd); 6678 qib_7322_config_ctxts(dd);
6678 qib_set_ctxtcnt(dd); 6679 qib_set_ctxtcnt(dd);
6679 6680
6680 if (qib_wc_pat) { 6681 /*
6681 resource_size_t vl15off; 6682 * We do not set WC on the VL15 buffers to avoid
6682 /* 6683 * a rare problem with unaligned writes from
6683 * We do not set WC on the VL15 buffers to avoid 6684 * interrupt-flushed store buffers, so we need
6684 * a rare problem with unaligned writes from 6685 * to map those separately here. We can't solve
6685 * interrupt-flushed store buffers, so we need 6686 * this for the rarely used mtrr case.
6686 * to map those separately here. We can't solve 6687 */
6687 * this for the rarely used mtrr case. 6688 ret = init_chip_wc_pat(dd, 0);
6688 */ 6689 if (ret)
6689 ret = init_chip_wc_pat(dd, 0); 6690 goto bail;
6690 if (ret)
6691 goto bail;
6692 6691
6693 /* vl15 buffers start just after the 4k buffers */ 6692 /* vl15 buffers start just after the 4k buffers */
6694 vl15off = dd->physaddr + (dd->piobufbase >> 32) + 6693 vl15off = dd->physaddr + (dd->piobufbase >> 32) +
6695 dd->piobcnt4k * dd->align4k; 6694 dd->piobcnt4k * dd->align4k;
6696 dd->piovl15base = ioremap_nocache(vl15off, 6695 dd->piovl15base = ioremap_nocache(vl15off,
6697 NUM_VL15_BUFS * dd->align4k); 6696 NUM_VL15_BUFS * dd->align4k);
6698 if (!dd->piovl15base) { 6697 if (!dd->piovl15base) {
6699 ret = -ENOMEM; 6698 ret = -ENOMEM;
6700 goto bail; 6699 goto bail;
6701 }
6702 } 6700 }
6701
6703 qib_7322_set_baseaddrs(dd); /* set chip access pointers now */ 6702 qib_7322_set_baseaddrs(dd); /* set chip access pointers now */
6704 6703
6705 ret = 0; 6704 ret = 0;