f99533bd | 27-Jul-2023 |
Bart Van Assche <bvanassche@acm.org> |
scsi: ufs: Simplify zero-initialization
Use { } instead of { { 0 }, } to zero-initialize data structures on the stack. This patch fixes two W=2 warnings.
Signed-off-by: Bart Van Assche <bvanassche@
scsi: ufs: Simplify zero-initialization
Use { } instead of { { 0 }, } to zero-initialize data structures on the stack. This patch fixes two W=2 warnings.
Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20230727194457.3152309-7-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
f0819152 | 27-Jul-2023 |
Bart Van Assche <bvanassche@acm.org> |
scsi: ufs: Rename a function argument
This patch suppresses the following W=2 warning:
drivers/ufs/core/ufs-hwmon.c:130:49: warning: declaration of ‘_data’ shadows a global declaration [-Wshadow]
scsi: ufs: Rename a function argument
This patch suppresses the following W=2 warning:
drivers/ufs/core/ufs-hwmon.c:130:49: warning: declaration of ‘_data’ shadows a global declaration [-Wshadow]
Reviewed-by: Avri Altman <avri.altman@wdc.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20230727194457.3152309-5-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
8d8af294 | 27-Jul-2023 |
Bart Van Assche <bvanassche@acm.org> |
scsi: ufs: Fix kernel-doc headers
Fix the remaining kernel-doc warnings that are reported when building with W=2.
Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r
scsi: ufs: Fix kernel-doc headers
Fix the remaining kernel-doc warnings that are reported when building with W=2.
Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20230727194457.3152309-4-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
fd4bffb5 | 27-Jul-2023 |
Bart Van Assche <bvanassche@acm.org> |
scsi: ufs: Document all return values
This patch fixes multiple W=2 kernel-doc warnings.
Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20230727194457.3152309-3
scsi: ufs: Document all return values
This patch fixes multiple W=2 kernel-doc warnings.
Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20230727194457.3152309-3-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
03ce80a1 | 31-Jul-2023 |
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> |
scsi: ufs: qcom: Add support for scaling interconnects
Qcom SoCs require scaling the interconnect paths for proper working of the peripherals connected through interconnects. Even for accessing the
scsi: ufs: qcom: Add support for scaling interconnects
Qcom SoCs require scaling the interconnect paths for proper working of the peripherals connected through interconnects. Even for accessing the UFS controller, someone should setup the interconnect paths. So far, the bootloaders used to setup the interconnect paths before booting Linux as they need to access the UFS storage for things like fetching boot firmware. But with the advent of multi boot options, bootloader nowadays like in SA8540p SoC do not setup the interconnect paths at all.
So trying to configure UFS in the absence of the interconnect path configuration results in a boot crash.
To fix this issue, and also to dynamically scale the interconnects (UFS-DDR and CPU-UFS), interconnect API support is added to the Qcom UFS driver. With this support, the interconnect paths are scaled dynamically based on the gear configuration.
During the early stage of ufs_qcom_init(), ufs_qcom_icc_init() will setup the paths to max bandwidth to allow configuring the UFS registers. Touching the registers without configuring the icc paths would result in a crash. However, we don't really need to set max vote for the icc paths as any minimal vote would suffice. But the max value would allow initialization to be done faster. After init, the bandwidth will get updated using ufs_qcom_icc_update_bw() based on the gear and lane configuration.
The bandwidth values defined in ufs_qcom_bw_table struct are taken from Qcom downstream vendor devicetree source and are calculated as per the UFS3.1 Spec, Section 6.4.1, HS Gear Rates. So it is fixed across platforms.
Cc: Brian Masney <bmasney@redhat.com> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20230731145020.41262-3-manivannan.sadhasivam@linaro.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
2903265e | 24-Jul-2023 |
Bart Van Assche <bvanassche@acm.org> |
scsi: ufs: Fix residual handling
Only call scsi_set_resid() in case of an underflow. Do not call scsi_set_resid() in case of an overflow.
Cc: Avri Altman <avri.altman@wdc.com> Cc: Adrian Hunter <ad
scsi: ufs: Fix residual handling
Only call scsi_set_resid() in case of an underflow. Do not call scsi_set_resid() in case of an overflow.
Cc: Avri Altman <avri.altman@wdc.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Fixes: cb38845d90fc ("scsi: ufs: core: Set the residual byte count") Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20230724200843.3376570-2-bvanassche@acm.org Reviewed-by: Avri Altman <avri.altman@wdc.com> Reviewed-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
65aca38b | 24-Jul-2023 |
Arnd Bergmann <arnd@arndb.de> |
scsi: ufs: qcom: Remove unused variable
A recent change removed the only user of a local variable that needs to now also be removed:
drivers/ufs/host/ufs-qcom.c: In function 'ufs_qcom_mcq_esi_handl
scsi: ufs: qcom: Remove unused variable
A recent change removed the only user of a local variable that needs to now also be removed:
drivers/ufs/host/ufs-qcom.c: In function 'ufs_qcom_mcq_esi_handler': drivers/ufs/host/ufs-qcom.c:1652:31: error: unused variable 'host' [-Werror=unused-variable]
Fixes: 8f2b78652d05 ("scsi: ufs: qcom: Get queue ID from MSI index in ESI handler") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/llvm/64c00cd4.630a0220.6ad79.0eac@mx.google.com/ Link: https://lore.kernel.org/r/20230724122029.1430482-1-arnd@kernel.org Reviewed-by: Abel Vesa <abel.vesa@linaro.org> Reviewed-by: Manivannan Sadhasivam <mani@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
c2ab6660 | 14-Jul-2023 |
Rob Herring <robh@kernel.org> |
scsi: ufs: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of t
scsi: ufs: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes.
Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230714175018.4064957-1-robh@kernel.org Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
317a3804 | 12-Jul-2023 |
Yang Li <yang.lee@linux.alibaba.com> |
scsi: ufs: core: Fix some kernel-doc comments
Use colons to separate parameter names from their specific meanings to silence the following warnings:
drivers/ufs/core/ufs-mcq.c:499: warning: Functio
scsi: ufs: core: Fix some kernel-doc comments
Use colons to separate parameter names from their specific meanings to silence the following warnings:
drivers/ufs/core/ufs-mcq.c:499: warning: Function parameter or member 'hba' not described in 'ufshcd_mcq_sq_cleanup' drivers/ufs/core/ufs-mcq.c:499: warning: Function parameter or member 'task_tag' not described in 'ufshcd_mcq_sq_cleanup' drivers/ufs/core/ufs-mcq.c:560: warning: Function parameter or member 'utrd' not described in 'ufshcd_mcq_nullify_sqe' drivers/ufs/core/ufs-mcq.c:583: warning: Function parameter or member 'hba' not described in 'ufshcd_mcq_sqe_search' drivers/ufs/core/ufs-mcq.c:583: warning: Function parameter or member 'hwq' not described in 'ufshcd_mcq_sqe_search' drivers/ufs/core/ufs-mcq.c:583: warning: Function parameter or member 'task_tag' not described in 'ufshcd_mcq_sqe_search' drivers/ufs/core/ufs-mcq.c:630: warning: Function parameter or member 'cmd' not described in 'ufshcd_mcq_abort'
Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5850 Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://lore.kernel.org/r/20230712075836.15375-1-yang.lee@linux.alibaba.com Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
75aa2987 | 12-Jul-2023 |
Yang Li <yang.lee@linux.alibaba.com> |
scsi: ufs: ufs-mediatek: Remove redundant dev_err()
There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or pl
scsi: ufs: ufs-mediatek: Remove redundant dev_err()
There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure.
./drivers/ufs/host/ufs-mediatek.c:864:3-10: line 864 is redundant because platform_get_irq() already prints an error
Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5846 Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://lore.kernel.org/r/20230712064832.44188-1-yang.lee@linux.alibaba.com Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
f52a805e | 11-Jul-2023 |
Ziqi Chen <quic_ziqichen@quicinc.com> |
scsi: ufs: qcom: Hold the mutex lock when configuring ESI
Lock the MSI descriptor storage of a device when configuring ESI. Otherwise we would see warnings during boot.
Signed-off-by: Ziqi Chen <qu
scsi: ufs: qcom: Hold the mutex lock when configuring ESI
Lock the MSI descriptor storage of a device when configuring ESI. Otherwise we would see warnings during boot.
Signed-off-by: Ziqi Chen <quic_ziqichen@quicinc.com> Link: https://lore.kernel.org/r/1689065327-45039-1-git-send-email-quic_ziqichen@quicinc.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
8f2b7865 | 11-Jul-2023 |
Ziqi Chen <quic_ziqichen@quicinc.com> |
scsi: ufs: qcom: Get queue ID from MSI index in ESI handler
platform_msi_domain_alloc_irqs() does not always get consecutive IRQ numbers, hence queue IDs calculated out from IRQ numbers may be incor
scsi: ufs: qcom: Get queue ID from MSI index in ESI handler
platform_msi_domain_alloc_irqs() does not always get consecutive IRQ numbers, hence queue IDs calculated out from IRQ numbers may be incorrect if we assume IRQ numbers are consecutive. Fix this by passing msi_desc to ESI handler to use msi_desc->msi_index as queue ID.
Co-developed-by: Can Guo <quic_cang@quicinc.com> Signed-off-by: Can Guo <quic_cang@quicinc.com> Signed-off-by: Ziqi Chen <quic_ziqichen@quicinc.com> Link: https://lore.kernel.org/r/1689062349-77385-1-git-send-email-quic_ziqichen@quicinc.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
a9814b6c | 10-Jul-2023 |
Udit Kumar <u-kumar1@ti.com> |
scsi: ufs: ti-j721e: Expose device tree aliases
When TI UFS host controller driver is built as kernel module it is not getting auto-loaded due to missing aliases in modules.
Add device tree related
scsi: ufs: ti-j721e: Expose device tree aliases
When TI UFS host controller driver is built as kernel module it is not getting auto-loaded due to missing aliases in modules.
Add device tree related aliases.
Signed-off-by: Udit Kumar <u-kumar1@ti.com> Link: https://lore.kernel.org/r/20230710094801.183149-1-u-kumar1@ti.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
e152a616 | 01-Jul-2023 |
Po-Wen Kao <powen.kao@mediatek.com> |
scsi: ufs: ufs-mediatek: Add MCQ support for MTK platform
Add UFS MCQ vops and IRQ handler for MediaTek platform. PM flow is fixed accordingly.
Signed-off-by: Po-Wen Kao <powen.kao@mediatek.com> L
scsi: ufs: ufs-mediatek: Add MCQ support for MTK platform
Add UFS MCQ vops and IRQ handler for MediaTek platform. PM flow is fixed accordingly.
Signed-off-by: Po-Wen Kao <powen.kao@mediatek.com> Link: https://lore.kernel.org/r/20230701124442.10489-3-powen.kao@mediatek.com Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Stanley Chu <stanley.chu@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
11afb65c | 01-Jul-2023 |
Po-Wen Kao <powen.kao@mediatek.com> |
scsi: ufs: core: Export symbols for MTK driver module
Export symbols for MediaTek UFS driver's PM flow and IRQ handler.
Signed-off-by: Po-Wen Kao <powen.kao@mediatek.com> Link: https://lore.kernel.
scsi: ufs: core: Export symbols for MTK driver module
Export symbols for MediaTek UFS driver's PM flow and IRQ handler.
Signed-off-by: Po-Wen Kao <powen.kao@mediatek.com> Link: https://lore.kernel.org/r/20230701124442.10489-2-powen.kao@mediatek.com Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Stanley Chu <stanley.chu@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
24befa92 | 26-Jun-2023 |
Arthur Simchaev <Arthur.Simchaev@wdc.com> |
scsi: ufs: core: Add support for qTimestamp attribute
The new qTimestamp attribute was added to UFS 4.0 spec, in order to synchronize timestamp between device logs and the host. The spec recommends
scsi: ufs: core: Add support for qTimestamp attribute
The new qTimestamp attribute was added to UFS 4.0 spec, in order to synchronize timestamp between device logs and the host. The spec recommends to send this attribute upon device power-on Reset/HW reset or when switching to Active state (using SSU command). Due to this attribute, the attribute's max value was extended to 8 bytes. As a result, the new definition of struct utp_upiu_query_v4_0 was added.
Signed-off-by: Arthur Simchaev <Arthur.Simchaev@wdc.com>
----------------- Changes to v2: - Adressed Bart's comments - Add missed response variable to ufshcd_set_timestamp_attr
Link: https://lore.kernel.org/r/20230626103320.8737-1-arthur.simchaev@wdc.com Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
89f7ef7f | 01-Jul-2023 |
Randy Dunlap <rdunlap@infradead.org> |
scsi: ufs: ufs-mediatek: Add dependency for RESET_CONTROLLER
When RESET_CONTROLLER is not set, kconfig complains about missing dependencies for RESET_TI_SYSCON, so add the missing dependency just as
scsi: ufs: ufs-mediatek: Add dependency for RESET_CONTROLLER
When RESET_CONTROLLER is not set, kconfig complains about missing dependencies for RESET_TI_SYSCON, so add the missing dependency just as is done above for SCSI_UFS_QCOM.
Silences this kconfig warning:
WARNING: unmet direct dependencies detected for RESET_TI_SYSCON Depends on [n]: RESET_CONTROLLER [=n] && HAS_IOMEM [=y] Selected by [m]: - SCSI_UFS_MEDIATEK [=m] && SCSI_UFSHCD [=y] && SCSI_UFSHCD_PLATFORM [=y] && ARCH_MEDIATEK [=y]
Fixes: de48898d0cb6 ("scsi: ufs-mediatek: Create reset control device_link") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Link: lore.kernel.org/r/202306020859.1wHg9AaT-lkp@intel.com Link: https://lore.kernel.org/r/20230701052348.28046-1-rdunlap@infradead.org Cc: Stanley Chu <stanley.chu@mediatek.com> Cc: Peter Wang <peter.wang@mediatek.com> Cc: Paul Gazzillo <paul@pgazz.com> Cc: Necip Fazil Yildiran <fazilyildiran@gmail.com> Cc: linux-scsi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Cc: "James E.J. Bottomley" <jejb@linux.ibm.com> Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|