Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754111AbcDFPGM (ORCPT ); Wed, 6 Apr 2016 11:06:12 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:40040 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753405AbcDFPGJ (ORCPT ); Wed, 6 Apr 2016 11:06:09 -0400 Date: Wed, 6 Apr 2016 11:05:52 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Michal Nazarewicz cc: Ivaylo Dimitrov , Tony Lindgren , , , Felipe Balbi , Bin Liu , Subject: Re: [PATCH] usb: f_mass_storage: test whether thread is running before starting another In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 822 Lines: 21 On Wed, 6 Apr 2016, Michal Nazarewicz wrote: > On Tue, Apr 05 2016, Alan Stern wrote: > > Suppose one usb_function is carrying out an I/O operation while > > another one in the same config gets a Set-Interface request from the > > host. > > That cannot happen. A single instance of mass_storage cannot¹ be added > twice to the same configuration. > > ¹ To be more precise, not via configfs. A legacy gadget could do that, > but that would be a bug in that legacy driver, not f_mass_storage. > Moreover, no current legacy gadgets do that though so IMO this is an > academic discussion. Okay. Then I suggest adding this explanation to the patch description. BTW, is configfs capable of adding a single instance twice in different configs? Or is that again something only legacy gadgets can do? Alan Stern