diff options
-rw-r--r-- | drivers/infiniband/hw/cxgb4/cm.c | 29 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb4/cq.c | 8 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb4/device.c | 16 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb4/provider.c | 4 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb4/qp.c | 41 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb4/t4.h | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 16 | ||||
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 3 |
9 files changed, 78 insertions, 44 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index df5bd3df08a2..6d61a16d1f5c 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c | |||
@@ -1813,6 +1813,20 @@ static int is_neg_adv(unsigned int status) | |||
1813 | status == CPL_ERR_KEEPALV_NEG_ADVICE; | 1813 | status == CPL_ERR_KEEPALV_NEG_ADVICE; |
1814 | } | 1814 | } |
1815 | 1815 | ||
1816 | static char *neg_adv_str(unsigned int status) | ||
1817 | { | ||
1818 | switch (status) { | ||
1819 | case CPL_ERR_RTX_NEG_ADVICE: | ||
1820 | return "Retransmit timeout"; | ||
1821 | case CPL_ERR_PERSIST_NEG_ADVICE: | ||
1822 | return "Persist timeout"; | ||
1823 | case CPL_ERR_KEEPALV_NEG_ADVICE: | ||
1824 | return "Keepalive timeout"; | ||
1825 | default: | ||
1826 | return "Unknown"; | ||
1827 | } | ||
1828 | } | ||
1829 | |||
1816 | static void set_tcp_window(struct c4iw_ep *ep, struct port_info *pi) | 1830 | static void set_tcp_window(struct c4iw_ep *ep, struct port_info *pi) |
1817 | { | 1831 | { |
1818 | ep->snd_win = snd_win; | 1832 | ep->snd_win = snd_win; |
@@ -2011,8 +2025,9 @@ static int act_open_rpl(struct c4iw_dev *dev, struct sk_buff *skb) | |||
2011 | status, status2errno(status)); | 2025 | status, status2errno(status)); |
2012 | 2026 | ||
2013 | if (is_neg_adv(status)) { | 2027 | if (is_neg_adv(status)) { |
2014 | printk(KERN_WARNING MOD "Connection problems for atid %u\n", | 2028 | dev_warn(&dev->rdev.lldi.pdev->dev, |
2015 | atid); | 2029 | "Connection problems for atid %u status %u (%s)\n", |
2030 | atid, status, neg_adv_str(status)); | ||
2016 | return 0; | 2031 | return 0; |
2017 | } | 2032 | } |
2018 | 2033 | ||
@@ -2488,8 +2503,9 @@ static int peer_abort(struct c4iw_dev *dev, struct sk_buff *skb) | |||
2488 | 2503 | ||
2489 | ep = lookup_tid(t, tid); | 2504 | ep = lookup_tid(t, tid); |
2490 | if (is_neg_adv(req->status)) { | 2505 | if (is_neg_adv(req->status)) { |
2491 | PDBG("%s neg_adv_abort ep %p tid %u\n", __func__, ep, | 2506 | dev_warn(&dev->rdev.lldi.pdev->dev, |
2492 | ep->hwtid); | 2507 | "Negative advice on abort - tid %u status %d (%s)\n", |
2508 | ep->hwtid, req->status, neg_adv_str(req->status)); | ||
2493 | return 0; | 2509 | return 0; |
2494 | } | 2510 | } |
2495 | PDBG("%s ep %p tid %u state %u\n", __func__, ep, ep->hwtid, | 2511 | PDBG("%s ep %p tid %u state %u\n", __func__, ep, ep->hwtid, |
@@ -3894,8 +3910,9 @@ static int peer_abort_intr(struct c4iw_dev *dev, struct sk_buff *skb) | |||
3894 | return 0; | 3910 | return 0; |
3895 | } | 3911 | } |
3896 | if (is_neg_adv(req->status)) { | 3912 | if (is_neg_adv(req->status)) { |
3897 | PDBG("%s neg_adv_abort ep %p tid %u\n", __func__, ep, | 3913 | dev_warn(&dev->rdev.lldi.pdev->dev, |
3898 | ep->hwtid); | 3914 | "Negative advice on abort - tid %u status %d (%s)\n", |
3915 | ep->hwtid, req->status, neg_adv_str(req->status)); | ||
3899 | kfree_skb(skb); | 3916 | kfree_skb(skb); |
3900 | return 0; | 3917 | return 0; |
3901 | } | 3918 | } |
diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c index de9bcf2e6d30..0f773e78e080 100644 --- a/drivers/infiniband/hw/cxgb4/cq.c +++ b/drivers/infiniband/hw/cxgb4/cq.c | |||
@@ -913,14 +913,8 @@ struct ib_cq *c4iw_create_cq(struct ib_device *ibdev, int entries, | |||
913 | /* | 913 | /* |
914 | * memsize must be a multiple of the page size if its a user cq. | 914 | * memsize must be a multiple of the page size if its a user cq. |
915 | */ | 915 | */ |
916 | if (ucontext) { | 916 | if (ucontext) |
917 | memsize = roundup(memsize, PAGE_SIZE); | 917 | memsize = roundup(memsize, PAGE_SIZE); |
918 | hwentries = memsize / sizeof *chp->cq.queue; | ||
919 | while (hwentries > rhp->rdev.hw_queue.t4_max_iq_size) { | ||
920 | memsize -= PAGE_SIZE; | ||
921 | hwentries = memsize / sizeof *chp->cq.queue; | ||
922 | } | ||
923 | } | ||
924 | chp->cq.size = hwentries; | 918 | chp->cq.size = hwentries; |
925 | chp->cq.memsize = memsize; | 919 | chp->cq.memsize = memsize; |
926 | chp->cq.vector = vector; | 920 | chp->cq.vector = vector; |
diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c index 03b6fa1291bf..bda949223637 100644 --- a/drivers/infiniband/hw/cxgb4/device.c +++ b/drivers/infiniband/hw/cxgb4/device.c | |||
@@ -934,17 +934,17 @@ static struct c4iw_dev *c4iw_alloc(const struct cxgb4_lld_info *infop) | |||
934 | 934 | ||
935 | devp->rdev.hw_queue.t4_eq_status_entries = | 935 | devp->rdev.hw_queue.t4_eq_status_entries = |
936 | devp->rdev.lldi.sge_ingpadboundary > 64 ? 2 : 1; | 936 | devp->rdev.lldi.sge_ingpadboundary > 64 ? 2 : 1; |
937 | devp->rdev.hw_queue.t4_max_eq_size = | 937 | devp->rdev.hw_queue.t4_max_eq_size = 65520; |
938 | 65520 - devp->rdev.hw_queue.t4_eq_status_entries; | 938 | devp->rdev.hw_queue.t4_max_iq_size = 65520; |
939 | devp->rdev.hw_queue.t4_max_iq_size = 65520 - 1; | 939 | devp->rdev.hw_queue.t4_max_rq_size = 8192 - |
940 | devp->rdev.hw_queue.t4_max_rq_size = | 940 | devp->rdev.hw_queue.t4_eq_status_entries - 1; |
941 | 8192 - devp->rdev.hw_queue.t4_eq_status_entries; | ||
942 | devp->rdev.hw_queue.t4_max_sq_size = | 941 | devp->rdev.hw_queue.t4_max_sq_size = |
943 | devp->rdev.hw_queue.t4_max_eq_size - 1; | 942 | devp->rdev.hw_queue.t4_max_eq_size - |
943 | devp->rdev.hw_queue.t4_eq_status_entries - 1; | ||
944 | devp->rdev.hw_queue.t4_max_qp_depth = | 944 | devp->rdev.hw_queue.t4_max_qp_depth = |
945 | devp->rdev.hw_queue.t4_max_rq_size - 1; | 945 | devp->rdev.hw_queue.t4_max_rq_size; |
946 | devp->rdev.hw_queue.t4_max_cq_depth = | 946 | devp->rdev.hw_queue.t4_max_cq_depth = |
947 | devp->rdev.hw_queue.t4_max_iq_size - 1; | 947 | devp->rdev.hw_queue.t4_max_iq_size - 2; |
948 | devp->rdev.hw_queue.t4_stat_len = | 948 | devp->rdev.hw_queue.t4_stat_len = |
949 | devp->rdev.lldi.sge_egrstatuspagesize; | 949 | devp->rdev.lldi.sge_egrstatuspagesize; |
950 | 950 | ||
diff --git a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h index 69f047cdba6a..c378fd25ee0c 100644 --- a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h +++ b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h | |||
@@ -193,7 +193,7 @@ static inline int c4iw_fatal_error(struct c4iw_rdev *rdev) | |||
193 | 193 | ||
194 | static inline int c4iw_num_stags(struct c4iw_rdev *rdev) | 194 | static inline int c4iw_num_stags(struct c4iw_rdev *rdev) |
195 | { | 195 | { |
196 | return min((int)T4_MAX_NUM_STAG, (int)(rdev->lldi.vr->stag.size >> 5)); | 196 | return (int)(rdev->lldi.vr->stag.size >> 5); |
197 | } | 197 | } |
198 | 198 | ||
199 | #define C4IW_WR_TO (30*HZ) | 199 | #define C4IW_WR_TO (30*HZ) |
diff --git a/drivers/infiniband/hw/cxgb4/provider.c b/drivers/infiniband/hw/cxgb4/provider.c index 67c4a6908021..72e3b69d1b76 100644 --- a/drivers/infiniband/hw/cxgb4/provider.c +++ b/drivers/infiniband/hw/cxgb4/provider.c | |||
@@ -318,7 +318,7 @@ static int c4iw_query_device(struct ib_device *ibdev, | |||
318 | props->vendor_id = (u32)dev->rdev.lldi.pdev->vendor; | 318 | props->vendor_id = (u32)dev->rdev.lldi.pdev->vendor; |
319 | props->vendor_part_id = (u32)dev->rdev.lldi.pdev->device; | 319 | props->vendor_part_id = (u32)dev->rdev.lldi.pdev->device; |
320 | props->max_mr_size = T4_MAX_MR_SIZE; | 320 | props->max_mr_size = T4_MAX_MR_SIZE; |
321 | props->max_qp = T4_MAX_NUM_QP; | 321 | props->max_qp = dev->rdev.lldi.vr->qp.size / 2; |
322 | props->max_qp_wr = dev->rdev.hw_queue.t4_max_qp_depth; | 322 | props->max_qp_wr = dev->rdev.hw_queue.t4_max_qp_depth; |
323 | props->max_sge = T4_MAX_RECV_SGE; | 323 | props->max_sge = T4_MAX_RECV_SGE; |
324 | props->max_sge_rd = 1; | 324 | props->max_sge_rd = 1; |
@@ -326,7 +326,7 @@ static int c4iw_query_device(struct ib_device *ibdev, | |||
326 | props->max_qp_rd_atom = min(dev->rdev.lldi.max_ordird_qp, | 326 | props->max_qp_rd_atom = min(dev->rdev.lldi.max_ordird_qp, |
327 | c4iw_max_read_depth); | 327 | c4iw_max_read_depth); |
328 | props->max_qp_init_rd_atom = props->max_qp_rd_atom; | 328 | props->max_qp_init_rd_atom = props->max_qp_rd_atom; |
329 | props->max_cq = T4_MAX_NUM_CQ; | 329 | props->max_cq = dev->rdev.lldi.vr->qp.size; |
330 | props->max_cqe = dev->rdev.hw_queue.t4_max_cq_depth; | 330 | props->max_cqe = dev->rdev.hw_queue.t4_max_cq_depth; |
331 | props->max_mr = c4iw_num_stags(&dev->rdev); | 331 | props->max_mr = c4iw_num_stags(&dev->rdev); |
332 | props->max_pd = T4_MAX_NUM_PD; | 332 | props->max_pd = T4_MAX_NUM_PD; |
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c index fd66bd9a9db0..c158fcc02bca 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c | |||
@@ -205,9 +205,9 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq, | |||
205 | } | 205 | } |
206 | 206 | ||
207 | /* | 207 | /* |
208 | * RQT must be a power of 2. | 208 | * RQT must be a power of 2 and at least 16 deep. |
209 | */ | 209 | */ |
210 | wq->rq.rqt_size = roundup_pow_of_two(wq->rq.size); | 210 | wq->rq.rqt_size = roundup_pow_of_two(max_t(u16, wq->rq.size, 16)); |
211 | wq->rq.rqt_hwaddr = c4iw_rqtpool_alloc(rdev, wq->rq.rqt_size); | 211 | wq->rq.rqt_hwaddr = c4iw_rqtpool_alloc(rdev, wq->rq.rqt_size); |
212 | if (!wq->rq.rqt_hwaddr) { | 212 | if (!wq->rq.rqt_hwaddr) { |
213 | ret = -ENOMEM; | 213 | ret = -ENOMEM; |
@@ -1621,13 +1621,17 @@ struct ib_qp *c4iw_create_qp(struct ib_pd *pd, struct ib_qp_init_attr *attrs, | |||
1621 | if (attrs->cap.max_inline_data > T4_MAX_SEND_INLINE) | 1621 | if (attrs->cap.max_inline_data > T4_MAX_SEND_INLINE) |
1622 | return ERR_PTR(-EINVAL); | 1622 | return ERR_PTR(-EINVAL); |
1623 | 1623 | ||
1624 | rqsize = roundup(attrs->cap.max_recv_wr + 1, 16); | 1624 | if (attrs->cap.max_recv_wr > rhp->rdev.hw_queue.t4_max_rq_size) |
1625 | if (rqsize > rhp->rdev.hw_queue.t4_max_rq_size) | ||
1626 | return ERR_PTR(-E2BIG); | 1625 | return ERR_PTR(-E2BIG); |
1626 | rqsize = attrs->cap.max_recv_wr + 1; | ||
1627 | if (rqsize < 8) | ||
1628 | rqsize = 8; | ||
1627 | 1629 | ||
1628 | sqsize = roundup(attrs->cap.max_send_wr + 1, 16); | 1630 | if (attrs->cap.max_send_wr > rhp->rdev.hw_queue.t4_max_sq_size) |
1629 | if (sqsize > rhp->rdev.hw_queue.t4_max_sq_size) | ||
1630 | return ERR_PTR(-E2BIG); | 1631 | return ERR_PTR(-E2BIG); |
1632 | sqsize = attrs->cap.max_send_wr + 1; | ||
1633 | if (sqsize < 8) | ||
1634 | sqsize = 8; | ||
1631 | 1635 | ||
1632 | ucontext = pd->uobject ? to_c4iw_ucontext(pd->uobject->context) : NULL; | 1636 | ucontext = pd->uobject ? to_c4iw_ucontext(pd->uobject->context) : NULL; |
1633 | 1637 | ||
@@ -1635,19 +1639,20 @@ struct ib_qp *c4iw_create_qp(struct ib_pd *pd, struct ib_qp_init_attr *attrs, | |||
1635 | if (!qhp) | 1639 | if (!qhp) |
1636 | return ERR_PTR(-ENOMEM); | 1640 | return ERR_PTR(-ENOMEM); |
1637 | qhp->wq.sq.size = sqsize; | 1641 | qhp->wq.sq.size = sqsize; |
1638 | qhp->wq.sq.memsize = (sqsize + 1) * sizeof *qhp->wq.sq.queue; | 1642 | qhp->wq.sq.memsize = |
1643 | (sqsize + rhp->rdev.hw_queue.t4_eq_status_entries) * | ||
1644 | sizeof(*qhp->wq.sq.queue) + 16 * sizeof(__be64); | ||
1639 | qhp->wq.sq.flush_cidx = -1; | 1645 | qhp->wq.sq.flush_cidx = -1; |
1640 | qhp->wq.rq.size = rqsize; | 1646 | qhp->wq.rq.size = rqsize; |
1641 | qhp->wq.rq.memsize = (rqsize + 1) * sizeof *qhp->wq.rq.queue; | 1647 | qhp->wq.rq.memsize = |
1648 | (rqsize + rhp->rdev.hw_queue.t4_eq_status_entries) * | ||
1649 | sizeof(*qhp->wq.rq.queue); | ||
1642 | 1650 | ||
1643 | if (ucontext) { | 1651 | if (ucontext) { |
1644 | qhp->wq.sq.memsize = roundup(qhp->wq.sq.memsize, PAGE_SIZE); | 1652 | qhp->wq.sq.memsize = roundup(qhp->wq.sq.memsize, PAGE_SIZE); |
1645 | qhp->wq.rq.memsize = roundup(qhp->wq.rq.memsize, PAGE_SIZE); | 1653 | qhp->wq.rq.memsize = roundup(qhp->wq.rq.memsize, PAGE_SIZE); |
1646 | } | 1654 | } |
1647 | 1655 | ||
1648 | PDBG("%s sqsize %u sqmemsize %zu rqsize %u rqmemsize %zu\n", | ||
1649 | __func__, sqsize, qhp->wq.sq.memsize, rqsize, qhp->wq.rq.memsize); | ||
1650 | |||
1651 | ret = create_qp(&rhp->rdev, &qhp->wq, &schp->cq, &rchp->cq, | 1656 | ret = create_qp(&rhp->rdev, &qhp->wq, &schp->cq, &rchp->cq, |
1652 | ucontext ? &ucontext->uctx : &rhp->rdev.uctx); | 1657 | ucontext ? &ucontext->uctx : &rhp->rdev.uctx); |
1653 | if (ret) | 1658 | if (ret) |
@@ -1766,9 +1771,11 @@ struct ib_qp *c4iw_create_qp(struct ib_pd *pd, struct ib_qp_init_attr *attrs, | |||
1766 | qhp->ibqp.qp_num = qhp->wq.sq.qid; | 1771 | qhp->ibqp.qp_num = qhp->wq.sq.qid; |
1767 | init_timer(&(qhp->timer)); | 1772 | init_timer(&(qhp->timer)); |
1768 | INIT_LIST_HEAD(&qhp->db_fc_entry); | 1773 | INIT_LIST_HEAD(&qhp->db_fc_entry); |
1769 | PDBG("%s qhp %p sq_num_entries %d, rq_num_entries %d qpid 0x%0x\n", | 1774 | PDBG("%s sq id %u size %u memsize %zu num_entries %u " |
1770 | __func__, qhp, qhp->attr.sq_num_entries, qhp->attr.rq_num_entries, | 1775 | "rq id %u size %u memsize %zu num_entries %u\n", __func__, |
1771 | qhp->wq.sq.qid); | 1776 | qhp->wq.sq.qid, qhp->wq.sq.size, qhp->wq.sq.memsize, |
1777 | attrs->cap.max_send_wr, qhp->wq.rq.qid, qhp->wq.rq.size, | ||
1778 | qhp->wq.rq.memsize, attrs->cap.max_recv_wr); | ||
1772 | return &qhp->ibqp; | 1779 | return &qhp->ibqp; |
1773 | err8: | 1780 | err8: |
1774 | kfree(mm5); | 1781 | kfree(mm5); |
@@ -1856,5 +1863,11 @@ int c4iw_ib_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, | |||
1856 | memset(attr, 0, sizeof *attr); | 1863 | memset(attr, 0, sizeof *attr); |
1857 | memset(init_attr, 0, sizeof *init_attr); | 1864 | memset(init_attr, 0, sizeof *init_attr); |
1858 | attr->qp_state = to_ib_qp_state(qhp->attr.state); | 1865 | attr->qp_state = to_ib_qp_state(qhp->attr.state); |
1866 | init_attr->cap.max_send_wr = qhp->attr.sq_num_entries; | ||
1867 | init_attr->cap.max_recv_wr = qhp->attr.rq_num_entries; | ||
1868 | init_attr->cap.max_send_sge = qhp->attr.sq_max_sges; | ||
1869 | init_attr->cap.max_recv_sge = qhp->attr.sq_max_sges; | ||
1870 | init_attr->cap.max_inline_data = T4_MAX_SEND_INLINE; | ||
1871 | init_attr->sq_sig_type = qhp->sq_sig_all ? IB_SIGNAL_ALL_WR : 0; | ||
1859 | return 0; | 1872 | return 0; |
1860 | } | 1873 | } |
diff --git a/drivers/infiniband/hw/cxgb4/t4.h b/drivers/infiniband/hw/cxgb4/t4.h index c9f7034e6647..df5edfa31a8f 100644 --- a/drivers/infiniband/hw/cxgb4/t4.h +++ b/drivers/infiniband/hw/cxgb4/t4.h | |||
@@ -36,10 +36,7 @@ | |||
36 | #include "t4_msg.h" | 36 | #include "t4_msg.h" |
37 | #include "t4fw_ri_api.h" | 37 | #include "t4fw_ri_api.h" |
38 | 38 | ||
39 | #define T4_MAX_NUM_QP 65536 | ||
40 | #define T4_MAX_NUM_CQ 65536 | ||
41 | #define T4_MAX_NUM_PD 65536 | 39 | #define T4_MAX_NUM_PD 65536 |
42 | #define T4_MAX_NUM_STAG (1<<15) | ||
43 | #define T4_MAX_MR_SIZE (~0ULL) | 40 | #define T4_MAX_MR_SIZE (~0ULL) |
44 | #define T4_PAGESIZE_MASK 0xffff000 /* 4KB-128MB */ | 41 | #define T4_PAGESIZE_MASK 0xffff000 /* 4KB-128MB */ |
45 | #define T4_STAG_UNSET 0xffffffff | 42 | #define T4_STAG_UNSET 0xffffffff |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c index eb5a278e8045..e76885236e9d 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | |||
@@ -1719,16 +1719,24 @@ static void mps_intr_handler(struct adapter *adapter) | |||
1719 | */ | 1719 | */ |
1720 | static void mem_intr_handler(struct adapter *adapter, int idx) | 1720 | static void mem_intr_handler(struct adapter *adapter, int idx) |
1721 | { | 1721 | { |
1722 | static const char name[3][5] = { "EDC0", "EDC1", "MC" }; | 1722 | static const char name[4][7] = { "EDC0", "EDC1", "MC/MC0", "MC1" }; |
1723 | 1723 | ||
1724 | unsigned int addr, cnt_addr, v; | 1724 | unsigned int addr, cnt_addr, v; |
1725 | 1725 | ||
1726 | if (idx <= MEM_EDC1) { | 1726 | if (idx <= MEM_EDC1) { |
1727 | addr = EDC_REG(EDC_INT_CAUSE, idx); | 1727 | addr = EDC_REG(EDC_INT_CAUSE, idx); |
1728 | cnt_addr = EDC_REG(EDC_ECC_STATUS, idx); | 1728 | cnt_addr = EDC_REG(EDC_ECC_STATUS, idx); |
1729 | } else if (idx == MEM_MC) { | ||
1730 | if (is_t4(adapter->params.chip)) { | ||
1731 | addr = MC_INT_CAUSE; | ||
1732 | cnt_addr = MC_ECC_STATUS; | ||
1733 | } else { | ||
1734 | addr = MC_P_INT_CAUSE; | ||
1735 | cnt_addr = MC_P_ECC_STATUS; | ||
1736 | } | ||
1729 | } else { | 1737 | } else { |
1730 | addr = MC_INT_CAUSE; | 1738 | addr = MC_REG(MC_P_INT_CAUSE, 1); |
1731 | cnt_addr = MC_ECC_STATUS; | 1739 | cnt_addr = MC_REG(MC_P_ECC_STATUS, 1); |
1732 | } | 1740 | } |
1733 | 1741 | ||
1734 | v = t4_read_reg(adapter, addr) & MEM_INT_MASK; | 1742 | v = t4_read_reg(adapter, addr) & MEM_INT_MASK; |
@@ -1892,6 +1900,8 @@ int t4_slow_intr_handler(struct adapter *adapter) | |||
1892 | pcie_intr_handler(adapter); | 1900 | pcie_intr_handler(adapter); |
1893 | if (cause & MC) | 1901 | if (cause & MC) |
1894 | mem_intr_handler(adapter, MEM_MC); | 1902 | mem_intr_handler(adapter, MEM_MC); |
1903 | if (!is_t4(adapter->params.chip) && (cause & MC1)) | ||
1904 | mem_intr_handler(adapter, MEM_MC1); | ||
1895 | if (cause & EDC0) | 1905 | if (cause & EDC0) |
1896 | mem_intr_handler(adapter, MEM_EDC0); | 1906 | mem_intr_handler(adapter, MEM_EDC0); |
1897 | if (cause & EDC1) | 1907 | if (cause & EDC1) |
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_regs.h b/drivers/net/ethernet/chelsio/cxgb4/t4_regs.h index 3b244abbf907..e3146e83df20 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/t4_regs.h +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | |||
@@ -448,11 +448,13 @@ | |||
448 | #define TDUE 0x00010000U | 448 | #define TDUE 0x00010000U |
449 | 449 | ||
450 | #define MC_INT_CAUSE 0x7518 | 450 | #define MC_INT_CAUSE 0x7518 |
451 | #define MC_P_INT_CAUSE 0x41318 | ||
451 | #define ECC_UE_INT_CAUSE 0x00000004U | 452 | #define ECC_UE_INT_CAUSE 0x00000004U |
452 | #define ECC_CE_INT_CAUSE 0x00000002U | 453 | #define ECC_CE_INT_CAUSE 0x00000002U |
453 | #define PERR_INT_CAUSE 0x00000001U | 454 | #define PERR_INT_CAUSE 0x00000001U |
454 | 455 | ||
455 | #define MC_ECC_STATUS 0x751c | 456 | #define MC_ECC_STATUS 0x751c |
457 | #define MC_P_ECC_STATUS 0x4131c | ||
456 | #define ECC_CECNT_MASK 0xffff0000U | 458 | #define ECC_CECNT_MASK 0xffff0000U |
457 | #define ECC_CECNT_SHIFT 16 | 459 | #define ECC_CECNT_SHIFT 16 |
458 | #define ECC_CECNT(x) ((x) << ECC_CECNT_SHIFT) | 460 | #define ECC_CECNT(x) ((x) << ECC_CECNT_SHIFT) |
@@ -1101,6 +1103,7 @@ | |||
1101 | #define I2CM 0x00000002U | 1103 | #define I2CM 0x00000002U |
1102 | #define CIM 0x00000001U | 1104 | #define CIM 0x00000001U |
1103 | 1105 | ||
1106 | #define MC1 0x31 | ||
1104 | #define PL_INT_ENABLE 0x19410 | 1107 | #define PL_INT_ENABLE 0x19410 |
1105 | #define PL_INT_MAP0 0x19414 | 1108 | #define PL_INT_MAP0 0x19414 |
1106 | #define PL_RST 0x19428 | 1109 | #define PL_RST 0x19428 |