Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2420003ybi; Sun, 28 Jul 2019 08:38:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqwVYj4G5ifNypq6SFS7ZhAh/UgRYIRU+LSsg4pnUQj9Tmeq/kMEtwEOAgJBv2QbuvJBxXTp X-Received: by 2002:a17:902:f81:: with SMTP id 1mr11009241plz.191.1564328315401; Sun, 28 Jul 2019 08:38:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564328315; cv=none; d=google.com; s=arc-20160816; b=gSbx43QplnjgVzu030PaSo0yxsMRKWGuKqaecZc/Jg3VGobhfIBSK5c0bXwlSJ4PYv 9Ij7GJe6QiNsVXcYEbSv/KYm+ROyGoDNuoFdShIPyZX23Jw+gQwAqswqXB02mKvwRvH/ AFwya5hjNBtLt5iZ9fWdCd7B1/7kI8eZkWkrskivUvH0k+lw1ICUid5Tcak2YSVjWlcJ rpdqoq6Wkkb8kmJWWhzrrzP9S0+scI8HO2lAHaoATliM9S0ARvkUXMLh8w5syo4ZopyS g5JNN41EeB8klKMvT/VvrAt3I6LbeUfUwzKSvknmjVGpuJa/ld8OEljbSB9ivRt5hGjn SS7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rSWf1uhJOz0mZhUFiKPPKAw9HLQOPbco8RgeQHz2vRY=; b=OyLTLpNM+7zhDvGZj5E7jCQ9L5dQuh1Seq3AGxWLlDDOVIfua868VS612gwFjOTciP algJDnqsqSaMD8VB6PKQiC8UBUHeAqnt9A3wP3WyC3e5YtlubG8oqnC1O+3FDqg8Goce cKxeO/DRFbZS0QqY+qA3RLpGdSsbBpVGE/w9XWhsbWpeq2NZG0ZOAlppV7rsYtki369O FC2AQ5xRzuOlP80nCinleKH2Df4OYXNdeKz2klZTjo0/UahskYt7sajOMxNuUt2NS+DX M5BMke/qoDlYnj79Av5BYAvAWOA6KCijc8XLqCu7YMzodFTEMH/cICzMQ21nXQtre9mH kVLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=e7+0iwwQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si21452087pls.358.2019.07.28.08.38.20; Sun, 28 Jul 2019 08:38:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=e7+0iwwQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726238AbfG1Phc (ORCPT + 99 others); Sun, 28 Jul 2019 11:37:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:47686 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726148AbfG1Phc (ORCPT ); Sun, 28 Jul 2019 11:37:32 -0400 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A4A3A2075E; Sun, 28 Jul 2019 15:37:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564328250; bh=dtpU0JvrhpmoMYOOkgibEwwTx2ITKEaj/zaUT14NMXY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=e7+0iwwQS6zexQs9n1mZQqR2usI1hB7F3+6QneIJaBy2NftphI4L0qR4SIx3Q9+Vz dUTsOKQ5LtocYpvFHRFzQqT1ehu7Hyb3yQE/ZpQ1JdYvso09pFNRAvH8rwE932CwHd 8dN2F1VOIKhd0rHnT3oQEUw6is3bVqQqL+sKjvgM= Date: Sun, 28 Jul 2019 11:37:29 -0400 From: Sasha Levin To: Thinh Nguyen Cc: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , EJ Hsu , Alan Stern , Felipe Balbi , "linux-usb@vger.kernel.org" Subject: Re: [PATCH AUTOSEL 5.1 054/141] usb: gadget: storage: Remove warning message Message-ID: <20190728153729.GG8637@sasha-vm> References: <20190719040246.15945-1-sashal@kernel.org> <20190719040246.15945-54-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 19, 2019 at 05:27:31AM +0000, Thinh Nguyen wrote: >Hi Sasha, > >Sasha Levin wrote: >> From: EJ Hsu >> >> [ Upstream commit e70b3f5da00119e057b7faa557753fee7f786f17 ] >> >> This change is to fix below warning message in following scenario: >> usb_composite_setup_continue: Unexpected call >> >> When system tried to enter suspend, the fsg_disable() will be called to >> disable fsg driver and send a signal to fsg_main_thread. However, at >> this point, the fsg_main_thread has already been frozen and can not >> respond to this signal. So, this signal will be pended until >> fsg_main_thread wakes up. >> >> Once system resumes from suspend, fsg_main_thread will detect a signal >> pended and do some corresponding action (in handle_exception()). Then, >> host will send some setup requests (get descriptor, set configuration...) >> to UDC driver trying to enumerate this device. During the handling of "set >> configuration" request, it will try to sync up with fsg_main_thread by >> sending a signal (which is the same as the signal sent by fsg_disable) >> to it. In a similar manner, once the fsg_main_thread receives this >> signal, it will call handle_exception() to handle the request. >> >> However, if the fsg_main_thread wakes up from suspend a little late and >> "set configuration" request from Host arrives a little earlier, >> fsg_main_thread might come across the request from "set configuration" >> when it handles the signal from fsg_disable(). In this case, it will >> handle this request as well. So, when fsg_main_thread tries to handle >> the signal sent from "set configuration" later, there will nothing left >> to do and warning message "Unexpected call" is printed. >> >> Acked-by: Alan Stern >> Signed-off-by: EJ Hsu >> Signed-off-by: Felipe Balbi >> Signed-off-by: Sasha Levin >> --- >> drivers/usb/gadget/function/f_mass_storage.c | 21 ++++++++++++++------ >> drivers/usb/gadget/function/storage_common.h | 1 + >> 2 files changed, 16 insertions(+), 6 deletions(-) >> >> diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c >> index 043f97ad8f22..982c3e89eb0d 100644 >> --- a/drivers/usb/gadget/function/f_mass_storage.c >> +++ b/drivers/usb/gadget/function/f_mass_storage.c >> > >This patch may have issue. It was reverted upstream. Please don't queue >to stable. I've dropped it, thanks! -- Thanks, Sasha