lkml.org 
[lkml]   [2014]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] usb: gadget: don't create new string_container if already exist
W dniu 04.11.2014 o 12:05, Neil Zhang pisze:
>
>> -----Original Message-----
>> From: Andrzej Pietrasiewicz [mailto:andrzej.p@samsung.com]
>> Sent: 2014年10月28日 21:10
>> To: Neil Zhang; linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org
>> Cc: balbi@ti.com; gregkh@linuxfoundation.org
>> Subject: Re: [PATCH] usb: gadget: don't create new string_container if already
>> exist
>>

<snip>

>>
>> The problem you are describing does not exist in mainline kernel, where
>> functions are always unbound as part of the whole gadget's unbind - regardless
>> of whether it is a legacy gadget or configfs-composed gadget. When the whole
>> gadget is unbound, composite_dev_cleanup() is called which zeroes cdev-
>>> next_string_id and frees all gadget strings containers.
>>
>
> Yes, you are right that the current mainline won't suffer this issue.
> But it will be needed if we want to implement similar features like android do.

What features do you think of?
Mainlining the android gadget has been attempted a number of times
and is unlikely to succeed.

A configurable gadget can be composed with configfs interface,
so no need to add anything new.

That said, I think that the proper way of eliminating the problem
described is freeing the resources on function unbind rather than
preventing composite from allocating more (duplicate) resources
on bind, which your patch does.

AP
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-11-04 13:01    [W:0.058 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site