aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpi3mr/mpi3mr.h
Commit message (Collapse)AuthorAgeFilesLines
* scsi: mpi3mr: Update driver version to 8.13.0.5.50Ranjan Kumar2025-02-251-2/+2
| | | | | | | | Update driver version to 8.13.0.5.50 Signed-off-by: Ranjan Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Check admin reply queue from WatchdogRanjan Kumar2025-02-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Admin reply processing can be called from multiple contexts. The driver uses an atomic flag for synchronization among multiple threads/context for draining the admin replies. Upon entering the admin processing routine, the driver will set the atomic flag and start reply processing. When exiting the routine, the driver resets the flag. However, there is a race condition when one thread (Thread 1) has processed replies and is about to reset the flag but in the meantime few more replies are posted and another thread (Thread 2) is called to process replies. Since the synchronization flag is still set, Thread 2 will return without processing replies and those new replies will not be flushed. Make the watchdog thread monitor cases where admin ISR/poll call returns due to another thread processing admin replies. If such an instance is found, make driver call admin ISR to drain replies (if any). Co-developed-by: Sumit Saxena <[email protected]> Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Ranjan Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Update driver version to 8.12.1.0.50Ranjan Kumar2025-02-041-2/+2
| | | | | | | | Update driver version to 8.12.1.0.50 Signed-off-by: Ranjan Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Synchronous access b/w reset and tm thread for reply queueRanjan Kumar2025-02-041-0/+2
| | | | | | | | | | | | | | | | | | When the task management thread processes reply queues while the reset thread resets them, the task management thread accesses an invalid queue ID (0xFFFF), set by the reset thread, which points to unallocated memory, causing a crash. Add flag 'io_admin_reset_sync' to synchronize access between the reset, I/O, and admin threads. Before a reset, the reset handler sets this flag to block I/O and admin processing threads. If any thread bypasses the initial check, the reset thread waits up to 10 seconds for processing to finish. If the wait exceeds 10 seconds, the controller is marked as unrecoverable. Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Ranjan Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Support for Segmented Hardware Trace bufferRanjan Kumar2025-02-041-0/+13
| | | | | | | | | | | | | | | | | Allocate segmented trace buffer if firmware advertises the capability in IOCfacts. Upon driver load, read the trace buffer size from driver page 1, calculate the required segments for trace buffer, and allocate segmented buffers. Each segment is 4096 bytes in size. While posting driver diagnostic buffer to firmware, advertise that trace buffer is segmented. Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Ranjan Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Avoid reply queue full conditionRanjan Kumar2025-02-041-1/+11
| | | | | | | | | | | | | | | | To avoid reply queue full condition, update the driver to check IOCFacts capabilities for qfull. Update the operational reply queue's Consumer Index after processing 100 replies. If pending I/Os on a reply queue exceeds a threshold (reply_queue_depth - 200), then return I/O back to OS to retry. Also increase default admin reply queue size to 2K. Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Ranjan Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: replace blk_mq_pci_map_queues with blk_mq_map_hw_queuesDaniel Wagner2024-12-231-1/+0
| | | | | | | | | | | | | | | Replace all users of blk_mq_pci_map_queues with the more generic blk_mq_map_hw_queues. This in preparation to retire blk_mq_pci_map_queues. Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Reviewed-by: Ming Lei <[email protected]> Reviewed-by: John Garry <[email protected]> Signed-off-by: Daniel Wagner <[email protected]> Link: https://lore.kernel.org/r/20241202-refactor-blk-affinity-helpers-v6-5-27211e9c2cd5@kernel.org Signed-off-by: Jens Axboe <[email protected]>
* scsi: mpi3mr: Update driver version to 8.12.0.3.50Ranjan Kumar2024-12-041-2/+2
| | | | | | | | Update driver version to 8.12.0.3.50. Signed-off-by: Ranjan Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Fix corrupt config pages PHY state is switched in sysfsRanjan Kumar2024-12-041-9/+0
| | | | | | | | | | | | | | | The driver, through the SAS transport, exposes a sysfs interface to enable/disable PHYs in a controller/expander setup. When multiple PHYs are disabled and enabled in rapid succession, the persistent and current config pages related to SAS IO unit/SAS Expander pages could get corrupted. Use separate memory for each config request. Signed-off-by: Prayas Patel <[email protected]> Signed-off-by: Ranjan Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* Merge tag 'scsi-fixes' of ↵Linus Torvalds2024-10-191-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Fixes all in drivers. The largest is the mpi3mr which corrects a phy count limit that should only apply to the controller but was being incorrectly applied to expander phys" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: target: core: Fix null-ptr-deref in target_alloc_device() scsi: mpi3mr: Validate SAS port assignments scsi: ufs: core: Set SDEV_OFFLINE when UFS is shut down scsi: ufs: core: Requeue aborted request scsi: ufs: core: Fix the issue of ICU failure
| * scsi: mpi3mr: Validate SAS port assignmentsRanjan Kumar2024-10-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A sanity check on phy_mask was added in commit 3668651def2c ("scsi: mpi3mr: Sanitise num_phys"). This causes warning messages when more than 64 phys are detected and devices connected to phys greater than 64 are dropped. The phy_mask bitmap is only needed for controller phys and not required for expander phys. Controller phys can go up to a maximum of 64 and therefore u64 is good enough to contain phy_mask bitmap. To suppress those warnings and allow devices to be discovered as before the offending commit, restrict the phy_mask setting and lowest phy setting only to the controller phys. Fixes: 3668651def2c ("scsi: mpi3mr: Sanitise num_phys") Cc: [email protected] Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Reported-by: Alexander Motin <[email protected]> Signed-off-by: Ranjan Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* | move asm/unaligned.h to linux/unaligned.hAl Viro2024-10-021-1/+1
|/ | | | | | | | | | | | | | | | | | | asm/unaligned.h is always an include of asm-generic/unaligned.h; might as well move that thing to linux/unaligned.h and include that - there's nothing arch-specific in that header. auto-generated by the following: for i in `git grep -l -w asm/unaligned.h`; do sed -i -e "s/asm\/unaligned.h/linux\/unaligned.h/" $i done for i in `git grep -l -w asm-generic/unaligned.h`; do sed -i -e "s/asm-generic\/unaligned.h/linux\/unaligned.h/" $i done git mv include/asm-generic/unaligned.h include/linux/unaligned.h git mv tools/include/asm-generic/unaligned.h tools/include/linux/unaligned.h sed -i -e "/unaligned.h/d" include/asm-generic/Kbuild sed -i -e "s/__ASM_GENERIC/__LINUX/" include/linux/unaligned.h tools/include/linux/unaligned.h
* Merge patch series "mpi3mr: Few Enhancements and minor fix"Martin K. Petersen2024-09-131-3/+5
|\ | | | | | | | | | | | | | | | | Ranjan Kumar <[email protected]> says: Few Enhancements and minor fix of mpi3mr driver. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
| * scsi: mpi3mr: Update driver version to 8.12.0.0.50Ranjan Kumar2024-09-131-2/+2
| | | | | | | | | | | | | | | | Update driver version to 8.12.0.0.50. Signed-off-by: Ranjan Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
| * scsi: mpi3mr: Use firmware-provided timestamp update intervalRanjan Kumar2024-09-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | Make driver use the timestamp update interval value provided by firmware in the driver page 1. If firmware fails to provide non-zero value, then the driver will fall back to the driver defined macro. Signed-off-by: Prayas Patel <[email protected]> Signed-off-by: Ranjan Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* | scsi: mpi3mr: A performance fixTomas Henzl2024-09-131-1/+1
|/ | | | | | | | | | | | | | Commit 0c52310f2600 ("hrtimer: Ignore slack time for RT tasks in schedule_hrtimeout_range()") effectivelly shortens a sleep in a polling function in the driver. That is causing a performance regression as the new value of just 2us is too low, in certain tests the perf drop is ~30%. Fix this by adjusting the sleep to 20us (close to the previous value). Reported-by: Jan Jurca <[email protected]> Signed-off-by: Tomas Henzl <[email protected]> Acked-by: Sumit Saxena <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* Merge patch series "Simplify multiple create*_workqueue() invocations"Martin K. Petersen2024-08-231-2/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bart Van Assche <[email protected]> says: Hi Martin, Multiple SCSI drivers use snprintf() to format a workqueue name before invoking one of the create*_workqueue() macros. This patch series simplifies such code by passing the format string and arguments to alloc_workqueue(). Additionally, the structure members that are only used as a temporary buffer for formatting workqueue names are removed. Please consider this patch series for the next merge window. Thanks, Bart. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
| * scsi: mpi3mr: Simplify an alloc_ordered_workqueue() invocationBart Van Assche2024-08-231-2/+0
| | | | | | | | | | | | | | | | | | Let alloc_ordered_workqueue() format the workqueue name instead of calling snprintf() explicitly. Signed-off-by: Bart Van Assche <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* | scsi: mpi3mr: Driver version update to 8.10.0.5.50Ranjan Kumar2024-08-131-2/+2
| | | | | | | | | | | | | | | | Update driver version to 8.10.0.5.50. Signed-off-by: Ranjan Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* | scsi: mpi3mr: Update consumer index of reply queues after every 100 repliesRanjan Kumar2024-08-131-0/+1
|/ | | | | | | | | | | | Instead of updating the ConsumerIndex of the Admin and Operational ReplyQueues after processing all replies in the queue, the index will now be periodically updated after processing every 100 replies. Co-developed-by: Sathya Prakash <[email protected]> Signed-off-by: Sathya Prakash <[email protected]> Signed-off-by: Ranjan Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Driver version updateSumit Saxena2024-07-051-2/+2
| | | | | | Signed-off-by: Sumit Saxena <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Prevent PCI writes from driver during PCI error recoverySumit Saxena2024-07-051-0/+1
| | | | | | | | | | | | Prevent interaction with the hardware while the error recovery in progress. Co-developed-by: Sathya Prakash <[email protected]> Signed-off-by: Sathya Prakash <[email protected]> Co-developed-by: Ranjan Kumar <[email protected]> Signed-off-by: Ranjan Kumar <[email protected]> Signed-off-by: Sumit Saxena <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Support PCI Error Recovery callback handlersSumit Saxena2024-07-051-0/+6
| | | | | | | | | | | | | | PCI Error recovery support is required to recover the controller upon detection of PCI errors. Add support for the PCI error recovery callback handlers in mpi3mr driver. Co-developed-by: Sathya Prakash <[email protected]> Signed-off-by: Sathya Prakash <[email protected]> Co-developed-by: Ranjan Kumar <[email protected]> Signed-off-by: Ranjan Kumar <[email protected]> Signed-off-by: Sumit Saxena <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Update driver version to 8.9.1.0.50Ranjan Kumar2024-06-271-2/+2
| | | | | | | | Update driver version to 8.9.1.0.50 Signed-off-by: Ranjan Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Add ioctl support for HDBRanjan Kumar2024-06-271-0/+12
| | | | | | | | | | | Add interface for applications to manage the host diagnostic buffers and update the automatic diag buffer capture triggers. Co-developed-by: Sathya Prakash <[email protected]> Signed-off-by: Sathya Prakash <[email protected]> Signed-off-by: Ranjan Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Trigger supportRanjan Kumar2024-06-271-0/+43
| | | | | | | | | | | | | | Add functions to process automatic diag triggers. If a condition defined in the triggers is met, the driver will call appropriate controller functions to save the diagnostic information. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Co-developed-by: Sathya Prakash <[email protected]> Signed-off-by: Sathya Prakash <[email protected]> Signed-off-by: Ranjan Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: HDB allocation and posting for hardware and firmware buffersRanjan Kumar2024-06-271-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | To be able to debug controller problems it is beneficial to allocate and configure system/host memory buffers which can be used to capture hardware and firmware diagnostic information. Add functions required to allocate and post firmware and hardware diagnostic buffers to the controller and to set up automatic diagnostic capture triggers. Captures will be triggered under the following circumstances: 1. Firmware is in FAULT state. 2. Admin commands time out. 3. Controller reset caused due to I/O timeout Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Co-developed-by: Sathya Prakash <[email protected]> Signed-off-by: Sathya Prakash <[email protected]> Signed-off-by: Ranjan Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Switch to using ->device_configureChristoph Hellwig2024-04-121-1/+0
| | | | | | | | | | | | | | | | | Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Note that mpi3mr also updates the limits from an event handler that iterates all SCSI devices. This is also updated to use the queue_limits, but the complete locking of this path probably means it already is completely broken and needs a proper audit. Signed-off-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Damien Le Moal <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Driver version update to 8.8.1.0.50Ranjan Kumar2024-03-251-2/+2
| | | | | | | | Update driver version to 8.8.1.0.50. Signed-off-by: Ranjan Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Debug ability improvementsRanjan Kumar2024-03-251-3/+7
| | | | | | | | | | | | Update driver to include OS type in fault/reset reason code. MPI request sent through ioctl now automatically dumped on timeout. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Ranjan Kumar <[email protected]> Signed-off-by: Sathya Prakash <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Block devices are not removed even when VDs are offlinedRanjan Kumar2024-03-251-1/+1
| | | | | | | | | | | | | The driver did not remove the virtual disk that was exposed as hidden and offline after the controller was reset. Drive is removed from OS when firmware sends "device added" event with hidden bit set or access status indicating inability to accept I/Os. Signed-off-by: Ranjan Kumar <[email protected]> Signed-off-by: Sathya Prakash <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Update driver version to 8.5.1.0.0Chandrakanth patil2023-12-061-2/+2
| | | | | | | | Update driver version to 8.5.1.0.0 Signed-off-by: Chandrakanth patil <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Support for preallocation of SGL BSG data buffers part-3Chandrakanth patil2023-12-061-4/+6
| | | | | | | | | | | The driver acquires the required NVMe SGLs from the pre-allocated pool. Co-developed-by: Sathya Prakash <[email protected]> Signed-off-by: Sathya Prakash <[email protected]> Signed-off-by: Chandrakanth patil <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Support for preallocation of SGL BSG data buffers part-2Chandrakanth patil2023-12-061-0/+2
| | | | | | | | | | The driver acquires the required SGLs from the pre-allocated pool. Co-developed-by: Sathya Prakash <[email protected]> Signed-off-by: Sathya Prakash <[email protected]> Signed-off-by: Chandrakanth patil <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Support for preallocation of SGL BSG data buffers part-1Chandrakanth patil2023-12-061-0/+15
| | | | | | | | | | | | | The driver now supports SGLs for BSG data transfer. Upon loading, the driver pre-allocates SGLs in chunks of 8k, results in a total of 256 * 8k, equal to 2MB. These pre-allocated SGLs are reserved for handling BSG commands and are deallocated during driver unload. Co-developed-by: Sathya Prakash <[email protected]> Signed-off-by: Sathya Prakash <[email protected]> Signed-off-by: Chandrakanth patil <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: driver version upgrade to 8.5.0.0.50Sumit Saxena2023-11-251-2/+2
| | | | | | | | Update driver version to 8.5.0.0.50. Signed-off-by: Sumit Saxena <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Increase maximum number of PHYs to 64 from 32Sumit Saxena2023-11-251-1/+1
| | | | | | | | | SAS5116 controllers supports maximum 48 physical PHYs. Modify driver to accommodate up to 64 PHYs (though current need is to support 48 PHYs). Signed-off-by: Sumit Saxena <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Update driver version to 8.5.0.0.0Ranjan Kumar2023-08-081-2/+2
| | | | | | | | Update driver version to 8.5.0.0.0 Signed-off-by: Ranjan Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: WRITE SAME implementationRanjan Kumar2023-08-081-0/+11
| | | | | | | | | | | | | Enhance driver to divert the WRITE SAME commands that are issued with UNMAP=1 and NDOB=1 and with the transfer length greater than the max WRITE SAME length specified by the firmware for the particular drive to the controller firmware. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Ranjan Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Add support for more than 1MB I/ORanjan Kumar2023-08-081-2/+6
| | | | | | | | | | Enhance the driver to get the maximum data length per I/O request from IOC Facts data and report that to the upper layers. If the IOC facts data is not reported then a default I/O size of 1MB is reported to the OS. Signed-off-by: Ranjan Kumar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Fix the type used for pointers to bitmapChristophe JAILLET2023-05-221-4/+4
| | | | | | | | | | | Bitmaps are "unsigned long[]", so better use "unsigned long *" instead of a plain "void *" when dealing with pointers to bitmaps. This is more informative. Signed-off-by: Christophe JAILLET <[email protected]> Link: https://lore.kernel.org/r/8bdf9148ce1a5d01aac11c46c8617b477813457e.1683473011.git.christophe.jaillet@wanadoo.fr Signed-off-by: Martin K. Petersen <[email protected]>
* Merge branch '6.3/scsi-fixes' into 6.4/scsi-stagingMartin K. Petersen2023-04-011-0/+5
|\ | | | | | | | | | | | | Pull in the fixes branch to resolve an mpi3mr conflict reported by sfr. Signed-off-by: Martin K. Petersen <[email protected]>
| * scsi: mpi3mr: Fix expander node leak in mpi3mr_remove()Tomas Henzl2023-03-081-0/+2
| | | | | | | | | | | | | | | | | | | | Add a missing resource clean up in .remove. Fixes: e22bae30667a ("scsi: mpi3mr: Add expander devices to STL") Signed-off-by: Tomas Henzl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: Sathya Prakash Veerichetty <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
| * scsi: mpi3mr: ioctl timeout when disabling/enabling interruptRanjan Kumar2023-03-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of Task Management handling, the driver will disable and enable the MSIx index zero which belongs to the Admin reply queue. During this transition the driver loses some interrupts and this leads to Admin request and ioctl timeouts. After enabling the interrupts, poll the Admin reply queue to avoid timeouts. Signed-off-by: Ranjan Kumar <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* | scsi: mpi3mr: Update driver version to 8.4.1.0.0Ranjan Kumar2023-03-171-2/+2
| | | | | | | | | | | | | | | | | | Update driver version to 8.4.1.0.0. Signed-off-by: Ranjan Kumar <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* | scsi: mpi3mr: Update copyright yearRanjan Kumar2023-03-171-1/+1
| | | | | | | | | | | | | | | | | | Update copyright year from 2022 to 2023. Signed-off-by: Ranjan Kumar <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* | scsi: mpi3mr: Modify MUR timeout value to 120 secondsRanjan Kumar2023-03-171-0/+1
| | | | | | | | | | | | | | | | | | | | Modify Message Unit Reset timeout value to 120 seconds from the previous value of 30 seconds. Signed-off-by: Ranjan Kumar <[email protected]> Signed-off-by: Sreekant Reddy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* | scsi: mpi3mr: Successive VD delete and add causes FW faultRanjan Kumar2023-03-171-1/+7
|/ | | | | | | | | | | | | Upon Virtual disk removal, firmware sends device status change event (Virtual disk remove event) and expects the driver to start device remove handshake (by sending target reset and IOU control command to firmware). However, the driver does not initiate the device remove handshake which leads to the firmware fault. Signed-off-by: Ranjan Kumar <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Remove unneeded version.h includeJesper Juhl2023-02-221-1/+0
| | | | | | | | Remove unneeded version.h include pointed out by 'make versioncheck'. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jesper Juhl <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Use number of bits to manage bitmap sizesShin'ichiro Kawasaki2023-02-221-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To allocate bitmaps, the mpi3mr driver calculates sizes of bitmaps using byte as unit. However, bitmap helper functions assume that bitmaps are allocated using unsigned long as unit. This gap causes memory access beyond the bitmap sizes and results in "BUG: KASAN: slab-out-of-bounds". The BUG was observed at firmware download to eHBA-9600. Call trace indicated that the out-of-bounds access happened in find_first_zero_bit() called from mpi3mr_send_event_ack() for miroc->evtack_cmds_bitmap. To fix the BUG, do not use bytes to manage bitmap sizes. Instead, use number of bits, and call bitmap helper functions which take number of bits as arguments. For memory allocation, call bitmap_zalloc() instead of kzalloc() and krealloc(). For memory free, call bitmap_free() instead of kfree(). For zero clear, call bitmap_clear() instead of memset(). Remove three fields for bitmap byte sizes in struct scmd_priv which are no longer required. Replace the field dev_handle_bitmap_sz with dev_handle_bitmap_bits to keep number of bits of removepend_bitmap across resize. Link: https://lore.kernel.org/r/[email protected] Fixes: c5758fc72b92 ("scsi: mpi3mr: Gracefully handle online FW update operation") Fixes: e844adb1fbdc ("scsi: mpi3mr: Implement SCSI error handler hooks") Fixes: c1af985d27da ("scsi: mpi3mr: Add Event acknowledgment logic") Fixes: 824a156633df ("scsi: mpi3mr: Base driver code") Signed-off-by: Shin'ichiro Kawasaki <[email protected]> Acked-by: Sathya Prakash Veerichetty <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>