- 09 2月, 2023 1 次提交
-
-
由 Bjorn Andersson 提交于
The three DMA memory regions allocated for the host memory space are documented to require alignment of 128, 1024, and 1024 respectively, but the returned address is checked for PAGE_SIZE alignment. In the case where these allocations are serviced by e.g. the Arm SMMU, the size and alignment will be determined by its supported page sizes. In most cases SZ_4K and a few larger sizes are available. In the typical configuration this does not cause problems, but in the event that the system PAGE_SIZE is increased beyond 4k, it's no longer reasonable to expect that the allocation will be PAGE_SIZE aligned. Limit the DMA alignment check to the actual alignment requirements written in the comments in the code, to avoid the UFS core refusing to initialize with such configuration. Link: https://lore.kernel.org/r/20230201034917.1902330-1-quic_bjorande@quicinc.comSigned-off-by: NBjorn Andersson <quic_bjorande@quicinc.com> Reviewed-by: NManivannan Sadhasivam <mani@kernel.org> Reviewed-by: NBart Van Assche <bvanassche@acm.org> Reviewed-by: NAsutosh Das <quic_asutoshd@quicinc.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 24 1月, 2023 2 次提交
-
-
由 Bart Van Assche 提交于
All UFS host controllers support DMA clustering. Hence enable DMA clustering. Notes: - The max_segment_size parameter implements the 256 KiB limit for the PRDT. The dma_boundary parameter represents a boundary that must not be crossed by DMA scatter/gather lists. I'm not aware of any restrictions on DMA scatter/gather lists in the UFSHCI specification other than the 256 KiB limit for the PRDT and the 32-bit address restriction for controllers that only support 32-bits DMA. The latter restriction is already handled by ufshcd_set_dma_mask(). - Without patch "scsi: ufs: exynos: Fix the maximum segment size", this patch breaks support for the Exynos controller. The history of the dma_boundary parameter in the UFS driver is as follows: * The initial UFS driver did not set the dma_boundary parameter. * Commit 4dd4130a ("scsi: make sure all drivers set the use_clustering flag") set the .use_clustering flag. * Commit 4af14d11 ("scsi: remove the use_clustering flag") removed the use_clustering flag and set the dma_boundary parameter instead. Cc: Avri Altman <avri.altman@wdc.com> Cc: Alim Akhtar <alim.akhtar@samsung.com> Cc: Kiwoong Kim <kwmad.kim@samsung.com> Signed-off-by: NBart Van Assche <bvanassche@acm.org> Acked-by: NAdrian Hunter <adrian.hunter@intel.com> Reviewed-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Bart Van Assche 提交于
The Exynos UFS controller only supports scatter/gather list elements that are aligned on a 4 KiB boundary. Fix DMA alignment in case PAGE_SIZE != 4096. Rename UFSHCD_QUIRK_ALIGN_SG_WITH_PAGE_SIZE into UFSHCD_QUIRK_4KB_DMA_ALIGNMENT. Cc: Kiwoong Kim <kwmad.kim@samsung.com> Fixes: 2b2bfc8a ("scsi: ufs: Introduce a quirk to allow only page-aligned sg entries") Signed-off-by: NBart Van Assche <bvanassche@acm.org> Reviewed-by: NAlim Akhtar <alim.akhtar@samsung.com> Tested-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 14 1月, 2023 15 次提交
-
-
由 Can Guo 提交于
As Event Specific Interrupt message format is not defined in UFSHCI JEDEC specs, and the ESI handling highly depends on how the format is designed, hence add a vendor specific ops such that SoC vendors can configure their own ESI handlers. If ESI vops is not provided or returning error, go with the legacy (central) interrupt way. Signed-off-by: NCan Guo <quic_cang@quicinc.com> Reviewed-by: NBart Van Assche <bvanassche@acm.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Asutosh Das 提交于
Enable MCQ in the Host Controller. Signed-off-by: NAsutosh Das <quic_asutoshd@quicinc.com> Reviewed-by: NBart Van Assche <bvanassche@acm.org> Reviewed-by: NManivannan Sadhasivam <mani@kernel.org> Reviewed-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Asutosh Das 提交于
Complete CQE requests in poll. Assumption is that several poll completion may happen in different CPUs for the same completion queue. Hence a spin lock protection is added. Co-developed-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NAsutosh Das <quic_asutoshd@quicinc.com> Reviewed-by: NBart Van Assche <bvanassche@acm.org> Reviewed-by: NManivannan Sadhasivam <mani@kernel.org> Reviewed-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Asutosh Das 提交于
Add support for completing requests from Completion Queue. Some host controllers support vendor specific registers that provide a bitmap of all CQs which have at least one completed CQE. Add this support. The MCQ specification doesn't provide the Task Tag or its equivalent in the Completion Queue Entry. So use an indirect method to find the Task Tag from the Completion Queue Entry. Co-developed-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NAsutosh Das <quic_asutoshd@quicinc.com> Reviewed-by: NBart Van Assche <bvanassche@acm.org> Reviewed-by: NManivannan Sadhasivam <mani@kernel.org> Reviewed-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Asutosh Das 提交于
Modify completion path APIs and add completion queue entry. Co-developed-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NAsutosh Das <quic_asutoshd@quicinc.com> Reviewed-by: NBart Van Assche <bvanassche@acm.org> Reviewed-by: NManivannan Sadhasivam <mani@kernel.org> Reviewed-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Asutosh Das 提交于
Add support to find the hardware queue on which the request would be queued. Since the very first queue is to serve device commands, an offset of 1 is added to the index of the hardware queue. Co-developed-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NAsutosh Das <quic_asutoshd@quicinc.com> Reviewed-by: NBart Van Assche <bvanassche@acm.org> Reviewed-by: NManivannan Sadhasivam <mani@kernel.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Asutosh Das 提交于
Add support to send commands using multiple submission queues in MCQ mode. Modify the functions that use ufshcd_send_command(). Co-developed-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NAsutosh Das <quic_asutoshd@quicinc.com> Reviewed-by: NBart Van Assche <bvanassche@acm.org> Reviewed-by: NManivannan Sadhasivam <mani@kernel.org> Reviewed-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Asutosh Das 提交于
Enable shared tags for MCQ. For UFS, this should not have a huge performance impact. It however simplifies the MCQ implementation and reuses most of the existing code in the issue and completion path. Also add multiple queue mapping to map_queue(). Co-developed-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NAsutosh Das <quic_asutoshd@quicinc.com> Reviewed-by: NBart Van Assche <bvanassche@acm.org> Reviewed-by: NManivannan Sadhasivam <mani@kernel.org> Reviewed-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Asutosh Das 提交于
Runtime and operation registers are defined per Submission and Completion queue. The location of these registers is not defined in the spec; meaning the offsets and stride may vary for different HC vendors. Establish the stride, base address, and doorbell address offsets from vendor host driver and program it. Co-developed-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NAsutosh Das <quic_asutoshd@quicinc.com> Reviewed-by: NManivannan Sadhasivam <mani@kernel.org> Reviewed-by: NBart Van Assche <bvanassche@acm.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Asutosh Das 提交于
To read the bqueuedepth, the device descriptor is fetched in Single Doorbell Mode. This allocated memory may not be enough for MCQ mode because the number of tags supported in MCQ mode may be larger than in SDB mode. Hence, release the memory allocated in SDB mode and allocate memory for MCQ mode operation. Define the UFS hardware queue and Completion Queue Entry. Co-developed-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NAsutosh Das <quic_asutoshd@quicinc.com> Reviewed-by: NManivannan Sadhasivam <mani@kernel.org> Reviewed-by: NBart Van Assche <bvanassche@acm.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Asutosh Das 提交于
The UFS device defines the supported queuedepth by bqueuedepth which has a max value of 256. The HC defines MAC (Max Active Commands) that defines the max number of commands that in flight to the UFS device. Calculate and configure the nutrs based on both these values. Co-developed-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NAsutosh Das <quic_asutoshd@quicinc.com> Reviewed-by: NManivannan Sadhasivam <mani@kernel.org> Reviewed-by: NBart Van Assche <bvanassche@acm.org> Reviewed-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Asutosh Das 提交于
Multi-circular queue (MCQ) has been added in UFSHC v4.0 standard in addition to the Single Doorbell mode. The MCQ mode supports multiple submission and completion queues. Add support to allocate and configure the queues. Add module parameters support to configure the queues. Co-developed-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NAsutosh Das <quic_asutoshd@quicinc.com> Reviewed-by: NBart Van Assche <bvanassche@acm.org> Reviewed-by: NManivannan Sadhasivam <mani@kernel.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Asutosh Das 提交于
If MCQ support is present, enabling it after MCQ support has been configured would require reallocating tags and memory. It would also free up the already allocated memory in Single Doorbell Mode. So defer invoking scsi_add_host() until MCQ is configured. Co-developed-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NAsutosh Das <quic_asutoshd@quicinc.com> Reviewed-by: NBart Van Assche <bvanassche@acm.org> Reviewed-by: NManivannan Sadhasivam <mani@kernel.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Asutosh Das 提交于
Add support to check for MCQ capability in the UFSHC. Add a module parameter to disable MCQ if needed. Co-developed-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NAsutosh Das <quic_asutoshd@quicinc.com> Reviewed-by: NBart Van Assche <bvanassche@acm.org> Reviewed-by: NManivannan Sadhasivam <mani@kernel.org> Reviewed-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Asutosh Das 提交于
Task Tag is limited to 8 bits and this restricts the number of active I/Os to 255. In multi-circular queue mode, this may not be enough. The specification provides EXT_IID which can be used to increase the number of I/Os if the UFS device and UFSHC support it. This patch adds support to probe for EXT_IID support in UFS device and UFSHC. Co-developed-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NCan Guo <quic_cang@quicinc.com> Signed-off-by: NAsutosh Das <quic_asutoshd@quicinc.com> Reviewed-by: NBart Van Assche <bvanassche@acm.org> Reviewed-by: NAvri Altman <avri.altman@wdc.com> Reviewed-by: NManivannan Sadhasivam <mani@kernel.org> Reviewed-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 12 1月, 2023 1 次提交
-
-
由 Manivannan Sadhasivam 提交于
Some platforms like Qcom, requires the UFS device to be reinitialized after switching to maximum gear speed. So add support for that in UFS core by introducing a new quirk (UFSHCD_CAP_REINIT_AFTER_MAX_GEAR_SWITCH) and doing the reinitialization, if the quirk is enabled by the controller driver. Suggested-by: NCan Guo <quic_cang@quicinc.com> Tested-by: Andrew Halaney <ahalaney@redhat.com> # Qdrive3/sa8540p-ride Signed-off-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: NBart Van Assche <bvanassche@acm.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 31 12月, 2022 11 次提交
-
-
由 Arthur Simchaev 提交于
There shouldn't be any restriction of the descriptor size (not the descriptor id for that matter) up to QUERY_DESC_MAX_SIZE. According to the spec, the caller can use any descriptor size, and it is up to the device to return the actual size. Therefore there shouldn't be any sizes hardcoded in the kernel, nor any need to cache it, hence the ufshcd_map_desc_id_to_length() function is redundant. Always read the descriptors with QUERY_DESC_MAX_SIZE size. Reviewed-by: NBart Van Assche <bvanassche@acm.org> Reviewed-by: NBean Huo <beanhuo@micron.com> Suggested-by: NBean Huo <beanhuo@micron.com> Signed-off-by: NArthur Simchaev <Arthur.Simchaev@wdc.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Arthur Simchaev 提交于
len argument is not used anymore in ufshcd_set_active_icc_lvl() function. Signed-off-by: NArthur Simchaev <Arthur.Simchaev@wdc.com> Reviewed-by: NBart Van Assche <bvanassche@acm.org> Reviewed-by: NBean Huo <beanhuo@micron.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Arthur Simchaev 提交于
Always read the descriptor with QUERY_DESC_MAX_SIZE. According to the spec, the device returns the actual size. Signed-off-by: NArthur Simchaev <Arthur.Simchaev@wdc.com> Reviewed-by: NBean Huo <beanhuo@micron.com> Reviewed-by: NBart Van Assche <bvanassche@acm.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Arthur Simchaev 提交于
We used to use the extended-feature field in the device descriptor as an indication that the device supported UFS 2.2 or later. Remove that as this check is specifically done few lines above. Signed-off-by: NArthur Simchaev <Arthur.Simchaev@wdc.com> Reviewed-by: NBart Van Assche <bvanassche@acm.org> Reviewed-by: NBean Huo <beanhuo@micron.com> Reviewed-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Eric Biggers 提交于
Modify the UFSHCD core to allow 'struct ufshcd_sg_entry' to be variable-length. The default is the standard length, but variants can override ufs_hba::sg_entry_size with a larger value if there are vendor-specific fields following the standard ones. This is needed to support inline encryption with ufs-exynos (FMP). Cc: Eric Biggers <ebiggers@google.com> Reviewed-by: NAvri Altman <avri.altman@wdc.com> Signed-off-by: NEric Biggers <ebiggers@google.com> [ bvanassche: edited commit message and introduced CONFIG_SCSI_UFS_VARIABLE_SG_ENTRY_SIZE ] Signed-off-by: NBart Van Assche <bvanassche@acm.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Bart Van Assche 提交于
Prepare for adding an additional ufshcd_clock_scaling_prepare() call with a different timeout. Reviewed-by: NAvri Altman <avri.altman@wdc.com> Signed-off-by: NBart Van Assche <bvanassche@acm.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Bart Van Assche 提交于
Wait at most 20 ms before rechecking the doorbells instead of waiting for a potentially long time between doorbell checks. Reviewed-by: NAvri Altman <avri.altman@wdc.com> Reviewed-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NBart Van Assche <bvanassche@acm.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Bean Huo 提交于
Add advanced RPMB support in ufs_bsg: 1. According to the UFS specification, only one RPMB operation can be performed at any time. We can ensure this by using reserved slot and its dev_cmd sync operation protection mechanism. 2. For Advanced RPMB, RPMB metadata is packaged in an EHS (Extra Header Segment) of a command UPIU, and the corresponding reply EHS (from the device) should also be returned to the user space. bsg_job->request and bsg_job->reply allow us to pass and return EHS from/back to userspace. Compared to normal/legacy RPMB, the advantages of advanced RPMB are: 1. The data length in the Advanced RPMB data read/write command can be larger than 4KB. For the legacy RPMB, the data length in a single RPMB data transfer is 256 bytes. 2. All of the advanced RPMB operations will be a single command. For legacy RPMB, take the read write-counter value as an example, you need two commands (first SECURITY PROTOCOL OUT, then second SECURITY PROTOCOL IN). Signed-off-by: NBean Huo <beanhuo@micron.com> Reviewed-by: NAvri Altman <avri.altman@wdc.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Bean Huo 提交于
We need to fill in the total EHS length in UTP Transfer Request Descriptor. Add this functionality to ufshcd_prepare_req_desc_hdr(). Signed-off-by: NBean Huo <beanhuo@micron.com> Reviewed-by: NAvri Altman <avri.altman@wdc.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Bean Huo 提交于
Check UFS Advanced RPMB LU enablement during ufshcd_lu_init(). Signed-off-by: NBean Huo <beanhuo@micron.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Bean Huo 提交于
Take out the "map scatter-gather list to prdt" part of the code in ufshcd_map_sg() and split it into a new function ufshcd_sgl_to_prdt(). Signed-off-by: NBean Huo <beanhuo@micron.com> Reviewed-by: NAvri Altman <avri.altman@wdc.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 26 11月, 2022 3 次提交
-
-
由 Bart Van Assche 提交于
Fix the following issues in ufshcd_poll(): - If polling succeeds, return a positive value. - Do not complete polling requests from interrupt context because the block layer expects these requests to be completed from thread context. From block/bio.c: If REQ_ALLOC_CACHE is set, the final put of the bio MUST be done from process context, not hard/soft IRQ. Fixes: eaab9b57 ("scsi: ufs: Implement polling support") Signed-off-by: NBart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20221118233717.441298-1-bvanassche@acm.orgReviewed-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 ChanWoo Lee 提交于
Only checks true and false so it can be converted to bool. Signed-off-by: NChanWoo Lee <cw9316.lee@samsung.com> Link: https://lore.kernel.org/r/20221111062209.7365-1-cw9316.lee@samsung.comSigned-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 ChanWoo Lee 提交于
Separate the function name and message to make it easier to check the log. Modify messages to fit the format of others. Signed-off-by: NChanWoo Lee <cw9316.lee@samsung.com> Link: https://lore.kernel.org/r/20221111062126.7307-1-cw9316.lee@samsung.comSigned-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 08 11月, 2022 2 次提交
-
-
由 Bart Van Assche 提交于
Move the code for aborting all SCSI commands and TMFs into a new function. This patch makes the ufshcd_err_handler() easier to read. Except for adding more logging, this patch does not change any functionality. Signed-off-by: NBart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20221031183433.2443554-1-bvanassche@acm.orgReviewed-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Keoseong Park 提交于
Use "if error return" style in ufshcd_hba_enable(). No functional change. Cc: Bart Van Assche <bvanassche@acm.org> Cc: Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NKeoseong Park <keosung.park@samsung.com> Link: https://lore.kernel.org/r/20221028073553epcms2p6dc4f8bdbebdc8f96f43fc4197b3edd0c@epcms2p6Reviewed-by: NBart Van Assche <bvanassche@acm.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 27 10月, 2022 3 次提交
-
-
由 Bean Huo 提交于
Combine ufshcd_get_lu_power_on_wp_status() and ufshcd_set_queue_depth() into one single ufshcd_lu_init(), so that we only need to read the LUN descriptor once. Signed-off-by: NBean Huo <beanhuo@micron.com> Link: https://lore.kernel.org/r/20221025222430.277768-3-beanhuo@iokpp.deReviewed-by: NArthur Simchaev <arthur.simchaev@wdc.com> Reviewed-by: NBart Van Assche <bvanassche@acm.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Bean Huo 提交于
Ccommit d3d9c457 ("scsi: ufs: Fix memory corruption by ufshcd_read_desc_param()") has properly fixed stack overflow issue. As a result, commit a2fca52e ("scsi: ufs: WB is only available on LUN #0 to #7") is no longer required. Revert it. Cc: Jaegeuk Kim <jaegeuk@kernel.org> Signed-off-by: NBean Huo <beanhuo@micron.com> Link: https://lore.kernel.org/r/20221025222430.277768-2-beanhuo@iokpp.deReviewed-by: NArthur Simchaev <arthur.simchaev@wdc.com> Reviewed-by: NBart Van Assche <bvanassche@acm.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Peter Wang 提交于
WLUN suspend and resume events are currently not handled by ufshcd_print_evt_hist(). Add the missing events. Signed-off-by: NPeter Wang <peter.wang@mediatek.com> Link: https://lore.kernel.org/r/20221024120602.30019-1-peter.wang@mediatek.comReviewed-by: NStanley Chu <stanley.chu@mediatek.com> Reviewed-by: NAsutosh Das <quic_asutoshd@quicinc.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 25 10月, 2022 1 次提交
-
-
由 Christoph Hellwig 提交于
The fact that blk_mq_destroy_queue also drops a queue reference leads to various places having to grab an extra reference. Move the call to blk_put_queue into the callers to allow removing the extra references. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NSagi Grimberg <sagi@grimberg.me> Reviewed-by: NChaitanya Kulkarni <kch@nvidia.com> Reviewed-by: NKeith Busch <kbusch@kernel.org> Link: https://lore.kernel.org/r/20221018135720.670094-2-hch@lst.de [axboe: fix fabrics_q vs admin_q conflict in nvme core.c] Signed-off-by: NJens Axboe <axboe@kernel.dk>
-
- 22 10月, 2022 1 次提交
-
-
由 Bart Van Assche 提交于
The following deadlock has been observed on multiple test setups: * ufshcd_wl_suspend() is waiting for blk_execute_rq(START STOP UNIT) to complete while ufshcd_wl_suspend() holds host_sem. * The SCSI error handler is activated, changes the host state to SHOST_RECOVERY, ufshcd_eh_host_reset_handler() and ufshcd_err_handler() are called and the latter function tries to obtain host_sem. This is a deadlock because blk_execute_rq() can't execute SCSI commands while the host is in the SHOST_RECOVERY state and because the error handler cannot make progress because host_sem is held by another thread. Fix this deadlock as follows: * Fail attempts to suspend the system while the SCSI error handler is in progress by setting the SCMD_FAIL_IF_RECOVERING flag for START STOP UNIT commands. * If the system is suspending and a START STOP UNIT command times out, handle the SCSI command timeout from inside the context of the SCSI timeout handler instead of activating the SCSI error handler. The runtime power management code is not affected by this deadlock since hba->host_sem is not touched by the runtime power management functions in the UFS driver. Reviewed-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NBart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20221018202958.1902564-11-bvanassche@acm.orgSigned-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-