mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
To: "Yang, Fei" <fei.yang@intel.com>, John Stultz <john.stultz@linaro.org>
Cc: Felipe Balbi <balbi@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Chen Yu <chenyu56@huawei.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Linux USB List <linux-usb@vger.kernel.org>,
	Amit Pundir <amit.pundir@linaro.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	"kernel@collabora.com" <kernel@collabora.com>
Subject: Re: [REGRESSION] usb: gadget: f_fs: Allow scatter-gather buffers
Date: Tue, 21 May 2019 12:04:49 +0200	[thread overview]
Message-ID: <1672b93a-dfe6-acb2-715e-c4a13af54413@collabora.com> (raw)
In-Reply-To: <02E7334B1630744CBDC55DA8586225837F885FFD@ORSMSX103.amr.corp.intel.com>

Hi,

W dniu 20.05.2019 o 23:52, Yang, Fei pisze:
>>>>> One question that comes to my mind is this: Does the USB

<snip>

> 
> One of the problems appears to be that req->num_mapped_sgs was left uninitialized. I made the following change and got a lot more requests completed.
> However this change is not sufficient to solve the adb issue, the usb requests would eventually get stuck without getting a matching ffs_epfile_async_io_complete.
> 
> @@ -1067,6 +1067,7 @@ static ssize_t ffs_epfile_io(struct file *file, struct ffs_io_data *io_data)
>                          req->buf = NULL;
>                          req->sg = io_data->sgt.sgl;
>                          req->num_sgs = io_data->sgt.nents;
> +                       req->num_mapped_sgs = req->num_sgs;
>                  } else {
>                          req->buf = data;
>                  }
> @@ -1110,6 +1111,7 @@ static ssize_t ffs_epfile_io(struct file *file, struct ffs_io_data *io_data)
>                          req->buf = NULL;
>                          req->sg = io_data->sgt.sgl;
>                          req->num_sgs = io_data->sgt.nents;
> +                       req->num_mapped_sgs = req->num_sgs;
>                  } else {
>                          req->buf = data;
>                  }
> 

Isn't num_mapped_sgs meant to be set by drivers/usb/gadget/udc/core.c?

And the comment in include/linux/usb/gadget.h says "internal".

One thing that becomes evident now is that adb uses async io.
It seems that interaction of async io and s-g mode should be further
investigated.

Andrzej

  reply	other threads:[~2019-05-21 10:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-08  2:18 John Stultz
2019-05-08  7:01 ` Andrzej Pietrasiewicz
2019-05-08 21:39   ` John Stultz
2019-05-09  3:25   ` John Stultz
2019-05-08 12:44 ` Andrzej Pietrasiewicz
2019-05-08 21:45   ` John Stultz
2019-05-09 14:02 ` Andrzej Pietrasiewicz
2019-05-09 18:25   ` John Stultz
2019-05-09 21:23     ` John Stultz
2019-05-13 14:08       ` Andrzej Pietrasiewicz
2019-05-13 18:09         ` John Stultz
2019-05-14 10:14           ` Andrzej Pietrasiewicz
2019-05-20 10:42             ` Andrzej Pietrasiewicz
2019-05-20 16:23               ` Yang, Fei
2019-05-20 18:33                 ` John Stultz
2019-05-20 21:52                   ` Yang, Fei
2019-05-21 10:04                     ` Andrzej Pietrasiewicz [this message]
2019-05-21 15:34                       ` John Stultz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1672b93a-dfe6-acb2-715e-c4a13af54413@collabora.com \
    --to=andrzej.p@collabora.com \
    --cc=amit.pundir@linaro.org \
    --cc=balbi@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=chenyu56@huawei.com \
    --cc=fei.yang@intel.com \
    --cc=john.stultz@linaro.org \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®