aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-08-31scsi: megaraid_sas: Replace one-element array with flexible-array member in ↵Gustavo A. R. Silva1-1/+1
MR_FW_RAID_MAP_DYNAMIC One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element array with flexible-array member in struct MR_FW_RAID_MAP_DYNAMIC. This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy(). Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/109 Link: https://lore.kernel.org/r/896476f8fe43cf83b491c6c13f59c9ace780d82c.1660592640.git.gustavoars@kernel.org Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-31scsi: megaraid_sas: Replace one-element array with flexible-array member in ↵Gustavo A. R. Silva3-4/+4
MR_FW_RAID_MAP One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element array with flexible-array member in struct MR_DRV_RAID_MAP and refactor the the rest of the code accordingly. This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy(). Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/109 Link: https://lore.kernel.org/r/4495ce170c8ef088a10f1abe0e7c227368f43242.1660592640.git.gustavoars@kernel.org Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]> Enhanced-by: Kees Cook <[email protected]> # Change in struct MR_FW_RAID_MAP_ALL
2022-08-31scsi: qla2xxx: Avoid flush_scheduled_work() usageTetsuo Handa1-1/+1
Although qla2xxx driver is calling schedule_{,delayed}_work() from 10 locations, I assume that flush_scheduled_work() from qlt_stop_phase1() needs to flush only works scheduled by qlt_sched_sess_work(), for this loop continues while "struct qla_tgt"->sess_works_list is not empty. Link: https://lore.kernel.org/r/[email protected] Tested-by: Himanshu Madhani <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Tetsuo Handa <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-31scsi: qla2xxx: Always wait for qlt_sess_work_fn() from qlt_stop_phase1()Tetsuo Handa1-2/+2
Currently qlt_stop_phase1() may fail to call flush_scheduled_work(), for list_empty() may return true as soon as qlt_sess_work_fn() called list_del(). In order to close this race window, check list_empty() after calling flush_scheduled_work(). If this patch causes problems, please check commit c4f135d64382 ("workqueue: Wrap flush_workqueue() using a macro"). We are on the way to remove all flush_scheduled_work() calls from the kernel. Link: https://lore.kernel.org/r/[email protected] Tested-by: Himanshu Madhani <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Tetsuo Handa <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-31scsi: qla2xxx: Remove unused qlt_tmr_work()Tetsuo Handa2-67/+0
qlt_tmr_work() is no longer used since commit fb35265b12bb ("scsi: qla2xxx: Remove session creation redundant code"). Link: https://lore.kernel.org/r/[email protected] Tested-by: Himanshu Madhani <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Tetsuo Handa <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-31scsi: qla2xxx: Remove unused del_sess_list fieldTetsuo Handa2-4/+0
"struct qla_tgt"->del_sess_list is no longer used since commit 726b85487067 ("qla2xxx: Add framework for async fabric discovery"). Link: https://lore.kernel.org/r/[email protected] Tested-by: Himanshu Madhani <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Tetsuo Handa <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-31scsi: lpfc: Copyright updates for 14.2.0.6 patchesJames Smart5-5/+5
Update copyrights to 2022 for files modified in the 14.2.0.6 patch set. Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Justin Tee <[email protected]> Signed-off-by: Justin Tee <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-31scsi: lpfc: Update lpfc version to 14.2.0.6James Smart1-1/+1
Update lpfc version to 14.2.0.6. Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Justin Tee <[email protected]> Signed-off-by: Justin Tee <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-31scsi: lpfc: Remove SANDiags related codeJames Smart8-507/+4
The SANDiags feature is unused, and related code is removed. Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Justin Tee <[email protected]> Signed-off-by: Justin Tee <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-31scsi: lpfc: Add warning notification period to CMF_SYNC_WQEJames Smart3-1/+11
Add capability to specify warning notification period to help firmware adjust to congestion accordingly. Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Justin Tee <[email protected]> Signed-off-by: Justin Tee <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-31scsi: lpfc: Rework MIB Rx Monitor debug info logicJames Smart7-125/+240
The kernel test robot reported the following sparse warning: arch/arm64/include/asm/cmpxchg.h:88:1: sparse: sparse: cast truncates bits from constant value (369 becomes 69) On arm64, atomic_xchg only works on 8-bit byte fields. Thus, the macro usage of LPFC_RXMONITOR_TABLE_IN_USE can be unintentionally truncated leading to all logic involving the LPFC_RXMONITOR_TABLE_IN_USE macro to not work properly. Replace the Rx Table atomic_t indexing logic with a new lpfc_rx_info_monitor structure that holds a circular ring buffer. For locking semantics, a spinlock_t is used. Link: https://lore.kernel.org/r/[email protected] Fixes: 17b27ac59224 ("scsi: lpfc: Add rx monitoring statistics") Cc: <[email protected]> # v5.15+ Co-developed-by: Justin Tee <[email protected]> Signed-off-by: Justin Tee <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-31scsi: lpfc: Fix null ndlp ptr dereference in abnormal exit path for GFT_IDJames Smart1-5/+2
An error case exit from lpfc_cmpl_ct_cmd_gft_id() results in a call to lpfc_nlp_put() with a null pointer to a nodelist structure. Changed lpfc_cmpl_ct_cmd_gft_id() to initialize nodelist pointer upon entry. Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Justin Tee <[email protected]> Signed-off-by: Justin Tee <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-31scsi: lpfc: Fix unsolicited FLOGI receive handling during PT2PT discoveryJames Smart1-1/+0
During a stress offline/online test in PT2PT topology, target rediscovery can fail with a specific target vendor array. When the HBA transitions to online mode it is possible to receive an unsolicited FLOGI before processing the Link Up event. The received FLOGI will set the defer_flogi_acc_flag, which instructs the driver to wait until it transmits its own FLOGI before ACKing the received FLOGI. In this failure scenario, the link up processing clears the set defer_flogi_acc_flag before we have sent out the FLOGI. As the target has the higher WWPN and is responsible for sending the PLOGI, the target is stuck waiting for its FLOGI_ACC that the driver will never send. Remove the clear of defer_flogi_acc_flag from Link Up event processing. In this stress test case, the defer_flogi_acc_flag is cleared during the Link Down event processing anyways. Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Justin Tee <[email protected]> Signed-off-by: Justin Tee <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-31scsi: st: Remove redundant variable pointer stpColin Ian King1-2/+1
Variable stp is assigned a value that is never read, the assignment and the variable stp are redundant and can be removed. Cleans up clang scan build warning: drivers/scsi/st.c:4253:7: warning: Although the value stored to 'stp' is used in the enclosing expression, the value is never actually read from 'stp' [deadcode.DeadStores] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-31scsi: megaraid: Remove redundant assignment to variable mfiStatusColin Ian King1-3/+1
The variable mfiStatus is assigned a value but it is never read. The assignment is redundant and can be removed. Also remove { } as the return statement does not need to be in its own code block. Cleans up clang scan build warning: drivers/scsi/megaraid/megaraid_sas_base.c:4026:7: warning: Although the value stored to 'mfiStatus' is used in the enclosing expression, the value is never actually read from 'mfiStatus' [deadcode.DeadStores] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-31scsi: initio: Remove redundant assignment to pointer scbColin Ian King1-1/+1
The variable scb is assigned a value but it is never read. The assignment is redundant and can be removed. Also replace the != NULL check with the more usual non-null check idiom. Cleans up clang scan build warning: drivers/scsi/initio.c:1169:9: warning: Although the value stored to 'scb' is used in the enclosing expression, the value is never actually read from 'scb' [deadcode.DeadStores] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-31scsi: message: fusion: Remove redundant variable iocnumColin Ian King1-4/+2
Variable iocnum is assigned a value that is never read, the assignment and hence the variable are redundant can be removed. Also update the comment to reflect the correct name of the variable being updated. Cleans up clang-scan warning: drivers/message/fusion/mptctl.c:641:8: warning: Although the value stored to 'iocnum' is used in the enclosing expression, the value is never actually read from 'iocnum' [deadcode.DeadStores] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-31scsi: mpt3sas: Disable MPI2_FUNCTION_FW_DOWNLOAD for ATTO devicesBradley Grove1-0/+8
Disable firmware download for ATTO devices where it is not supported. Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Rob Crispo <[email protected]> Signed-off-by: Rob Crispo <[email protected]> Signed-off-by: Bradley Grove <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-31scsi: mpt3sas: Add support for ATTO ExpressSAS H12xx GT devicesBradley Grove5-6/+333
Add ATTO's PCI IDs and modify the driver to handle the unique NVRAM structure used by ATTO's devices. Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Rob Crispo <[email protected]> Signed-off-by: Rob Crispo <[email protected]> Signed-off-by: Bradley Grove <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-31scsi: mpi3mr: Block I/Os while refreshing target dev objectsSreekanth Reddy1-10/+15
Block the I/Os on the target devices until corresponding target device's target dev objects are refreshed as part of post controller reset operation. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-31scsi: mpi3mr: Refresh SAS ports during soft resetSreekanth Reddy4-1/+421
Update the host's SAS ports if there is change in port id or phys. If the port id is changed, then the driver updates it. If some phys are enabled/disabled during reset, then driver updates them in STL. Check for the responding expander devices and update the device handle if it got changed. Register the expander with STL if it got added during reset and unregister the expander device if it got removed during reset. [mkp: include fix for zeroday warning] Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: mpi3mr: Support SAS transport class callbacksSreekanth Reddy4-2/+914
Add support for the following SAS transport class callbacks: - get_linkerrors - get_enclosure_identifier - get_bay_identifier - phy_reset - phy_enable - set_phy_speed - smp_handler Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: mpi3mr: Add framework to issue MPT transport cmdsSreekanth Reddy4-1/+249
Add framework to issue MPT transport commands to controllers. Also issue the MPT transport commands to get the manufacturing info of SAS expander device. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: mpi3mr: Add SAS SATA end devices to STLSreekanth Reddy3-17/+235
Register/unregister the SAS, SATA devices to SCSI Transport Layer(STL) whenever the corresponding device is added/removed from topology. Link: https://lore.kernel.org/r/[email protected] Reported-by: kernel test robot <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: mpi3mr: Get target object based on rphySreekanth Reddy4-10/+86
When device is registered with the STL then get the corresponding device's target object using the rphy in below callback functions: - mpi3mr_target_alloc() - mpi3mr_slave_alloc() - mpi3mr_slave_configure() - mpi3mr_slave_destroy() Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: mpi3mr: Add expander devices to STLSreekanth Reddy3-9/+432
Register/unregister the expander devices to SCSI Transport Layer(STL) whenever the corresponding expander is added/removed from topology. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: mpi3mr: Enable STL on HBAs where multipath is disabledSreekanth Reddy3-4/+46
Register the SAS, SATA devices to SCSI Transport Layer (STL) only if multipath capability is disabled in the controller's firmware. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: mpi3mr: Add helper functions to manage device's portSreekanth Reddy3-1/+539
Add the following helper functions: - Update the host phys with STL - Remove the device's SAS port with STL Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: mpi3mr: Add helper functions to retrieve device objectsSreekanth Reddy3-0/+295
Add the following helper functions: - Get the device's sas address by reading corresponding device's Device page0 - Get the expander object from expander list based on expander's handle - Get the target device object from target device list based on device's sas address - Get the expander device object from expander list based on expanders's sas address - Get hba port object from hba port table list based on port's port id Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: mpi3mr: Add framework to add phys to STLSreekanth Reddy3-0/+524
Add framework to register and unregister the host and expander phys with SCSI Transport Layer (STL). Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: mpi3mr: Enable Enclosure device add eventSreekanth Reddy3-2/+154
Enable and process the Enclosure device add event. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: mpi3mr: Add helper functions to retrieve config pagesSreekanth Reddy2-0/+621
Add helper functions to retrieve below controller's config pages: - SAS IOUnit Page0 - SAS IOUnit Page1 - Driver Page1 - Device Page0 - SAS Phy Page0 - SAS Phy Page1 - SAS Expander Page0 - SAS Expander Page1 - Enclosure Page0 Also add the helper function to set SAS IOUnit Page1. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: mpi3mr: Add framework to issue config requestsSreekanth Reddy3-0/+282
Add framework to issue config requests commands to controller firmware. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: mpi3mr: Add config and transport related debug flagsSreekanth Reddy1-0/+27
Add config and transport request related error & info debug flags and functions. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: ufs: wb: Modify messagesJinyoung Choi2-13/+12
Modify messages to fit the format of others. Link: https://lore.kernel.org/r/20220804075519epcms2p148b6ae956b172925b26304b50d6a0da9@epcms2p1 Reviewed-by: Avri Altman <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Jinyoung Choi <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: ufs: wb: Introduce ufshcd_is_wb_buf_flush_allowed()Jinyoung Choi3-4/+10
The explicit flushing should check the following: - UFSHCD_CAP_WB_EN - UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL Add helper to improve readability. Link: https://lore.kernel.org/r/20220804075444epcms2p4a0520880262281f02be65ce0fe50602d@epcms2p4 Reviewed-by: Avri Altman <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Reviewed-by: Stanley Chu <[email protected]> Acked-by: Bean Huo <[email protected]> Signed-off-by: Jinyoung Choi <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: ufs: wb: Add explicit flush sysfs attributeJinyoung Choi4-4/+61
There is the following quirk to bypass "WB Flush" in Write Booster. - UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL If this quirk is not set, there is no knob that can control "WB Flush". There are three flags that control Write Booster Feature: 1. WB ON/OFF 2. WB Hibern Flush ON/OFF (implicitly) 3. WB Flush ON/OFF (explicit) The sysfs attribute that controls the WB was implemented. (1) In the case of "Hibern Flush", it is always good to turn on. Control may not be required. (2) Finally, "Flush" may be necessary because the Auto-Hibern8 is not supported in a specific environment. So the sysfs attribute that controls this is necessary. (3) Link: https://lore.kernel.org/r/20220804075354epcms2p8c21c894b4e28840c5fc651875b7f435f@epcms2p8 Reviewed-by: Avri Altman <[email protected]> Signed-off-by: Jinyoung Choi <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: ufs: wb: Change function name and parameter namesJinyoung Choi1-13/+17
Change the parameter names of ufshcd_wb_toggle_flush_during_h8() to match the other toggle functions. Link: https://lore.kernel.org/r/20220804075058epcms2p550c578d743fe0a94888b3d71cc9076d4@epcms2p5 Reviewed-by: Avri Altman <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Jinyoung Choi <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: ufs: wb: Change wb_enabled condition testJinyoung Choi1-4/+2
Change to improve readability. Link: https://lore.kernel.org/r/20220804074928epcms2p86582693a39597501b491400a28543a92@epcms2p8 Reviewed-by: Avri Altman <[email protected]> Reviewed-by: Bean Huo <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Reviewed-by: Stanley Chu <[email protected]> Signed-off-by: Jinyoung Choi <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: ufs: core: Allow host driver to disable wb toggling during clock scalingPeter Wang4-5/+19
Mediatek UFS does not want to toggle write booster during clock scaling. Permit host driver to disable wb toggling during clock scaling. Introduce a flag UFSHCD_CAP_WB_WITH_CLK_SCALING to decouple WB and clock scaling. UFSHCD_CAP_WB_WITH_CLK_SCALING is only valid when UFSHCD_CAP_CLK_SCALING is set. Just like UFSHCD_CAP_HIBERN8_WITH_CLK_GATING is valid only when UFSHCD_CAP_CLK_GATING set. Set UFSHCD_CAP_WB_WITH_CLK_SCALING for qcom to compatible legacy design at the same time. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Stanley Chu <[email protected]> Signed-off-by: Peter Wang <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: ufs: core: Use local_clock() for debugging timestampsDaniil Lunev2-13/+21
CLOCK_MONOTONIC is not advanced when the system is in suspend. This becomes problematic when debugging issues related to suspend-resume: the timestamps printed by ufshcd_print_trs can not be correlated with dmesg entries, which are timestamped with local_clock(). Change the used clock to local_clock() for the informational timestamp variables and adds mirroring *_local_clock instances for variables used in subsequent derevations (to not change the semantics of those derevations). Link: https://lore.kernel.org/r/20220804065019.v5.1.I699244ea7efbd326a34a6dfd9b5a31e78400cf68@changeid Acked-by: Stanley Chu <[email protected]> Acked-by: Avri Altman <[email protected]> Signed-off-by: Daniil Lunev <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: ufs: ufs-mediatek: Support clk-scaling to optimize power consumptionPo-Wen Kao3-2/+153
Provide clk-scaling feature in MediaTek UFS platforms. MediaTek platform supports clk-scaling by switching parent clock mux of UFSHCI main clocks: ufs_sel. The driver needs to prevent changing the rate of ufs_sel because its parent PLL clock may be shared between multiple IPs. In order to achieve this goal, the maximum and minimum clock rates of ufs_sel defined in dts should match the rate of "ufs_sel_max_src" and "ufs_sel_min_src" respectively. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Stanley Chu <[email protected]> Signed-off-by: Po-Wen Kao <[email protected]> Signed-off-by: Stanley Chu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: ufs: ufs-mediatek: Fix performance scalingPeter Wang1-4/+14
If clk-scaling is enabled, performance scaling can be bound to the decision of clk-scaling to avoid unnecessary boosting. In addition, fix missing initialization of pm-qos request. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Stanley Chu <[email protected]> Signed-off-by: Peter Wang <[email protected]> Signed-off-by: Stanley Chu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: ufs: ufs-mediatek: Dump more registersPeter Wang1-2/+5
Dump more proprietary UFSHCI status registers for easier issue breakdown. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Stanley Chu <[email protected]> Signed-off-by: Peter Wang <[email protected]> Signed-off-by: Stanley Chu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: ufs: ufs-mediatek: Provide detailed description for UIC errorsStanley Chu1-0/+58
Provide detailed description in logs for UIC errors for easier issue breakdown. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stanley Chu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-22scsi: ufs: ufs-mediatek: Remove redundant header filesStanley Chu1-1/+0
Remove redundant #include of header file <linux/sched/clock.h>. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Stanley Chu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2022-08-14Linux 6.0-rc1Linus Torvalds1-4/+4
2022-08-14radix-tree: replace gfp.h inclusion with gfp_types.hYury Norov1-1/+1
Radix tree header includes gfp.h for __GFP_BITS_SHIFT only. Now we have gfp_types.h for this. Fixes powerpc allmodconfig build: In file included from include/linux/nodemask.h:97, from include/linux/mmzone.h:17, from include/linux/gfp.h:7, from include/linux/radix-tree.h:12, from include/linux/idr.h:15, from include/linux/kernfs.h:12, from include/linux/sysfs.h:16, from include/linux/kobject.h:20, from include/linux/pci.h:35, from arch/powerpc/kernel/prom_init.c:24: include/linux/random.h: In function 'add_latent_entropy': >> include/linux/random.h:25:46: error: 'latent_entropy' undeclared (first use in this function); did you mean 'add_latent_entropy'? 25 | add_device_randomness((const void *)&latent_entropy, sizeof(latent_entropy)); | ^~~~~~~~~~~~~~ | add_latent_entropy include/linux/random.h:25:46: note: each undeclared identifier is reported only once for each function it appears in Reported-by: kernel test robot <[email protected]> CC: Andy Shevchenko <[email protected]> CC: Andrew Morton <[email protected]> CC: Jason A. Donenfeld <[email protected]> Signed-off-by: Yury Norov <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2022-08-14Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfsLinus Torvalds1-0/+3
Pull vfs lseek fix from Al Viro: "Fix proc_reg_llseek() breakage. Always had been possible if somebody left NULL ->proc_lseek, became a practical issue now" * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: take care to handle NULL ->proc_lseek()
2022-08-14take care to handle NULL ->proc_lseek()Al Viro1-0/+3
Easily done now, just by clearing FMODE_LSEEK in ->f_mode during proc_reg_open() for such entries. Fixes: 868941b14441 "fs: remove no_llseek" Signed-off-by: Al Viro <[email protected]>