From patchwork Tue Nov 15 11:44:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Tachici X-Patchwork-Id: 1653 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2616206wru; Tue, 15 Nov 2022 01:46:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf6E2w25+gx1WH7MIzSAw/rq45FEMmSsiliAlmswojFZ/uEGu4qEc9o+P/ODO57XbnjEvWgG X-Received: by 2002:a17:907:c246:b0:78d:3863:e555 with SMTP id tj6-20020a170907c24600b0078d3863e555mr13134059ejc.438.1668505598762; Tue, 15 Nov 2022 01:46:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668505598; cv=none; d=google.com; s=arc-20160816; b=CVWipALkY3iQ3OSUUI0c4l6C+Kwb0gpKOk5EkAYO6/gg7zvN7eBeBbZ+x4xsuzaYuf h8WyvdH3E5fvsU9UP0jrdh7TObYdBXYTtiTcnJSSk4M1I++fol6C0qFC3y2FI2gJHH2O 9gaSR5W3Env3ZFszFHF7PIiy9gUpNQ/gXRzJHNE24daE/JD/DhN8eaTYvUBCWAusiOus a6R8+kizIwgkI62dHBIha+J3uoqACv0moUQs3Cnrdm/F9YgQNOjTrAp7Du6tlMlEy+9/ QcxfopiYXh9jOdpeLQ6+x/hFhU2sXlut0xH13Bk0TAGNpzhJYPOQT8snPxnRpZv4iVEp uWGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=207c0/lNEQrK3IdIaoWVgRJ3H4R1r+qsNR0rifySVo8=; b=U5ycM5KNwDBnvswvQV1PmPxMftatlWc/Di483oWc+HZU1magaAdubIc4T0gIsuU2oI gcp3Fob775vFCbHT06+q9a6CDv3+Vfv4mGspAAMsGtMqkuucktXimpNvnWXJTUpwNG45 AofD27zeW5CJRWzs3NQjCSwuMZxJ3rJQw1FPFgtIesukBq3BBCCHUEkVk0S8BDS8lbfx Sb8VZif2p3sRtclxvzhXfTHTebLP7yVdxGaEcOGUlhA3jW8PtPpT3gC3RjuLGFfYCw6R AMbjhU0V+dLVFEZX1eZazsv6DuovrZ2miNeYhLZ8V9sTxi2u5X9ygcNWTz7SS6Jos0td jO0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qt13-20020a170906eced00b00770d9e664f8si9361431ejb.152.2022.11.15.01.46.14; Tue, 15 Nov 2022 01:46:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analog.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237995AbiKOJp0 (ORCPT + 99 others); Tue, 15 Nov 2022 04:45:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237119AbiKOJpX (ORCPT ); Tue, 15 Nov 2022 04:45:23 -0500 Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0F6B101D2; Tue, 15 Nov 2022 01:45:22 -0800 (PST) Received: from pps.filterd (m0167089.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AF9XLoA002200; Tue, 15 Nov 2022 04:44:58 -0500 Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 3kuuqhv5w8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Nov 2022 04:44:57 -0500 Received: from ASHBMBX9.ad.analog.com (ASHBMBX9.ad.analog.com [10.64.17.10]) by nwd2mta3.analog.com (8.14.7/8.14.7) with ESMTP id 2AF9iup1041297 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 15 Nov 2022 04:44:56 -0500 Received: from ASHBCASHYB4.ad.analog.com (10.64.17.132) by ASHBMBX9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Tue, 15 Nov 2022 04:44:55 -0500 Received: from ASHBMBX9.ad.analog.com (10.64.17.10) by ASHBCASHYB4.ad.analog.com (10.64.17.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Tue, 15 Nov 2022 04:44:55 -0500 Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server id 15.2.986.14 via Frontend Transport; Tue, 15 Nov 2022 04:44:55 -0500 Received: from tachici-Precision-5530.ad.analog.com ([10.48.65.160]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 2AF9iatT023257; Tue, 15 Nov 2022 04:44:38 -0500 From: Alexandru Tachici To: CC: , , , , , , , , , , Subject: [net v2 0/1] net: usb: smsc95xx: fix external PHY reset Date: Tue, 15 Nov 2022 13:44:33 +0200 Message-ID: <20221115114434.9991-1-alexandru.tachici@analog.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-ADIRuleOP-NewSCL: Rule Triggered X-Proofpoint-ORIG-GUID: LS6EtJn5ATURK72BSOcYumpvAnU-d_Wq X-Proofpoint-GUID: LS6EtJn5ATURK72BSOcYumpvAnU-d_Wq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-15_04,2022-11-15_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=896 impostorscore=0 lowpriorityscore=0 suspectscore=0 bulkscore=0 spamscore=0 phishscore=0 adultscore=0 priorityscore=1501 malwarescore=0 clxscore=1015 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211150067 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749554926713232041?= X-GMAIL-MSGID: =?utf-8?q?1749554926713232041?= An external PHY needs settling time after power up or reset. In the bind() function an mdio bus is registered. If at this point the external PHY is still initialising, no valid PHY ID will be read and on phy_find_first() the bind() function will fail. If an external PHY is present, wait the maximum time specified in 802.3 45.2.7.1.1. Alexandru Tachici (1): net: usb: smsc95xx: fix external PHY reset Changelog v1 -> v2: - fixed typo in commit message - added reset() callback to the mii_bus - moved fsleep() call to smsc95xx_mdiobus_reset() - moved is_internal_phy bool in struct smsc95xx_priv - added an explicit PHY_RST_ command to PM_CTRL in smsc95xx_mdiobus_reset() drivers/net/usb/smsc95xx.c | 46 ++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-)