* [PATCH net-next 0/9] mlx5 driver updates
@ 2014-12-02 10:26 Eli Cohen
2014-12-02 10:26 ` [PATCH net-next 3/9] net/mlx5_core: Fix command queue size enforcement Eli Cohen
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Eli Cohen @ 2014-12-02 10:26 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: roland-DgEjT+Ai2ygdnm+yROfE0A, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA, ogerlitz-VPRAkNaXOzVWk0Htik3J/w,
amirv-VPRAkNaXOzVWk0Htik3J/w, Eli Cohen
Hi Dave,
The following series contains some fixes to mlx5 as well as update to the list
of supported devices.
Thanks,
Eli
Eli Cohen (8):
net/mlx5_core: Request the mlx5 IB module on driver load
net/mlx5_core: Fix min vectors value in mlx5_enable_msix
net/mlx5_core: Fix command queue size enforcement
net/mlx5_core: Remove unused dev cap enum fields
net/mlx5_core: Print resource number on QP/SRQ async events
net/mlx5_core: Add more supported devices
mlx5: Fix sparse warnings
mlx5: Fix error flow in add_keys
Majd Dibbiny (1):
net/mlx5_core: Clear outbox of dealloc uar
drivers/infiniband/hw/mlx5/mr.c | 3 +++
drivers/infiniband/hw/mlx5/qp.c | 16 +++++++++++++++-
drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/eq.c | 4 ++--
drivers/net/ethernet/mellanox/mlx5/core/main.c | 15 +++++++++++++--
drivers/net/ethernet/mellanox/mlx5/core/uar.c | 1 +
include/linux/mlx5/device.h | 8 --------
7 files changed, 35 insertions(+), 14 deletions(-)
--
2.1.3
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH net-next 1/9] net/mlx5_core: Request the mlx5 IB module on driver load
[not found] ` <1417515979-22418-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
@ 2014-12-02 10:26 ` Eli Cohen
2014-12-02 10:26 ` [PATCH net-next 2/9] net/mlx5_core: Fix min vectors value in mlx5_enable_msix Eli Cohen
` (5 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Eli Cohen @ 2014-12-02 10:26 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: roland-DgEjT+Ai2ygdnm+yROfE0A, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA, ogerlitz-VPRAkNaXOzVWk0Htik3J/w,
amirv-VPRAkNaXOzVWk0Htik3J/w, Eli Cohen
Call request module on mlx5_ib so it will be available for applications
requiring it, such as installers that require boot over IB.
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
drivers/net/ethernet/mellanox/mlx5/core/main.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
index 71b10b210792..4e3c27e77768 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -43,6 +43,7 @@
#include <linux/mlx5/qp.h>
#include <linux/mlx5/srq.h>
#include <linux/debugfs.h>
+#include <linux/kmod.h>
#include <linux/mlx5/mlx5_ifc.h>
#include "mlx5_core.h"
@@ -840,6 +841,8 @@ struct mlx5_core_event_handler {
void *data);
};
+#define MLX5_IB_MOD "mlx5_ib"
+
static int init_one(struct pci_dev *pdev,
const struct pci_device_id *id)
{
@@ -878,6 +881,10 @@ static int init_one(struct pci_dev *pdev,
goto out_init;
}
+ err = request_module_nowait(MLX5_IB_MOD);
+ if (err)
+ pr_info("failed request module on %s\n", MLX5_IB_MOD);
+
return 0;
out_init:
--
2.1.3
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH net-next 2/9] net/mlx5_core: Fix min vectors value in mlx5_enable_msix
[not found] ` <1417515979-22418-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-12-02 10:26 ` [PATCH net-next 1/9] net/mlx5_core: Request the mlx5 IB module on driver load Eli Cohen
@ 2014-12-02 10:26 ` Eli Cohen
2014-12-02 10:26 ` [PATCH net-next 4/9] net/mlx5_core: Remove unused dev cap enum fields Eli Cohen
` (4 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Eli Cohen @ 2014-12-02 10:26 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: roland-DgEjT+Ai2ygdnm+yROfE0A, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA, ogerlitz-VPRAkNaXOzVWk0Htik3J/w,
amirv-VPRAkNaXOzVWk0Htik3J/w, Eli Cohen
mlx5 requires at least one interrupt vector for completions so fix the minvec
argument to pci_enable_msix_range() accordingly.
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
index 4e3c27e77768..c9d4a024f186 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -226,7 +226,7 @@ static int mlx5_enable_msix(struct mlx5_core_dev *dev)
table->msix_arr[i].entry = i;
nvec = pci_enable_msix_range(dev->pdev, table->msix_arr,
- MLX5_EQ_VEC_COMP_BASE, nvec);
+ MLX5_EQ_VEC_COMP_BASE + 1, nvec);
if (nvec < 0)
return nvec;
--
2.1.3
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH net-next 3/9] net/mlx5_core: Fix command queue size enforcement
2014-12-02 10:26 [PATCH net-next 0/9] mlx5 driver updates Eli Cohen
@ 2014-12-02 10:26 ` Eli Cohen
2014-12-02 10:26 ` [PATCH net-next 5/9] net/mlx5_core: Print resource number on QP/SRQ async events Eli Cohen
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: Eli Cohen @ 2014-12-02 10:26 UTC (permalink / raw)
To: davem; +Cc: roland, linux-rdma, netdev, ogerlitz, amirv, Eli Cohen
Command queue descriptor page size is 4KB and not the page size used by the
kernel.
Signed-off-by: Eli Cohen <eli@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
index 368c6c5ea014..a2853057c779 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
@@ -1363,7 +1363,7 @@ int mlx5_cmd_init(struct mlx5_core_dev *dev)
goto err_map;
}
- if (cmd->log_sz + cmd->log_stride > PAGE_SHIFT) {
+ if (cmd->log_sz + cmd->log_stride > MLX5_ADAPTER_PAGE_SHIFT) {
dev_err(&dev->pdev->dev, "command queue size overflow\n");
err = -EINVAL;
goto err_map;
--
2.1.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH net-next 4/9] net/mlx5_core: Remove unused dev cap enum fields
[not found] ` <1417515979-22418-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-12-02 10:26 ` [PATCH net-next 1/9] net/mlx5_core: Request the mlx5 IB module on driver load Eli Cohen
2014-12-02 10:26 ` [PATCH net-next 2/9] net/mlx5_core: Fix min vectors value in mlx5_enable_msix Eli Cohen
@ 2014-12-02 10:26 ` Eli Cohen
2014-12-02 10:26 ` [PATCH net-next 6/9] net/mlx5_core: Clear outbox of dealloc uar Eli Cohen
` (3 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Eli Cohen @ 2014-12-02 10:26 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: roland-DgEjT+Ai2ygdnm+yROfE0A, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA, ogerlitz-VPRAkNaXOzVWk0Htik3J/w,
amirv-VPRAkNaXOzVWk0Htik3J/w, Eli Cohen
These enumerations are not used so remove them.
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
include/linux/mlx5/device.h | 8 --------
1 file changed, 8 deletions(-)
diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h
index 1d67fd32e71c..ea4f1c46f761 100644
--- a/include/linux/mlx5/device.h
+++ b/include/linux/mlx5/device.h
@@ -219,23 +219,15 @@ enum {
};
enum {
- MLX5_DEV_CAP_FLAG_RC = 1LL << 0,
- MLX5_DEV_CAP_FLAG_UC = 1LL << 1,
- MLX5_DEV_CAP_FLAG_UD = 1LL << 2,
MLX5_DEV_CAP_FLAG_XRC = 1LL << 3,
- MLX5_DEV_CAP_FLAG_SRQ = 1LL << 6,
MLX5_DEV_CAP_FLAG_BAD_PKEY_CNTR = 1LL << 8,
MLX5_DEV_CAP_FLAG_BAD_QKEY_CNTR = 1LL << 9,
MLX5_DEV_CAP_FLAG_APM = 1LL << 17,
MLX5_DEV_CAP_FLAG_ATOMIC = 1LL << 18,
MLX5_DEV_CAP_FLAG_BLOCK_MCAST = 1LL << 23,
- MLX5_DEV_CAP_FLAG_ON_DMND_PG = 1LL << 24,
MLX5_DEV_CAP_FLAG_CQ_MODER = 1LL << 29,
MLX5_DEV_CAP_FLAG_RESIZE_CQ = 1LL << 30,
- MLX5_DEV_CAP_FLAG_RESIZE_SRQ = 1LL << 32,
MLX5_DEV_CAP_FLAG_DCT = 1LL << 37,
- MLX5_DEV_CAP_FLAG_REMOTE_FENCE = 1LL << 38,
- MLX5_DEV_CAP_FLAG_TLP_HINTS = 1LL << 39,
MLX5_DEV_CAP_FLAG_SIG_HAND_OVER = 1LL << 40,
MLX5_DEV_CAP_FLAG_CMDIF_CSUM = 3LL << 46,
};
--
2.1.3
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH net-next 5/9] net/mlx5_core: Print resource number on QP/SRQ async events
2014-12-02 10:26 [PATCH net-next 0/9] mlx5 driver updates Eli Cohen
2014-12-02 10:26 ` [PATCH net-next 3/9] net/mlx5_core: Fix command queue size enforcement Eli Cohen
@ 2014-12-02 10:26 ` Eli Cohen
2014-12-02 10:26 ` [PATCH net-next 8/9] mlx5: Fix sparse warnings Eli Cohen
[not found] ` <1417515979-22418-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
3 siblings, 0 replies; 11+ messages in thread
From: Eli Cohen @ 2014-12-02 10:26 UTC (permalink / raw)
To: davem; +Cc: roland, linux-rdma, netdev, ogerlitz, amirv, Eli Cohen
Useful for debugging purposes.
Signed-off-by: Eli Cohen <eli@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/eq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eq.c b/drivers/net/ethernet/mellanox/mlx5/core/eq.c
index dfd3ad0a39c1..ab684463780b 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eq.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eq.c
@@ -225,8 +225,8 @@ static int mlx5_eq_int(struct mlx5_core_dev *dev, struct mlx5_eq *eq)
case MLX5_EVENT_TYPE_WQ_INVAL_REQ_ERROR:
case MLX5_EVENT_TYPE_WQ_ACCESS_ERROR:
rsn = be32_to_cpu(eqe->data.qp_srq.qp_srq_n) & 0xffffff;
- mlx5_core_dbg(dev, "event %s(%d) arrived\n",
- eqe_type_str(eqe->type), eqe->type);
+ mlx5_core_dbg(dev, "event %s(%d) arrived on resource 0x%x\n",
+ eqe_type_str(eqe->type), eqe->type, rsn);
mlx5_rsc_event(dev, rsn, eqe->type);
break;
--
2.1.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH net-next 6/9] net/mlx5_core: Clear outbox of dealloc uar
[not found] ` <1417515979-22418-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
` (2 preceding siblings ...)
2014-12-02 10:26 ` [PATCH net-next 4/9] net/mlx5_core: Remove unused dev cap enum fields Eli Cohen
@ 2014-12-02 10:26 ` Eli Cohen
2014-12-02 10:26 ` [PATCH net-next 7/9] net/mlx5_core: Add more supported devices Eli Cohen
` (2 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Eli Cohen @ 2014-12-02 10:26 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: roland-DgEjT+Ai2ygdnm+yROfE0A, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA, ogerlitz-VPRAkNaXOzVWk0Htik3J/w,
amirv-VPRAkNaXOzVWk0Htik3J/w, Majd Dibbiny, Eli Cohen
From: Majd Dibbiny <majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
The outbox should be cleared before executing the command.
Signed-off-by: Majd Dibbiny <majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
drivers/net/ethernet/mellanox/mlx5/core/uar.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/uar.c b/drivers/net/ethernet/mellanox/mlx5/core/uar.c
index 0a6348cefc01..06801d6f595e 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/uar.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/uar.c
@@ -96,6 +96,7 @@ int mlx5_cmd_free_uar(struct mlx5_core_dev *dev, u32 uarn)
int err;
memset(&in, 0, sizeof(in));
+ memset(&out, 0, sizeof(out));
in.hdr.opcode = cpu_to_be16(MLX5_CMD_OP_DEALLOC_UAR);
in.uarn = cpu_to_be32(uarn);
err = mlx5_cmd_exec(dev, &in, sizeof(in), &out, sizeof(out));
--
2.1.3
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH net-next 7/9] net/mlx5_core: Add more supported devices
[not found] ` <1417515979-22418-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
` (3 preceding siblings ...)
2014-12-02 10:26 ` [PATCH net-next 6/9] net/mlx5_core: Clear outbox of dealloc uar Eli Cohen
@ 2014-12-02 10:26 ` Eli Cohen
2014-12-02 10:26 ` [PATCH net-next 9/9] mlx5: Fix error flow in add_keys Eli Cohen
2014-12-09 1:46 ` [PATCH net-next 0/9] mlx5 driver updates David Miller
6 siblings, 0 replies; 11+ messages in thread
From: Eli Cohen @ 2014-12-02 10:26 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: roland-DgEjT+Ai2ygdnm+yROfE0A, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA, ogerlitz-VPRAkNaXOzVWk0Htik3J/w,
amirv-VPRAkNaXOzVWk0Htik3J/w, Eli Cohen
Add ConnectX-4LX to the list of supported devices as well as their virtual
functions.
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
drivers/net/ethernet/mellanox/mlx5/core/main.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
index c9d4a024f186..3f4525619a07 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -903,8 +903,12 @@ static void remove_one(struct pci_dev *pdev)
}
static const struct pci_device_id mlx5_core_pci_table[] = {
- { PCI_VDEVICE(MELLANOX, 4113) }, /* MT4113 Connect-IB */
+ { PCI_VDEVICE(MELLANOX, 4113) }, /* Connect-IB */
+ { PCI_VDEVICE(MELLANOX, 4114) }, /* Connect-IB VF */
{ PCI_VDEVICE(MELLANOX, 4115) }, /* ConnectX-4 */
+ { PCI_VDEVICE(MELLANOX, 4116) }, /* ConnectX-4 VF */
+ { PCI_VDEVICE(MELLANOX, 4117) }, /* ConnectX-4LX */
+ { PCI_VDEVICE(MELLANOX, 4118) }, /* ConnectX-4LX VF */
{ 0, }
};
--
2.1.3
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH net-next 8/9] mlx5: Fix sparse warnings
2014-12-02 10:26 [PATCH net-next 0/9] mlx5 driver updates Eli Cohen
2014-12-02 10:26 ` [PATCH net-next 3/9] net/mlx5_core: Fix command queue size enforcement Eli Cohen
2014-12-02 10:26 ` [PATCH net-next 5/9] net/mlx5_core: Print resource number on QP/SRQ async events Eli Cohen
@ 2014-12-02 10:26 ` Eli Cohen
[not found] ` <1417515979-22418-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
3 siblings, 0 replies; 11+ messages in thread
From: Eli Cohen @ 2014-12-02 10:26 UTC (permalink / raw)
To: davem; +Cc: roland, linux-rdma, netdev, ogerlitz, amirv, Eli Cohen
1. Add required __acquire/__release statements to balance spinlock usage.
2. Change the index parameter of begin_wqe() to be unsigned to match supplied
argument type.
Signed-off-by: Eli Cohen <eli@mellanox.com>
---
drivers/infiniband/hw/mlx5/qp.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index 0e2ef9fe0e29..1cae1c7132b4 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -1011,9 +1011,14 @@ static void mlx5_ib_lock_cqs(struct mlx5_ib_cq *send_cq, struct mlx5_ib_cq *recv
}
} else {
spin_lock_irq(&send_cq->lock);
+ __acquire(&recv_cq->lock);
}
} else if (recv_cq) {
spin_lock_irq(&recv_cq->lock);
+ __acquire(&send_cq->lock);
+ } else {
+ __acquire(&send_cq->lock);
+ __acquire(&recv_cq->lock);
}
}
@@ -1033,10 +1038,15 @@ static void mlx5_ib_unlock_cqs(struct mlx5_ib_cq *send_cq, struct mlx5_ib_cq *re
spin_unlock_irq(&recv_cq->lock);
}
} else {
+ __release(&recv_cq->lock);
spin_unlock_irq(&send_cq->lock);
}
} else if (recv_cq) {
+ __release(&send_cq->lock);
spin_unlock_irq(&recv_cq->lock);
+ } else {
+ __release(&recv_cq->lock);
+ __release(&send_cq->lock);
}
}
@@ -2411,7 +2421,7 @@ static u8 get_fence(u8 fence, struct ib_send_wr *wr)
static int begin_wqe(struct mlx5_ib_qp *qp, void **seg,
struct mlx5_wqe_ctrl_seg **ctrl,
- struct ib_send_wr *wr, int *idx,
+ struct ib_send_wr *wr, unsigned *idx,
int *size, int nreq)
{
int err = 0;
@@ -2737,6 +2747,8 @@ out:
if (bf->need_lock)
spin_lock(&bf->lock);
+ else
+ __acquire(&bf->lock);
/* TBD enable WC */
if (0 && nreq == 1 && bf->uuarn && inl && size > 1 && size <= bf->buf_size / 16) {
@@ -2753,6 +2765,8 @@ out:
bf->offset ^= bf->buf_size;
if (bf->need_lock)
spin_unlock(&bf->lock);
+ else
+ __release(&bf->lock);
}
spin_unlock_irqrestore(&qp->sq.lock, flags);
--
2.1.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH net-next 9/9] mlx5: Fix error flow in add_keys
[not found] ` <1417515979-22418-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
` (4 preceding siblings ...)
2014-12-02 10:26 ` [PATCH net-next 7/9] net/mlx5_core: Add more supported devices Eli Cohen
@ 2014-12-02 10:26 ` Eli Cohen
2014-12-09 1:46 ` [PATCH net-next 0/9] mlx5 driver updates David Miller
6 siblings, 0 replies; 11+ messages in thread
From: Eli Cohen @ 2014-12-02 10:26 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: roland-DgEjT+Ai2ygdnm+yROfE0A, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA, ogerlitz-VPRAkNaXOzVWk0Htik3J/w,
amirv-VPRAkNaXOzVWk0Htik3J/w, Eli Cohen
If mlx5_core_create_mkey fails, decrease the pending counter to undo the
previous increment.
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
drivers/infiniband/hw/mlx5/mr.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
index 4c89b64aa9cf..5a80dd993761 100644
--- a/drivers/infiniband/hw/mlx5/mr.c
+++ b/drivers/infiniband/hw/mlx5/mr.c
@@ -159,6 +159,9 @@ static int add_keys(struct mlx5_ib_dev *dev, int c, int num)
sizeof(*in), reg_mr_callback,
mr, &mr->out);
if (err) {
+ spin_lock_irq(&ent->lock);
+ ent->pending--;
+ spin_unlock_irq(&ent->lock);
mlx5_ib_warn(dev, "create mkey failed %d\n", err);
kfree(mr);
break;
--
2.1.3
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH net-next 0/9] mlx5 driver updates
[not found] ` <1417515979-22418-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
` (5 preceding siblings ...)
2014-12-02 10:26 ` [PATCH net-next 9/9] mlx5: Fix error flow in add_keys Eli Cohen
@ 2014-12-09 1:46 ` David Miller
6 siblings, 0 replies; 11+ messages in thread
From: David Miller @ 2014-12-09 1:46 UTC (permalink / raw)
To: eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb
Cc: roland-DgEjT+Ai2ygdnm+yROfE0A, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA, ogerlitz-VPRAkNaXOzVWk0Htik3J/w,
amirv-VPRAkNaXOzVWk0Htik3J/w, eli-VPRAkNaXOzVWk0Htik3J/w
From: Eli Cohen <eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Date: Tue, 2 Dec 2014 12:26:10 +0200
> The following series contains some fixes to mlx5 as well as update to the list
> of supported devices.
Series applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-12-09 1:46 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-02 10:26 [PATCH net-next 0/9] mlx5 driver updates Eli Cohen
2014-12-02 10:26 ` [PATCH net-next 3/9] net/mlx5_core: Fix command queue size enforcement Eli Cohen
2014-12-02 10:26 ` [PATCH net-next 5/9] net/mlx5_core: Print resource number on QP/SRQ async events Eli Cohen
2014-12-02 10:26 ` [PATCH net-next 8/9] mlx5: Fix sparse warnings Eli Cohen
[not found] ` <1417515979-22418-1-git-send-email-eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-12-02 10:26 ` [PATCH net-next 1/9] net/mlx5_core: Request the mlx5 IB module on driver load Eli Cohen
2014-12-02 10:26 ` [PATCH net-next 2/9] net/mlx5_core: Fix min vectors value in mlx5_enable_msix Eli Cohen
2014-12-02 10:26 ` [PATCH net-next 4/9] net/mlx5_core: Remove unused dev cap enum fields Eli Cohen
2014-12-02 10:26 ` [PATCH net-next 6/9] net/mlx5_core: Clear outbox of dealloc uar Eli Cohen
2014-12-02 10:26 ` [PATCH net-next 7/9] net/mlx5_core: Add more supported devices Eli Cohen
2014-12-02 10:26 ` [PATCH net-next 9/9] mlx5: Fix error flow in add_keys Eli Cohen
2014-12-09 1:46 ` [PATCH net-next 0/9] mlx5 driver updates David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).