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 ab

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 cont

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 i

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 a

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 poin

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 this

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 hand

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 E

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 a

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: > > > > > > Yoshihiro,

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 1024

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 s

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 s

RE: How to resolve an issue in swiotlb environment?

2019-06-10 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 Christ

Re: How to resolve an issue in swiotlb environment?

2019-06-10 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 avoi

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 > though...

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&r=1&w=2 > >

RE: How to resolve an issue in swiotlb environment?

2019-06-10 Thread Biju Das
full (sz: 1003520 bytes), total 32768 (slots), used 1088 (slots) Regards, Biju > Subject: RE: How to resolve an issue in swiotlb environment? > > Hi Christoph, > > I think we should continue to discuss on this email thread instead of the > fixed > DMA-API.txt patch [1] >

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&r=1&w=2 > From: Yoshihiro Shimoda, Sent: Monday, June 3, 2019 3:42 PM > > Hi linux-block and iommu mailing lists, > > I have an issue th