linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-rc 0/3] Broadcom's roce dirver bug fixes
@ 2019-11-19 15:48 Devesh Sharma
  2019-11-19 15:48 ` [PATCH for-rc 1/3] RDMA/bnxt_re: Fix chip number validation Broadcom's Gen P5 series Devesh Sharma
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Devesh Sharma @ 2019-11-19 15:48 UTC (permalink / raw)
  To: dledford, jgg; +Cc: linux-rdma, Devesh Sharma

This series contain 3 patches patch 1 and patch 2 are specific to
Gen P5 devices. Patch 3 is a generic fix to silence few sparse
warnings.

changes for V0 to V1
 - originally this series had only 1 patch which is the first patch.
 - Added Fixes tag on the first patch.
 - added two more patches to fix other quick bug fixes.

Devesh Sharma (2):
  RDMA/bnxt_re: fix stat push into dma buffer on gen p5 devices
  RDMA/bnxt_re: fix sparse warnings

Luke Starrett (1):
  RDMA/bnxt_re: Fix chip number validation Broadcom's Gen P5 series

 drivers/infiniband/hw/bnxt_re/main.c      | 9 +++++----
 drivers/infiniband/hw/bnxt_re/qplib_res.h | 8 ++++++--
 2 files changed, 11 insertions(+), 6 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH for-rc 1/3] RDMA/bnxt_re: Fix chip number validation Broadcom's Gen P5 series
  2019-11-19 15:48 [PATCH for-rc 0/3] Broadcom's roce dirver bug fixes Devesh Sharma
@ 2019-11-19 15:48 ` Devesh Sharma
  2019-11-19 15:48 ` [PATCH for-rc 2/3] RDMA/bnxt_re: fix stat push into dma buffer on gen p5 devices Devesh Sharma
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Devesh Sharma @ 2019-11-19 15:48 UTC (permalink / raw)
  To: dledford, jgg
  Cc: linux-rdma, Luke Starrett, Naresh Kumar PBS, Selvin Xavier,
	Devesh Sharma

From: Luke Starrett <luke.starrett@broadcom.com>

In the first version of Gen P5 ASIC, chip-id was always
set to 0x1750 for all adaptor port configurations. This
has been fixed in the new chip rev.

Making a change in chip-number validation check to honor
other chip-ids as well.

Fixes: ae8637e13185 ("RDMA/bnxt_re: Add chip context to identify 57500 series")
Signed-off-by: Naresh Kumar PBS <nareshkumar.pbs@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Luke Starrett <luke.starrett@broadcom.com>
Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com>
---
 drivers/infiniband/hw/bnxt_re/qplib_res.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/bnxt_re/qplib_res.h b/drivers/infiniband/hw/bnxt_re/qplib_res.h
index fbda11a..aaa76d7 100644
--- a/drivers/infiniband/hw/bnxt_re/qplib_res.h
+++ b/drivers/infiniband/hw/bnxt_re/qplib_res.h
@@ -186,7 +186,9 @@ struct bnxt_qplib_chip_ctx {
 	u8	chip_metal;
 };
 
-#define CHIP_NUM_57500          0x1750
+#define CHIP_NUM_57508		0x1750
+#define CHIP_NUM_57504		0x1751
+#define CHIP_NUM_57502		0x1752
 
 struct bnxt_qplib_res {
 	struct pci_dev			*pdev;
@@ -203,7 +205,9 @@ struct bnxt_qplib_res {
 
 static inline bool bnxt_qplib_is_chip_gen_p5(struct bnxt_qplib_chip_ctx *cctx)
 {
-	return (cctx->chip_num == CHIP_NUM_57500);
+	return (cctx->chip_num == CHIP_NUM_57508 ||
+		cctx->chip_num == CHIP_NUM_57504 ||
+		cctx->chip_num == CHIP_NUM_57502);
 }
 
 static inline u8 bnxt_qplib_get_hwq_type(struct bnxt_qplib_res *res)
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH for-rc 2/3] RDMA/bnxt_re: fix stat push into dma buffer on gen p5  devices
  2019-11-19 15:48 [PATCH for-rc 0/3] Broadcom's roce dirver bug fixes Devesh Sharma
  2019-11-19 15:48 ` [PATCH for-rc 1/3] RDMA/bnxt_re: Fix chip number validation Broadcom's Gen P5 series Devesh Sharma
@ 2019-11-19 15:48 ` Devesh Sharma
  2019-11-19 15:48 ` [PATCH for-rc 3/3] RDMA/bnxt_re: fix sparse warnings Devesh Sharma
  2019-11-19 19:38 ` [PATCH for-rc 0/3] Broadcom's roce dirver bug fixes Jason Gunthorpe
  3 siblings, 0 replies; 8+ messages in thread
From: Devesh Sharma @ 2019-11-19 15:48 UTC (permalink / raw)
  To: dledford, jgg; +Cc: linux-rdma, Devesh Sharma

Making a change to fix device stat push from chip
to dma buffer. The new firmware command expects dma
length to be specified during stat allocation.

Fixes: 2792b5b95ed5 ("bnxt_en: Update firmware interface spec. to 1.10.0.89")
Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com>
---
 drivers/infiniband/hw/bnxt_re/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c
index 30a54f8..2ee2cd4 100644
--- a/drivers/infiniband/hw/bnxt_re/main.c
+++ b/drivers/infiniband/hw/bnxt_re/main.c
@@ -477,6 +477,7 @@ static int bnxt_re_net_stats_ctx_alloc(struct bnxt_re_dev *rdev,
 	bnxt_re_init_hwrm_hdr(rdev, (void *)&req, HWRM_STAT_CTX_ALLOC, -1, -1);
 	req.update_period_ms = cpu_to_le32(1000);
 	req.stats_dma_addr = cpu_to_le64(dma_map);
+	req.stats_dma_length = cpu_to_le16(sizeof(struct ctx_hw_stats_ext));
 	req.stat_ctx_flags = STAT_CTX_ALLOC_REQ_STAT_CTX_FLAGS_ROCE;
 	bnxt_re_fill_fw_msg(&fw_msg, (void *)&req, sizeof(req), (void *)&resp,
 			    sizeof(resp), DFLT_HWRM_CMD_TIMEOUT);
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH for-rc 3/3] RDMA/bnxt_re: fix sparse warnings
  2019-11-19 15:48 [PATCH for-rc 0/3] Broadcom's roce dirver bug fixes Devesh Sharma
  2019-11-19 15:48 ` [PATCH for-rc 1/3] RDMA/bnxt_re: Fix chip number validation Broadcom's Gen P5 series Devesh Sharma
  2019-11-19 15:48 ` [PATCH for-rc 2/3] RDMA/bnxt_re: fix stat push into dma buffer on gen p5 devices Devesh Sharma
@ 2019-11-19 15:48 ` Devesh Sharma
  2019-11-19 19:38 ` [PATCH for-rc 0/3] Broadcom's roce dirver bug fixes Jason Gunthorpe
  3 siblings, 0 replies; 8+ messages in thread
From: Devesh Sharma @ 2019-11-19 15:48 UTC (permalink / raw)
  To: dledford, jgg; +Cc: linux-rdma, Devesh Sharma

Making a change to fix following sparse warnings
 CHECK   drivers/infiniband/hw/bnxt_re/main.c
drivers/infiniband/hw/bnxt_re/main.c:1274:18: warning: cast from restricted __le16
drivers/infiniband/hw/bnxt_re/main.c:1275:18: warning: cast from restricted __le16
drivers/infiniband/hw/bnxt_re/main.c:1276:18: warning: cast from restricted __le16
drivers/infiniband/hw/bnxt_re/main.c:1277:21: warning: restricted __le16 degrades to integer

Fixes: 2b827ea1926b ("RDMA/bnxt_re: Query HWRM Interface version from FW")
Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com>
---
 drivers/infiniband/hw/bnxt_re/main.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c
index 2ee2cd4..27e2df4 100644
--- a/drivers/infiniband/hw/bnxt_re/main.c
+++ b/drivers/infiniband/hw/bnxt_re/main.c
@@ -1271,10 +1271,10 @@ static void bnxt_re_query_hwrm_intf_version(struct bnxt_re_dev *rdev)
 		return;
 	}
 	rdev->qplib_ctx.hwrm_intf_ver =
-		(u64)resp.hwrm_intf_major << 48 |
-		(u64)resp.hwrm_intf_minor << 32 |
-		(u64)resp.hwrm_intf_build << 16 |
-		resp.hwrm_intf_patch;
+		(u64)le16_to_cpu(resp.hwrm_intf_major) << 48 |
+		(u64)le16_to_cpu(resp.hwrm_intf_minor) << 32 |
+		(u64)le16_to_cpu(resp.hwrm_intf_build) << 16 |
+		le16_to_cpu(resp.hwrm_intf_patch);
 }
 
 static void bnxt_re_ib_unreg(struct bnxt_re_dev *rdev)
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH for-rc 0/3] Broadcom's roce dirver bug fixes
  2019-11-19 15:48 [PATCH for-rc 0/3] Broadcom's roce dirver bug fixes Devesh Sharma
                   ` (2 preceding siblings ...)
  2019-11-19 15:48 ` [PATCH for-rc 3/3] RDMA/bnxt_re: fix sparse warnings Devesh Sharma
@ 2019-11-19 19:38 ` Jason Gunthorpe
  2019-11-20  5:22   ` Devesh Sharma
  3 siblings, 1 reply; 8+ messages in thread
From: Jason Gunthorpe @ 2019-11-19 19:38 UTC (permalink / raw)
  To: Devesh Sharma; +Cc: dledford, linux-rdma

On Tue, Nov 19, 2019 at 10:48:48AM -0500, Devesh Sharma wrote:
> This series contain 3 patches patch 1 and patch 2 are specific to
> Gen P5 devices. Patch 3 is a generic fix to silence few sparse
> warnings.

These commit messages are not suitable for -rc, and a sparse warning
fix is rarely appropriate

You need to describe what the user impact is of these bugs.

-rc is done anyhow unless something urgent comes up.

Jason

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH for-rc 0/3] Broadcom's roce dirver bug fixes
  2019-11-19 19:38 ` [PATCH for-rc 0/3] Broadcom's roce dirver bug fixes Jason Gunthorpe
@ 2019-11-20  5:22   ` Devesh Sharma
  2019-11-20 13:32     ` Jason Gunthorpe
  0 siblings, 1 reply; 8+ messages in thread
From: Devesh Sharma @ 2019-11-20  5:22 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: dledford, linux-rdma

On Wed, Nov 20, 2019 at 1:08 AM Jason Gunthorpe <jgg@mellanox.com> wrote:
>
> On Tue, Nov 19, 2019 at 10:48:48AM -0500, Devesh Sharma wrote:
> > This series contain 3 patches patch 1 and patch 2 are specific to
> > Gen P5 devices. Patch 3 is a generic fix to silence few sparse
> > warnings.
>
> These commit messages are not suitable for -rc, and a sparse warning
> fix is rarely appropriate
>
> You need to describe what the user impact is of these bugs.
>
> -rc is done anyhow unless something urgent comes up.
Got your point. Let's drop sparse fixes patch from this series.

For first patch the impact catastrophic as consumer wont be able to use the
cards as it won't be listed the dev_list.

For second patch the impact is that the end-user won't be able to read
the hardware
stats.

Let me add both points in the commit description respectively.
>
> Jason

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH for-rc 0/3] Broadcom's roce dirver bug fixes
  2019-11-20  5:22   ` Devesh Sharma
@ 2019-11-20 13:32     ` Jason Gunthorpe
  2019-11-20 16:17       ` Devesh Sharma
  0 siblings, 1 reply; 8+ messages in thread
From: Jason Gunthorpe @ 2019-11-20 13:32 UTC (permalink / raw)
  To: Devesh Sharma; +Cc: dledford, linux-rdma

On Wed, Nov 20, 2019 at 10:52:01AM +0530, Devesh Sharma wrote:
> On Wed, Nov 20, 2019 at 1:08 AM Jason Gunthorpe <jgg@mellanox.com> wrote:
> >
> > On Tue, Nov 19, 2019 at 10:48:48AM -0500, Devesh Sharma wrote:
> > > This series contain 3 patches patch 1 and patch 2 are specific to
> > > Gen P5 devices. Patch 3 is a generic fix to silence few sparse
> > > warnings.
> >
> > These commit messages are not suitable for -rc, and a sparse warning
> > fix is rarely appropriate
> >
> > You need to describe what the user impact is of these bugs.
> >
> > -rc is done anyhow unless something urgent comes up.
> Got your point. Let's drop sparse fixes patch from this series.

Why? it can go to -next, like I said, there won't be another -rc

> For first patch the impact catastrophic as consumer wont be able to use the
> cards as it won't be listed the dev_list.

Supporting a new card is a new feature, not -rc material

Jason

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH for-rc 0/3] Broadcom's roce dirver bug fixes
  2019-11-20 13:32     ` Jason Gunthorpe
@ 2019-11-20 16:17       ` Devesh Sharma
  0 siblings, 0 replies; 8+ messages in thread
From: Devesh Sharma @ 2019-11-20 16:17 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: dledford, linux-rdma

On Wed, Nov 20, 2019 at 7:02 PM Jason Gunthorpe <jgg@mellanox.com> wrote:
>
> On Wed, Nov 20, 2019 at 10:52:01AM +0530, Devesh Sharma wrote:
> > On Wed, Nov 20, 2019 at 1:08 AM Jason Gunthorpe <jgg@mellanox.com> wrote:
> > >
> > > On Tue, Nov 19, 2019 at 10:48:48AM -0500, Devesh Sharma wrote:
> > > > This series contain 3 patches patch 1 and patch 2 are specific to
> > > > Gen P5 devices. Patch 3 is a generic fix to silence few sparse
> > > > warnings.
> > >
> > > These commit messages are not suitable for -rc, and a sparse warning
> > > fix is rarely appropriate
> > >
> > > You need to describe what the user impact is of these bugs.
> > >
> > > -rc is done anyhow unless something urgent comes up.
> > Got your point. Let's drop sparse fixes patch from this series.
>
> Why? it can go to -next, like I said, there won't be another -rc
Yup, it can certainly go.
>
> > For first patch the impact catastrophic as consumer wont be able to use the
> > cards as it won't be listed the dev_list.
>
> Supporting a new card is a new feature, not -rc material
Alright, I shall move the series to for-next and add back the sparse
warning fix. Please ignore V2 which have posted already.
>
> Jason

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-11-20 16:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-19 15:48 [PATCH for-rc 0/3] Broadcom's roce dirver bug fixes Devesh Sharma
2019-11-19 15:48 ` [PATCH for-rc 1/3] RDMA/bnxt_re: Fix chip number validation Broadcom's Gen P5 series Devesh Sharma
2019-11-19 15:48 ` [PATCH for-rc 2/3] RDMA/bnxt_re: fix stat push into dma buffer on gen p5 devices Devesh Sharma
2019-11-19 15:48 ` [PATCH for-rc 3/3] RDMA/bnxt_re: fix sparse warnings Devesh Sharma
2019-11-19 19:38 ` [PATCH for-rc 0/3] Broadcom's roce dirver bug fixes Jason Gunthorpe
2019-11-20  5:22   ` Devesh Sharma
2019-11-20 13:32     ` Jason Gunthorpe
2019-11-20 16:17       ` Devesh Sharma

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).