From patchwork Sat Jul 28 07:52:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10547897 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0E30E13BF for ; Sat, 28 Jul 2018 07:53:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0007D28505 for ; Sat, 28 Jul 2018 07:53:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E44B22B5DF; Sat, 28 Jul 2018 07:53:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5462E28505 for ; Sat, 28 Jul 2018 07:53:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726185AbeG1JSf (ORCPT ); Sat, 28 Jul 2018 05:18:35 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:52173 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726061AbeG1JSf (ORCPT ); Sat, 28 Jul 2018 05:18:35 -0400 Received: from localhost.localdomain ([37.4.249.97]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.183]) with ESMTPSA (Nemesis) id 0MUVwx-1fbNw12XvX-00REnE; Sat, 28 Jul 2018 09:52:50 +0200 From: Stefan Wahren To: Woojung Huh , UNGLinuxDriver@microchip.com, "David S. Miller" Cc: Greg Kroah-Hartman , Dave Stevenson , netdev@vger.kernel.org, linux-usb@vger.kernel.org, Stefan Wahren Subject: [PATCH] net: lan78xx: fix rx handling before first packet is send Date: Sat, 28 Jul 2018 09:52:10 +0200 Message-Id: <1532764330-14522-1-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 X-Provags-ID: V03:K1:1UgD7xV2Hs3djVASkjGZexXrelNVV9KQ4W/KMZ/6ZAjOD8iCVVb 8jgtNmA1TZYvTOLPwIOhlB8fkrx6AkSXGQRQtE1q6zNBYDYszenIppRha2tGTSDIR8dnhZs tmeCWOtaIFiYiDYuCEtYrYgFELx1btCiQS8Ibc237s0SLbaPNnQ369IwfgO4dQdcdOZuixw Ugo4KTjNh2qR2Hp4FWD7g== X-UI-Out-Filterresults: notjunk:1;V01:K0:JyYP1ZeZOl0=:98L7zdWnTjAX3Fa+4Pqc+f T3TiXkUfXJyEJ+QxnkwcBp0LXo+7/LWQ7h4/cZJnHF7Uo8bsvljCcRVGmMhx5Cy46MtNZvUED CW5cOvXktUAucStGptcPE+qDnRJ6ruaSzDuwc/A7tBqW518YK/KyASr+EwASjmyvcqOYMVd6M ZAP4in8S1PqQ98w3Ya3wxpz4heiv9J6xbs1HGSjNCBs0T80zp9ufdlNqCz7QBJ/07LlheZPkh TeMhKHNUoaqIq2wfm/LT2+O9oO4hBPB1kGcwj50z5oPO86MXeJWtoUx8JKU8l+56tWQydlhc7 PYFqGBnCG+krEz6Eoh1CM+KJIh1CrmlteojK38ny/GllmThwPLrXsVrVaUPoZ38gduQz3Ug5+ gyOA7CU3L/eamlSo1XevvLRdv8ObDF5V82qTvBANHqEg5ZAW0MIe/hhIGKArtR1jpXSOan4M6 lY6ejQh3ZBtliMvpjoPCWh3ivl7hQpi+Cm4cQrJeq1DuB1MbGJQfZXCieSBUJkhi7y8YLzuN6 N2QlDoLCXzmrz2N2Fcx69oKVIKOfWVk9wgXlYKNG7Ovd8KT0jVwG8WpWRKhRTwsJYWvRY9+Rc MA7jSxJSgtBSA/cs12dACWJ8rkaA9uezD1g8YRFSJDf/IXXUqWmONuPGAh89RtCr+lMQne/oY da1rqaBklRMhegBeJ1yrYFkyuyoWztMMC7JbjrM7lMHkOfhih49WDkWBTGZvdEwTc+Ps= Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As long the bh tasklet isn't scheduled once, no packet from the rx path will be handled. Since the tx path also schedule the same tasklet this situation only persits until the first packet transmission. So fix this issue by scheduling the tasklet after link reset. Link: https://github.com/raspberrypi/linux/issues/2617 Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet") Suggested-by: Floris Bos Signed-off-by: Stefan Wahren --- drivers/net/usb/lan78xx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index ed10d49..aeca484 100644 --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c @@ -1242,6 +1242,8 @@ static int lan78xx_link_reset(struct lan78xx_net *dev) mod_timer(&dev->stat_monitor, jiffies + STAT_UPDATE_TIMER); } + + tasklet_schedule(&dev->bh); } return ret;