Re: USB gadgets with configfs hang reboot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 31 Mar 2016, Ivaylo Dimitrov wrote:

> > This isn't supposed to cause any problems.  The two instances should
> > never run at the same time, because they belong to different configs.
> >
> 
> The problem seems to be that fsg driver creates a thread for every 
> fsg_bind() call, which overwrites common->thread_task without first 
> checking if a thread is already created. I don't know the idea behind - 
> should it have only one thread for all instances, or there should be a 
> thread per instance, but anyway the current implementation looks wrong.

You've put your finger on the problem.

Michal, I'm not sure how you intended to handle this.  We only need to
have one thread per interface (even if there's more than one LUN), but
if there are multiple mass-storage interfaces in one configuration then
you might want to have multiple threads.  Of course, then you would
have to handle cases where one config has one mass-storage interface
and another config has two...

It's your decision, but clearly the driver needs to be fixed.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux