commit e9ff858c9adff26f5d2f77d3575e39fb1470027c Author: Alok Tiwari Date: Tue Oct 21 02:03:52 2025 -0700 scsi: qla4xxx: Use correct variable in memset for clarity Both mbox_cmd and mbox_sts have the same size, so using sizeof(mbox_cmd) when clearing mbox_sts did not cause any functional issue. However, it is misleading and reduces code readability. Update the memset() calls to use sizeof(mbox_sts) to make the intent clear Signed-off-by: Alok Tiwari Link: https://patch.msgid.link/20251021090354.1804327-1-alok.a.tiwari@oracle.com Signed-off-by: Martin K. Petersen commit e414748b7e83673cc777ce33e44d90e5157d687f Author: Bart Van Assche Date: Tue Oct 21 13:17:43 2025 -0700 scsi: aacraid: Improve code readability aac_queuecommand() is a scsi_host_template.queuecommand() implementation. Any value returned by this function other than one of the following values is translated into SCSI_MLQUEUE_HOST_BUSY: * 0 * SCSI_MLQUEUE_HOST_BUSY * SCSI_MLQUEUE_DEVICE_BUSY * SCSI_MLQUEUE_EH_RETRY * SCSI_MLQUEUE_TARGET_BUSY Improve readability of aac_queuecommand() by returning SCSI_MLQUEUE_HOST_BUSY instead of FAILED. Cc: Gilbert Wu Cc: Sagar Biradar Cc: John Garry Signed-off-by: Bart Van Assche Reviewed-by: John Garry Link: https://patch.msgid.link/20251021201743.3539900-1-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit bb798c1f43c0010d792b93dc9cbb9cef7a052f61 Author: John Garry Date: Thu Oct 23 08:54:51 2025 +0000 scsi: advansys: Don't call asc_prt_scsi_host() -> scsi_host_busy() The driver calls asc_prt_scsi_host() -> scsi_host_busy() prior to calling scsi_add_host(). This should not be done, and has raised issues for other drivers, like [0]. Function asc_prt_scsi_host() only has a single callsite, as above, where the shost busy count would always be 0. Avoid printing the shost busy count to avoid this problem. [0] https://lore.kernel.org/linux-scsi/20251014200118.3390839-3-bvanassche@acm.org/ Reported-by: Bart Van Assche Signed-off-by: John Garry Reviewed-by: Bart Van Assche Link: https://patch.msgid.link/20251023085451.3933666-1-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit dcc98c11364e19df1b4b49d75a04149f99c1b348 Author: John Garry Date: Thu Oct 23 08:27:59 2025 +0000 scsi: core: Minor comment fixes for scsi_host_busy() I guess that the @shost comment on scsi_host_busy() was copied from scsi_host_get() (as it is the same), however they do not do the same thing. Also drop reference to busy counter, which has been removed. Signed-off-by: John Garry Reviewed-by: Bart Van Assche Link: https://patch.msgid.link/20251023082759.3927000-1-john.g.garry@oracle.com Signed-off-by: Martin K. Petersen commit bfe5f5dacfbab96a6424c3bb376557bf0d8e4a20 Author: Bart Van Assche Date: Tue Oct 14 13:01:00 2025 -0700 scsi: ufs: core: Simplify ufshcd_mcq_sq_cleanup() using guard() Simplify ufshcd_mcq_sq_cleanup() by using guard(mutex)() instead of explicit mutex_lock() and mutex_unlock() calls. No functionality has been changed. Signed-off-by: Bart Van Assche Reviewed-by: Peter Wang Link: https://patch.msgid.link/20251014200118.3390839-9-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 047f190494a010d402b13f31bf37b2b16bf5720a Author: Bart Van Assche Date: Tue Oct 14 13:00:59 2025 -0700 scsi: ufs: core: Remove a goto label from ufshcd_uic_cmd_compl() Return directly instead of jumping to a return statement. No functionality has been changed. Signed-off-by: Bart Van Assche Reviewed-by: Peter Wang Link: https://patch.msgid.link/20251014200118.3390839-8-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit b30006b5bec1dcba207bc42e7f7cd96a568acc27 Author: Bart Van Assche Date: Tue Oct 14 13:00:58 2025 -0700 scsi: ufs: core: Move the ufshcd_enable_intr() declaration ufshcd_enable_intr() is not exported and hence should not be declared in include/ufs/ufshcd.h. Fixes: 253757797973 ("scsi: ufs: core: Change MCQ interrupt enable flow") Signed-off-by: Bart Van Assche Reviewed-by: Peter Wang Link: https://patch.msgid.link/20251014200118.3390839-7-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit a332735a53d6877f0d4fe28bc9263864da3dd470 Author: Bart Van Assche Date: Tue Oct 14 13:00:57 2025 -0700 scsi: ufs: core: Remove UFS_DEV_COMP Remove the UFS_DEV_COMP constant because it is not used. Signed-off-by: Bart Van Assche Reviewed-by: Peter Wang Link: https://patch.msgid.link/20251014200118.3390839-6-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit b3b0842bcb0696e25b1977238ce2907a4c02d8c4 Author: Bart Van Assche Date: Tue Oct 14 13:00:56 2025 -0700 scsi: ufs: core: Change the type of uic_command::cmd_active Since uic_command::cmd_active is used as a boolean variable, change its type from 'int' into 'bool'. No functionality has been changed. Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/20251014200118.3390839-5-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 7b2c4224faa7bc6cdaf1fb6106ec7b46c63a28cb Author: Bart Van Assche Date: Tue Oct 14 13:00:55 2025 -0700 scsi: ufs: core: Improve documentation in include/ufs/ufshci.h Make it easier to find the sections in the UFSHCI standard where these constants come from. Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/20251014200118.3390839-4-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit ea0e278a5c5500be1fdfc1be68c63de4c31513fc Author: Magnus Lindholm Date: Thu Oct 2 07:25:24 2025 +0200 scsi: qla1280: Fix compiler warnings (DEBUG mode) Building the qla1280 driver with DEBUG_QLA1280 set will emit compiler warnings. Fix some print formatting strings to reflect the correct type of printed variables as well as remove unused code. (static function ql1280_dump_device) in order to avoid compiler warnings. [mkp: fixed a few more checkpatch warnings] Signed-off-by: Magnus Lindholm Link: https://patch.msgid.link/20251002052604.24590-1-linmag7@gmail.com Signed-off-by: Martin K. Petersen commit 9ce37e94c30090d26df26b1bbb2fa9c51ede7651 Author: Naomi Chu Date: Wed Sep 24 17:43:30 2025 +0800 scsi: ufs: host: mediatek: Support new features for MT6991 Add support for the MT6991 platform by enabling MRTT settings and random performance improvements. These enhancements aim to optimize performance and efficiency on the MT6991 hardware. Enable multi-Round Trip Time (MRTT) for improved data handling. Enable random performance improvement features to boost overall system responsiveness. Signed-off-by: Naomi Chu Reviewed-by: Peter Wang Acked-by: Chun-Hung Wu Signed-off-by: Peter Wang Link: https://patch.msgid.link/20250924094527.2992256-9-peter.wang@mediatek.com Signed-off-by: Martin K. Petersen commit 4fb4c835a92b6dfa3a461102ba0943b416ae7e55 Author: Peter Wang Date: Wed Sep 24 17:43:29 2025 +0800 scsi: ufs: host: mediatek: Add support for new platform with MMIO_OTSD_CTR Introduce support for a new UFS Mediatek platform by adding the REG_UFS_UFS_MMIO_OTSD_CTRL register. This update includes checks for legacy platforms and uses the new register to replace debug selection and handle specific operations. The changes ensure compatibility across different hardware versions and prevent potential issues with debug usage on newer platforms. Additional updates include error logging improvements during link setup for newer and legacy platforms, ensuring proper event logging and debugging. Signed-off-by: Peter Wang Acked-by: Chun-Hung Wu Link: https://patch.msgid.link/20250924094527.2992256-8-peter.wang@mediatek.com Signed-off-by: Martin K. Petersen commit 9b2b03b36168bcda298546b121d6ecc530d01d25 Author: Peter Wang Date: Wed Sep 24 17:43:28 2025 +0800 scsi: ufs: host: mediatek: Remove duplicate function Remove the duplicate ufs_mtk_us_to_ahit() function in the UFS Mediatek driver and export the existing ufshcd_us_to_ahit() function for shared use. This change reduces redundancy and maintains consistency across the codebase. Signed-off-by: Peter Wang Reviewed-by: Bart Van Assche Acked-by: Chun-Hung Wu Link: https://patch.msgid.link/20250924094527.2992256-7-peter.wang@mediatek.com Signed-off-by: Martin K. Petersen commit 014de20bb36ba03e0e0b0a7e0a1406ab900c9fda Author: Peter Wang Date: Wed Sep 24 17:43:27 2025 +0800 scsi: ufs: host: mediatek: Fix shutdown/suspend race condition Address a race condition between shutdown and suspend operations in the UFS Mediatek driver. Before entering suspend, check if a shutdown is in progress to prevent conflicts and ensure system stability. Signed-off-by: Peter Wang Acked-by: Chun-Hung Wu Link: https://patch.msgid.link/20250924094527.2992256-6-peter.wang@mediatek.com Signed-off-by: Martin K. Petersen commit 1fd05367d5b1a5edd3d14c966a5f510e5b8a0c5e Author: Peter Wang Date: Wed Sep 24 17:43:26 2025 +0800 scsi: ufs: host: mediatek: Adjust sync length for FASTAUTO mode Set the sync length for FASTAUTO G1 mode in the UFS Mediatek driver. This ensures the sync length meets minimum values for high-speed gears, improving stability during power mode changes. Signed-off-by: Peter Wang Reviewed-by: Bart Van Assche Acked-by: Chun-Hung Wu Link: https://patch.msgid.link/20250924094527.2992256-5-peter.wang@mediatek.com Signed-off-by: Martin K. Petersen commit 16b42c4281ae536a6ceda97303d9820ac5741293 Author: Peter Wang Date: Wed Sep 24 17:43:25 2025 +0800 scsi: ufs: host: mediatek: Handle clock scaling for high gear in PM flow Add clock scaling down for power management flow in the UFS Mediatek driver. If clock scaling is disabled and fixed in high gear, ensure the clock scales down during suspend and scales up again after resume to support high gear. This adjustment maintains proper power management. Signed-off-by: Peter Wang Acked-by: Chun-Hung Wu Link: https://patch.msgid.link/20250924094527.2992256-4-peter.wang@mediatek.com Signed-off-by: Martin K. Petersen commit 55ce691dc75a356e4b7c552505ce0a427c72f3af Author: Peter Wang Date: Wed Sep 24 17:43:24 2025 +0800 scsi: ufs: host: mediatek: Adjust clock scaling for PM flow Adjust clock scaling during suspend and resume in the UFS Mediatek driver. Ensure that the clock scales down during suspend if it was scaled up, and scales up again after resume. This adjustment maintains proper power management. Signed-off-by: Peter Wang Acked-by: Chun-Hung Wu Link: https://patch.msgid.link/20250924094527.2992256-3-peter.wang@mediatek.com Signed-off-by: Martin K. Petersen commit 7162536410768ec6b219524c36d3a871ff97adf8 Author: Peter Wang Date: Wed Sep 24 17:43:23 2025 +0800 scsi: ufs: host: mediatek: Correct clock scaling with PM QoS flow Correct clock scaling with PM QoS during suspend and resume. Ensure PM QoS is released during suspend if scaling up and re-applied after resume. This prevents performance issues and maintains proper power management. Signed-off-by: Peter Wang Reviewed-by: Bart Van Assche Acked-by: Chun-Hung Wu Link: https://patch.msgid.link/20250924094527.2992256-2-peter.wang@mediatek.com Signed-off-by: Martin K. Petersen commit 4760b639b43c107c8bfccd658478bbb3152fa56f Author: Bao D. Nguyen Date: Mon Oct 13 12:38:16 2025 -0700 scsi: ufs: core: Replace hard coded vcc-off delay with a variable After the UFS device VCC is powered off, all the UFS device manufacturers require a minimum of 1ms of power-off time before VCC can be powered on again. This requirement has been verified with all the UFS device manufacturer's datasheets. Replace the hard coded 5ms delay with a variable with a default setting of 2ms to improve the system resume latency. The platform drivers can override this setting as needed. Signed-off-by: Bao D. Nguyen Reviewed-by: Bart Van Assche Reviewed-by: Peter Wang Link: https://patch.msgid.link/72fa649406a0bf02271575b7d58f22c968aa5d7e.1760383740.git.quic_nguyenb@quicinc.com Signed-off-by: Martin K. Petersen commit f8e82ae65eaf347fb8924a1d9c544da7bcb9f798 Author: Bao D. Nguyen Date: Mon Oct 13 12:38:15 2025 -0700 scsi: ufs: core: Remove UFS_DEVICE_QUIRK_DELAY_AFTER_LPM quirk After the UFS device VCC is turned off, all the UFS device manufacturers require a period of power-off time before the VCC can be turned on again. This requirement has been confirmed with all the UFS device manufacturer's datasheets. Remove the UFS_DEVICE_QUIRK_DELAY_AFTER_LPM quirk in the UFS core driver and implement a universal delay that is required by all the UFS device manufacturers. In addition, remove the support for this quirk in the platform drivers. Signed-off-by: Bao D. Nguyen Reviewed-by: Peter Wang Reviewed-by: Bart Van Assche Link: https://patch.msgid.link/25f134d5a42e8b8365be64d512d1bb5fc2bce6ff.1760383740.git.quic_nguyenb@quicinc.com Signed-off-by: Martin K. Petersen commit 8627f322cb7b6f1f9f7a78bd9c79b82534fbc9c9 Author: Peter Wang Date: Thu Oct 16 10:32:32 2025 +0800 scsi: ufs: core: Support dumping CQ entry in MCQ Mode Enhance the ufshcd_print_tr() function to support dumping completion queue (CQ) entries in MCQ mode when an error occurs. This addition provides more detailed debugging information by including the CQ entry data in the error logs, aiding in the diagnosis of issues in MCQ mode. Signed-off-by: Peter Wang Reviewed-by: Bart Van Assche Link: https://patch.msgid.link/20251016023507.1000664-3-peter.wang@mediatek.com Signed-off-by: Martin K. Petersen commit bfe0d22f12559f44bf27ae88b9c4a9f8fdae65d0 Author: Peter Wang Date: Thu Oct 16 10:32:31 2025 +0800 scsi: ufs: core: Update CQ Entry to UFS 4.1 format Update the completion queue (CQ) entry format according to the UFS 4.1 specification. UFS 4.1 introduces new members in reserved record DW5. Also refine DW4 with detailed members defined in UFS 4.0. Modify the code to incorporate these changes by updating the overall_status in the CQ entry structure. Signed-off-by: Peter Wang Reviewed-by: Bart Van Assche Link: https://patch.msgid.link/20251016023507.1000664-2-peter.wang@mediatek.com Signed-off-by: Martin K. Petersen commit ce085ecdba23a5d5462877d884ecff3ffceaad22 Author: Bart Van Assche Date: Tue Oct 14 15:04:25 2025 -0700 scsi: core: Do not declare scsi_cmnd pointers const This change allows removing multiple casts and hence improves type checking by the compiler. Cc: Hannes Reinecke Suggested-by: John Garry Signed-off-by: Bart Van Assche Reviewed-by: John Garry Link: https://patch.msgid.link/20251014220426.3690007-1-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 3d0d1c7a5c9981ca35e2976337c0b6c9e644d269 Author: Qiang Liu Date: Fri Oct 17 15:55:03 2025 +0800 scsi: fnic: Self-assignment of intr_time_type has no effect Remove the self-assignment statement of the intr_time_type variable. Signed-off-by: Qiang Liu Reviewed-by: Karan Tilak Kumar Link: https://patch.msgid.link/20251017075504.143491-1-liuqiangneo@163.com Signed-off-by: Martin K. Petersen commit 79a2287c1df4896d4f930a24c0dc77571959d3b3 Author: André Draszik Date: Tue Oct 7 16:56:28 2025 +0100 scsi: ufs: dt-bindings: exynos: Add power-domains The UFS controller can be part of a power domain, so we need to allow the relevant property 'power-domains'. Signed-off-by: André Draszik Reviewed-by: Peter Griffin Reviewed-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Link: https://patch.msgid.link/20251007-power-domains-scsi-ufs-dt-bindings-exynos-v1-1-1acfa81a887a@linaro.org Signed-off-by: Martin K. Petersen commit 05e66c18e3fd27b4b017ff02e4a7a908274ff755 Author: Bhanu Seshu Kumar Valluri Date: Tue Oct 7 12:23:45 2025 +0530 scsi: smartpqi: Prefer kmalloc_array() over kmalloc() As a best practice use kmalloc_array() to safely calculate dynamic object sizes without overflow. [mkp: line exceeding 100 chars, added newline] Acked-by: Don Brace Signed-off-by: Bhanu Seshu Kumar Valluri Link: https://patch.msgid.link/20251007065345.8853-1-bhanuseshukumar@gmail.com Signed-off-by: Martin K. Petersen commit 81cb6c228ff877ca0046a432ea831788590633ff Author: Gustavo A. R. Silva Date: Fri Sep 19 13:56:29 2025 +0200 scsi: megaraid_sas: Avoid a couple -Wflex-array-member-not-at-end warnings -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Use the new TRAILING_OVERLAP() helper to fix the following warnings: drivers/scsi/megaraid/megaraid_sas_fusion.h:1153:31: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] drivers/scsi/megaraid/megaraid_sas_fusion.h:1198:32: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] This helper creates a union between a flexible-array member (FAM) and a set of MEMBERS that would otherwise follow it --in this case 'struct MR_LD_SPAN_MAP ldSpanMap[MAX_LOGICAL_DRIVES_DYN]' and 'struct MR_LD_SPAN_MAP ldSpanMap[MAX_LOGICAL_DRIVES]' in the corresponding structures. This overlays the trailing members onto the FAM (struct MR_LD_SPAN_MAP ldSpanMap[];) while keeping the FAM and the start of MEMBERS aligned. The static_assert() ensures this alignment remains, and it's intentionally placed inmediately after the corresponding structures --no blank line in between. Signed-off-by: Gustavo A. R. Silva Link: https://patch.msgid.link/aM1E7Xa8qYdZ598N@kspp Signed-off-by: Martin K. Petersen commit 11956e4b912167459ffc51d66f56341a97a94323 Author: Gustavo A. R. Silva Date: Fri Sep 19 13:24:30 2025 +0200 scsi: isci: Avoid -Wflex-array-member-not-at-end warning -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Move the conflicting declaration (which happens to be in a union, so we're moving the entire union) to the end of the corresponding structure. Notice that `struct ssp_response_iu` is a flexible structure, this is a structure that contains a flexible-array member. With these changes fix the following warning: drivers/scsi/isci/task.h:92:11: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end] Signed-off-by: Gustavo A. R. Silva Link: https://patch.msgid.link/aM09bpl1xj9KZSZl@kspp Signed-off-by: Martin K. Petersen