From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: Christoph Hellwig <hch@lst.de>, Alan Stern <stern@rowland.harvard.edu>
Cc: Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: RE: How to resolve an issue in swiotlb environment?
Date: Wed, 12 Jun 2019 08:52:21 +0000 [thread overview]
Message-ID: <OSAPR01MB3089D154C6DF0237003CE80CD8EC0@OSAPR01MB3089.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <20190612073059.GA20086@lst.de>
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 either:
>
> git://git.infradead.org/users/hch/misc.git scsi-virt-boundary-fixes
Thank you for the patches!
Unfortunately, the three patches could not resolve this issue.
However, it's a hint to me, and then I found the root cause:
- slave_configure() in drivers/usb/storage/scsiglue.c calls
blk_queue_max_hw_sectors() with 2048 sectors (1 MiB) when USB_SPEED_SUPER or more.
-- So that, even if your patches (also I fixed it a little [1]) could not resolve
the issue because the max_sectors is overwritten by above code.
So, I think we should fix the slave_configure() by using dma_max_mapping_size().
What do you think? If so, I can make such a patch.
[1]
In the "scsi: take the DMA max mapping size into account" patch,
+ shost->max_sectors = min_t(unsigned int, shost->max_sectors,
+ dma_max_mapping_size(dev) << SECTOR_SHIFT);
it should be:
+ dma_max_mapping_size(dev) >> SECTOR_SHIFT);
But, if we fix the slave_configure(), we don't need this patch, IIUC.
Best regards,
Yoshihiro Shimoda
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2019-06-12 8:54 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-03 6:42 How to resolve an issue in swiotlb environment? Yoshihiro Shimoda
2019-06-07 12:00 ` Yoshihiro Shimoda
2019-06-10 7:31 ` Biju Das
2019-06-10 11:13 ` Yoshihiro Shimoda
2019-06-10 12:32 ` Christoph Hellwig
2019-06-10 18:46 ` Alan Stern
2019-06-11 6:41 ` Christoph Hellwig
2019-06-11 14:51 ` Alan Stern
2019-06-12 7:30 ` Christoph Hellwig
2019-06-12 8:52 ` Yoshihiro Shimoda [this message]
2019-06-12 11:31 ` Christoph Hellwig
2019-06-13 4:52 ` Yoshihiro Shimoda
2019-06-12 11:46 ` Oliver Neukum
2019-06-12 12:06 ` Christoph Hellwig
2019-06-12 14:43 ` Alan Stern
2019-06-13 7:39 ` Christoph Hellwig
2019-06-13 16:57 ` Martin K. Petersen
2019-06-13 17:16 ` Alan Stern
2019-06-13 18:18 ` Greg KH
2019-06-13 23:01 ` shuah
2019-06-14 14:44 ` Alan Stern
2019-06-18 15:28 ` shuah
2019-06-19 20:23 ` shuah
2019-06-19 21:05 ` Alan Stern
2019-06-21 17:43 ` Suwan Kim
2019-06-11 6:49 ` Yoshihiro Shimoda
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=OSAPR01MB3089D154C6DF0237003CE80CD8EC0@OSAPR01MB3089.jpnprd01.prod.outlook.com \
--to=yoshihiro.shimoda.uh@renesas.com \
--cc=hch@lst.de \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--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).