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

Commit a3d34698 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull rdma fixes from Doug Ledford:
 "Round one of 4.8 rc fixes.

  This should be the bulk of the -rc fixes for 4.8.  I only have a few
  things that are still outstanding (two ipoib bugs for which the
  solution is not yet fully known, and a few queued items that came in
  after my last push and I didn't want to delay this pull request for
  late comers again).

  Even though the patch count is kind of high, everything is minor fixes
  so the overall churn is pretty low.

  Summary:

   - minor fixes to cxgb4
   - minor fixes to mlx4
   - one minor fix each to core, rxe, isert, srpt, mlx5, ocrdma, and usnic
   - six or so fixes to i40iw fixes
   - the rest are hfi1 fixes"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (34 commits)
  i40iw: Send last streaming mode message for loopback connections
  IB/srpt: Update sport->port_guid with each port refresh
  RDMA/ocrdma: Fix the max_sge reported from FW
  i40iw: Avoid writing to freed memory
  i40iw: Fix double free of allocated_buffer
  IB/mlx5: Remove superfluous include of io-mapping.h
  i40iw: Do not set self-referencing pointer to NULL after kfree
  i40iw: Add missing NULL check for MPA private data
  iw_cxgb4: Fix cxgb4 arm CQ logic w/IB_CQ_REPORT_MISSED_EVENTS
  i40iw: Add missing check for interface already open
  i40iw: Protect req_resource_num update
  i40iw: Change mem_resources pointer to a u8
  IB/core: Use memdup_user() rather than duplicating its implementation
  IB/qib: Use memdup_user() rather than duplicating its implementation
  iw_cxgb4: use the MPA initiator's IRD if < our ORD
  iw_cxgb4: limit IRD/ORD advertised to ULP by device max.
  IB/hfi1: Fix mm_struct use after free
  IB/rdmvat: Fix double vfree() in rvt_create_qp() error path
  IB/hfi1: Improve J_KEY generation
  IB/hfi1: Return invalid field for non-QSFP CableInfo queries
  ...
parents 03cef710 049b1e7c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -7661,7 +7661,7 @@ L: linux-rdma@vger.kernel.org
S:	Supported
S:	Supported
W:	https://github.com/SoftRoCE/rxe-dev/wiki/rxe-dev:-Home
W:	https://github.com/SoftRoCE/rxe-dev/wiki/rxe-dev:-Home
Q:	http://patchwork.kernel.org/project/linux-rdma/list/
Q:	http://patchwork.kernel.org/project/linux-rdma/list/
F:	drivers/infiniband/hw/rxe/
F:	drivers/infiniband/sw/rxe/
F:	include/uapi/rdma/rdma_user_rxe.h
F:	include/uapi/rdma/rdma_user_rxe.h


MEMBARRIER SUPPORT
MEMBARRIER SUPPORT
+12 −6
Original line number Original line Diff line number Diff line
@@ -2462,18 +2462,24 @@ static int cma_resolve_iboe_route(struct rdma_id_private *id_priv)


	if (addr->dev_addr.bound_dev_if) {
	if (addr->dev_addr.bound_dev_if) {
		ndev = dev_get_by_index(&init_net, addr->dev_addr.bound_dev_if);
		ndev = dev_get_by_index(&init_net, addr->dev_addr.bound_dev_if);
		if (!ndev)
		if (!ndev) {
			return -ENODEV;
			ret = -ENODEV;
			goto err2;
		}


		if (ndev->flags & IFF_LOOPBACK) {
		if (ndev->flags & IFF_LOOPBACK) {
			dev_put(ndev);
			dev_put(ndev);
			if (!id_priv->id.device->get_netdev)
			if (!id_priv->id.device->get_netdev) {
				return -EOPNOTSUPP;
				ret = -EOPNOTSUPP;
				goto err2;
			}


			ndev = id_priv->id.device->get_netdev(id_priv->id.device,
			ndev = id_priv->id.device->get_netdev(id_priv->id.device,
							      id_priv->id.port_num);
							      id_priv->id.port_num);
			if (!ndev)
			if (!ndev) {
				return -ENODEV;
				ret = -ENODEV;
				goto err2;
			}
		}
		}


		route->path_rec->net = &init_net;
		route->path_rec->net = &init_net;
+5 −1
Original line number Original line Diff line number Diff line
@@ -1827,8 +1827,12 @@ static int process_mpa_request(struct c4iw_ep *ep, struct sk_buff *skb)
				(ep->mpa_pkt + sizeof(*mpa));
				(ep->mpa_pkt + sizeof(*mpa));
			ep->ird = ntohs(mpa_v2_params->ird) &
			ep->ird = ntohs(mpa_v2_params->ird) &
				MPA_V2_IRD_ORD_MASK;
				MPA_V2_IRD_ORD_MASK;
			ep->ird = min_t(u32, ep->ird,
					cur_max_read_depth(ep->com.dev));
			ep->ord = ntohs(mpa_v2_params->ord) &
			ep->ord = ntohs(mpa_v2_params->ord) &
				MPA_V2_IRD_ORD_MASK;
				MPA_V2_IRD_ORD_MASK;
			ep->ord = min_t(u32, ep->ord,
					cur_max_read_depth(ep->com.dev));
			PDBG("%s initiator ird %u ord %u\n", __func__, ep->ird,
			PDBG("%s initiator ird %u ord %u\n", __func__, ep->ird,
			     ep->ord);
			     ep->ord);
			if (ntohs(mpa_v2_params->ird) & MPA_V2_PEER2PEER_MODEL)
			if (ntohs(mpa_v2_params->ird) & MPA_V2_PEER2PEER_MODEL)
@@ -3136,7 +3140,7 @@ int c4iw_accept_cr(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
	if (ep->mpa_attr.version == 2 && ep->mpa_attr.enhanced_rdma_conn) {
	if (ep->mpa_attr.version == 2 && ep->mpa_attr.enhanced_rdma_conn) {
		if (conn_param->ord > ep->ird) {
		if (conn_param->ord > ep->ird) {
			if (RELAXED_IRD_NEGOTIATION) {
			if (RELAXED_IRD_NEGOTIATION) {
				ep->ord = ep->ird;
				conn_param->ord = ep->ird;
			} else {
			} else {
				ep->ird = conn_param->ird;
				ep->ird = conn_param->ird;
				ep->ord = conn_param->ord;
				ep->ord = conn_param->ord;
+5 −5
Original line number Original line Diff line number Diff line
@@ -1016,15 +1016,15 @@ int c4iw_resize_cq(struct ib_cq *cq, int cqe, struct ib_udata *udata)
int c4iw_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags)
int c4iw_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags)
{
{
	struct c4iw_cq *chp;
	struct c4iw_cq *chp;
	int ret;
	int ret = 0;
	unsigned long flag;
	unsigned long flag;


	chp = to_c4iw_cq(ibcq);
	chp = to_c4iw_cq(ibcq);
	spin_lock_irqsave(&chp->lock, flag);
	spin_lock_irqsave(&chp->lock, flag);
	ret = t4_arm_cq(&chp->cq,
	t4_arm_cq(&chp->cq,
		  (flags & IB_CQ_SOLICITED_MASK) == IB_CQ_SOLICITED);
		  (flags & IB_CQ_SOLICITED_MASK) == IB_CQ_SOLICITED);
	if (flags & IB_CQ_REPORT_MISSED_EVENTS)
		ret = t4_cq_notempty(&chp->cq);
	spin_unlock_irqrestore(&chp->lock, flag);
	spin_unlock_irqrestore(&chp->lock, flag);
	if (ret && !(flags & IB_CQ_REPORT_MISSED_EVENTS))
		ret = 0;
	return ret;
	return ret;
}
}
+5 −0
Original line number Original line Diff line number Diff line
@@ -634,6 +634,11 @@ static inline int t4_valid_cqe(struct t4_cq *cq, struct t4_cqe *cqe)
	return (CQE_GENBIT(cqe) == cq->gen);
	return (CQE_GENBIT(cqe) == cq->gen);
}
}


static inline int t4_cq_notempty(struct t4_cq *cq)
{
	return cq->sw_in_use || t4_valid_cqe(cq, &cq->queue[cq->cidx]);
}

static inline int t4_next_hw_cqe(struct t4_cq *cq, struct t4_cqe **cqe)
static inline int t4_next_hw_cqe(struct t4_cq *cq, struct t4_cqe **cqe)
{
{
	int ret;
	int ret;
Loading