From nobody Sun Dec 14 12:17:29 2025 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC7DF8488; Mon, 26 May 2025 05:35:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748237737; cv=none; b=Ym2AWkPau7kxO9ZLhZdyZ6fHGlRaRe1vq/FtkgFBY1o5tX//7o2liWrvW/lFOYDHFoRZOw+HB2oS0G6w80VUhHLGKswPEvODTPExrVFK5/3vVOPg4aC/Hih4wsesap6UWfWfwi+bZtdhL6c1huUlIyFoU9KfVKDxX8ILilInPsA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748237737; c=relaxed/simple; bh=Ybxf2SQDsOqgKipFq8b/1RSY2RK6Zk63VEp6uukSrgs=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XC6fzWY2J40B1hqs0St8QBiekmWQuVAgimlkeobpXBHRHkfFhUDdxk9qqFSjG1/dA9AR29duwWvNGf5B/ty5w9zTDZ9IcuUqgdSy0sEwUcCQFKf3VTuCBUKVKs7rcDgQcDMbaLy0/Dvg/A653pJEHsKOK7HT2BnkEqXNUbsYg4M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=ISj6TBET; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="ISj6TBET" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1748237735; x=1779773735; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=Ybxf2SQDsOqgKipFq8b/1RSY2RK6Zk63VEp6uukSrgs=; b=ISj6TBETZT9PKRMrQIycLGo4z0GNGHHTXkilCxdasGDhp6hz70hE9v41 zfkoJBhWtNegKOYPI7Fp1o6L2bOVhULtozQCewxs05lBPxM6+kK5onBw0 cehJAEznWse4gssU6Dmi5rh/lwJrKCS3ephVG6U22a50y8vQW7YjybHuL 7SbUwpU+LHnZ38ifck6wAuanUHYppyMQaz61p0hIfpr43lWpQDXMr4E2H X2RlZZ/EMuFVzMgPWabWG01c0uWWzSNDezVirm+O4LrTiz2Vj2Q4HlzjI MjHWDEMT+N4zL53qWSm9ejBb08LUnQv3knc9v6GZn8hqqFPQRbbmD+KT2 Q==; X-CSE-ConnectionGUID: ZIY/Wzj3Q22sZWvgvBPVZg== X-CSE-MsgGUID: SpW3N/6dTNq9Unp+XepaDA== X-IronPort-AV: E=Sophos;i="6.15,315,1739862000"; d="scan'208";a="41602082" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 25 May 2025 22:35:33 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44; Sun, 25 May 2025 22:35:03 -0700 Received: from che-dk-ungapp03lx.microchip.com (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.44 via Frontend Transport; Sun, 25 May 2025 22:35:00 -0700 From: Thangaraj Samynathan To: , , , , , , , , Subject: [PATCH v2 net 1/2] net: lan743x: rename lan743x_reset_phy to lan743x_hw_reset_phy Date: Mon, 26 May 2025 11:00:47 +0530 Message-ID: <20250526053048.287095-2-thangaraj.s@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250526053048.287095-1-thangaraj.s@microchip.com> References: <20250526053048.287095-1-thangaraj.s@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" rename the function to lan743x_hw_reset_phy to better describe it operation. Fixes: 23f0703c125be ("lan743x: Add main source files for new lan743x drive= r") Signed-off-by: Thangaraj Samynathan Reviewed-by: Andrew Lunn --- drivers/net/ethernet/microchip/lan743x_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/et= hernet/microchip/lan743x_main.c index 7e71579632f3..efa569b670cb 100644 --- a/drivers/net/ethernet/microchip/lan743x_main.c +++ b/drivers/net/ethernet/microchip/lan743x_main.c @@ -1330,7 +1330,7 @@ static int lan743x_mac_set_mtu(struct lan743x_adapter= *adapter, int new_mtu) } =20 /* PHY */ -static int lan743x_phy_reset(struct lan743x_adapter *adapter) +static int lan743x_hw_reset_phy(struct lan743x_adapter *adapter) { u32 data; =20 @@ -1348,7 +1348,7 @@ static int lan743x_phy_reset(struct lan743x_adapter *= adapter) =20 static int lan743x_phy_init(struct lan743x_adapter *adapter) { - return lan743x_phy_reset(adapter); + return lan743x_hw_reset_phy(adapter); } =20 static void lan743x_phy_interface_select(struct lan743x_adapter *adapter) --=20 2.25.1 From nobody Sun Dec 14 12:17:29 2025 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67C5F1B3930; Mon, 26 May 2025 05:35:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748237739; cv=none; b=ZTOZy2a7jqil2wABVbw7QXqhgwCOTXJiqO9uIhSFnojtTyu2X8OdT6vAuMhJxe1Efh0qNLGQQ67uArzH69uGyRTLX+91l7oqqd2P48QJ0KD89cfwq+QkxwijUlYVKbvsxgPFT04IOzhXLN5gXyvy2VuTanC3zUncmxLpQi9BlBA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748237739; c=relaxed/simple; bh=0pNqoPv8fPVLNxtu59Wp0wSlLX9MZ0Zb+OUFxvPIcKA=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Nm2ziAXLbksqzM7L4US6MljM2npAhI71Ix6nYOxcTrhvjKW/1czv0+TjGmIOHpaZewGJt+em3yGYveXNalB3XEgHZ2LHoP8nWJl+QSOCIznE6cvTnfq5EaXQrgx+8xXJhLhXkVsFXce5XnGzVvYVCXbQt30DbqAoXp0Qohg58Ck= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=hurJAwJ6; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="hurJAwJ6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1748237737; x=1779773737; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=0pNqoPv8fPVLNxtu59Wp0wSlLX9MZ0Zb+OUFxvPIcKA=; b=hurJAwJ6QlLm26FjYERejJD66WPdI4bEvhbJsK1+STvweniEohn0cwBm UETjdRpTTolbl81xoRvHMG2VgYIjxbN9f2X3ruvrZ0cgbweTJep3bIWid vLx7nx/OYXTtW40lox9dWcu1NJPT0kM7eomQg1vCo958GDpmizRUHIK2b 6tiBfNp+H/VAqf3tyD/a02U8+GXytqaHWgE6IAON4RuFekPjWu6I+2AZb of2OOw0iebeS4Z8ZVYFfNNQYyhLH6BUki8g9cQG6QCmSCs+5a4UMypzbh FyrGWXvGsQC5pO2uiR0UTAoXN2N2/cf3exYmbZkr5zizq0JNBxLRb0iH1 w==; X-CSE-ConnectionGUID: ZIY/Wzj3Q22sZWvgvBPVZg== X-CSE-MsgGUID: pU6mxBHsTDO5iMasIG/dxg== X-IronPort-AV: E=Sophos;i="6.15,315,1739862000"; d="scan'208";a="41602085" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 25 May 2025 22:35:34 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44; Sun, 25 May 2025 22:35:08 -0700 Received: from che-dk-ungapp03lx.microchip.com (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.44 via Frontend Transport; Sun, 25 May 2025 22:35:05 -0700 From: Thangaraj Samynathan To: , , , , , , , , Subject: [PATCH v2 net 2/2] net: lan743x: Fix PHY reset handling during initialization and WOL Date: Mon, 26 May 2025 11:00:48 +0530 Message-ID: <20250526053048.287095-3-thangaraj.s@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250526053048.287095-1-thangaraj.s@microchip.com> References: <20250526053048.287095-1-thangaraj.s@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Remove lan743x_phy_init from lan743x_hardware_init as it resets the PHY registers, causing WOL to fail on subsequent attempts. Add a call to lan743x_hw_reset_phy in the probe function to ensure the PHY is reset during device initialization. Fixes: 23f0703c125be ("lan743x: Add main source files for new lan743x drive= r") Signed-off-by: Thangaraj Samynathan Reviewed-by: Andrew Lunn --- drivers/net/ethernet/microchip/lan743x_main.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/et= hernet/microchip/lan743x_main.c index efa569b670cb..9d70b51ca91d 100644 --- a/drivers/net/ethernet/microchip/lan743x_main.c +++ b/drivers/net/ethernet/microchip/lan743x_main.c @@ -1346,11 +1346,6 @@ static int lan743x_hw_reset_phy(struct lan743x_adapt= er *adapter) 50000, 1000000); } =20 -static int lan743x_phy_init(struct lan743x_adapter *adapter) -{ - return lan743x_hw_reset_phy(adapter); -} - static void lan743x_phy_interface_select(struct lan743x_adapter *adapter) { u32 id_rev; @@ -3534,10 +3529,6 @@ static int lan743x_hardware_init(struct lan743x_adap= ter *adapter, if (ret) return ret; =20 - ret =3D lan743x_phy_init(adapter); - if (ret) - return ret; - ret =3D lan743x_ptp_init(adapter); if (ret) return ret; @@ -3674,6 +3665,10 @@ static int lan743x_pcidev_probe(struct pci_dev *pdev, if (ret) goto cleanup_pci; =20 + ret =3D lan743x_hw_reset_phy(adapter); + if (ret) + goto cleanup_pci; + ret =3D lan743x_hardware_init(adapter, pdev); if (ret) goto cleanup_pci; --=20 2.25.1