- 08 7月, 2020 1 次提交
-
-
由 Bean Huo 提交于
According to the UFS Spec, the Flags field in the UPIU is one byte in size, not 4. Change it to be u8. Link: https://lore.kernel.org/r/20200706123936.24799-1-huobean@gmail.comTested-by: NAlim Akhtar <alim.akhtar@samsung.com> Reviewed-by: NAlim Akhtar <alim.akhtar@samsung.com> Reviewed-by: NAvri Altman <avri.altman@wdc.com> Signed-off-by: NBean Huo <beanhuo@micron.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 27 6月, 2020 1 次提交
-
-
由 Stanley Chu 提交于
If a UFS device is not qualified to use WriteBooster, either due to wrong UFS version or device-specific quirks, then the capability in host shall be disabled to prevent any WriteBooster operations in the future. Link: https://lore.kernel.org/r/20200625030430.25048-1-stanley.chu@mediatek.com Fixes: 3d17b9b5 ("scsi: ufs: Add write booster feature support") Tested-by: NSteev Klimaszewski <steev@kali.org> Reviewed-by: NAvri Altman <avri.altman@wdc.com> Reviewed-by: NBean Huo <beanhuo@micron.com> Signed-off-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 16 6月, 2020 15 次提交
-
-
由 Stanley Chu 提交于
The UFS load calculation is based on "total_time" and "busy_time" in a devfreq window. However, the source of time is different for both parameters: "busy_time" is assigned from "jiffies" thus has different accuracy from "total_time" which is assigned from ktime_get(). In addition, the time of window boundary is not exactly the same as the starting busy time in this window if UFS is actually busy in the beginning of the window. A similar accuracy error may also happen for the end of busy time in current window. To guarantee the precision of load calculation, we need to 1. Align time accuracy of both devfreq_dev_status.total_time and devfreq_dev_status.busy_time. For example, use "ktime_get()" directly. 2. Align the following timelines: - The beginning time of devfreq windows - The beginning of busy time in a new window - The end of busy time in the current window Link: https://lore.kernel.org/r/20200611101043.6379-1-stanley.chu@mediatek.com Fixes: a3cd5ec5 ("scsi: ufs: add load based scaling of UFS gear") Reviewed-by: NAvri Altman <avri.altman@wdc.com> Signed-off-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Stanley Chu 提交于
Use the ftrace infrastructure to conditionally trace UFS UIC command events. New trace event "ufshcd_uic_command" is created, which samples the following UFS UIC command data: - Device name - Optional identification string - UIC command opcode - UIC command argument1 - UIC command argument2 - UIC command argement3 Usage: echo 1 > /sys/kernel/debug/tracing/events/ufs/enable cat /sys/kernel/debug/tracing/trace_pipe Link: https://lore.kernel.org/r/20200615072235.23042-3-stanley.chu@mediatek.comAcked-by: NAvri Altman <avri.altman@wdc.com> Signed-off-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Stanley Chu 提交于
Clean up the following items: - Sort vendor names in alphabetical order - Squash quirks as compact as possible in device table to enhance performance of the lookup - Sort device quirks in alphabetical order Link: https://lore.kernel.org/r/20200612012625.6615-3-stanley.chu@mediatek.comReviewed-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Stanley Chu 提交于
It is confirmed that Micron device needs DELAY_BEFORE_LPM quirk to have a delay before VCC is powered off. Sdd Micron vendor ID and this quirk for Micron devices. Link: https://lore.kernel.org/r/20200612012625.6615-2-stanley.chu@mediatek.comReviewed-by: NBean Huo <beanhuo@micron.com> Reviewed-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Bean Huo 提交于
Add SPDX GPL-2.0 to UFS driver files that specified the GPL version 2 license, remove the full boilerplate text. Link: https://lore.kernel.org/r/20200605200520.20831-2-huobean@gmail.comReviewed-by: NTomas Winkler <tomas.winkler@intel.com> Reviewed-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NBean Huo <beanhuo@micron.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Bean Huo 提交于
For UFS 3.1, the normal unit descriptor is 10 bytes larger than the RPMB unit. However, both descriptors share the same desc_idn, to cover both unit descriptors with one length, we choose the normal unit descriptor length by desc_index. Link: https://lore.kernel.org/r/20200603091959.27618-6-huobean@gmail.comReviewed-by: NAvri Altman <avri.altman@wdc.com> Signed-off-by: NBean Huo <beanhuo@micron.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Bean Huo 提交于
At UFS initialization stage, to get the length of the descriptor, ufshcd_read_desc_length() was being called 6 times. Instead, we will capture the descriptor size the first time we'll read it. Delete unnecessary redundant code, remove ufshcd_read_desc_length(), ufshcd_init_desc_sizes(), and boost UFS initialization. Link: https://lore.kernel.org/r/20200603091959.27618-5-huobean@gmail.comAcked-by: NAvri Altman <avri.altman@wdc.com> Reviewed-by: NBart van Assche <bvanassche@acm.org> Reviewed-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NBean Huo <beanhuo@micron.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Bean Huo 提交于
If param_offset is not 0, the memcpy length shouldn't be the true descriptor length. Link: https://lore.kernel.org/r/20200603091959.27618-4-huobean@gmail.comAcked-by: NAvri Altman <avri.altman@wdc.com> Signed-off-by: NBean Huo <beanhuo@micron.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Bean Huo 提交于
Delete ufshcd_read_desc(). Instead, let caller directly call ufshcd_read_desc_param(). Link: https://lore.kernel.org/r/20200603091959.27618-3-huobean@gmail.comReviewed-by: NAvri Altman <avri.altman@wdc.com> Reviewed-by: NBart van Assche <bvanassche@acm.org> Reviewed-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NBean Huo <beanhuo@micron.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Bean Huo 提交于
For the UFS device, the maximum descriptor size is 255, max_t called on ufs_get_device_desc() is useless. Link: https://lore.kernel.org/r/20200603091959.27618-2-huobean@gmail.comReviewed-by: NStanley Chu <stanley.chu@mediatek.com> Acked-by: NAvri Altman <avri.altman@wdc.com> Signed-off-by: NBart van Assche <bvanassche@acm.org> Signed-off-by: NBean Huo <beanhuo@micron.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Kiwoong Kim 提交于
Some controller like Exynos determines if FATAL ERROR (0x7) in OCS field in UTRD occurs for values other than GOOD (0x0) in STATUS field in response upiu as well as errors that a host controller can't cover. This patch is to prevent from reporting command results in those cases. Link: https://lore.kernel.org/r/20200528011658.71590-6-alim.akhtar@samsung.comReviewed-by: NAvri Altman <avri.altman@wdc.com> Signed-off-by: NKiwoong Kim <kwmad.kim@samsung.com> Signed-off-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Alim Akhtar 提交于
Some UFS host controllers like Exynos uses granularities of PRDT length and offset as bytes, whereas others use actual segment count. Link: https://lore.kernel.org/r/20200528011658.71590-5-alim.akhtar@samsung.comReviewed-by: NAvri Altman <avri.altman@wdc.com> Signed-off-by: NKiwoong Kim <kwmad.kim@samsung.com> Signed-off-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Alim Akhtar 提交于
Some host controllers don't support host controller enable via HCE. Link: https://lore.kernel.org/r/20200528011658.71590-4-alim.akhtar@samsung.comReviewed-by: NCan Guo <cang@codeaurora.org> Reviewed-by: NAvri Altman <avri.altman@wdc.com> Signed-off-by: NSeungwon Jeon <essuuj@gmail.com> Signed-off-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Alim Akhtar 提交于
Some host controllers support interrupt aggregation but don't allow resetting counter and timer in software. Link: https://lore.kernel.org/r/20200528011658.71590-3-alim.akhtar@samsung.comReviewed-by: NAvri Altman <avri.altman@wdc.com> Signed-off-by: NSeungwon Jeon <essuuj@gmail.com> Signed-off-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Alim Akhtar 提交于
With the correct behavior, setting the bit to '0' indicates clear and '1' indicates no change. If host controller handles this the other way around, UFSHCI_QUIRK_BROKEN_REQ_LIST_CLR can be used. Link: https://lore.kernel.org/r/20200528011658.71590-2-alim.akhtar@samsung.comReviewed-by: NCan Guo <cang@codeaurora.org> Reviewed-by: NAvri Altman <avri.altman@wdc.com> Signed-off-by: NSeungwon Jeon <essuuj@gmail.com> Signed-off-by: NAlim Akhtar <alim.akhtar@samsung.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 03 6月, 2020 2 次提交
-
-
由 Stanley Chu 提交于
In ufshcd_probe_hba(), all BKOP SW tracking variables can be reset together in ufshcd_force_reset_auto_bkops(), thus urgent_bkop_lvl initialization in the beginning of ufshcd_probe_hba() can be merged into ufshcd_force_reset_auto_bkops(). Link: https://lore.kernel.org/r/20200530141200.4616-1-stanley.chu@mediatek.comReviewed-by: NAvri Altman <avri.altman@wdc.com> Signed-off-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Can Guo 提交于
Urgent bkops level is used to compare against actual bkops status read from UFS device. Urgent bkops level is set during initialization and might be updated in exception event handler during runtime. But it should not be updated to the actual bkops status every time when auto bkops is toggled. Otherwise, if urgent bkops level is updated to 0, auto bkops shall always be kept enabled. Link: https://lore.kernel.org/r/1590632686-17866-1-git-send-email-cang@codeaurora.org Fixes: 24366c2a ("scsi: ufs: Recheck bkops level if bkops is disabled") Reviewed-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NCan Guo <cang@codeaurora.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 27 5月, 2020 4 次提交
-
-
由 Stanley Chu 提交于
Currently UFS host driver promises VCC supply if UFS device needs to do WriteBooster flush during runtime suspend. However the UFS specification mentions: "While the flushing operation is in progress, the device is in Active power mode." Therefore UFS host driver needs to promise more: Keep UFS device as "Active power mode", otherwise UFS device shall not do any flush if device enters Sleep or PowerDown power mode. Similarly, the same promises shall be applied if device needs urgent BKOP during runtime suspend. Fix this by not changing device power mode if WriteBooster flush or urgent BKOP is required in ufshcd_suspend(). Now, if device finishes its job but is not resumed for a very long time, system will have unnecessary power drain because VCC is still supplied. A method to re-check the threshold of keeping VCC supply is required to fix the power drain. However, the threshold re-check needs to re-activate the link first because the decision depends on the latest device status. Also introduce a delayed work to force runtime resume after a certain delay during runtime suspend. This makes threshold re-check happen natually in the entry of the next runtime-suspend. The device can continue its WriteBooster flush or urgent BKOP jobs soon after resumed if device has no upcoming requests and link enters hibern8 state either by Auto-Hibern8 or hibern8 during clk-gating scheme. This solution not only prevents power drain but also makes as much use of time as possible for device's background jobs. Link: https://lore.kernel.org/r/20200522083212.4008-5-stanley.chu@mediatek.comReviewed-by: NAsutosh Das <asutoshd@codeaurora.org> Signed-off-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Stanley Chu 提交于
For WriteBooster feature related attributes, the index used by query shall be LUN ID if LU Dedicated buffer mode is enabled. Link: https://lore.kernel.org/r/20200522083212.4008-4-stanley.chu@mediatek.comReviewed-by: NAvri Altman <avri.altman@wdc.com> Reviewed-by: NAsutosh Das <asutoshd@codeaurora.org> Signed-off-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Stanley Chu 提交于
According to the UFS specification, WriteBooster is officially supported by UFS 2.2. Since UFS 2.2 specification has been finalized in JEDEC and such devices have also showed up in the market, modify the checking rule for ufshcd_wb_probe() to allow these devices to enable WriteBooster. Link: https://lore.kernel.org/r/20200522083212.4008-3-stanley.chu@mediatek.comReviewed-by: NAvri Altman <avri.altman@wdc.com> Reviewed-by: NAsutosh Das <asutoshd@codeaurora.org> Signed-off-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Stanley Chu 提交于
The whole UFS host instance has been zero-initialized by scsi_host_alloc(), thus UFS driver does not need to clear "dev_info" member specifically in ufshcd_device_params_init(). Simply remove the unnecessary code. Link: https://lore.kernel.org/r/20200522083212.4008-2-stanley.chu@mediatek.comReviewed-by: NAvri Altman <avri.altman@wdc.com> Reviewed-by: NAsutosh Das <asutoshd@codeaurora.org> Signed-off-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 20 5月, 2020 1 次提交
-
-
由 Bart Van Assche 提交于
The ufshcd_wait_for_register() function either sleeps or spins until the specified register has reached the desired value. Busy-waiting is not only considered a bad practice but also has a bad impact on energy consumption. Always sleep instead of spinning by making sure that all ufshcd_wait_for_register() calls happen from a context where it is allowed to sleep. The only function call that has to be moved is the ufshcd_hba_stop() call in ufshcd_host_reset_and_restore(). Link: https://lore.kernel.org/r/20200507222750.19113-1-bvanassche@acm.org Cc: Can Guo <cang@codeaurora.org> Cc: Avri Altman <avri.altman@wdc.com> Cc: Bean Huo <beanhuo@micron.com> Cc: Alim Akhtar <alim.akhtar@samsung.com> Cc: Asutosh Das <asutoshd@codeaurora.org> Tested-by: NBean Huo <beanhuo@micron.com> Reviewed-by: NStanley Chu <stanley.chu@mediatek.com> Reviewed-by: NBean Huo <beanhuo@micron.com> Reviewed-by: NAsutosh Das <asutoshd@codeaurora.org> Signed-off-by: NBart Van Assche <bvanassche@acm.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 15 5月, 2020 2 次提交
-
-
由 Stanley Chu 提交于
Allow flush threshold for WriteBooster to be customizable by vendors. To achieve this, make the value a variable in struct ufs_hba_variant_params. Also introduce UFS_WB_BUF_REMAIN_PERCENT() macro to provide a more flexible way to specify WriteBooster available buffer values. Link: https://lore.kernel.org/r/20200509093716.21010-4-stanley.chu@mediatek.comReviewed-by: NAsutosh Das <asutoshd@codeaurora.org> Signed-off-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Stanley Chu 提交于
The UFS driver is growing more and more customizable parameters. Collect them in one place. Link: https://lore.kernel.org/r/20200509093716.21010-2-stanley.chu@mediatek.comReviewed-by: NAsutosh Das <asutoshd@codeaurora.org> Signed-off-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 12 5月, 2020 7 次提交
-
-
由 Stanley Chu 提交于
Small cleanup as below items, 1. Use ufshcd_is_wb_allowed() directly instead of ufshcd_wb_sup() since ufshcd_wb_sup() just returns the result of ufshcd_is_wb_allowed(). 2. In ufshcd_suspend(), "else if (!ufshcd_is_runtime_pm(pm_op)) can be simplified to "else" since both have the same meaning. This patch does not change any functionality. Link: https://lore.kernel.org/r/20200508080115.24233-9-stanley.chu@mediatek.comReviewed-by: NAvri Altman <avri.altman@wdc.com> Reviewed-by: NAsutosh Das <asutoshd@codeaurora.org> Signed-off-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Stanley Chu 提交于
According to UFS specification, there are two WriteBooster mode of operations: "LU dedicated buffer" mode and "shared buffer" mode. In the "LU dedicated buffer" mode, the WriteBooster Buffer is dedicated to a logical unit. If the device supports the "LU dedicated buffer" mode, this mode is configured by setting bWriteBoosterBufferType to 00h. The logical unit WriteBooster Buffer size is configured by setting the dLUNumWriteBoosterBufferAllocUnits field of the related Unit Descriptor. Only a value greater than zero enables the WriteBooster feature in the logical unit. Modify ufshcd_wb_probe() as above description to support LU Dedicated buffer mode. Note that according to UFS 3.1 specification, the valid value of bDeviceMaxWriteBoosterLUs parameter in Geometry Descriptor is 1, which means at most one LUN can have WriteBooster buffer in "LU dedicated buffer mode". Therefore this patch supports only one LUN with WriteBooster enabled. All WriteBooster related sysfs nodes are specifically mapped to the LUN with WriteBooster enabled in LU Dedicated buffer mode. Link: https://lore.kernel.org/r/20200508080115.24233-7-stanley.chu@mediatek.comReviewed-by: NAvri Altman <avri.altman@wdc.com> Reviewed-by: NBean Huo <beanhuo@micron.com> Reviewed-by: NAsutosh Das <asutoshd@codeaurora.org> Signed-off-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Stanley Chu 提交于
For preparation of LU Dedicated buffer mode support on WriteBooster feature, "index" parameter shall be added and allowed to be specified by callers. Link: https://lore.kernel.org/r/20200508080115.24233-6-stanley.chu@mediatek.comReviewed-by: NBean Huo <beanhuo@micron.com> Reviewed-by: NAvri Altman <avri.altman@wdc.com> Reviewed-by: NCan Guo <cang@codeaurora.org> Reviewed-by: NAsutosh Das <asutoshd@codeaurora.org> Signed-off-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Stanley Chu 提交于
Export ufs_fixup_device_setup() to allow vendors to re-use it for fixing device quriks on specified UFS hosts. Link: https://lore.kernel.org/r/20200508080115.24233-4-stanley.chu@mediatek.comReviewed-by: NAvri Altman <avri.altman@wdc.com> Reviewed-by: NAsutosh Das <asutoshd@codeaurora.org> Signed-off-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Stanley Chu 提交于
Some UFS deivces may have required device quirks or have non-standard features which are enabled only on specified UFS hosts or for special customers. To not "pollute" common device quirk list, i.e. ufs_fixups table, for those devices mentioned above, introduce "fixup_dev_quirks" vops to allow vendors to fix or modify device quirks accordingly. Link: https://lore.kernel.org/r/20200508080115.24233-3-stanley.chu@mediatek.comReviewed-by: NAvri Altman <avri.altman@wdc.com> Reviewed-by: NAsutosh Das <asutoshd@codeaurora.org> Signed-off-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Stanley Chu 提交于
The WriteBooster feature can be supported by some pre-3.1 UFS devices by upgrading firmware. To enable WriteBooster feature in such devices, introduce a device quirk to relax the entrance condition of ufshcd_wb_probe() to allow host driver to check those devices' WriteBooster capability. WriteBooster feature can be available if below all conditions are satisfied, 1. Host enables WriteBooster capability 2. UFS 3.1 device or UFS pre-3.1 device with quirk UFS_DEVICE_QUIRK_SUPPORT_EXTENDED_FEATURES enabled 3. The device descriptor shall have DEVICE_DESC_PARAM_EXT_UFS_FEATURE_SUP field 4. WriteBooster support is specified in above field Link: https://lore.kernel.org/r/20200508080115.24233-2-stanley.chu@mediatek.comReviewed-by: NAvri Altman <avri.altman@wdc.com> Reviewed-by: NAsutosh Das <asutoshd@codeaurora.org> Signed-off-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Gustavo A. R. Silva 提交于
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on. Also, notice that, dynamic memory allocations won't be affected by this change: "Flexible array members have incomplete type, and so the sizeof operator may not be applied. As a quirk of the original implementation of zero-length arrays, sizeof evaluates to zero."[1] sizeof(flexible-array-member) triggers a warning because flexible array members have incomplete type[1]. There are some instances of code in which the sizeof operator is being incorrectly/erroneously applied to zero-length arrays and the result is zero. Such instances may be hiding some bugs. So, this work (flexible-array member conversions) will also help to get completely rid of those sorts of issues. This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732 ("cxgb3/l2t: Fix undefined behaviour") Link: https://lore.kernel.org/r/20200507192550.GA16683@embeddedorSigned-off-by: NGustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 28 4月, 2020 2 次提交
-
-
由 Asutosh Das 提交于
The write performance of TLC NAND is considerably lower than SLC NAND. Using SLC NAND as a WriteBooster Buffer enables the write request to be processed with lower latency and improves the overall write performance. Adds support for shared-buffer mode WriteBooster. WriteBooster enable: SW enables it when clocks are scaled up, thus it's enabled only in high load conditions. WriteBooster disable: SW will disable the feature, when clocks are scaled down. Thus writes would go as normal writes. To keep the endurance of the WriteBooster Buffer at a maximum, this load-based toggling is adopted. Link: https://lore.kernel.org/r/2871444d9083b0e9323ef6d8ff1b544b7784adc9.1587591527.git.asutoshd@codeaurora.orgReviewed-by: NAvri Altman <avri.altman@wdc.com> Signed-off-by: NAsutosh Das <asutoshd@codeaurora.org> Signed-off-by: NSubhash Jadavani <subhashj@codeaurora.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Jason Yan 提交于
Fix the following coccicheck warning: drivers/scsi/ufs/ufshcd.c:4140:6-14: WARNING: Assignment of 0/1 to bool variable. Link: https://lore.kernel.org/r/20200426094305.24083-1-yanaijie@huawei.comSigned-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 18 4月, 2020 1 次提交
-
-
由 Asutosh Das 提交于
During suspend, if the link is put to off, it would require a full initialization during resume. This patch resets and restores both the host and the card during initialization, otherwise host-only reset and restore would fail occasionally. Link: https://lore.kernel.org/r/1586844892-22720-1-git-send-email-cang@codeaurora.orgReviewed-by: NBean Huo <beanhuo@micron.com> Reviewed-by: NAlim Akhtar <alim.akhtar@samsung.com> Acked-by: NStanley Chu <stanley.chu@mediatek.com> Acked-by: NAvri Altman <Avri.Altman@wdc.com> Signed-off-by: NAsutosh Das <asutoshd@codeaurora.org> Signed-off-by: NCan Guo <cang@codeaurora.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 02 4月, 2020 1 次提交
-
-
由 Can Guo 提交于
When scaling gear, use ufshcd_config_pwr_mode() instead of ufshcd_change_power_mode() so that vops_pwr_change_notify(PRE_CHANGE) can be utilized to allow vendors use customized settings before changing power mode. Link: https://lore.kernel.org/r/1581485910-8307-2-git-send-email-cang@codeaurora.orgReviewed-by: NAvri Altman <avri.altman@wdc.com> Reviewed-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NCan Guo <cang@codeaurora.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 01 4月, 2020 1 次提交
-
-
由 Stanley Chu 提交于
Currently ufshcd driver assumes that bInitPowerMode parameter is not changed by any vendors thus device power mode can be set as "Active" during initialization. According to UFS JEDEC specification, device power mode shall be "Active" after HW Reset is triggered if the bInitPowerMode parameter in Device Descriptor is default value. By above description, we can set device power mode as "Active" after device reset is triggered by vendor's callback. With this change, the link startup performance can be improved in some cases by not setting link_startup_again as true in ufshcd_link_startup(). Link: https://lore.kernel.org/r/20200327095835.10293-1-stanley.chu@mediatek.comReviewed-by: NCan Guo <cang@codeaurora.org> Reviewed-by: NAsutosh Das <asutoshd@codeaurora.org> Signed-off-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 30 3月, 2020 2 次提交
-
-
由 Stanley Chu 提交于
Export ufshcd_link_recovery to allow vendors to recover failed link in vendor's callbacks. Link: https://lore.kernel.org/r/20200327095329.10083-2-stanley.chu@mediatek.comReviewed-by: NAvri Altman <avri.altman@wdc.com> Signed-off-by: NStanley Chu <stanley.chu@mediatek.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Subhash Jadavani 提交于
This change introduces a func ufshcd_set_clk_freq() to explicitly set clock frequency so that it can be used in reset_and_restore path and in ufshcd_scale_clks(). This change also cleans up the clock scaling error out path. [mkp: commit desc] Link: https://lore.kernel.org/r/1585214742-5466-2-git-send-email-cang@codeaurora.org Fixes: a3cd5ec5 ("scsi: ufs: add load based scaling of UFS gear") Reviewed-by: NBean Huo <beanhuo@micron.com> Acked-by: NAvri Altman <Avri.Altman@wdc.com> Signed-off-by: NSubhash Jadavani <subhashj@codeaurora.org> Signed-off-by: NCan Guo <cang@codeaurora.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-