Re: How to resolve an issue in swiotlb environment?

2019-06-21 Thread Suwan Kim
On Wed, Jun 19, 2019 at 05:05:49PM -0400, Alan Stern wrote: > On Wed, 19 Jun 2019, shuah wrote: > > > I missed a lot of the thread info. and went looking for it and found the > > following summary of the problem: > > > > == > > The issue which prompted the commit this thread is

Re: How to resolve an issue in swiotlb environment?

2019-06-19 Thread Alan Stern
On Wed, 19 Jun 2019, shuah wrote: > I missed a lot of the thread info. and went looking for it and found the > following summary of the problem: > > == > The issue which prompted the commit this thread is about arose in a > situation where the block layer set up a scatterlist

Re: How to resolve an issue in swiotlb environment?

2019-06-19 Thread shuah
Hi Alan, On 6/18/19 9:28 AM, shuah wrote: On 6/14/19 8:44 AM, Alan Stern wrote: On Thu, 13 Jun 2019, shuah wrote: Great!  So all we have to do is fix vhci-hcd.  Then we can remove all the virt_boundary_mask stuff from usb-storage and uas entirely. (I'm assuming wireless USB isn't a genuine

Re: How to resolve an issue in swiotlb environment?

2019-06-18 Thread shuah
On 6/14/19 8:44 AM, Alan Stern wrote: On Thu, 13 Jun 2019, shuah wrote: Great! So all we have to do is fix vhci-hcd. Then we can remove all the virt_boundary_mask stuff from usb-storage and uas entirely. (I'm assuming wireless USB isn't a genuine issue. As far as I know, it is pretty much

Re: How to resolve an issue in swiotlb environment?

2019-06-14 Thread Alan Stern
On Thu, 13 Jun 2019, shuah wrote: > > Great! So all we have to do is fix vhci-hcd. Then we can remove all > > the virt_boundary_mask stuff from usb-storage and uas entirely. > > > > (I'm assuming wireless USB isn't a genuine issue. As far as I know, it > > is pretty much abandoned at this

Re: How to resolve an issue in swiotlb environment?

2019-06-13 Thread shuah
On 6/13/19 11:16 AM, Alan Stern wrote: On Thu, 13 Jun 2019, Christoph Hellwig wrote: On Wed, Jun 12, 2019 at 10:43:11AM -0400, Alan Stern wrote: Would it be okay to rely on the assumption that USB block devices never have block size < 512? (We could even add code to the driver to enforce

Re: How to resolve an issue in swiotlb environment?

2019-06-13 Thread Greg KH
On Thu, Jun 13, 2019 at 01:16:32PM -0400, Alan Stern wrote: > On Thu, 13 Jun 2019, Christoph Hellwig wrote: > > > On Wed, Jun 12, 2019 at 10:43:11AM -0400, Alan Stern wrote: > > > Would it be okay to rely on the assumption that USB block devices never > > > have block size < 512? (We could even

Re: How to resolve an issue in swiotlb environment?

2019-06-13 Thread Alan Stern
On Thu, 13 Jun 2019, Christoph Hellwig wrote: > On Wed, Jun 12, 2019 at 10:43:11AM -0400, Alan Stern wrote: > > Would it be okay to rely on the assumption that USB block devices never > > have block size < 512? (We could even add code to the driver to > > enforce this, although refusing to

Re: How to resolve an issue in swiotlb environment?

2019-06-13 Thread Martin K. Petersen
Christoph, > sd.c only supports a few specific sector size, and none of them is > < 512 bytes: Yep, while sd.c in theory supported 256-byte logical blocks a while back, that code was removed since the block layer always operates on units of 512 bytes. -- Martin K. Petersen Oracle Linux

Re: How to resolve an issue in swiotlb environment?

2019-06-13 Thread Christoph Hellwig
On Wed, Jun 12, 2019 at 10:43:11AM -0400, Alan Stern wrote: > Would it be okay to rely on the assumption that USB block devices never > have block size < 512? (We could even add code to the driver to > enforce this, although refusing to handle such devices at all might be > worse than getting

RE: How to resolve an issue in swiotlb environment?

2019-06-12 Thread Yoshihiro Shimoda
Hi Christoph, > From: Christoph Hellwig, Sent: Wednesday, June 12, 2019 8:31 PM > > On Wed, Jun 12, 2019 at 08:52:21AM +, Yoshihiro Shimoda wrote: > > Hi Christoph, > > > > > From: Christoph Hellwig, Sent: Wednesday, June 12, 2019 4:31 PM > > > > > > First things first: > > > > > >

Re: How to resolve an issue in swiotlb environment?

2019-06-12 Thread Alan Stern
On Wed, 12 Jun 2019, Christoph Hellwig wrote: > On Wed, Jun 12, 2019 at 01:46:06PM +0200, Oliver Neukum wrote: > > > Thay is someething the virt_boundary prevents. But could still give > > > you something like: > > > > > > 1536 4096 4096 1024 > > > > > > or > > > 1536 16384 8192 4096 16384

Re: How to resolve an issue in swiotlb environment?

2019-06-12 Thread Christoph Hellwig
On Wed, Jun 12, 2019 at 01:46:06PM +0200, Oliver Neukum wrote: > > Thay is someething the virt_boundary prevents. But could still give > > you something like: > > > > 1536 4096 4096 1024 > > > > or > > 1536 16384 8192 4096 16384 512 > > That would kill the driver, if maxpacket were

Re: How to resolve an issue in swiotlb environment?

2019-06-12 Thread Oliver Neukum
Am Mittwoch, den 12.06.2019, 09:30 +0200 schrieb Christoph Hellwig: > > So based on the above I'm a little confused about the actual requirement > again. Can you still split the SCSI command into multiple URBs? And Yes. The device sees only a number of packets over the wire. They can come from

Re: How to resolve an issue in swiotlb environment?

2019-06-12 Thread Christoph Hellwig
On Wed, Jun 12, 2019 at 08:52:21AM +, Yoshihiro Shimoda wrote: > Hi Christoph, > > > From: Christoph Hellwig, Sent: Wednesday, June 12, 2019 4:31 PM > > > > First things first: > > > > Yoshihiro, can you try this git branch? The new bits are just the three > > patches at the end, but they

RE: How to resolve an issue in swiotlb environment?

2019-06-12 Thread Yoshihiro Shimoda
Hi Christoph, > From: Christoph Hellwig, Sent: Wednesday, June 12, 2019 4:31 PM > > First things first: > > Yoshihiro, can you try this git branch? The new bits are just the three > patches at the end, but they sit on top of a few patches already sent > out to the list, so a branch is probably

Re: How to resolve an issue in swiotlb environment?

2019-06-12 Thread Christoph Hellwig
First things first: Yoshihiro, can you try this git branch? The new bits are just the three patches at the end, but they sit on top of a few patches already sent out to the list, so a branch is probably either: git://git.infradead.org/users/hch/misc.git scsi-virt-boundary-fixes Gitweb:

Re: How to resolve an issue in swiotlb environment?

2019-06-11 Thread Alan Stern
On Tue, 11 Jun 2019, Christoph Hellwig wrote: > Hi Alan, > > thanks for the explanation. It seems like what usb wants is to: > > - set sg_tablesize to 1 for devices that can't handle scatterlist at all Hmmm. usb-storage (and possible other drivers too) currently handles such controllers by

RE: How to resolve an issue in swiotlb environment?

2019-06-11 Thread Yoshihiro Shimoda
Hi Christoph, Alan, > From: Alan Stern, Sent: Tuesday, June 11, 2019 3:46 AM > > On Mon, 10 Jun 2019, Christoph Hellwig wrote: > > > Hi Yoshihiro, > > > > sorry for not taking care of this earlier, today is a public holiday > > here and thus I'm not working much over the long weekend. To

Re: How to resolve an issue in swiotlb environment?

2019-06-11 Thread Christoph Hellwig
Hi Alan, thanks for the explanation. It seems like what usb wants is to: - set sg_tablesize to 1 for devices that can't handle scatterlist at all - set the virt boundary as-is for devices supporting "basic" scatterlist, although that still assumes they can rejiggle them because for example

Re: How to resolve an issue in swiotlb environment?

2019-06-10 Thread Alan Stern
On Mon, 10 Jun 2019, Christoph Hellwig wrote: > Hi Yoshihiro, > > sorry for not taking care of this earlier, today is a public holiday > here and thus I'm not working much over the long weekend. > > On Mon, Jun 10, 2019 at 11:13:07AM +, Yoshihiro Shimoda wrote: > > I have another way to

Re: How to resolve an issue in swiotlb environment?

2019-06-10 Thread Christoph Hellwig
Hi Yoshihiro, sorry for not taking care of this earlier, today is a public holiday here and thus I'm not working much over the long weekend. On Mon, Jun 10, 2019 at 11:13:07AM +, Yoshihiro Shimoda wrote: > I have another way to avoid the issue. But it doesn't seem that a good way >

RE: How to resolve an issue in swiotlb environment?

2019-06-10 Thread Yoshihiro Shimoda
Hi Christoph, Alan, (add linux-usb ML on CC.) > From: Yoshihiro Shimoda, Sent: Friday, June 7, 2019 9:00 PM > > Hi Christoph, > > I think we should continue to discuss on this email thread instead of the > fixed DMA-API.txt patch [1] > > [1] > https://marc.info/?t=15598941221=1=2 > > >

RE: How to resolve an issue in swiotlb environment?

2019-06-10 Thread Biju Das
Hi All, Any update on the below issue. I am seeing similar issue on RZ/G2M board with Linux version 5.2.0-rc3. root@hihope-rz-g2m:~# [ 35.414177] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using xhci-hcd [ 35.449402] usb-storage 2-1:1.0: USB Mass Storage device detected [

RE: How to resolve an issue in swiotlb environment?

2019-06-07 Thread Yoshihiro Shimoda
Hi Christoph, I think we should continue to discuss on this email thread instead of the fixed DMA-API.txt patch [1] [1] https://marc.info/?t=15598941221=1=2 > From: Yoshihiro Shimoda, Sent: Monday, June 3, 2019 3:42 PM > > Hi linux-block and iommu mailing lists, > > I have an issue that