[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240115103240.GL392144@kernel.org>
Date: Mon, 15 Jan 2024 10:32:40 +0000
From: Simon Horman <horms@...nel.org>
To: Karol Kolacinski <karol.kolacinski@...el.com>
Cc: intel-wired-lan@...ts.osuosl.org, netdev@...r.kernel.org,
anthony.l.nguyen@...el.com, jesse.brandeburg@...el.com,
Jacob Keller <jacob.e.keller@...el.com>
Subject: Re: [PATCH v5 iwl-next 1/6] ice: introduce PTP state machine
On Mon, Jan 08, 2024 at 01:47:12PM +0100, Karol Kolacinski wrote:
Should there be a "From: Jacob" line here to
match the Signed-off-by below?
> Add PTP state machine so that the driver can correctly identify PTP
> state around resets.
> When the driver got information about ungraceful reset, PTP was not
> prepared for reset and it returned error. When this situation occurs,
> prepare PTP before rebuilding its structures.
>
> Signed-off-by: Jacob Keller <jacob.e.keller@...el.com>
> Signed-off-by: Karol Kolacinski <karol.kolacinski@...el.com>
> Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
Hi Karol and Jacob,
FWIIW, The combination of both a Signed-off-by and Reviewed-by tag from
Jacob seems a little odd to me. If he authored the patch then I would have
gone with the following (along with the From line mentioned above):
Signed-off-by: Jacob Keller <jacob.e.keller@...el.com>
Signed-off-by: Karol Kolacinski <karol.kolacinski@...el.com>
Otherwise, if he reviewed the patch I would have gone with:
Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
Signed-off-by: Karol Kolacinski <karol.kolacinski@...el.com>
...
> diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c
...
> @@ -2640,6 +2676,16 @@ void ice_ptp_reset(struct ice_pf *pf)
> int err, itr = 1;
> u64 time_diff;
>
> + if (ptp->state != ICE_PTP_RESETTING) {
> + if (ptp->state == ICE_PTP_READY) {
> + ice_ptp_prepare_for_reset(pf);
> + } else {
> + err = -EINVAL;
> + dev_err(ice_pf_to_dev(pf), "PTP was not initialized\n");
> + goto err;
> + }
> + }
nit: perhaps this following is slightly nicer?
(completely untested!)
if (ptp->state == ICE_PTP_READY) {
ice_ptp_prepare_for_reset(pf);
} else if (ptp->state != ICE_PTP_RESETTING) {
err = -EINVAL;
dev_err(ice_pf_to_dev(pf), "PTP was not initialized\n");
goto err;
}
> +
> if (test_bit(ICE_PFR_REQ, pf->state) ||
> !ice_pf_src_tmr_owned(pf))
> goto pfr;
...
Powered by blists - more mailing lists