linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg KH <greg@kroah.com>, Oliver Neukum <oneukum@suse.com>,
	Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>,
	Seth Bollinger <Seth.Bollinger@digi.com>,
	Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
	USB list <linux-usb@vger.kernel.org>
Subject: Re: [PATCH] UAS: Revert commit 3ae62a42090f ("UAS: fix alignment of scatter/gather segments")
Date: Thu, 24 Oct 2019 03:10:59 +0200	[thread overview]
Message-ID: <20191024011059.GB5067@lst.de> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1910231132470.1878-100000@iolanthe.rowland.org>

On Wed, Oct 23, 2019 at 11:34:33AM -0400, Alan Stern wrote:
> Commit 3ae62a42090f ("UAS: fix alignment of scatter/gather segments"),
> copying a similar commit for usb-storage, attempted to solve a problem
> involving scatter-gather I/O and USB/IP by setting the
> virt_boundary_mask for mass-storage devices.
> 
> However, it now turns out that the analogous change in usb-storage
> interacted badly with commit 09324d32d2a0 ("block: force an unlimited
> segment size on queues with a virt boundary"), which was added later.
> A typical error message is:
> 
> 	ehci-pci 0000:00:13.2: swiotlb buffer is full (sz: 327680 bytes),
> 	total 32768 (slots), used 97 (slots)
> 
> There is no longer any reason to keep the virt_boundary_mask setting
> in the uas driver.  It was needed in the first place only for
> handling devices with a block size smaller than the maxpacket size and
> where the host controller was not capable of fully general
> scatter-gather operation (that is, able to merge two SG segments into
> a single USB packet).  But:
> 
> 	High-speed or slower connections never use a bulk maxpacket
> 	value larger than 512;
> 
> 	The SCSI layer does not handle block devices with a block size
> 	smaller than 512 bytes;
> 
> 	All the host controllers capable of SuperSpeed operation can
> 	handle fully general SG;
> 
> 	Since commit ea44d190764b ("usbip: Implement SG support to
> 	vhci-hcd and stub driver") was merged, the USB/IP driver can
> 	also handle SG.
> 
> Therefore all supported device/controller combinations should be okay
> with no need for any special virt_boundary_mask.  So in order to head
> off potential problems similar to those affecting usb-storage, this
> patch reverts commit 3ae62a42090f.
> 
> Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
> CC: Oliver Neukum <oneukum@suse.com>
> CC: <stable@vger.kernel.org>

Looks good,

Acked-by: Christoph Hellwig <hch@lst.de>

      reply	other threads:[~2019-10-24  1:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-17  9:54 reeze while write on external usb 3.0 hard disk [Bug 204095] Piergiorgio Sartor
2019-08-19 14:14 ` Alan Stern
2019-08-20  7:23   ` Christoph Hellwig
2019-08-20 16:37     ` Piergiorgio Sartor
2019-08-26 17:38       ` Piergiorgio Sartor
2019-08-29 14:08         ` Christoph Hellwig
2019-09-25 17:07         ` Piergiorgio Sartor
2019-09-25 18:31           ` Alan Stern
2019-09-27  9:04             ` Peter Chen
2019-09-29 20:13             ` Piergiorgio Sartor
2019-09-30  1:01               ` Alan Stern
2019-09-30 18:25                 ` Piergiorgio Sartor
2019-10-13 18:11                   ` Piergiorgio Sartor
2019-10-16 17:01                     ` Alan Stern
2019-10-17 17:53                       ` Piergiorgio Sartor
2019-10-17 19:23                         ` Alan Stern
2019-11-08 23:05                           ` Piergiorgio Sartor
2019-10-21 15:48                         ` [PATCH] usb-storage: Revert commit 747668dbc061 ("usb-storage: Set virt_boundary_mask to avoid SG overflows") Alan Stern
2019-10-23  1:53                           ` Christoph Hellwig
2019-10-23 14:12                             ` Alan Stern
2019-10-23 15:34                             ` [PATCH] UAS: Revert commit 3ae62a42090f ("UAS: fix alignment of scatter/gather segments") Alan Stern
2019-10-24  1:10                               ` Christoph Hellwig [this message]

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=20191024011059.GB5067@lst.de \
    --to=hch@lst.de \
    --cc=Seth.Bollinger@digi.com \
    --cc=axboe@kernel.dk \
    --cc=greg@kroah.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=oneukum@suse.com \
    --cc=piergiorgio.sartor@nexgo.de \
    --cc=stern@rowland.harvard.edu \
    /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).