Felipe Balbi <ba...@kernel.org>
> Cc: Laurent Pinchart <laurent.pinch...@ideasonboard.com>
> Cc: Oliver Neukum <oneu...@suse.com>
> Cc: Johan Hovold <jo...@kernel.org>
> Cc: Michal Nazarewicz <min...@mina86.com>
Acked-by: Michal Nazarewicz <min...@mina86
gre...@linuxfoundation.org>
> Cc: Raviteja Garimella <raviteja.garime...@broadcom.com>
> Cc: Michal Nazarewicz <min...@mina86.com>
Acked-by: Michal Nazarewicz <min...@mina86.com>
> Cc: "Gustavo A. R. Silva" <garsi...@embeddedor.com>
> Cc: linux-
e device. Therefore the
> entire mechanism responsible for this (the fsg_operations structure
> with its ->thread_exits method, the fsg_common_set_ops() routine, and
> the msg_thread_exits() callback routine) can all be eliminated. Even
> the msg_registered bitflag can be re
list.
>
> Cc: Felipe Balbi <ba...@kernel.org>
> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org>
> Cc: Raviteja Garimella <raviteja.garime...@broadcom.com>
> Cc: Michal Nazarewicz <min...@mina86.com>
Acked-by: Michal Nazarewicz <min...@mina86.com>
&
ctionFS so that data completed
> requests is passed to userspace in the order in which they complete.
>
> Signed-off-by: John Keeping <j...@metanate.com>
Acked-by: Michal Nazarewicz <min...@mina86.com>
> ---
> I originally sent a version of this patch back in Ju
Greg Kroah-Hartman <gre...@linuxfoundation.org>
> Cc: Raviteja Garimella <raviteja.garime...@broadcom.com>
> Cc: Michal Nazarewicz <min...@mina86.com>
> Cc: "Gustavo A. R. Silva" <garsi...@embeddedor.com>
> Cc: linux-usb@vger.kernel.org
> Signed-
On Mon, Aug 14 2017, Jerry Zhang wrote:
> On Mon, Aug 14, 2017 at 7:26 AM, Michal Nazarewicz <min...@mina86.com> wrote:
>> On Fri, Aug 11 2017, Jerry Zhang wrote:
>>> Users can apply i/o in the wrong direction on an
>>> endpoint to stall it. In case there is
On Fri, Aug 11 2017, Jerry Zhang wrote:
> Users can apply i/o in the wrong direction on an
> endpoint to stall it. In case there is an error
> that does not allow the endpoint to be stalled,
> we want the user to know.
>
> An operation to stall the endpoint will return
> EBADMSG if successful,
On Fri, Jun 09 2017, Axel Lin wrote:
> It is wrong to do --i in the for loop.
>
> Fixes: dd02ea5a3305 ("usb: gadget: mass_storage: Use static array for luns")
> Signed-off-by: Axel Lin <axel....@ingics.com>
Acked-by: Michal Nazarewicz <min...@mina86.com>
&g
"GFP_ATOMIC".
>
> Signed-off-by: Jia-Ju Bai <baijiaju1...@163.com>
Acked-by: Michal Nazarewicz <min...@mina86.com>
> ---
> drivers/usb/gadget/function/f_fs.c |2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/
On Sat, May 13 2017, Geliang Tang wrote:
> Use memdup_user() helper instead of open-coding to simplify the code.
>
> Signed-off-by: Geliang Tang <geliangt...@gmail.com>
Acked-by: Michal Nazarewicz <min...@mina86.com>
> ---
> drivers/usb/gadget/function/f_fs.c | 11 ++
On Fri, Apr 21 2017, Felipe Balbi wrote:
> why would it have to do that? We would allocate a new struct
> usb_request, allocate a new buffer, copy_from_user() and
> usb_ep_queue(). Why would we return -EAGAIN?
Nvm. Of course you’re right.
>> What if user space doesn’t want to read? If kernel
ion_interruptible() is what's killing
>>> performance. Each and every read/write waits for the USB side to
>>> complete. It would've been much better to have something like:
>>>
>>> if (flags & O_NONBLOCK)
>>> wait_for_completion_interruptib
On Fri, Apr 21 2017, Felipe Balbi wrote:
> Hi Jerry,
>
> Jerry Zhang writes:
>> (reposting this question in its own subject, instead of buried in a patchset)
>>
>> Android has migrated to using f_fs for the mtp function, but in the
>> process we ran into some performance
of endpoints being enabled.
>
> ESHUTDOWN is now a possible return value and ENODEV is not, so change
> docs accordingly.
>
> Signed-off-by: Jerry Zhang <zhangje...@google.com>
Acked-by: Michal Nazarewicz <min...@mina86.com>
> ---
> Changelog since v2:
> - Update
; Previously, calling ioctls before read/write would depending on the
> timing of endpoints being enabled.
>
> Signed-off-by: Jerry Zhang <zhangje...@google.com>
Acked-by: Michal Nazarewicz <min...@mina86.com>
> ---
> Changelog since v1:
> - Guarded against epfile->
On Tue, Apr 18 2017, Jerry Zhang wrote:
> Also change the docs to reflect that ENODEV is no longer returned.
>
> This allows users to make an ioctl call as the first action on a
> connection. Ex, some functions might want to get endpoint size
> before making any i/os.
>
> Previously, calling
fs_data makes more sense and is less redundant.
>
> Also use wake_up_interruptible to reflect use of
> wait_event_interruptible.
>
> Signed-off-by: Jerry Zhang <zhangje...@google.com>
Acked-by: Michal Nazarewicz <min...@mina86.com>
> ---
> drivers/usb/gadget/func
On Tue, Apr 18 2017, Jerry Zhang wrote:
> The comment for this states that it returns -ENODEV
> when the function is inactive. Really, an inactive
> function is treated as having no interfaces, so -EDOM
> is returned.
Uh? Than what’s this:
if (code == FUNCTIONFS_INTERFACE_REVMAP) {
sleeper.
>
> However, a better solution in the future would be to use wait_queue
> method that takes care of managing memory barrier between waker and
> waiter.
>
> See DEFINE_WAIT_FUNC comment in kernel scheduling wait.c as this
> solution is similar to its implementation.
>
> Sig
but the actual amount is not immediately obvious
and depends on pointer size and which slab buckets the structure
and name would fall into).
Signed-off-by: Michal Nazarewicz <min...@mina86.com>
---
drivers/usb/gadget/function/f_fs.c | 72 +++---
drivers/usb/gadget/fu
but the actual amount is not immediately obvious
and depends on pointer size and which slab buckets the structure
and name would fall into).
Signed-off-by: Michal Nazarewicz <min...@mina86.com>
---
drivers/usb/gadget/function/f_fs.c | 79 --
drivers/usb/gadget/fu
Reported-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
Signed-off-by: Michal Nazarewicz <min...@mina86.com>
---
drivers/usb/gadget/udc/mv_udc_core.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/usb/gadget/udc/mv_udc_core.c
b/drivers/us
.@embeddedor.com>
Acked-by: Michal Nazarewicz <min...@mina86.com>
> ---
> drivers/usb/gadget/udc/amd5536udc.c | 20 +++-
> 1 file changed, 11 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/usb/gadget/udc/amd5536udc.c
> b/drivers/usb/gadg
On Mon, Feb 13 2017, Gustavo A. R. Silva wrote:
> Remove unnecessary variable and update function prototype.
>
> Reviewed-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
> Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
Acked-by: Michal Nazar
On Sat, Feb 11 2017, Gustavo A. R. Silva wrote:
> Remove pointer dereference after free and set pointer to NULL after free.
>
> Addresses-Coverity-ID: 1091173
> Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
Acked-by: Michal Nazarewicz <min...@mina86.com>
but the actual amount is not immediately obvious
and depends on pointer size and which slab buckets the structure
and name would fall into).
Signed-off-by: Michal Nazarewicz <min...@mina86.com>
---
drivers/usb/gadget/function/f_fs.c | 79 --
drivers/usb/gadget/fu
Reported-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
Signed-off-by: Michal Nazarewicz <min...@mina86.com>
---
drivers/usb/gadget/udc/mv_udc_core.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/usb/gadget/udc/mv_udc_core.c
b/drivers/us
On Wed, Feb 08 2017, Felipe Balbi wrote:
> Hi,
>
> "Gustavo A. R. Silva" writes:
>> Add missing break in switch.
>>
>> Addresses-Coverity-ID: 201385
>> Signed-off-by: Gustavo A. R. Silva
>> ---
>> drivers/usb/gadget/udc/mv_udc_core.c | 1 +
>> 1
1a0e2d1d0b121fdfeccea7ace Mon Sep 17 00:00:00 2001
From: Michal Nazarewicz <min...@mina86.com>
Date: Fri, 9 Dec 2016 15:56:44 +0100
Subject: [PATCH] =?UTF-8?q?usb:=20function:=20make=20sure=20usb=5Fget=5Ffu?=
=?UTF-8?q?nction*=20functions=20don=E2=80=99t=20returen=20NULL?=
MIME-Version: 1
fput+0xb0/0x1f4
> [ 52.642633] c1 [] fput+0x20/0x2c
> [ 52.642636] c1 [] task_work_run+0xb4/0xe8
> [ 52.642640] c1 [] do_exit+0x360/0xb9c
> [ 52.642644] c1 [] do_group_exit+0x4c/0xb0
> [ 52.642647] c1 [] get_signal+0x380/0x89c
> [ 52.642651] c1 [] do_signal+0x1
epfile->ep is protected by ffs->eps_lock (not epfile->mutex) so clear it
while holding the spin lock.
Signed-off-by: Michal Nazarewicz <min...@mina86.com>
---
drivers/usb/gadget/function/f_fs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/
ffs_func_eps_disable is called from atomic context so it cannot sleep
thus cannot grab a mutex. Change the handling of epfile->read_buffer
to use non-sleeping synchronisation method.
Reported-by: Chen Yu
Signed-off-by: Michał Nazarewicz
Fixes:
On Mon, Oct 03 2016, John Stultz wrote:
> On Wed, Sep 28, 2016 at 2:38 PM, Michal Nazarewicz <min...@mina86.com> wrote:
>> On Wed, Sep 28 2016, Michal Nazarewicz wrote:
>>> With that done, the only thing which needs a mutex is
>>> epfile->read_buffer.
>&g
On Wed, Sep 28 2016, Michal Nazarewicz wrote:
> With that done, the only thing which needs a mutex is
> epfile->read_buffer.
Perhaps this would do:
>8 -- -
>From 6416a1065203a39328311f6c58083089efe169aa Mon Sep 1
in the code and we need to do this:
--- >8 -
>From 0ce6cc5e2440800243eff06c6952cba0f976da2f Mon Sep 17 00:00:00 2001
From: Michal Nazarewicz <min...@mina86.com>
Date: Wed, 28 Sep 2016 18:10:42 +0200
Subject: [PATCH] usb:
complete()
>
> Signed-off-by: Daniel Wagner <daniel.wag...@bmw-carit.de>
> Cc: Felipe Balbi <ba...@kernel.org>
> Cc: Michal Nazarewicz <min...@mina86.com>
Acked-by: Michal Nazarewicz <min...@mina86.com>
> Cc: Greg Kroah-Hartman <gre...@linuxfo
onello.com>
Acked-by: Michal Nazarewicz <min...@mina86.com>
> ---
> drivers/usb/gadget/function/f_midi.c | 2 +-
> drivers/usb/gadget/legacy/gmidi.c| 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/gadget/function/f_midi.c
>
ich does always returns the
> aligned buffer size for an endpoint. This is useful to be used by USB requests
> allocator functions.
>
> Signed-off-by: Felipe F. Tonello <e...@felipetonello.com>
Acked-by: Michal Nazarewicz <min...@mina86.com>
> ---
> include/linux/
On Wed, Aug 03 2016, Oliver Neukum wrote:
> Before we think about that, the basic question whether
>
> S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
>
> is clearer and easier to read than
>
> 0644
>
> must be decided. I would saz no, it is not.
I was about to write the same thing.
I dislike magic
On Tue, Jul 26 2016, Felipe F. Tonello wrote:
> Use gadget's framework allocation function instead of directly calling
> usb_ep_alloc_request().
>
> Signed-off-by: Felipe F. Tonello <e...@felipetonello.com>
Acked-by: Michal Nazarewicz <min...@mina86.com>
> ---
>
On Tue, Jul 26 2016, Felipe F. Tonello wrote:
> We should always use free_ep_req() when allocating requests with
> alloc_ep_req().
>
> Signed-off-by: Felipe F. Tonello <e...@felipetonello.com>
Acked-by: Michal Nazarewicz <min...@mina86.com>
> ---
> drivers/us
me.
> create an inline function to pass the same value to len and default_len.
>
> So this patch also removes duplicate code from few drivers.
>
> Signed-off-by: Felipe F. Tonello <e...@felipetonello.com>
Acked-by: Michal Nazarewicz <min...@mina86.com>
> ---
>
On Tue, Jul 26 2016, Felipe F. Tonello wrote:
> Using usb_ep_align() makes sure that the buffer size for OUT endpoints is
> always aligned with wMaxPacketSize (512 usually). This makes sure
> that no buffer has the wrong size, which can cause nasty bugs.
>
> Signed-off-by: Felipe F. Tonello
onello.com>
Acked-by: Michal Nazarewicz <min...@mina86.com>
> ---
> drivers/usb/gadget/function/f_midi.c | 2 +-
> drivers/usb/gadget/legacy/gmidi.c| 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/gadget/function/f_midi.c
>
ich does always returns the
> aligned buffer size for an endpoint. This is useful to be used by USB requests
> allocator functions.
>
> Signed-off-by: Felipe F. Tonello <e...@felipetonello.com>
Acked-by: Michal Nazarewicz <min...@mina86.com>
> ---
> include/linux/
s need to align
> the request buffer's size to an ep's maxpacketsize.
>
> Signed-off-by: Baolin Wang <baolin.w...@linaro.org>
> Acked-by: Michal Nazarewicz <min...@mina86.com>
> ---
> Changelog since v1:
> - Remove the in_ep modification.
> - Remove max_t() functio
[PING]
> DEVICE: [NAK]
> ...
> HOST: [PING]
> DEVICE: [NAK]
>
> This patch fixes this problem by setting the minimum usb_request's buffer
> size
> for the OUT endpoint as its wMaxPacketSize.
>
> Acked-by: Michal Nazarewic
> Baolin Wang writes:
>> @@ -359,10 +361,12 @@ static int f_midi_set_alt(struct usb_function *f,
>> unsigned intf, unsigned alt)
>>
>> /* allocate a bunch of read buffers and queue them all at once. */
>> for (i = 0; i < midi->qlen && err == 0; i++) {
>> -
On Fri, Jul 08 2016, Baolin Wang wrote:
> On 7 July 2016 at 20:51, Michal Nazarewicz <min...@mina86.com> wrote:
>> On Thu, Jul 07 2016, Baolin Wang wrote:
>>> Some gadget device (such as dwc3 gadget) requires quirk_ep_out_aligned_size
>>> attribute, which m
s need to align
> the request buffer's size to an ep's maxpacketsize.
>
> Signed-off-by: Baolin Wang <baolin.w...@linaro.org>
Acked-by: Michal Nazarewicz <min...@mina86.com>
> ---
> drivers/usb/gadget/function/f_midi.c | 18 +++---
> 1 file changed, 11
On Fri, Jun 24 2016, Dan Carpenter wrote:
> Return -ENOMEM if kmalloc() fails.
>
> Fixes: 9353afbbfa7b ('usb: gadget: f_fs: buffer data from ‘oversized’ OUT
> requests')
> Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
>
Acked-by: Michal Nazarewicz <min..
that
are needed.
Signed-off-by: Michal Nazarewicz <min...@mina86.com>
---
drivers/usb/gadget/udc/m66592-udc.c | 24 ++--
1 file changed, 6 insertions(+), 18 deletions(-)
diff --git a/drivers/usb/gadget/udc/m66592-udc.c
b/drivers/usb/gadget/udc/m66592-udc.c
index b1cfa96..6e977dc
;
^
In doing so, it removes calls to ioread32 function which does I/O with
the device, but I hope the reads don’t have any side effects that are
needed.
Signed-off-by: Michal Nazarewicz <min...@mina86.com>
---
drivers/usb/gadget/udc/mv_u3d_core.c | 23 +++
1 file changed, 3 inse
that
are needed.
Signed-off-by: Michal Nazarewicz <min...@mina86.com>
---
drivers/usb/gadget/udc/r8a66597-udc.c | 24 ++--
1 file changed, 6 insertions(+), 18 deletions(-)
diff --git a/drivers/usb/gadget/udc/r8a66597-udc.c
b/drivers/usb/gadget/udc/r8a66597-udc.c
index 8
On Tue, May 31 2016, Felipe Balbi wrote:
> This series doesn't seem to apply to v4.7-rc1. Care to rebase on
> testing/fixes?
Sure. Only the first patch needs fixing (by skipping failed hunks).
Michal Nazarewicz (4):
usb: gadget: fix unused-but-set-variale warnings
usb: gadget: m6659
Those are enabled with W=1 make option.
The patch leaves of some type-limits warnings which are caused by
generic macros used in a way where they produce always-false
conditions.
Signed-off-by: Michal Nazarewicz <min...@mina86.com>
---
drivers/usb/gadget/function/f_fs.c | 3 +--
d
On Sat, May 28 2016, Dan Carpenter wrote:
> Try compiling the code you suggested.
I find this amusing to be perfectly honest.
Kernel uses designated initialisers, flexible array members, stdint.h,
compound literals and variadic macros, yet still for some reason sticks
to -std=gnu89.
No matter,
8abd25994 ('USB: f_fs: the FunctionFS driver')
> Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
Acked-by: Michal Nazarewicz <min...@mina86.com>
> ---
> v2: move the eps_ptr assignment outside the loop.
>
> diff --git a/drivers/usb/gadget/function/f_fs.c
> b/drivers/
On Sat, May 28 2016, Dan Carpenter wrote:
> Also in the kernel we have to declare variables at the start of the
> block.
/me shrugs
I looked at this out of curiosity and there are precedents:
$ git grep 'for (\(int\|unsigned\|signed\|long\|char\)[[:space:]]' |wc -l
19
(albeit mostly in
wrong variable to use for an iterator.
>
> Fixes: ddf8abd25994 ('USB: f_fs: the FunctionFS driver')
> Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
Acked-by: Michal Nazarewicz <min...@mina86.com>
How on Earth could I have made that mistake is beyond my
comprehension.
igned-off-by: Michal Nazarewicz <min...@mina86.com>
---
drivers/usb/gadget/function/f_fs.c | 3 +-
drivers/usb/gadget/function/u_serial.c | 3 +-
drivers/usb/gadget/legacy/g_ffs.c | 15 --
drivers/usb/gadget/udc/amd5536udc.c| 9 +-
drivers/usb/gadget/udc/bdc/b
that
are needed.
Signed-off-by: Michal Nazarewicz <min...@mina86.com>
Cc: Yoshihiro Shimoda <shimoda.yoshih...@renesas.com>
---
drivers/usb/gadget/udc/m66592-udc.c | 24 ++--
1 file changed, 6 insertions(+), 18 deletions(-)
diff --git a/drivers/usb/gadget/udc/m66592-udc.c
b
that
are needed.
Signed-off-by: Michal Nazarewicz <min...@mina86.com>
Cc: Yoshihiro Shimoda <shimoda.yoshih...@renesas.com>
---
drivers/usb/gadget/udc/r8a66597-udc.c | 24 ++--
1 file changed, 6 insertions(+), 18 deletions(-)
diff --git a/drivers/usb/gadget/udc/r8a66
;
^
In doing so, it removes calls to ioread32 function which does I/O with
the device, but I hope the reads don’t have any side effects that are
needed.
Signed-off-by: Michal Nazarewicz <min...@mina86.com>
Cc: Yu Xu <y...@marvell.com>
---
drivers/usb/gadget/udc/mv_u3d_core.c | 23 +++---
Fixes all of the unused-but-set-variable warnings enabled when
building with W=1. As described in the first patch, some warnings are
left off. See said patch for more description.
Michal Nazarewicz (4):
usb: gadget: fix unused-but-set-variale warnings
usb: gadget: m66592: fix unused-but-set
UDC does and
* breaks one read -> one request model which has been true so far.
Michal Nazarewicz (2):
usb: gadget: f_fs: printk error when excess data is dropped on read
usb: gadget: f_fs: buffer data from ‘oversized’ OUT requests
drivers/usb/gadget/function/f_fs.c |
ignored.
Signed-off-by: Michal Nazarewicz <min...@mina86.com>
---
drivers/usb/gadget/function/f_fs.c | 130 +++--
1 file changed, 109 insertions(+), 21 deletions(-)
diff --git a/drivers/usb/gadget/function/f_fs.c
b/drivers/usb/gadget/function/f_fs.c
index e
Add a pr_err when host sent more data then the size of the buffer user
space gave us. This may happen on UDCs which require OUT requests to
be aligned to max packet size. The patch includes a description of the
situation.
Signed-off-by: Michal Nazarewicz <min...@mina86.com>
---
drive
On Thu, May 19 2016, Changbin Du wrote:
>> On Wed, May 18 2016, Felipe Balbi wrote:
>> > we've been through this before. This needs to be done at the gadget
>> > layer. Gadget driver can over-allocate ahead of time if
>> > gadget->quirk_ep_out_aligned_size is true, then we avoid memcpy() at
>> >
On Wed, May 18 2016, Felipe Balbi wrote:
> we've been through this before. This needs to be done at the gadget
> layer. Gadget driver can over-allocate ahead of time if
> gadget->quirk_ep_out_aligned_size is true, then we avoid memcpy() at
> the UDC driver level.
Right, all right, so let’s look
On Tue, May 17 2016, Changbin Du wrote:
>> There appears to be no kfifo support for iov_iter though, so I just went
>> with a simple buffer.
>>
>> I haven’t looked at the patch too carefully so this is an RFC rather
>> than an actual patch at this point. It does compile at least.
>>
>>
On Mon, May 16 2016, Felipe Balbi wrote:
> Michal Nazarewicz <min...@mina86.com> writes:
>
>>> Alan Stern <st...@rowland.harvard.edu> writes:
>>>> The point is that you don't know whether the host sent more data than
>>>> expected. All you
> On 05/16/2016 06:05 PM, Michal Nazarewicz wrote:
>> So I’ve been looking at AIO handling in f_fs and either I’m stupid or
>> the code is broken.
On Mon, May 16 2016, Lars-Peter Clausen wrote:
> The code was broken. Fixed in commit 332a5b446b791 ("usb: gadget:
> f
So I’ve been looking at AIO handling in f_fs and either I’m stupid or
the code is broken. Here’s part of ffs_user_copy_worker:
int ret = io_data->req->status ? io_data->req->status :
io_data->req->actual;
if (io_data->read && ret > 0) {
> Alan Stern writes:
>> The point is that you don't know whether the host sent more data than
>> expected. All you know is that the host sent more data than the user
>> asked the kernel for -- but maybe the user didn't ask for all the
>> data that he expected. Maybe
On Fri, May 13 2016, Alan Stern wrote:
> The point is that you don't know whether the host sent more data than
> expected. All you know is that the host sent more data than the user
> asked the kernel for -- but maybe the user didn't ask for all the data
> that he expected. Maybe the user wanted
On Wed, May 11 2016, Felipe Balbi wrote:
> Also, returning -EOVERFLOW is not exactly correct here, because you'd
> violate POSIX specification of read(), right ?
Maybe we could piggyback on:
EINVAL fd was created via a call to timerfd_create(2) and the
wrong size buffer was
_fs: add aio support")
> Signed-off-by: Lars-Peter Clausen <l...@metafoo.de>
And obviously, moments after I sent an email asking a question I tracked
down ki_complete. The commit message could benefit from being more
detailed regardless.
Acked-by: Michal Nazarewicz <min...@mina86.com>
On Thu, Apr 14 2016, Lars-Peter Clausen wrote:
> Calling the ki_complete() callback will free the underlying data structure.
> Make sure that it is no longer accessed beyond that point, otherwise
> undefined behaviour might occur.
To be honest I have trouble tracking what ki_complete is. Could
On Mon, Apr 18 2016, Andrzej Pietrasiewicz wrote:
> The function responsible for verifying if a symlink can be made is in
> drivers/usb/gadget/configfs.c: config_usb_cfg_link()
>
> There is a comment from the author:
>
>* Also a function instance can only be linked once.
>
> This is the
not mistaken, configfs
gadget doesn’t even allow it to be expressed.
¹ I have no example failure though. Conclusion that legacy/multi has
a bug is based purely on me reading the code.
Signed-off-by: Michal Nazarewicz <min...@mina86.com>
Tested-by: Ivaylo Dimitrov <ivo.g.dimitrov...@gmai
> On Thu, 7 Apr 2016, Michal Nazarewicz wrote:
>> 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 functio
>> 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
9b8639 ("gadget/function/f_fs.c: use put iov_iter into io_data")
> Signed-off-by: Lars-Peter Clausen <l...@metafoo.de>
Acked-by: Michal Nazarewicz <min...@mina86.com>
(I thought I’ve already acked it).
> ---
> Changes since v1:
> * copy_to_iter() can fail,
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.
That cannot happen. A single instance of mass_storage cannot¹ be added
twice to the same configuration.
¹ To be
> On Tue, 5 Apr 2016, Michal Nazarewicz wrote:
>> When binding the function to usb_configuration, check whether the thread
>> is running before starting another one. Without that, when function
>> instance is added to multiple configurations, fsg_bing starts multipl
need
to worry about starting the thread by themselves (which was where bug
in legacy/multi was in the first place).
¹ I have no example failure though. Conclusion that legacy/multi has
a bug is based purely on me reading the code.
Signed-off-by: Michal Nazarewicz <min...@mina86.com>
---
d
On Fri, Apr 01 2016, Michal Nazarewicz wrote:
> For legacy/nokia setting no_configfs should be a valid solution:
>
> >8
> diff --git a/drivers/usb/gadget/legacy/nokia.c
> b/drivers/usb/gadget/legacy/nokia
> On 04/04/16 13:11, Michal Nazarewicz wrote:
>> Or maybe even this which gets away with gotos all together:
>>
>> diff --git a/drivers/usb/gadget/function/f_midi.c
>> b/drivers/usb/gadget/function/f_midi.c
>> index 56e2dde..91cae60 100644
>> --- a/driver
On Mon, Apr 04 2016, Ivaylo Dimitrov wrote:
> Who and when is going to destroy the thread if one does
> "/sys/bus/platform/drivers/musb-hdrc# echo musb-hdrc.0.auto > unbind"?
> Wouldn't some kind of refcounting make sense here?
Currently the thread is killed when fsg_common structure is released
On Mon, Apr 04 2016, Alan Stern wrote:
> So there is no way to add a single function to several configurations?
There is. f_mass_storage (and any other usb_function_instance) simply
has to have multiple usb_function structures.
> It sounds like there are two problems then. The first problem is
On Sat, Apr 02 2016, Alan Stern wrote:
> On Sat, 2 Apr 2016, Michal Nazarewicz wrote:
>> At the same time, mass storage should work fine if it’s bound to
>> multiple configurations. Only one configuration can be active at any
>> given time so interfaces on different
On Sat, Apr 02 2016, Dan Carpenter wrote:
> We added some new locking here, but missed an error path where we need
> to unlock.
>
> Fixes: 9acdf4df2fc4 ('usb: gadget: f_midi: added spinlock on transmit
> function')
> Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com
> On Fri, 1 Apr 2016, Michal Nazarewicz wrote:
>> @@ -3050,9 +3053,11 @@ static int fsg_bind(struct usb_configuration *c,
>> struct usb_function *f)
>> if (ret)
>> return ret;
>> fsg_common_set_inqui
On Thu, Mar 31 2016, Alan Stern wrote:
> Michal, I'm not sure how you intended to handle this.
For legacy/nokia setting no_configfs should be a valid solution:
>8
diff --git a/drivers/usb/gadget/legacy/nokia.c
wMaxPacketSize
> because that can cause bugs (this bug) or performance issues. Thus, this patch
> fixes this problem by eliminating buflen entirely and replacing it with
> wMaxPacketSize of the appropriate endpoint where needed.
>
> Signed-off-by: Felipe F. Tonello <e...@felipetonell
ffer size
> for the OUT endpoint as its wMaxPacketSize.
>
> Signed-off-by: Felipe F. Tonello <e...@felipetonello.com>
Acked-by: Michal Nazarewicz <min...@mina86.com>
But see comment below:
> ---
> drivers/usb/gadget/function/f_midi.c | 4 +++-
> 1 file changed, 3 ins
;> + * Licensed under the GPLv2.
> On March 4, 2016 7:17:31 PM GMT+00:00, Michal Nazarewicz <min...@mina86.com>
> wrote:
>> Any particular reason to do that?
On Fri, Mar 04 2016, Felipe Ferreri Tonello wrote:
> Because the kernel is v2 only and not later.
Linux as a
On Wed, Mar 02 2016, Felipe F. Tonello wrote:
> Signed-off-by: Felipe F. Tonello
> ---
> drivers/usb/gadget/function/f_midi.c | 77
> +++-
> 1 file changed, 40 insertions(+), 37 deletions(-)
>
> diff --git
1 - 100 of 512 matches
Mail list logo