linux-sg2042/drivers/usb/storage
Alan Stern 1186f86a71 UAS: Revert commit 3ae62a4209 ("UAS: fix alignment of scatter/gather segments")
Commit 3ae62a4209 ("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 09324d32d2 ("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 ea44d19076 ("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 3ae62a4209.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Oliver Neukum <oneukum@suse.com>
CC: <stable@vger.kernel.org>
Acked-by: Christoph Hellwig <hch@lst.de>
Fixes: 3ae62a4209 ("UAS: fix alignment of scatter/gather segments")
Link: https://lore.kernel.org/r/Pine.LNX.4.44L0.1910231132470.1878-100000@iolanthe.rowland.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-28 17:53:39 +01:00
..
Kconfig USB: add missing SPDX lines to Kconfig and Makefiles 2019-01-22 09:08:17 +01:00
Makefile usb-storage: export symbols in USB_STORAGE namespace 2019-09-10 10:30:57 +02:00
alauda.c usb-storage: export symbols in USB_STORAGE namespace 2019-09-10 10:30:57 +02:00
cypress_atacb.c usb-storage: export symbols in USB_STORAGE namespace 2019-09-10 10:30:57 +02:00
datafab.c usb-storage: export symbols in USB_STORAGE namespace 2019-09-10 10:30:57 +02:00
debug.c USB: storage: remove invalid URL from drivers 2018-01-23 10:22:34 +01:00
debug.h usb-storage: remove single-use define for debugging 2019-09-10 10:30:53 +02:00
ene_ub6250.c usb-storage: export symbols in USB_STORAGE namespace 2019-09-10 10:30:57 +02:00
freecom.c usb-storage: export symbols in USB_STORAGE namespace 2019-09-10 10:30:57 +02:00
initializers.c USB: storage: remove invalid URL from drivers 2018-01-23 10:22:34 +01:00
initializers.h USB: storage: remove invalid URL from drivers 2018-01-23 10:22:34 +01:00
isd200.c Modules updates for v5.4 2019-09-22 10:34:46 -07:00
jumpshot.c usb-storage: export symbols in USB_STORAGE namespace 2019-09-10 10:30:57 +02:00
karma.c usb-storage: export symbols in USB_STORAGE namespace 2019-09-10 10:30:57 +02:00
onetouch.c usb-storage: export symbols in USB_STORAGE namespace 2019-09-10 10:30:57 +02:00
option_ms.c USB: storage: Remove redundant license text 2017-11-04 11:55:38 +01:00
option_ms.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
protocol.c USB: storage: remove invalid URL from drivers 2018-01-23 10:22:34 +01:00
protocol.h USB: storage: remove invalid URL from drivers 2018-01-23 10:22:34 +01:00
realtek_cr.c usb-storage: export symbols in USB_STORAGE namespace 2019-09-10 10:30:57 +02:00
scsiglue.c usb-storage: Revert commit 747668dbc0 ("usb-storage: Set virt_boundary_mask to avoid SG overflows") 2019-10-28 17:52:44 +01:00
scsiglue.h USB: storage: remove invalid URL from drivers 2018-01-23 10:22:34 +01:00
sddr09.c usb-storage: export symbols in USB_STORAGE namespace 2019-09-10 10:30:57 +02:00
sddr55.c usb-storage: export symbols in USB_STORAGE namespace 2019-09-10 10:30:57 +02:00
shuttle_usbat.c usb-storage: export symbols in USB_STORAGE namespace 2019-09-10 10:30:57 +02:00
sierra_ms.c usb: sierra: fix a missing check of device_create_file 2019-03-26 16:42:52 +09:00
sierra_ms.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
transport.c USB: storage: remove invalid URL from drivers 2018-01-23 10:22:34 +01:00
transport.h USB: storage: remove invalid URL from drivers 2018-01-23 10:22:34 +01:00
uas-detect.h uas: Always apply US_FL_NO_ATA_1X quirk to Seagate devices 2017-11-28 15:17:49 +01:00
uas.c UAS: Revert commit 3ae62a4209 ("UAS: fix alignment of scatter/gather segments") 2019-10-28 17:53:39 +01:00
unusual_alauda.h USB: storage: Remove redundant license text 2017-11-04 11:55:38 +01:00
unusual_cypress.h USB: storage: Remove redundant license text 2017-11-04 11:55:38 +01:00
unusual_datafab.h USB: storage: Remove redundant license text 2017-11-04 11:55:38 +01:00
unusual_devs.h usb-storage: Add new JMS567 revision to unusual_devs 2019-08-21 09:45:49 -07:00
unusual_ene_ub6250.h USB: storage: Remove redundant license text 2017-11-04 11:55:38 +01:00
unusual_freecom.h USB: storage: Remove redundant license text 2017-11-04 11:55:38 +01:00
unusual_isd200.h USB: storage: Remove redundant license text 2017-11-04 11:55:38 +01:00
unusual_jumpshot.h USB: storage: Remove redundant license text 2017-11-04 11:55:38 +01:00
unusual_karma.h USB: storage: Remove redundant license text 2017-11-04 11:55:38 +01:00
unusual_onetouch.h USB: storage: Remove redundant license text 2017-11-04 11:55:38 +01:00
unusual_realtek.h USB: usb-storage: Add new ID to ums-realtek 2019-06-05 11:52:42 +02:00
unusual_sddr09.h USB: storage: Remove redundant license text 2017-11-04 11:55:38 +01:00
unusual_sddr55.h USB: storage: Remove redundant license text 2017-11-04 11:55:38 +01:00
unusual_uas.h usb-storage: Add compatibility quirk flags for G-Technologies G-Drive 2018-05-24 18:19:39 +02:00
unusual_usbat.h USB: storage: Remove redundant license text 2017-11-04 11:55:38 +01:00
usb.c USB: storage: remove invalid URL from drivers 2018-01-23 10:22:34 +01:00
usb.h USB: storage: remove invalid URL from drivers 2018-01-23 10:22:34 +01:00
usual-tables.c USB: storage: remove invalid URL from drivers 2018-01-23 10:22:34 +01:00