From: Salvatore Bonaccorso <carnil@debian.org>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: stable <stable@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sasha Levin <sashal@kernel.org>, Martin Wilck <mwilck@suse.com>,
Christoph Hellwig <hch@infradead.org>,
Sreekanth Reddy <sreekanth.reddy@broadcom.com>,
"Linux regression tracking (Thorsten Leemhuis)"
<regressions@leemhuis.info>
Subject: Re: Please apply commit 06e472acf964 ("scsi: mpt3sas: Remove usage of dma_get_required_mask() API") to stable series
Date: Thu, 9 Mar 2023 10:45:27 +0100 [thread overview]
Message-ID: <ZAmqt45uu1YoEnaD@eldamar.lan> (raw)
In-Reply-To: <yq1wn3rgj7a.fsf@ca-mkp.ca.oracle.com>
Hi Martin,
On Wed, Mar 08, 2023 at 02:05:01PM -0500, Martin K. Petersen wrote:
>
> Salvatore,
>
> > So I believe the right thing would be to revert first in the stable
> > series where it was applied (5.10.y, 5.15.y) the commit e0e0747de0ea
> > ("scsi: mpt3sas: Fix return value check of dma_get_required_mask()")
> > and then on top of this revert apply the patches:
> >
> > 9df650963bf6 ("scsi: mpt3sas: Don't change DMA mask while reallocating pools")
> > 1a2dcbdde82e ("scsi: mpt3sas: re-do lost mpt3sas DMA mask fix")
> > 06e472acf964 ("scsi: mpt3sas: Remove usage of dma_get_required_mask() API")
> >
> > Attached mbox file implements this.
> >
> > Does that looks now good for resolving the regression?
>
> Yes, that's one way to resolve it.
>
> At a quick glance your mbox looks fine. Best way to validate would be to
> compare the resulting _base_config_dma_addressing() function between
> your tree and upstream. I don't believe we have had additional changes
> here so there should be no delta.
Yes, the resulting _base_config_dma_addressing() function is the same
after applying the series of commits.
In both cases it will be:
/**
* _base_config_dma_addressing - set dma addressing
* @ioc: per adapter object
* @pdev: PCI device struct
*
* Return: 0 for success, non-zero for failure.
*/
static int
_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) {
ioc->dma_mask = 32;
coherent_dma_mask = dma_mask = DMA_BIT_MASK(32);
/* Set 63 bit DMA mask for all SAS3 and SAS35 controllers */
} else if (ioc->hba_mpi_version_belonged > MPI2_VERSION) {
ioc->dma_mask = 63;
coherent_dma_mask = dma_mask = DMA_BIT_MASK(63);
} else {
ioc->dma_mask = 64;
coherent_dma_mask = dma_mask = DMA_BIT_MASK(64);
}
if (ioc->use_32bit_dma)
coherent_dma_mask = DMA_BIT_MASK(32);
if (dma_set_mask(&pdev->dev, dma_mask) ||
dma_set_coherent_mask(&pdev->dev, coherent_dma_mask))
return -ENODEV;
if (ioc->dma_mask > 32) {
ioc->base_add_sg_single = &_base_add_sg_single_64;
ioc->sge_size = sizeof(Mpi2SGESimple64_t);
} else {
ioc->base_add_sg_single = &_base_add_sg_single_32;
ioc->sge_size = sizeof(Mpi2SGESimple32_t);
}
si_meminfo(&s);
ioc_info(ioc, "%d BIT PCI BUS DMA ADDRESSING SUPPORTED, total mem (%ld kB)\n",
ioc->dma_mask, convert_to_kb(s.totalram));
return 0;
}
Regards,
Salvatore
next prev parent reply other threads:[~2023-03-09 9:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-04 9:52 Please apply commit 06e472acf964 ("scsi: mpt3sas: Remove usage of dma_get_required_mask() API") to stable series Salvatore Bonaccorso
2023-03-06 7:21 ` Greg Kroah-Hartman
2023-03-06 20:53 ` Salvatore Bonaccorso
2023-03-07 1:16 ` Martin K. Petersen
2023-03-08 16:32 ` Salvatore Bonaccorso
2023-03-08 18:06 ` Martin Wilck
2023-03-08 19:33 ` Salvatore Bonaccorso
2023-03-10 12:53 ` Greg Kroah-Hartman
2023-03-08 19:05 ` Martin K. Petersen
2023-03-09 9:45 ` Salvatore Bonaccorso [this message]
2023-03-09 15:51 ` Martin K. Petersen
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=ZAmqt45uu1YoEnaD@eldamar.lan \
--to=carnil@debian.org \
--cc=gregkh@linuxfoundation.org \
--cc=hch@infradead.org \
--cc=martin.petersen@oracle.com \
--cc=mwilck@suse.com \
--cc=regressions@leemhuis.info \
--cc=sashal@kernel.org \
--cc=sreekanth.reddy@broadcom.com \
--cc=stable@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.