Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1bb4238b authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'cxgb4-next'



Hariprasad Shenai says:

====================
Misc. fix for cxgb4 and iw_cxgb4

This patch series adds support to enchance error reporting, log detailed
warning for negative advice, support query_qp verb and advertise correct
device max attributes for iwarp.

The patches series is created against 'net-next' tree.
And includes patches on cxgb4 and iw_cxgb4 driver.

Since this patch-series contains changes which are dependent on commit id
4c2c5763 ("cxgb4/iw_cxgb4: use firmware ord/ird resource limits") of net-next
tree we would like to request this patch series to get merged via David Miller's
'net-next' tree.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents bc3bd3f4 91244bbd
Loading
Loading
Loading
Loading
+23 −6
Original line number Diff line number Diff line
@@ -1813,6 +1813,20 @@ static int is_neg_adv(unsigned int status)
	       status == CPL_ERR_KEEPALV_NEG_ADVICE;
}

static char *neg_adv_str(unsigned int status)
{
	switch (status) {
	case CPL_ERR_RTX_NEG_ADVICE:
		return "Retransmit timeout";
	case CPL_ERR_PERSIST_NEG_ADVICE:
		return "Persist timeout";
	case CPL_ERR_KEEPALV_NEG_ADVICE:
		return "Keepalive timeout";
	default:
		return "Unknown";
	}
}

static void set_tcp_window(struct c4iw_ep *ep, struct port_info *pi)
{
	ep->snd_win = snd_win;
@@ -2011,8 +2025,9 @@ static int act_open_rpl(struct c4iw_dev *dev, struct sk_buff *skb)
	     status, status2errno(status));

	if (is_neg_adv(status)) {
		printk(KERN_WARNING MOD "Connection problems for atid %u\n",
			atid);
		dev_warn(&dev->rdev.lldi.pdev->dev,
			 "Connection problems for atid %u status %u (%s)\n",
			 atid, status, neg_adv_str(status));
		return 0;
	}

@@ -2488,8 +2503,9 @@ static int peer_abort(struct c4iw_dev *dev, struct sk_buff *skb)

	ep = lookup_tid(t, tid);
	if (is_neg_adv(req->status)) {
		PDBG("%s neg_adv_abort ep %p tid %u\n", __func__, ep,
		     ep->hwtid);
		dev_warn(&dev->rdev.lldi.pdev->dev,
			 "Negative advice on abort - tid %u status %d (%s)\n",
			 ep->hwtid, req->status, neg_adv_str(req->status));
		return 0;
	}
	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)
		return 0;
	}
	if (is_neg_adv(req->status)) {
		PDBG("%s neg_adv_abort ep %p tid %u\n", __func__, ep,
		     ep->hwtid);
		dev_warn(&dev->rdev.lldi.pdev->dev,
			 "Negative advice on abort - tid %u status %d (%s)\n",
			 ep->hwtid, req->status, neg_adv_str(req->status));
		kfree_skb(skb);
		return 0;
	}
+1 −7
Original line number Diff line number Diff line
@@ -913,14 +913,8 @@ struct ib_cq *c4iw_create_cq(struct ib_device *ibdev, int entries,
	/*
	 * memsize must be a multiple of the page size if its a user cq.
	 */
	if (ucontext) {
	if (ucontext)
		memsize = roundup(memsize, PAGE_SIZE);
		hwentries = memsize / sizeof *chp->cq.queue;
		while (hwentries > rhp->rdev.hw_queue.t4_max_iq_size) {
			memsize -= PAGE_SIZE;
			hwentries = memsize / sizeof *chp->cq.queue;
		}
	}
	chp->cq.size = hwentries;
	chp->cq.memsize = memsize;
	chp->cq.vector = vector;
+8 −8
Original line number Diff line number Diff line
@@ -934,17 +934,17 @@ static struct c4iw_dev *c4iw_alloc(const struct cxgb4_lld_info *infop)

	devp->rdev.hw_queue.t4_eq_status_entries =
		devp->rdev.lldi.sge_ingpadboundary > 64 ? 2 : 1;
	devp->rdev.hw_queue.t4_max_eq_size =
		65520 - devp->rdev.hw_queue.t4_eq_status_entries;
	devp->rdev.hw_queue.t4_max_iq_size = 65520 - 1;
	devp->rdev.hw_queue.t4_max_rq_size =
		8192 - devp->rdev.hw_queue.t4_eq_status_entries;
	devp->rdev.hw_queue.t4_max_eq_size = 65520;
	devp->rdev.hw_queue.t4_max_iq_size = 65520;
	devp->rdev.hw_queue.t4_max_rq_size = 8192 -
		devp->rdev.hw_queue.t4_eq_status_entries - 1;
	devp->rdev.hw_queue.t4_max_sq_size =
		devp->rdev.hw_queue.t4_max_eq_size - 1;
		devp->rdev.hw_queue.t4_max_eq_size -
		devp->rdev.hw_queue.t4_eq_status_entries - 1;
	devp->rdev.hw_queue.t4_max_qp_depth =
		devp->rdev.hw_queue.t4_max_rq_size - 1;
		devp->rdev.hw_queue.t4_max_rq_size;
	devp->rdev.hw_queue.t4_max_cq_depth =
		devp->rdev.hw_queue.t4_max_iq_size - 1;
		devp->rdev.hw_queue.t4_max_iq_size - 2;
	devp->rdev.hw_queue.t4_stat_len =
		devp->rdev.lldi.sge_egrstatuspagesize;

+1 −1
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@ static inline int c4iw_fatal_error(struct c4iw_rdev *rdev)

static inline int c4iw_num_stags(struct c4iw_rdev *rdev)
{
	return min((int)T4_MAX_NUM_STAG, (int)(rdev->lldi.vr->stag.size >> 5));
	return (int)(rdev->lldi.vr->stag.size >> 5);
}

#define C4IW_WR_TO (30*HZ)
+2 −2
Original line number Diff line number Diff line
@@ -318,7 +318,7 @@ static int c4iw_query_device(struct ib_device *ibdev,
	props->vendor_id = (u32)dev->rdev.lldi.pdev->vendor;
	props->vendor_part_id = (u32)dev->rdev.lldi.pdev->device;
	props->max_mr_size = T4_MAX_MR_SIZE;
	props->max_qp = T4_MAX_NUM_QP;
	props->max_qp = dev->rdev.lldi.vr->qp.size / 2;
	props->max_qp_wr = dev->rdev.hw_queue.t4_max_qp_depth;
	props->max_sge = T4_MAX_RECV_SGE;
	props->max_sge_rd = 1;
@@ -326,7 +326,7 @@ static int c4iw_query_device(struct ib_device *ibdev,
	props->max_qp_rd_atom = min(dev->rdev.lldi.max_ordird_qp,
				    c4iw_max_read_depth);
	props->max_qp_init_rd_atom = props->max_qp_rd_atom;
	props->max_cq = T4_MAX_NUM_CQ;
	props->max_cq = dev->rdev.lldi.vr->qp.size;
	props->max_cqe = dev->rdev.hw_queue.t4_max_cq_depth;
	props->max_mr = c4iw_num_stags(&dev->rdev);
	props->max_pd = T4_MAX_NUM_PD;
Loading