From: Christoph Hellwig <hch@infradead.org>
To: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Cc: Bart Van Assche <bvanassche@acm.org>,
Salvatore Bonaccorso <carnil@debian.org>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
sathya.prakash@broadcom.com,
suganath-prabu.subramani@broadcom.com,
"Martin K. Petersen" <martin.petersen@oracle.com>,
MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org,
adi@kriegisch.at
Subject: Re: Report in downstream Debian: mpt3sas broken with xen dom0 with update to 5.10.149 in 5.10.y.
Date: Mon, 24 Oct 2022 10:30:41 -0700 [thread overview]
Message-ID: <Y1bLwUkCgElIBNdU@infradead.org> (raw)
In-Reply-To: <CAK=zhgr=MYn=-mrz3gKUFoXG_+EQ796bHEWSdK88o1Aqamby7g@mail.gmail.com>
On Mon, Oct 24, 2022 at 05:26:44PM +0530, Sreekanth Reddy wrote:
> This issue is getting observed after having the below patch changes,
> 2b9aba0c5d58e141e32bb1bb4c7cd91d19f075b8 scsi: mpt3sas: Fix return
> value check of dma_get_required_mask()
Looking at this commit it seems odd. dma_get_required_mask() should
only be used as an optimization for hardware that actually benefits
from a lower DMA Mask. That means either classic PCI that requires
DAC cycles, or firmware architectures like aic7xxx that do need
additional overhead. I don't think either is the case for mpt3sas,
so I think (in addition to fixing up the Xen required mask), mpt3sas
should do something like:
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 4e981ccaac4163..295942a8989780 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -2992,8 +2992,7 @@ _base_config_dma_addressing(struct MPT3SAS_ADAPTER *ioc, struct pci_dev *pdev)
struct sysinfo s;
u64 coherent_dma_mask, dma_mask;
- if (ioc->is_mcpu_endpoint || sizeof(dma_addr_t) == 4 ||
- dma_get_required_mask(&pdev->dev) <= DMA_BIT_MASK(32)) {
+ if (ioc->is_mcpu_endpoint) {
ioc->dma_mask = 32;
coherent_dma_mask = dma_mask = DMA_BIT_MASK(32);
/* Set 63 bit DMA mask for all SAS3 and SAS35 controllers */
prev parent reply other threads:[~2022-10-24 20:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-21 9:22 Report in downstream Debian: mpt3sas broken with xen dom0 with update to 5.10.149 in 5.10.y Salvatore Bonaccorso
2022-10-23 1:27 ` Bart Van Assche
2022-10-24 11:56 ` Sreekanth Reddy
2022-10-24 12:51 ` James Bottomley
2022-10-24 13:20 ` Juergen Gross
2022-10-24 16:58 ` Christoph Hellwig
2022-10-24 17:28 ` Andrew Cooper
2022-10-24 17:32 ` Christoph Hellwig
[not found] ` <20230314111752.EGroupware.TiNRv1BSroWqKL7zQtfNLJ8@_>
2023-03-14 11:23 ` Juergen Gross
2023-03-14 11:41 ` Andrew Cooper
2023-03-14 12:07 ` Salvatore Bonaccorso
2022-10-24 12:55 ` Juergen Gross
2022-10-24 18:50 ` James Bottomley
2022-10-25 4:32 ` Juergen Gross
2022-10-25 6:38 ` Juergen Gross
2022-10-24 14:58 ` Adi Kriegisch
2022-10-24 17:30 ` 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=Y1bLwUkCgElIBNdU@infradead.org \
--to=hch@infradead.org \
--cc=MPT-FusionLinux.pdl@broadcom.com \
--cc=adi@kriegisch.at \
--cc=bvanassche@acm.org \
--cc=carnil@debian.org \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sathya.prakash@broadcom.com \
--cc=sreekanth.reddy@broadcom.com \
--cc=suganath-prabu.subramani@broadcom.com \
--cc=xen-devel@lists.xenproject.org \
/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