Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2530378pxj; Mon, 31 May 2021 04:42:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOoYnFeG8ss3jkAC+g8C7CKJteAzw17taWzocp3dU5Vly2oirE1h5MpgDQ2OmrvXvLcL6k X-Received: by 2002:a05:6402:343:: with SMTP id r3mr3501156edw.22.1622461375363; Mon, 31 May 2021 04:42:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622461375; cv=none; d=google.com; s=arc-20160816; b=RHyPuDBDns+Jh9hh3cc6cWPylfk1O+fxk9zlh1nbu5n6rQ/c2FALJ9A4nryTueUB5P +V7rRYtmmGsw9DGNCJ9h7Ab24DNpf4OLQ02PmGMBYXlQmmeonhPfRE1MYqfJsYPfWHm6 qOohaGHoBXTLbjG2nszpJut8lsC8pqm2XDMB0dnlu3eJmONjo8VH57CeH4TYv6vem94M QK0F0n84S/pGzGcWCaDU5+Z9cR9Fedt6zBW9TWeaotiyZcOZ529rQ7tgbklMKohxpRbE MqZ8oGQQkZ6qnC+9sRq2FzC5xMk/V/m9zUhhqHWOsqsCeTmAeaD7uHahl3gCXLu9JDfr ESPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=V7xObfjDwvTGfNEO87299GNmpVte/oi7BeYnidgyYwk=; b=wOEdBr1VtpwwLOT13xBY4H4Mm/simn9ZN0wne2jlAg6ZmQsrAKaoJDAq3dh3d9h/UM eHhVKj+S/jbGlczJv1OKqK8GfagOsNvJoRmFyCP0MBobUx40TWEf36fT3e2cV32l2sCS fPs9OIJOxmZMaBSb4Ji9ytOJP5LqtT1WoHZQrUm+QtKSnAknYzqNoIwBNhTCfLXQxb61 Q5DrT2ZpS+lx+Wd+K75R2aHkFoP5PyDPgGKnPhhMNNXqIc1ZA9uyyWYiE2Dh364It7Z6 jMfHgd8lU8TKCfTWmWV6uBYs3wBaNT6UO6dVDy9zxtg8AfX+Jpsv+8C65WPYocj0hR6Q a/iw== 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 m19si14336421edd.348.2021.05.31.04.42.32; Mon, 31 May 2021 04:42:55 -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 S231370AbhEaLmZ (ORCPT + 99 others); Mon, 31 May 2021 07:42:25 -0400 Received: from muru.com ([72.249.23.125]:34398 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231240AbhEaLmX (ORCPT ); Mon, 31 May 2021 07:42:23 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 2DEA480C5; Mon, 31 May 2021 11:40:48 +0000 (UTC) Date: Mon, 31 May 2021 14:40:34 +0300 From: Tony Lindgren To: Alexandre Belloni Cc: Thomas Petazzoni , Bin Liu , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] usb: musb: fix MUSB_QUIRK_B_DISCONNECT_99 handling Message-ID: References: <20210528140446.278076-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Alexandre Belloni [210528 15:35]: > On 28/05/2021 16:04:46+0200, Thomas Petazzoni wrote: > > In commit 92af4fc6ec33 ("usb: musb: Fix suspend with devices > > connected for a64"), the logic to support the > > MUSB_QUIRK_B_DISCONNECT_99 quirk was modified to only conditionally > > schedule the musb->irq_work delayed work. > > > > This commit badly breaks ECM Gadget on AM335X. Indeed, with this > > commit, one can observe massive packet loss: > > > > $ ping 192.168.0.100 > > ... > > 15 packets transmitted, 3 received, 80% packet loss, time 14316ms > > > > Reverting this commit brings back a properly functioning ECM > > Gadget. An analysis of the commit seems to indicate that a mistake was > > made: the previous code was not falling through into the > > MUSB_QUIRK_B_INVALID_VBUS_91, but now it is, unless the condition is > > taken. > > > > Changing the logic to be as it was before the problematic commit *and* > > only conditionally scheduling musb->irq_work resolves the regression: > > > > $ ping 192.168.0.100 > > ... > > 64 packets transmitted, 64 received, 0% packet loss, time 64475ms > > > > Fixes: 92af4fc6ec33 ("usb: musb: Fix suspend with devices connected for a64") > > Signed-off-by: Thomas Petazzoni > Tested-by: Alexandre Belloni Ouch, sorry about that one. And thanks for fixing it: Acked-by: Tony Lindgren