Re: gadgetfs USB2.0 Chapter 9 Tests: Test after "Addressed State" fails

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

 



Thank you Roshan for the patch and thank you Michal for the discussion!
Appearently I am not as familiar with USB as you guys are. But what I
understood from the discussion is, that if I apply the patch from Roshan to
f_fs.c and composite.c, the CV Test should not fail?
Thanks!


On Tue, Dec 24, 2013 at 5:14 PM, Michal Nazarewicz <mina86@xxxxxxxxxx> wrote:
>
> >>This is a bug in user space.  FUNCTIONFS_DISABLE event means the host
> >>has chosen a configuration with given function disabled.  User-space
> >>should clean up it's state, as any pending requests of any >> kind are
> >>now invalid.  It should not close all of the ep files.
>
> On Tue, Dec 24 2013, roshan.jhalani@xxxxxxxxxxxx wrote:
> > Then, I would say this bug exists in both Android 4.2 and Android 4.4
> > version. But we are facing issue in Android 4.4 because kernel uses
> > FunctionFs instead of f_adb.c.
>
> That may be the case.
>
> > Do you think this should be ONLY fixed in user space or we can avoid
> > all ep releases in kernel?
>
> I think this should be fixed in user space since kernel space behaves as
> it always has and as advertised[1].  Changing the behaviour would change
> the ABI and risk situations that when a user space daemon crashes,
> gadget's USB configuration becomes dysfunctional for the host.
>
> Perhaps it would make sense in some cases for the FunctionFS to hang on
> even when all files are closed, but I don't think the issue you've
> described justifies such a change, since it's easily fixed in user space
> (a quick hack is to simply dup() ep0 and never close it).
>
> [1] See Documentation/usb/functionfs.txt:
>
>         When all files are closed the function disables itself.
>
> Perhaps the documentation should be made clearer here though.
>
> --
> Best regards,                                         _     _
> .o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
> ..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
> ooo +--<mpn@xxxxxxxxxx>--<xmpp:mina86@xxxxxxxxxx>--ooO--(_)--Ooo--
>
>
--
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