Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756428AbcDGOZe (ORCPT ); Thu, 7 Apr 2016 10:25:34 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:50828 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755472AbcDGOZc (ORCPT ); Thu, 7 Apr 2016 10:25:32 -0400 Date: Thu, 7 Apr 2016 10:25:30 -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: 1090 Lines: 30 On Thu, 7 Apr 2016, Michal Nazarewicz wrote: > Sounds good to me. I’d love someone to test this patch (I sadly have no > way of doing that at the moment) and with that I can resend it with > updated message. Ivaylo should be able to try it. > > BTW, is configfs capable of adding a single instance twice in different > > configs? Or is that again something only legacy gadgets can do? > > I don’t think so. I might be wrong though, but here’s configuration > from the original post: > > mkdir functions/mass_storage.0 > echo $file > functions/mass_storage.0/lun.0/file > ln -s functions/mass_storage.0 configs/c.1 > ln -s functions/mass_storage.0 configs/c.2 > > This makes me suspect it’s not possible to link a function instance to > the same configuration twice, but now that I think about it, I’m not > quite sure what would happen if one did: > > ln -s functions/mass_storage.0 configs/c.1/foo > ln -s functions/mass_storage.0 configs/c.1/bar Do you think it would be worthwhile to check for this possibility in the driver and report an error? Alan Stern