* [PATCH for-rc] RDMA/bnxt_re: Fix reporting active_{speed,width} attributes
@ 2023-05-29 15:35 Kamal Heib
2023-05-30 7:44 ` Selvin Xavier
2023-06-01 23:02 ` Jason Gunthorpe
0 siblings, 2 replies; 3+ messages in thread
From: Kamal Heib @ 2023-05-29 15:35 UTC (permalink / raw)
To: linux-rdma; +Cc: Selvin Xavier, Jason Gunthorpe, Leon Romanovsky, Kamal Heib
After commit 6d758147c7b8 ("RDMA/bnxt_re: Use auxiliary driver interface")
the active_{speed, width} attributes are reported incorrectly, This is
happening because ib_get_eth_speed() is called only once from
bnxt_re_ib_init() - Fix this issue by calling ib_get_eth_speed() from
bnxt_re_query_port().
Fixes: 6d758147c7b8 ("RDMA/bnxt_re: Use auxiliary driver interface")
Signed-off-by: Kamal Heib <kheib@redhat.com>
---
drivers/infiniband/hw/bnxt_re/bnxt_re.h | 2 --
drivers/infiniband/hw/bnxt_re/ib_verbs.c | 7 ++++---
drivers/infiniband/hw/bnxt_re/main.c | 2 --
3 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/infiniband/hw/bnxt_re/bnxt_re.h b/drivers/infiniband/hw/bnxt_re/bnxt_re.h
index 5a2baf49ecaa..2c95e6f3d47a 100644
--- a/drivers/infiniband/hw/bnxt_re/bnxt_re.h
+++ b/drivers/infiniband/hw/bnxt_re/bnxt_re.h
@@ -135,8 +135,6 @@ struct bnxt_re_dev {
struct delayed_work worker;
u8 cur_prio_map;
- u16 active_speed;
- u8 active_width;
/* FP Notification Queue (CQ & SRQ) */
struct tasklet_struct nq_task;
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index e86afecfbe46..8967e9aed14d 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -199,6 +199,7 @@ int bnxt_re_query_port(struct ib_device *ibdev, u32 port_num,
{
struct bnxt_re_dev *rdev = to_bnxt_re_dev(ibdev, ibdev);
struct bnxt_qplib_dev_attr *dev_attr = &rdev->dev_attr;
+ int rc;
memset(port_attr, 0, sizeof(*port_attr));
@@ -228,10 +229,10 @@ int bnxt_re_query_port(struct ib_device *ibdev, u32 port_num,
port_attr->sm_sl = 0;
port_attr->subnet_timeout = 0;
port_attr->init_type_reply = 0;
- port_attr->active_speed = rdev->active_speed;
- port_attr->active_width = rdev->active_width;
+ rc = ib_get_eth_speed(&rdev->ibdev, port_num, &port_attr->active_speed,
+ &port_attr->active_width);
- return 0;
+ return rc;
}
int bnxt_re_get_port_immutable(struct ib_device *ibdev, u32 port_num,
diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c
index b9e2f89337e8..dff50c152477 100644
--- a/drivers/infiniband/hw/bnxt_re/main.c
+++ b/drivers/infiniband/hw/bnxt_re/main.c
@@ -1077,8 +1077,6 @@ static int bnxt_re_ib_init(struct bnxt_re_dev *rdev)
return rc;
}
dev_info(rdev_to_dev(rdev), "Device registered with IB successfully");
- ib_get_eth_speed(&rdev->ibdev, 1, &rdev->active_speed,
- &rdev->active_width);
set_bit(BNXT_RE_FLAG_ISSUE_ROCE_STATS, &rdev->flags);
event = netif_running(rdev->netdev) && netif_carrier_ok(rdev->netdev) ?
--
2.40.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH for-rc] RDMA/bnxt_re: Fix reporting active_{speed,width} attributes
2023-05-29 15:35 [PATCH for-rc] RDMA/bnxt_re: Fix reporting active_{speed,width} attributes Kamal Heib
@ 2023-05-30 7:44 ` Selvin Xavier
2023-06-01 23:02 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Selvin Xavier @ 2023-05-30 7:44 UTC (permalink / raw)
To: Kamal Heib; +Cc: linux-rdma, Jason Gunthorpe, Leon Romanovsky
[-- Attachment #1: Type: text/plain, Size: 567 bytes --]
On Mon, May 29, 2023 at 9:10 PM Kamal Heib <kheib@redhat.com> wrote:
>
> After commit 6d758147c7b8 ("RDMA/bnxt_re: Use auxiliary driver interface")
> the active_{speed, width} attributes are reported incorrectly, This is
> happening because ib_get_eth_speed() is called only once from
> bnxt_re_ib_init() - Fix this issue by calling ib_get_eth_speed() from
> bnxt_re_query_port().
>
> Fixes: 6d758147c7b8 ("RDMA/bnxt_re: Use auxiliary driver interface")
> Signed-off-by: Kamal Heib <kheib@redhat.com>
Acked-by: Selvin Xavier <selvin.xavier@broadcom.com>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4224 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH for-rc] RDMA/bnxt_re: Fix reporting active_{speed,width} attributes
2023-05-29 15:35 [PATCH for-rc] RDMA/bnxt_re: Fix reporting active_{speed,width} attributes Kamal Heib
2023-05-30 7:44 ` Selvin Xavier
@ 2023-06-01 23:02 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2023-06-01 23:02 UTC (permalink / raw)
To: Kamal Heib; +Cc: linux-rdma, Selvin Xavier, Leon Romanovsky
On Mon, May 29, 2023 at 11:35:26AM -0400, Kamal Heib wrote:
> After commit 6d758147c7b8 ("RDMA/bnxt_re: Use auxiliary driver interface")
> the active_{speed, width} attributes are reported incorrectly, This is
> happening because ib_get_eth_speed() is called only once from
> bnxt_re_ib_init() - Fix this issue by calling ib_get_eth_speed() from
> bnxt_re_query_port().
>
> Fixes: 6d758147c7b8 ("RDMA/bnxt_re: Use auxiliary driver interface")
> Signed-off-by: Kamal Heib <kheib@redhat.com>
> Acked-by: Selvin Xavier <selvin.xavier@broadcom.com>
> ---
> drivers/infiniband/hw/bnxt_re/bnxt_re.h | 2 --
> drivers/infiniband/hw/bnxt_re/ib_verbs.c | 7 ++++---
> drivers/infiniband/hw/bnxt_re/main.c | 2 --
> 3 files changed, 4 insertions(+), 7 deletions(-)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-01 23:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-29 15:35 [PATCH for-rc] RDMA/bnxt_re: Fix reporting active_{speed,width} attributes Kamal Heib
2023-05-30 7:44 ` Selvin Xavier
2023-06-01 23:02 ` Jason Gunthorpe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.