All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] net: bnxt: replace reset with config timestamps
@ 2022-09-19 17:44 Vadim Fedorenko
  2022-09-19 18:37 ` Vadim Fedorenko
  0 siblings, 1 reply; 2+ messages in thread
From: Vadim Fedorenko @ 2022-09-19 17:44 UTC (permalink / raw)
  To: Michael Chan, Pavan Chebbi, netdev
  Cc: Jakub Kicinski, David S. Miller, Vadim Fedorenko

Any change to the hardware timestamps configuration triggers nic restart,
which breaks transmition and reception of network packets for a while.
But there is no need to fully restart the device because while configuring
hardware timestamps. The code for changing configuration runs after all
of the initialisation, when the NIC is actually up and running. This patch
changes the code that ioctl will only update configuration registers and
will not trigger carrier status change. Tested on BCM57504.

Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
index 8e316367f6ce..36e9148468b5 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
@@ -505,10 +505,8 @@ static int bnxt_hwrm_ptp_cfg(struct bnxt *bp)
 	ptp->tstamp_filters = flags;
 
 	if (netif_running(bp->dev)) {
-		rc = bnxt_close_nic(bp, false, false);
-		if (!rc)
-			rc = bnxt_open_nic(bp, false, false);
-		if (!rc && !ptp->tstamp_filters)
+		bnxt_ptp_cfg_tstamp_filters(bp);
+		if (!ptp->tstamp_filters)
 			rc = -EIO;
 	}
 
-- 
2.27.0


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

* Re: [PATCH net] net: bnxt: replace reset with config timestamps
  2022-09-19 17:44 [PATCH net] net: bnxt: replace reset with config timestamps Vadim Fedorenko
@ 2022-09-19 18:37 ` Vadim Fedorenko
  0 siblings, 0 replies; 2+ messages in thread
From: Vadim Fedorenko @ 2022-09-19 18:37 UTC (permalink / raw)
  To: Michael Chan, Pavan Chebbi, netdev; +Cc: Jakub Kicinski, David S. Miller

On 19.09.2022 18:44, Vadim Fedorenko wrote:
> Any change to the hardware timestamps configuration triggers nic restart,
> which breaks transmition and reception of network packets for a while.
> But there is no need to fully restart the device because while configuring
> hardware timestamps. The code for changing configuration runs after all
> of the initialisation, when the NIC is actually up and running. This patch
> changes the code that ioctl will only update configuration registers and
> will not trigger carrier status change. Tested on BCM57504.
> 

Ignore this one, plz. I'll send another with proper subject and Fixes tag.


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

end of thread, other threads:[~2022-09-19 18:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-19 17:44 [PATCH net] net: bnxt: replace reset with config timestamps Vadim Fedorenko
2022-09-19 18:37 ` Vadim Fedorenko

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.