linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: shuah <shuah@kernel.org>
To: Suwan Kim <suwan.kim027@gmail.com>
Cc: valentina.manea.m@gmail.com, gregkh@linuxfoundation.org,
	stern@rowland.harvard.edu, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, shuah <shuah@kernel.org>
Subject: Re: [PATCH v3 2/2] usbip: Implement SG support to vhci-hcd and stub driver
Date: Mon, 5 Aug 2019 09:07:24 -0600	[thread overview]
Message-ID: <9490fd7e-b5e7-21fb-4094-ab9c9e0e0aa5@kernel.org> (raw)
In-Reply-To: <20190805080451.GB8904@localhost.localdomain>

On 8/5/19 2:04 AM, Suwan Kim wrote:
> On Fri, Aug 02, 2019 at 04:41:52PM -0600, shuah wrote:
>> Hi Suwan,
>>
>> On 8/2/19 11:36 AM, Suwan Kim wrote:
>>> There are bugs on vhci with usb 3.0 storage device.
>>
>> This sentence doesn't make sense to me. What bugs? Ca you eloborate?
> 
> Alan's patch description "usb-storage: Set virt_boundary_mask to
> avoid SG overflows" elaborates the problem. In USB, each SG list
> entry buffer should be divisible by the bulk maxpacket size. But
> with native SG support, this problem doesn't matter because the
> SG buffer is treated as contiguous buffer. But without native SG
> support, storage driver breaks SG list into several URBs and each
> URB is sparate transfer.
> 
> Let's assume that driver request 31.5 KB data and has SG list which
> has 3584 bytes buffer followed by 7 4096 bytes buffer for some
> reason. USB Storage driver splits this SG list into several URBs
> because VHCI doesn't support SG and send them separately. So the
> first URB buffer size is 3584 bytes. When receiving data from device,
> USB 3.0 device sends data packet of 1024 bytes size because the max
> packet size of BULK pipe is 1024 bytes. So device sends 4096 bytes.
> But the first URB buffer has only 3584 bytes buffer size. So host
> controller terminates the transfer even though there is more data
> to receive.
> 
> Please also reference the mail thread
> https://marc.info/?t=155449209600003&r=1&w=2
> https://marc.info/?l=linux-usb&m=155482317722223&w=2
> 

I am asking you to elaborate and add it to the commit log instead of
just saying "There are bugs on vhci with usb 3.0 storage device."

thanks,
-- Shuah

  reply	other threads:[~2019-08-05 15:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-02 17:36 [PATCH v3 0/2] usbip: Implement SG support Suwan Kim
2019-08-02 17:36 ` [PATCH v3 1/2] usbip: Skip DMA mapping and unmapping for urb at vhci Suwan Kim
2019-08-02 22:22   ` shuah
2019-08-05  5:23     ` Suwan Kim
2019-08-05 15:08       ` shuah
2019-08-02 17:36 ` [PATCH v3 2/2] usbip: Implement SG support to vhci-hcd and stub driver Suwan Kim
2019-08-02 22:41   ` shuah
2019-08-05  8:04     ` Suwan Kim
2019-08-05 15:07       ` shuah [this message]
2019-08-02 22:44 ` [PATCH v3 0/2] usbip: Implement SG support shuah

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=9490fd7e-b5e7-21fb-4094-ab9c9e0e0aa5@kernel.org \
    --to=shuah@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=suwan.kim027@gmail.com \
    --cc=valentina.manea.m@gmail.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;
as well as URLs for NNTP newsgroup(s).