[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <xa1tvb3thhba.fsf@mina86.com>
Date: Thu, 07 Apr 2016 11:57:45 +0200
From: Michal Nazarewicz <mina86@...a86.com>
To: Alan Stern <stern@...land.harvard.edu>
Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75@...il.com>,
Tony Lindgren <tony@...mide.com>, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org,
Felipe Balbi <felipe.balbi@...ux.intel.com>,
Bin Liu <b-liu@...com>, pali.rohar@...il.com
Subject: Re: [PATCH] usb: f_mass_storage: test whether thread is running before starting another
>> 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.
> On Wed, 6 Apr 2016, Michal Nazarewicz wrote:
>> 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.
On Wed, Apr 06 2016, Alan Stern wrote:
> Okay. Then I suggest adding this explanation to the patch
> description.
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.
> 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
--
Best regards
ミハウ “𝓶𝓲𝓷𝓪86” ナザレヴイツ
«If at first you don’t succeed, give up skydiving»
Powered by blists - more mailing lists