Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp149792iog; Fri, 24 Jun 2022 00:54:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sbE1SwWGBmVZj8Pm8OZYiImiWv9tlWOQWMdMKqSGtt8/a2xDQux7vVa/I3Tzp+ydaze3eZ X-Received: by 2002:a05:6402:452:b0:434:a373:f9f8 with SMTP id p18-20020a056402045200b00434a373f9f8mr15959812edw.290.1656057269078; Fri, 24 Jun 2022 00:54:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656057269; cv=none; d=google.com; s=arc-20160816; b=IkqW6Dc/5NF8UYTqMZro9QXp0TIxAyv9a7ylHCwcT2sPvzdI6GKvQC9rXs1+bF0clT wRLacqEKC5qO3VD6rS31/3kBqkzxvGi6gnh8fxD1LAxrjEWV+2hsSk5z8fvAL1li7VoV j+dy96+XF5I9VPqyPxcge/w77PfB0o7uJtgB4JQ5vwKyRI5JZZxFz5KvobOujQALE9Ih I0jl7I+I7Ud839aTNMRSbUrbsstnq1rAMLNu6lJH2kpBMDOUg08S21BzhSxQnYnGpUvm hZQ7zSk2GGFvZ1W4Nuyh/ZzXH4b/K97kUgroKYQsbTDJ8uoodoruylRedp/7bh9pBpa2 cyPw== 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=+lLp1mqzC4ZVPDlg2+YZGz0qSjK00b1yDMzhzDgdLwE=; b=x0A72ezjtTvcmQ9TqQe7onXPtHhvFF6mGkrhi2mtxhEVaWZwE0HYx9yaqnN22Qub/I wec5VcKD/s01/LdkM9z9lCIlWg1Uq3R4MZPJlDvwPvMSTNWlGyvXGxNg8bDJIufz+lEi kufnMp3MfYoN3MNvurG88zc92M9QfwWieEQqRwluiNDuam/z5MhM9tCgCxXEtY2koG5g tVr22jj0V/m4Ox7bzNty2gPkKHYljpsNYTkq+o1KCxyckNuBOJA/MWm6Iq6seNeuTUlo LqSBG3PyNxYkAPFQ02wikfyCa76cLA/zlVvPCjQkCNeTetg3BNHxRri4lASi4E5b/4JL E0pw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ga6-20020a1709070c0600b006fea036b38esi2189734ejc.310.2022.06.24.00.54.03; Fri, 24 Jun 2022 00:54:29 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229969AbiFXHv6 (ORCPT + 99 others); Fri, 24 Jun 2022 03:51:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229488AbiFXHv4 (ORCPT ); Fri, 24 Jun 2022 03:51:56 -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 3DB7653A5D for ; Fri, 24 Jun 2022 00:51:55 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o4e6S-0005uS-NW; Fri, 24 Jun 2022 09:51:44 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1o4e6N-002NyH-PG; Fri, 24 Jun 2022 09:51:41 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1o4e6O-00DAhE-GW; Fri, 24 Jun 2022 09:51:40 +0200 From: Oleksij Rempel To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Oleksij Rempel , Anton Lundin , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Lukas Wunner Subject: [PATCH net v1 1/2] net: asix: fix "can't send until first packet is send" issue Date: Fri, 24 Jun 2022 09:51:38 +0200 Message-Id: <20220624075139.3139300-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: 2a0a:edc0:0:c01:1d::a2 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 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 If cable is attached after probe sequence, the usbnet framework would not automatically start processing RX packets except at least one packet was transmitted. On systems with any kind of address auto configuration this issue was not detected, because some packets are send immediately after link state is changed to "running". With this patch we will notify usbnet about link status change provided by the PHYlib. Fixes: e532a096be0e ("net: usb: asix: ax88772: add phylib support") Reported-by: Anton Lundin Signed-off-by: Oleksij Rempel --- drivers/net/usb/asix_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/usb/asix_common.c b/drivers/net/usb/asix_common.c index 632fa6c1d5e3..b4a1b7abcfc9 100644 --- a/drivers/net/usb/asix_common.c +++ b/drivers/net/usb/asix_common.c @@ -431,6 +431,7 @@ void asix_adjust_link(struct net_device *netdev) asix_write_medium_mode(dev, mode, 0); phy_print_status(phydev); + usbnet_link_change(dev, phydev->link, 0); } int asix_write_gpio(struct usbnet *dev, u16 value, int sleep, int in_pm) -- 2.30.2