SCSI fixes for 6.11-rc3
Subsystems (2)
James Bottomley
maintainerTwo small fixes to the mpi3mr driver. One to avoid oversize allocations in tracing and the other to fix an uninitialized spinlock in the user to driver feature request code (used to trigger dumps and the like).
The patch is available here:
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes
The short changelog is:
Shin'ichiro Kawasaki (2):
scsi: mpi3mr: Avoid MAX_PAGE_ORDER WARNING for buffer allocations
scsi: mpi3mr: Add missing spin_lock_init() for mrioc->trigger_lock
And the diffstat:
drivers/scsi/mpi3mr/mpi3mr_app.c | 11 ++++++++--- drivers/scsi/mpi3mr/mpi3mr_os.c | 1 + 2 files changed, 9 insertions(+), 3 deletions(-)
With full diff below.
James
---
drivers/scsi/mpi3mr/mpi3mr_app.c +8 -3
@@ -100,7 +100,8 @@ void mpi3mr_alloc_diag_bufs(struct mpi3mr_ioc *mrioc)dprint_init (mrioc,"trying to allocate trace diag buffer of size = %dKB\n" , trace_size /1024 ); -if (mpi3mr_alloc_trace_buffer (mrioc, trace_size)) { +if (get_order (trace_size) >MAX_PAGE_ORDER || +mpi3mr_alloc_trace_buffer (mrioc, trace_size)) { retry = true; trace_size -= trace_dec_size; dprint_init(mrioc, "trace diag buffer allocation failed\n"
@@ -118,8 +119,12 @@ void mpi3mr_alloc_diag_bufs(struct mpi3mr_ioc *mrioc) diag_buffer->type =MPI3_DIAG_BUFFER_TYPE_FW ; diag_buffer->status =MPI3MR_HDB_BUFSTATUS_NOT_ALLOCATED ;if ((mrioc->facts.diag_fw_sz < fw_size) && (fw_size >= fw_min_size)) { - diag_buffer->addr =dma_alloc_coherent (&mrioc->pdev->dev, - fw_size, &diag_buffer->dma_addr,GFP_KERNEL ); +if (get_order (fw_size) <=MAX_PAGE_ORDER ) { + diag_buffer->addr + =dma_alloc_coherent (&mrioc->pdev->dev, fw_size, + &diag_buffer->dma_addr, +GFP_KERNEL ); + }if (!retry) dprint_init(mrioc, "%s:trying to allocate firmware diag buffer of size = %dKB\n",
drivers/scsi/mpi3mr/mpi3mr_os.c +1 -0
@@ -5234,6 +5234,7 @@ mpi3mr_probe(struct pci_dev *pdev, const struct pci_device_id *id)spin_lock_init (&mrioc->watchdog_lock);spin_lock_init (&mrioc->chain_buf_lock);spin_lock_init (&mrioc->sas_node_lock); +spin_lock_init (&mrioc->trigger_lock);INIT_LIST_HEAD (&mrioc->fwevt_list);INIT_LIST_HEAD (&mrioc->tgtdev_list);
The pull request you sent on Sat, 17 Aug 2024 08:27:39 +0100:
The pull request you sent on Sat, 17 Aug 2024 08:27:39 +0100:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.gitscsi-fixes
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/df6cbc62cc9b3bcf593d13400dd58cd339a0f56d
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html