Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3986921pxb; Mon, 4 Oct 2021 14:29:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/hmm+aXnpIukkCbv22+4jNi9qxTo8zjRedc6uOXa2pMRFl96q2l5hAcZjU9bpsnBQjBap X-Received: by 2002:a50:d98a:: with SMTP id w10mr20489578edj.120.1633382994375; Mon, 04 Oct 2021 14:29:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633382994; cv=none; d=google.com; s=arc-20160816; b=moztWTjR+bBtP9gMfQK0uC/xAZgrkloyYkH/Q3WLj2oi/WJfLVfp8rZvQ5hrmDnBYE 0M3NJUG1BXrde9b0lLitEvXTnVPDI/YiV72kBOGOTAydcn9M40/PxZPto8RKVBRVuym9 RlKQwbY/yvNGd5oFjE6ePn8p0vmbhzDmYKAuRU+i/E4aaMdiiYlRvdvB4J2oXC/+INzB oZcOfPc+UM5w++oH7mXCKDSa+d0Ff2p+8z/17aV8C1LEkQflKDzA7RwT0KXvxwrG6CqH K/FLw3pPlbPN/YzeNUZJ7Dszfus9svE2EehbYYGkXBXd0OlBgrg9ywMKPPXSoOoePmJT YHVw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Ac2A0WALIEJgSDlWpZyEC0fgcu34anaC1YHZPIdqVe4=; b=EqctCO7D0/rjH0smQSZwVBtasdJUb5FzpSciKW0ivq3FAJ+VPzMoO6Vk3iWxzabuK9 o0rLZAhcHgEo/d0wCAgrj/cYEOOiRF1AfJSU/EQZLetH99ZTl7Nfd2CgrBm4REj8eGNr IMunFSrgxjNgB2IOyMviM9C4TjlXxNLluVZ1v6VhBKYChlqjCTk0TURifDw/fbyJZC6b o3jqLX+s1FTSOeFsbBCzQqPNs59mk6ifBT1fSvrrmc8rjwNi8dHyArkqMbHktSzmZ3lc mrmoP7eXazf1zVl//jU4+ZWuEKjw6QFEKOy5bo6rGK+PigCSsP3PLrj4m64M/qYxvCK8 3jTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2onJPbJM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cq21si22621178ejc.378.2021.10.04.14.29.31; Mon, 04 Oct 2021 14:29:54 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2onJPbJM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237176AbhJDNhx (ORCPT + 99 others); Mon, 4 Oct 2021 09:37:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:48020 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237852AbhJDNfd (ORCPT ); Mon, 4 Oct 2021 09:35:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DE93C6323B; Mon, 4 Oct 2021 13:16:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633353371; bh=smiUTtRiaGoU+nFcMxewv5eiXgcGWdbOb6D2V+gBoC8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2onJPbJMwr1y/s9bJ+7LJ3s1O63D4BrrVEJ7g8rKRTJ+Dsl2kVrYMrsDZ0oIEBnf9 07Jj4WkzZIP6oDACK6KXqpxlkMrIfjwRIz3SjzZm69X1iOAoMv6EUWYkcMwfNUEVLj QhmaNJEcvniVyBell0Dc7UjMFc4ZSF1YBsyJXqu4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Aaro Koskinen , "David S. Miller" , Sasha Levin Subject: [PATCH 5.14 103/172] smsc95xx: fix stalled rx after link change Date: Mon, 4 Oct 2021 14:52:33 +0200 Message-Id: <20211004125048.309479236@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211004125044.945314266@linuxfoundation.org> References: <20211004125044.945314266@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Aaro Koskinen [ Upstream commit 5ab8a447bcfee1ded709e7ff5dc7608ca9f66ae2 ] After commit 05b35e7eb9a1 ("smsc95xx: add phylib support"), link changes are no longer propagated to usbnet. As a result, rx URB allocation won't happen until there is a packet sent out first (this might never happen, e.g. running just ssh server with a static IP). Fix by triggering usbnet EVENT_LINK_CHANGE. Fixes: 05b35e7eb9a1 ("smsc95xx: add phylib support") Signed-off-by: Aaro Koskinen Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/usb/smsc95xx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 4c8ee1cff4d4..4cb71dd1998c 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -1178,7 +1178,10 @@ static void smsc95xx_unbind(struct usbnet *dev, struct usb_interface *intf) static void smsc95xx_handle_link_change(struct net_device *net) { + struct usbnet *dev = netdev_priv(net); + phy_print_status(net->phydev); + usbnet_defer_kevent(dev, EVENT_LINK_CHANGE); } static int smsc95xx_start_phy(struct usbnet *dev) -- 2.33.0