lkml.org 
[lkml]   [2024]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V3 net 1/7] net: hns3: using user configure after hardware reset
On Tue, May 07, 2024 at 09:42:18PM +0800, Jijie Shao wrote:
> From: Peiyang Wang <wangpeiyang1@huawei.com>
>
> When a reset occurring, it's supposed to recover user's configuration.
> Currently, the port info(speed, duplex and autoneg) is stored in hclge_mac
> and will be scheduled updated. Consider the case that reset was happened
> consecutively. During the first reset, the port info is configured with
> a temporary value cause the PHY is reset and looking for best link config.
> Second reset start and use pervious configuration which is not the user's.
> The specific process is as follows:
>
> +------+ +----+ +----+
> | USER | | PF | | HW |
> +---+--+ +-+--+ +-+--+
> | ethtool --reset | |
> +------------------->| reset command |
> | ethtool --reset +-------------------->|
> +------------------->| +---+
> | +---+ | |
> | | |reset currently | | HW RESET
> | | |and wait to do | |
> | |<--+ | |
> | | send pervious cfg |<--+
> | | (1000M FULL AN_ON) |
> | +-------------------->|
> | | read cfg(time task) |
> | | (10M HALF AN_OFF) +---+
> | |<--------------------+ | cfg take effect
> | | reset command |<--+
> | +-------------------->|
> | | +---+
> | | send pervious cfg | | HW RESET
> | | (10M HALF AN_OFF) |<--+
> | +-------------------->|
> | | read cfg(time task) |
> | | (10M HALF AN_OFF) +---+
> | |<--------------------+ | cfg take effect
> | | | |
> | | read cfg(time task) |<--+
> | | (10M HALF AN_OFF) |
> | |<--------------------+
> | | |
> v v v
>
> To avoid aboved situation, this patch introduced req_speed, req_duplex,
> req_autoneg to store user's configuration and it only be used after
> hardware reset and to recover user's configuration
>
> Fixes: f5f2b3e4dcc0 ("net: hns3: add support for imp-controlled PHYs")
> Signed-off-by: Peiyang Wang <wangpeiyang1@huawei.com>
> Signed-off-by: Jijie Shao <shaojijie@huawei.com>

Thanks for the update since v1.

Reviewed-by: Simon Horman <horms@kernel.org>


\
 
 \ /
  Last update: 2024-05-08 18:21    [W:0.084 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site