aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/cxgb4/cm.c6
-rw-r--r--drivers/infiniband/hw/cxgb4/device.c24
-rw-r--r--drivers/infiniband/hw/cxgb4/iw_cxgb4.h1
-rw-r--r--drivers/infiniband/hw/cxgb4/qp.c4
-rw-r--r--drivers/infiniband/hw/cxgb4/t4.h8
-rw-r--r--drivers/infiniband/hw/ipath/ipath_sysfs.c1
-rw-r--r--drivers/infiniband/hw/qib/qib_iba7322.c13
-rw-r--r--drivers/infiniband/hw/qib/qib_mad.c12
-rw-r--r--drivers/infiniband/hw/qib/qib_qsfp.h2
9 files changed, 51 insertions, 20 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 8b00e6c46f01..b4d9e4caf3c9 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -61,9 +61,9 @@ static char *states[] = {
61 NULL, 61 NULL,
62}; 62};
63 63
64static int dack_mode; 64static int dack_mode = 1;
65module_param(dack_mode, int, 0644); 65module_param(dack_mode, int, 0644);
66MODULE_PARM_DESC(dack_mode, "Delayed ack mode (default=0)"); 66MODULE_PARM_DESC(dack_mode, "Delayed ack mode (default=1)");
67 67
68int c4iw_max_read_depth = 8; 68int c4iw_max_read_depth = 8;
69module_param(c4iw_max_read_depth, int, 0644); 69module_param(c4iw_max_read_depth, int, 0644);
@@ -482,6 +482,7 @@ static int send_connect(struct c4iw_ep *ep)
482 TX_CHAN(ep->tx_chan) | 482 TX_CHAN(ep->tx_chan) |
483 SMAC_SEL(ep->smac_idx) | 483 SMAC_SEL(ep->smac_idx) |
484 DSCP(ep->tos) | 484 DSCP(ep->tos) |
485 ULP_MODE(ULP_MODE_TCPDDP) |
485 RCV_BUFSIZ(rcv_win>>10); 486 RCV_BUFSIZ(rcv_win>>10);
486 opt2 = RX_CHANNEL(0) | 487 opt2 = RX_CHANNEL(0) |
487 RSS_QUEUE_VALID | RSS_QUEUE(ep->rss_qid); 488 RSS_QUEUE_VALID | RSS_QUEUE(ep->rss_qid);
@@ -1274,6 +1275,7 @@ static void accept_cr(struct c4iw_ep *ep, __be32 peer_ip, struct sk_buff *skb,
1274 TX_CHAN(ep->tx_chan) | 1275 TX_CHAN(ep->tx_chan) |
1275 SMAC_SEL(ep->smac_idx) | 1276 SMAC_SEL(ep->smac_idx) |
1276 DSCP(ep->tos) | 1277 DSCP(ep->tos) |
1278 ULP_MODE(ULP_MODE_TCPDDP) |
1277 RCV_BUFSIZ(rcv_win>>10); 1279 RCV_BUFSIZ(rcv_win>>10);
1278 opt2 = RX_CHANNEL(0) | 1280 opt2 = RX_CHANNEL(0) |
1279 RSS_QUEUE_VALID | RSS_QUEUE(ep->rss_qid); 1281 RSS_QUEUE_VALID | RSS_QUEUE(ep->rss_qid);
diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c
index 54fbc1118abe..e29172c2afcb 100644
--- a/drivers/infiniband/hw/cxgb4/device.c
+++ b/drivers/infiniband/hw/cxgb4/device.c
@@ -87,17 +87,22 @@ static int dump_qp(int id, void *p, void *data)
87 return 1; 87 return 1;
88 88
89 if (qp->ep) 89 if (qp->ep)
90 cc = snprintf(qpd->buf + qpd->pos, space, "qp id %u state %u " 90 cc = snprintf(qpd->buf + qpd->pos, space,
91 "qp sq id %u rq id %u state %u onchip %u "
91 "ep tid %u state %u %pI4:%u->%pI4:%u\n", 92 "ep tid %u state %u %pI4:%u->%pI4:%u\n",
92 qp->wq.sq.qid, (int)qp->attr.state, 93 qp->wq.sq.qid, qp->wq.rq.qid, (int)qp->attr.state,
94 qp->wq.sq.flags & T4_SQ_ONCHIP,
93 qp->ep->hwtid, (int)qp->ep->com.state, 95 qp->ep->hwtid, (int)qp->ep->com.state,
94 &qp->ep->com.local_addr.sin_addr.s_addr, 96 &qp->ep->com.local_addr.sin_addr.s_addr,
95 ntohs(qp->ep->com.local_addr.sin_port), 97 ntohs(qp->ep->com.local_addr.sin_port),
96 &qp->ep->com.remote_addr.sin_addr.s_addr, 98 &qp->ep->com.remote_addr.sin_addr.s_addr,
97 ntohs(qp->ep->com.remote_addr.sin_port)); 99 ntohs(qp->ep->com.remote_addr.sin_port));
98 else 100 else
99 cc = snprintf(qpd->buf + qpd->pos, space, "qp id %u state %u\n", 101 cc = snprintf(qpd->buf + qpd->pos, space,
100 qp->wq.sq.qid, (int)qp->attr.state); 102 "qp sq id %u rq id %u state %u onchip %u\n",
103 qp->wq.sq.qid, qp->wq.rq.qid,
104 (int)qp->attr.state,
105 qp->wq.sq.flags & T4_SQ_ONCHIP);
101 if (cc < space) 106 if (cc < space)
102 qpd->pos += cc; 107 qpd->pos += cc;
103 return 0; 108 return 0;
@@ -368,7 +373,6 @@ static void c4iw_rdev_close(struct c4iw_rdev *rdev)
368static void c4iw_remove(struct c4iw_dev *dev) 373static void c4iw_remove(struct c4iw_dev *dev)
369{ 374{
370 PDBG("%s c4iw_dev %p\n", __func__, dev); 375 PDBG("%s c4iw_dev %p\n", __func__, dev);
371 cancel_delayed_work_sync(&dev->db_drop_task);
372 list_del(&dev->entry); 376 list_del(&dev->entry);
373 if (dev->registered) 377 if (dev->registered)
374 c4iw_unregister_device(dev); 378 c4iw_unregister_device(dev);
@@ -523,8 +527,16 @@ static int c4iw_uld_state_change(void *handle, enum cxgb4_state new_state)
523 case CXGB4_STATE_START_RECOVERY: 527 case CXGB4_STATE_START_RECOVERY:
524 printk(KERN_INFO MOD "%s: Fatal Error\n", 528 printk(KERN_INFO MOD "%s: Fatal Error\n",
525 pci_name(dev->rdev.lldi.pdev)); 529 pci_name(dev->rdev.lldi.pdev));
526 if (dev->registered) 530 dev->rdev.flags |= T4_FATAL_ERROR;
531 if (dev->registered) {
532 struct ib_event event;
533
534 memset(&event, 0, sizeof event);
535 event.event = IB_EVENT_DEVICE_FATAL;
536 event.device = &dev->ibdev;
537 ib_dispatch_event(&event);
527 c4iw_unregister_device(dev); 538 c4iw_unregister_device(dev);
539 }
528 break; 540 break;
529 case CXGB4_STATE_DETACH: 541 case CXGB4_STATE_DETACH:
530 printk(KERN_INFO MOD "%s: Detach\n", 542 printk(KERN_INFO MOD "%s: Detach\n",
diff --git a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
index 2fe19ec9ba60..9f6166f59268 100644
--- a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
+++ b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
@@ -176,7 +176,6 @@ struct c4iw_dev {
176 struct idr mmidr; 176 struct idr mmidr;
177 spinlock_t lock; 177 spinlock_t lock;
178 struct list_head entry; 178 struct list_head entry;
179 struct delayed_work db_drop_task;
180 struct dentry *debugfs_root; 179 struct dentry *debugfs_root;
181 u8 registered; 180 u8 registered;
182}; 181};
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c
index 4f0be25cab1a..70a5a3c646da 100644
--- a/drivers/infiniband/hw/cxgb4/qp.c
+++ b/drivers/infiniband/hw/cxgb4/qp.c
@@ -31,9 +31,9 @@
31 */ 31 */
32#include "iw_cxgb4.h" 32#include "iw_cxgb4.h"
33 33
34static int ocqp_support; 34static int ocqp_support = 1;
35module_param(ocqp_support, int, 0644); 35module_param(ocqp_support, int, 0644);
36MODULE_PARM_DESC(ocqp_support, "Support on-chip SQs (default=0)"); 36MODULE_PARM_DESC(ocqp_support, "Support on-chip SQs (default=1)");
37 37
38static void set_state(struct c4iw_qp *qhp, enum c4iw_qp_state state) 38static void set_state(struct c4iw_qp *qhp, enum c4iw_qp_state state)
39{ 39{
diff --git a/drivers/infiniband/hw/cxgb4/t4.h b/drivers/infiniband/hw/cxgb4/t4.h
index 70004425d695..24af12fc8228 100644
--- a/drivers/infiniband/hw/cxgb4/t4.h
+++ b/drivers/infiniband/hw/cxgb4/t4.h
@@ -507,8 +507,14 @@ static inline void t4_swcq_consume(struct t4_cq *cq)
507static inline void t4_hwcq_consume(struct t4_cq *cq) 507static inline void t4_hwcq_consume(struct t4_cq *cq)
508{ 508{
509 cq->bits_type_ts = cq->queue[cq->cidx].bits_type_ts; 509 cq->bits_type_ts = cq->queue[cq->cidx].bits_type_ts;
510 if (++cq->cidx_inc == cq->size) 510 if (++cq->cidx_inc == (cq->size >> 4)) {
511 u32 val;
512
513 val = SEINTARM(0) | CIDXINC(cq->cidx_inc) | TIMERREG(7) |
514 INGRESSQID(cq->cqid);
515 writel(val, cq->gts);
511 cq->cidx_inc = 0; 516 cq->cidx_inc = 0;
517 }
512 if (++cq->cidx == cq->size) { 518 if (++cq->cidx == cq->size) {
513 cq->cidx = 0; 519 cq->cidx = 0;
514 cq->gen ^= 1; 520 cq->gen ^= 1;
diff --git a/drivers/infiniband/hw/ipath/ipath_sysfs.c b/drivers/infiniband/hw/ipath/ipath_sysfs.c
index b8cb2f145ae4..8991677e9a08 100644
--- a/drivers/infiniband/hw/ipath/ipath_sysfs.c
+++ b/drivers/infiniband/hw/ipath/ipath_sysfs.c
@@ -557,6 +557,7 @@ static ssize_t store_reset(struct device *dev,
557 dev_info(dev,"Unit %d is disabled, can't reset\n", 557 dev_info(dev,"Unit %d is disabled, can't reset\n",
558 dd->ipath_unit); 558 dd->ipath_unit);
559 ret = -EINVAL; 559 ret = -EINVAL;
560 goto bail;
560 } 561 }
561 ret = ipath_reset_device(dd->ipath_unit); 562 ret = ipath_reset_device(dd->ipath_unit);
562bail: 563bail:
diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c
index b01809a82cb0..4a2d21e15a70 100644
--- a/drivers/infiniband/hw/qib/qib_iba7322.c
+++ b/drivers/infiniband/hw/qib/qib_iba7322.c
@@ -5582,9 +5582,16 @@ static void qsfp_7322_event(struct work_struct *work)
5582 * even on failure to read cable information. We don't 5582 * even on failure to read cable information. We don't
5583 * get here for QME, so IS_QME check not needed here. 5583 * get here for QME, so IS_QME check not needed here.
5584 */ 5584 */
5585 le2 = (!ret && qd->cache.atten[1] >= qib_long_atten && 5585 if (!ret && !ppd->dd->cspec->r1) {
5586 !ppd->dd->cspec->r1 && QSFP_IS_CU(qd->cache.tech)) ? 5586 if (QSFP_IS_ACTIVE_FAR(qd->cache.tech))
5587 LE2_5m : LE2_DEFAULT; 5587 le2 = LE2_QME;
5588 else if (qd->cache.atten[1] >= qib_long_atten &&
5589 QSFP_IS_CU(qd->cache.tech))
5590 le2 = LE2_5m;
5591 else
5592 le2 = LE2_DEFAULT;
5593 } else
5594 le2 = LE2_DEFAULT;
5588 ibsd_wr_allchans(ppd, 13, (le2 << 7), BMASK(9, 7)); 5595 ibsd_wr_allchans(ppd, 13, (le2 << 7), BMASK(9, 7));
5589 init_txdds_table(ppd, 0); 5596 init_txdds_table(ppd, 0);
5590} 5597}
diff --git a/drivers/infiniband/hw/qib/qib_mad.c b/drivers/infiniband/hw/qib/qib_mad.c
index 5ad224e4a38b..8fd3df5bf04d 100644
--- a/drivers/infiniband/hw/qib/qib_mad.c
+++ b/drivers/infiniband/hw/qib/qib_mad.c
@@ -464,8 +464,9 @@ static int subn_get_portinfo(struct ib_smp *smp, struct ib_device *ibdev,
464 memset(smp->data, 0, sizeof(smp->data)); 464 memset(smp->data, 0, sizeof(smp->data));
465 465
466 /* Only return the mkey if the protection field allows it. */ 466 /* Only return the mkey if the protection field allows it. */
467 if (smp->method == IB_MGMT_METHOD_SET || ibp->mkey == smp->mkey || 467 if (!(smp->method == IB_MGMT_METHOD_GET &&
468 ibp->mkeyprot == 0) 468 ibp->mkey != smp->mkey &&
469 ibp->mkeyprot == 1))
469 pip->mkey = ibp->mkey; 470 pip->mkey = ibp->mkey;
470 pip->gid_prefix = ibp->gid_prefix; 471 pip->gid_prefix = ibp->gid_prefix;
471 lid = ppd->lid; 472 lid = ppd->lid;
@@ -705,7 +706,7 @@ static int subn_set_portinfo(struct ib_smp *smp, struct ib_device *ibdev,
705 lwe = pip->link_width_enabled; 706 lwe = pip->link_width_enabled;
706 if (lwe) { 707 if (lwe) {
707 if (lwe == 0xFF) 708 if (lwe == 0xFF)
708 lwe = ppd->link_width_supported; 709 set_link_width_enabled(ppd, ppd->link_width_supported);
709 else if (lwe >= 16 || (lwe & ~ppd->link_width_supported)) 710 else if (lwe >= 16 || (lwe & ~ppd->link_width_supported))
710 smp->status |= IB_SMP_INVALID_FIELD; 711 smp->status |= IB_SMP_INVALID_FIELD;
711 else if (lwe != ppd->link_width_enabled) 712 else if (lwe != ppd->link_width_enabled)
@@ -720,7 +721,8 @@ static int subn_set_portinfo(struct ib_smp *smp, struct ib_device *ibdev,
720 * speeds. 721 * speeds.
721 */ 722 */
722 if (lse == 15) 723 if (lse == 15)
723 lse = ppd->link_speed_supported; 724 set_link_speed_enabled(ppd,
725 ppd->link_speed_supported);
724 else if (lse >= 8 || (lse & ~ppd->link_speed_supported)) 726 else if (lse >= 8 || (lse & ~ppd->link_speed_supported))
725 smp->status |= IB_SMP_INVALID_FIELD; 727 smp->status |= IB_SMP_INVALID_FIELD;
726 else if (lse != ppd->link_speed_enabled) 728 else if (lse != ppd->link_speed_enabled)
@@ -849,7 +851,7 @@ static int subn_set_portinfo(struct ib_smp *smp, struct ib_device *ibdev,
849 if (clientrereg) 851 if (clientrereg)
850 pip->clientrereg_resv_subnetto |= 0x80; 852 pip->clientrereg_resv_subnetto |= 0x80;
851 853
852 goto done; 854 goto get_only;
853 855
854err: 856err:
855 smp->status |= IB_SMP_INVALID_FIELD; 857 smp->status |= IB_SMP_INVALID_FIELD;
diff --git a/drivers/infiniband/hw/qib/qib_qsfp.h b/drivers/infiniband/hw/qib/qib_qsfp.h
index 19b527bafd57..c109bbdc90ac 100644
--- a/drivers/infiniband/hw/qib/qib_qsfp.h
+++ b/drivers/infiniband/hw/qib/qib_qsfp.h
@@ -79,6 +79,8 @@
79extern const char *const qib_qsfp_devtech[16]; 79extern const char *const qib_qsfp_devtech[16];
80/* Active Equalization includes fiber, copper full EQ, and copper near Eq */ 80/* Active Equalization includes fiber, copper full EQ, and copper near Eq */
81#define QSFP_IS_ACTIVE(tech) ((0xA2FF >> ((tech) >> 4)) & 1) 81#define QSFP_IS_ACTIVE(tech) ((0xA2FF >> ((tech) >> 4)) & 1)
82/* Active Equalization includes fiber, copper full EQ, and copper far Eq */
83#define QSFP_IS_ACTIVE_FAR(tech) ((0x32FF >> ((tech) >> 4)) & 1)
82/* Attenuation should be valid for copper other than full/near Eq */ 84/* Attenuation should be valid for copper other than full/near Eq */
83#define QSFP_HAS_ATTEN(tech) ((0x4D00 >> ((tech) >> 4)) & 1) 85#define QSFP_HAS_ATTEN(tech) ((0x4D00 >> ((tech) >> 4)) & 1)
84/* Length is only valid if technology is "copper" */ 86/* Length is only valid if technology is "copper" */