Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp319214pxv; Thu, 22 Jul 2021 00:25:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhteprjbBCg/Agc0Cf+h8MGWADeZ/7Gm+Ku97SLArAgdL2rfIxJCg6OuSaTCYelpl/DGGg X-Received: by 2002:a6b:7719:: with SMTP id n25mr29467695iom.37.1626938738408; Thu, 22 Jul 2021 00:25:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626938738; cv=none; d=google.com; s=arc-20160816; b=0UsMHL7GYphyBTf7CMq5d8gkrCPx/MVj1N8+DRlYAuVdxrpVhrXc5T2JpU30J4dgb4 5n9kZ4pingGrUuj1wWuq01MGJDGPHi+7mGYk8J7cuTm4W2PlXQThYtAJj/QNH9eTDuPg X3O1CmtY0F6DxvTdT7cH8kt7TuuykIyULPbviTmDiIrefpd5v/2Q3EHNeoekNquLB4tC HN1K9KxECI0iMx+rmntD2c0RYClhzoDhFexgOq74Dbw/E/mOTYiJ4Li0VPn7ls970acD VZ9TwmZPAIxDZgm80AiVI5NJvDuPQEu+/fBnQcdJCrLOhNYr6snmqMnOYqmC/3ictuEa LiKw== 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=N2zAECJR8fC5F94tRMPjk2tfuyhUpd+Dg5/9pXWVIMs=; b=mGDkTnIMA6OHPlisnJKL5z61DjQy+0Gzsz27F2WBEY7qyGcu8ARrTWPpT4NefrF5aa 1zhmQtdAyu7VXaW57DfC2YMkIzknvBgt6y13KYAI6ojZz148vamjK8J7LQiYp7aZXx3K jnyEbs054SzwxkXm8hV3ER7vhHtYT6e8EWTm1CDRdCx69DZ7+3yVCBiAMsoE230Twu52 Il6ugXxFaWwYUhp1/TvfecHM8Rc8waCGYgHypiMs+D9Wc5T3ucQitqv+lPWO/Gtf8wP5 9VICbFGmTpxbYTPRwp1yMBLjMmxKq6kakZDPGsqp5tGSP+0VOOduifWoylL/wEcFE3Kp PT2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z6si19014561ilq.82.2021.07.22.00.25.27; Thu, 22 Jul 2021 00:25:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231130AbhGVGn5 (ORCPT + 99 others); Thu, 22 Jul 2021 02:43:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230343AbhGVGnu (ORCPT ); Thu, 22 Jul 2021 02:43:50 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 929E7C0613D5 for ; Thu, 22 Jul 2021 00:23:49 -0700 (PDT) Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6T3Y-00033Q-JC; Thu, 22 Jul 2021 09:23:44 +0200 Received: from ore by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1m6T3X-0004CG-46; Thu, 22 Jul 2021 09:23:43 +0200 From: Oleksij Rempel To: "David S. Miller" , Jakub Kicinski , Andrew Lunn , Heiner Kallweit , Russell King Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH net-next v1 1/1] net: usb: asix: ax88772: do not poll for PHY before registering it Date: Thu, 22 Jul 2021 09:23:38 +0200 Message-Id: <20210722072338.16083-1-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org asix_get_phyid() is used for two reasons here. To print debug message with the PHY ID and to wait until the PHY is powered up. After migrating to the phylib, we can read PHYID from sysfs. If polling for the PHY is really needed, then we will need to handle it in the phylib as well. This change was tested with: - ax88772a + internal PHY - ax88772b + external PHY Signed-off-by: Oleksij Rempel --- drivers/net/usb/asix_devices.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c index 2c115216420a..049c20342a0b 100644 --- a/drivers/net/usb/asix_devices.c +++ b/drivers/net/usb/asix_devices.c @@ -714,7 +714,6 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf) u8 buf[ETH_ALEN] = {0}, chipcode = 0; struct asix_common_private *priv; int ret, i; - u32 phyid; usbnet_get_endpoints(dev, intf); @@ -762,10 +761,6 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf) return ret; } - /* Read PHYID register *AFTER* the PHY was reset properly */ - phyid = asix_get_phyid(dev); - netdev_dbg(dev->net, "PHYID=0x%08x\n", phyid); - /* Asix framing packs multiple eth frames into a 2K usb bulk transfer */ if (dev->driver_info->flags & FLAG_FRAMING_AX) { /* hard_mtu is still the default - the device does not support -- 2.30.2