From: Jason Gunthorpe <jgg@nvidia.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Doug Ledford <dledford@redhat.com>,
Bernard Metzler <bmt@zurich.ibm.com>,
Junxian Huang <huangjunxian6@hisilicon.com>,
Leon Romanovsky <leon@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Yuyu Li <liyuyu6@huawei.com>
Subject: Re: linux-next: manual merge of the rdma tree with Linus' tree
Date: Tue, 14 Jan 2025 20:41:30 -0400 [thread overview]
Message-ID: <20250115004130.GJ5556@nvidia.com> (raw)
In-Reply-To: <20250115082721.732ba8d2@canb.auug.org.au>
On Wed, Jan 15, 2025 at 08:27:21AM +1100, Stephen Rothwell wrote:
> Hi Jason,
>
> On Tue, 14 Jan 2025 16:48:28 -0400 Jason Gunthorpe <jgg@nvidia.com> wrote:
> >
> > I think we need to retain the ib_get_curr_port_state() call:
>
> Why?
That is how the new system is supposed to work.. Drivers are supposed
to call ib_get_curr_port_state() not open code it. This matches what
is in the for-next tree:
attr->state = ib_get_curr_port_state(sdev->netdev);
attr->phys_state = attr->state == IB_PORT_ACTIVE ?
IB_PORT_PHYS_STATE_LINK_UP : IB_PORT_PHYS_STATE_DISABLED;
> It is no longer used to determine the attr->phys-state value and
> then attr->state is set again just below.
Ah, missed that, it should be deleted also, and the phys_state should
use the other hunk too:
--- drivers/infiniband/sw/siw/siw_verbs.c 2025-01-14 16:37:02.023738738 -0400
+++ /home/jgg/oss/testing-k.o/drivers/infiniband/sw/siw/siw_verbs.c 2025-01-14 20:38:42.611302948 -0400
@@ -189,10 +189,9 @@
attr->max_msg_sz = -1;
attr->max_mtu = ib_mtu_int_to_enum(ndev->max_mtu);
attr->active_mtu = ib_mtu_int_to_enum(READ_ONCE(ndev->mtu));
- attr->phys_state = (netif_running(ndev) && netif_carrier_ok(ndev)) ?
+ attr->state = ib_get_curr_port_state(ndev);
+ attr->phys_state = attr->state == IB_PORT_ACTIVE ?
IB_PORT_PHYS_STATE_LINK_UP : IB_PORT_PHYS_STATE_DISABLED;
- attr->state = attr->phys_state == IB_PORT_PHYS_STATE_LINK_UP ?
- IB_PORT_ACTIVE : IB_PORT_DOWN;
attr->port_cap_flags = IB_PORT_CM_SUP | IB_PORT_DEVICE_MGMT_SUP;
/*
* All zero
Jason
next prev parent reply other threads:[~2025-01-15 0:41 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-06 0:13 linux-next: manual merge of the rdma tree with Linus' tree Stephen Rothwell
2025-01-14 20:48 ` Jason Gunthorpe
2025-01-14 21:27 ` Stephen Rothwell
2025-01-15 0:41 ` Jason Gunthorpe [this message]
2025-01-15 1:07 ` Stephen Rothwell
2025-01-15 11:17 ` Bernard Metzler
-- strict thread matches above, loose matches on Subject: below --
2025-09-11 2:23 Stephen Rothwell
2025-09-11 11:03 ` Leon Romanovsky
2025-05-14 2:24 Stephen Rothwell
2025-05-14 8:17 ` Leon Romanovsky
2025-04-22 4:30 Stephen Rothwell
2025-03-20 1:08 Stephen Rothwell
2025-03-20 6:35 ` Leon Romanovsky
2025-01-05 23:51 Stephen Rothwell
2025-01-06 1:02 ` Stephen Rothwell
2025-01-06 14:16 ` Zhu Yanjun
2023-06-22 1:52 Stephen Rothwell
2021-05-21 0:34 Stephen Rothwell
2021-04-15 2:05 Stephen Rothwell
2021-02-10 2:15 Stephen Rothwell
2021-02-10 18:57 ` Pearson, Robert B
2021-02-10 20:36 ` Jason Gunthorpe
2021-02-10 22:08 ` Pearson, Robert B
2021-02-11 20:03 ` Martin Wilck
2019-11-05 1:17 Stephen Rothwell
2019-11-05 2:21 ` Jason Gunthorpe
2019-11-05 2:28 ` Stephen Rothwell
2019-10-24 0:01 Stephen Rothwell
2019-10-28 19:30 ` Jason Gunthorpe
2019-06-20 2:10 Stephen Rothwell
2019-06-20 3:25 ` Doug Ledford
2019-06-20 2:06 Stephen Rothwell
2019-06-20 3:24 ` Doug Ledford
2019-06-14 3:00 Stephen Rothwell
2019-06-14 13:11 ` Doug Ledford
2018-09-28 0:01 Stephen Rothwell
2018-09-29 2:57 ` Parav Pandit
2018-08-06 2:01 Stephen Rothwell
2018-08-06 19:41 ` Jason Gunthorpe
2018-08-06 21:49 ` Stephen Rothwell
2017-08-08 2:11 Stephen Rothwell
2017-07-14 1:14 Stephen Rothwell
2017-07-14 1:17 ` Doug Ledford
2017-07-14 3:34 ` Leon Romanovsky
2017-07-14 3:50 ` Stephen Rothwell
2017-07-14 4:55 ` Leon Romanovsky
2017-07-14 12:03 ` Doug Ledford
2017-07-14 13:46 ` Leon Romanovsky
2017-07-14 4:12 ` Doug Ledford
2017-07-14 4:54 ` Leon Romanovsky
2017-07-14 14:33 ` Doug Ledford
2017-07-14 15:10 ` Leon Romanovsky
2016-12-15 0:47 Stephen Rothwell
2016-10-10 0:59 Stephen Rothwell
2016-10-10 0:54 Stephen Rothwell
2016-08-05 1:05 Stephen Rothwell
2016-08-05 1:01 Stephen Rothwell
2016-08-05 0:52 Stephen Rothwell
2016-05-19 1:45 Stephen Rothwell
2016-03-22 0:33 Stephen Rothwell
2016-03-22 0:29 Stephen Rothwell
2016-03-22 0:24 Stephen Rothwell
2016-03-22 0:17 Stephen Rothwell
2015-11-01 7:48 Stephen Rothwell
2015-11-02 10:40 ` Sagi Grimberg
2015-11-02 10:40 ` Sagi Grimberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250115004130.GJ5556@nvidia.com \
--to=jgg@nvidia.com \
--cc=bmt@zurich.ibm.com \
--cc=dledford@redhat.com \
--cc=huangjunxian6@hisilicon.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=liyuyu6@huawei.com \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.