Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

12.1 ufs31 #1

Merged
merged 26 commits into from
Apr 21, 2022
Merged

12.1 ufs31 #1

merged 26 commits into from
Apr 21, 2022

Commits on Apr 20, 2022

  1. Configuration menu
    Copy the full SHA
    988e284 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    828c2b7 View commit details
    Browse the repository at this point in the history
  3. Revert "Revert "scsi: ufs: increase query timeout""

    This reverts commit 911b210.
    goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    ccb17e1 View commit details
    Browse the repository at this point in the history
  4. Revert "drivers: scsi: ufs: Remove unused d_lu_wb_buf_alloc"

    This reverts commit 91101ea.
    goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    1a24f8d View commit details
    Browse the repository at this point in the history
  5. scsi/ufs: Add Samsung TW/HPB drivers

    *** These codes will do nothing without turning on associated CONFIGs ***
    
    This change contains the drivers to support the Turbo Write/Write Booster
    feature and the Host Performance Booster feature on Samsung 256GB UFS 3.0
    device KLUEG8UHDB-C2D1 with FW 0900.
    
    Please be aware that JEDEC "official" support for these features is in
    their UFS 3.1 spec JESD220E, and that is not 100% compatible with Samsung's
    implementation for their UFS 2.1 and UFS 3.0 parts.
    
    Reference:
       * mt_sm8250_H2.2.1_T1.1.0.patch, Samsung
       * UFS TURBO WRITE SPECIFICATION V1.0.1G Rev1, Samsung
       * UFS HPB SPECIFICATION V2.0.0G Rev1, Samsung
       * "13.4.17 Turbo Write", UFS 3.1 spec JESD220E, JEDEC
    
    Change-Id: I2cd1e202f804b0b462459651df8f19e823a30c88
    Signed-off-by: Qing Chang <a21550@motorola.com>
    Reviewed-on: https://gerrit.mot.com/1489722
    SLTApproved: Slta Waiver
    SME-Granted: SME Approvals Granted
    Tested-by: Jira Key
    Reviewed-by: Ling Jin <lingjin@motorola.com>
    Submit-Approved: Jira Key
    Qing Chang authored and goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    4d3f7be View commit details
    Browse the repository at this point in the history
  6. scsi/ufs: Support "forced" Turbo Write

    With Samsung's default configuration, tw_mode will be 1 (manual mode),
    and we need to manually write to the following sysfs nodes to turn on
    TW.
    
    /sys/devices/platform/soc/1d84000.ufshc/ufstw_lu4/tw_enable
    /sys/devices/platform/soc/1d84000.ufshc/ufstw_lu4/flush_during_hibern_enter
    
    This change makes it possible that the above could be done "automatically"
    during early driver initialization so that things are getting earsier.
    
    Change-Id: I772c44cc52b3c4903103d444d686fc9ec488866f
    Signed-off-by: Qing Chang <a21550@motorola.com>
    Reviewed-on: https://gerrit.mot.com/1493425
    SLTApproved: Slta Waiver
    SME-Granted: SME Approvals Granted
    Tested-by: Jira Key
    Reviewed-by: Qing Chang <qing@motorola.com>
    Submit-Approved: Jira Key
    Qing Chang authored and goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    633537b View commit details
    Browse the repository at this point in the history
  7. scsi/ufs: Block hibernation while enabling TW

    Samsung recommended to block hibernation using pm_runtime_get_sync()
    while TW is being turned on during power up.
    
    Change-Id: I01b6b407dbdbea181bc7544b200e2009694ae830
    Signed-off-by: Qing Chang <a21550@motorola.com>
    Reviewed-on: https://gerrit.mot.com/1497772
    SLTApproved: Slta Waiver
    SME-Granted: SME Approvals Granted
    Tested-by: Jira Key
    Reviewed-by: Qing Chang <qing@motorola.com>
    Submit-Approved: Jira Key
    Qing Chang authored and goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    6f81a88 View commit details
    Browse the repository at this point in the history
  8. scsi/ufs: Prevent LPM while flushing TW buffer

    This patch is from Samsung during joint validation for the Turbo
    Write and Host Performance Booster features on UFS 3.0 parts.
    
    If fTurboWriteBufferFlushDuringHibnerEnter flag is set
    and the value of bAvailbleTurboWriteBufferSize is less than
    UFSTW_AVAIL_BUF_SIZE_DISABLE_LPM(defined in ufstw.h),
    LPM mode will be disabled on runtime suspend.
    In addtion, if not runtime suspend(shutdown and system suspend),
    fTurboWriteBufferFlushDuringHibnerEnter flag will be disabled in
    suspend routines.
    
    Change-Id: I344cb57f994a8893d400a1470eecb3e35fe0dd5d
    Signed-off-by: Qing Chang <a21550@motorola.com>
    Reviewed-on: https://gerrit.mot.com/1498481
    SME-Granted: SME Approvals Granted
    SLTApproved: Slta Waiver
    Tested-by: Jira Key
    Reviewed-by: Qing Chang <qing@motorola.com>
    Submit-Approved: Jira Key
    Qing Chang authored and goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    6e13541 View commit details
    Browse the repository at this point in the history
  9. fixup (CR) scsi/ufs: Add Samsung TW/HPB drivers

    This is caused by qcom change:
    +++
    2ceec83 Revert existing FBE changes for ICE FBE
    +++
    Signed-off-by: a7301c <a7301c@motorola.com>
    
    Change-Id: I67de012e5ddf8cb4b74c46402422433eceaf6e28
    Signed-off-by: a7301c <a7301c@motorola.com>
    a7301c authored and goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    5f84225 View commit details
    Browse the repository at this point in the history
  10. scsi/ufs: enable turbo write feature for hynix parts

    enable turbo write feature for hynix by skipping version checking. hynix
    turbo write feature version is zero, so just skip checking version.
    
    Change-Id: I1e1125bb99ca6410025ea9c5d458b8ec41b69cd8
    Signed-off-by: yuedl1 <yuedl1@mt.com>
    Reviewed-on: https://gerrit.mot.com/1499133
    SME-Granted: SME Approvals Granted
    SLTApproved: Slta Waiver
    Tested-by: Jira Key
    Reviewed-by: Qing Chang <qing@motorola.com>
    Reviewed-by: Shi-Yong Li <a22381@motorola.com>
    Submit-Approved: Jira Key
    yuedl1 authored and goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    db6525c View commit details
    Browse the repository at this point in the history
  11. ufs:fixed ufshcd wait doorbell clear timeout

    when devfreq ufs, ufshcd wait doorbell clear timeout. some operations
    maybe take time longer than 1s. such as unmap operation. so change
    the timeout to 2s. error log as bellow:
    01-07 09:50:34.508     0     0 E ufshcd-qcom 1d84000.ufshc: ufshcd_wait_for_doorbell_clr: timedout waiting for doorbell to clear (tm=0x0, tr=0x2000000)
    01-07 09:50:34.508     0     0 E devfreq 1d84000.ufshc: dvfs failed with (-16) error
    
    Change-Id: Ie33481603a6f96c710e0180bfdd61b7d88eb003b
    Signed-off-by: yuedl1 <yuedl1@mt.com>
    Reviewed-on: https://gerrit.mot.com/1554341
    SME-Granted: SME Approvals Granted
    SLTApproved: Slta Waiver
    Tested-by: Jira Key
    Reviewed-by: Chuanchun Zhu <zhucc2@motorola.com>
    Reviewed-by: Huosheng Liao <liaohs@motorola.com>
    Reviewed-by: Shi-Yong Li <a22381@motorola.com>
    Submit-Approved: Jira Key
    yuedl1 authored and goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    ffa63ef View commit details
    Browse the repository at this point in the history
  12. scsi/ufs:Add Toshiba KioXia HPB driver

    Add HPB 1.0 driver from Toshiba Kioxia
    Since it is a device controlled mode HPB,
    Flag needs to be added to coexist with
    Current Samsung HPB/TW driver
    
    Reference:
    	M1CCL04-118_HPB10_DeviceControlMode.zip KioXia
    
    Change-Id: I46a31e0c2ff9b6da9d23638f398f2224436dc8b8
    Signed-off-by: a17671 <a17671@motorola.com>
    Reviewed-on: https://gerrit.mot.com/1755653
    SLTApproved: Slta Waiver
    SME-Granted: SME Approvals Granted
    Tested-by: Jira Key
    Reviewed-by: Wei Deng <dengwei1@motorola.com>
    Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
    Submit-Approved: Jira Key
    a17671 authored and goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    bf8c387 View commit details
    Browse the repository at this point in the history
  13. ufs:Fix the compatible issue with inline encrypted f2fs

    R introduces the new inline encrypted f2fs feature
    KioXia HPB driver has compatible issue with QCOM ICE
    The HPB READ 0xF8 command is not recognized by QCOM ICE
    ICE then return all the encrypted data so F2FS checking will fail
    Switching to READ_16 so QCOM ICE will decrypt the data in the fly
    
    Change-Id: I063d0fa7fa3481b6d0f8c27488cba1e6927ca96a
    Signed-off-by: a17671 <a17671@motorola.com>
    Reviewed-on: https://gerrit.mot.com/1798575
    SME-Granted: SME Approvals Granted
    SLTApproved: Slta Waiver
    Tested-by: Jira Key
    Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
    Submit-Approved: Jira Key
    a17671 authored and goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    5908ac8 View commit details
    Browse the repository at this point in the history
  14. ufs:Temp Fix KioXia 256G UFS panic issue

    In the phones with KioXia 256G
    READ_16 is used for large LBA
    Current KioXia HPB driver altered the
    READ_16 Address with different meaning
    Thus filter it from HPB to unblock the testing
    
    Change-Id: I217a23740d0252b1fad910a2665ed7abd2e06c97
    Signed-off-by: a17671 <a17671@motorola.com>
    Reviewed-on: https://gerrit.mot.com/1801148
    SME-Granted: SME Approvals Granted
    SLTApproved: Slta Waiver
    Tested-by: Jira Key
    Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
    Submit-Approved: Jira Key
    a17671 authored and goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    f7f6efe View commit details
    Browse the repository at this point in the history
  15. ufs:Check Firmware Version before HPB starts

    KioXia has two FW versions
    Only 1001 version supports HPB
    
    Change-Id: I556f365ae627919cddab48076368e7de2465fa67
    Signed-off-by: a17671 <a17671@motorola.com>
    Reviewed-on: https://gerrit.mot.com/1803405
    SLTApproved: Slta Waiver
    SME-Granted: SME Approvals Granted
    Tested-by: Jira Key
    Reviewed-by: Wang Wang <wangwang1@mt.com>
    Submit-Approved: Jira Key
    a17671 authored and goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    9078361 View commit details
    Browse the repository at this point in the history
  16. ufs:Sync the latest Samsung UFS HPB driver

    In Samsung mt_SM8250_DD_H261_T130.patch
    HID/RINGBUFFER POC are removed
    
    Change-Id: Ia9a8b5506b14815fc95c8bc9e174b90c71156eae
    Signed-off-by: a17671 <a17671@motorola.com>
    Reviewed-on: https://gerrit.mot.com/1804333
    SLTApproved: Slta Waiver
    SME-Granted: SME Approvals Granted
    Tested-by: Jira Key
    Reviewed-by: Wei Deng <dengwei1@motorola.com>
    Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
    Submit-Approved: Jira Key
    a17671 authored and goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    676c661 View commit details
    Browse the repository at this point in the history
  17. ufs:Add Samsung UFS 3.1 driver

    Integrate New Samsung UFS3.1 driver
    Support HPB/TW/HID/RINGBUFFER
    
    Change-Id: Iea9c787b49c563844859ffdc9a7bc7528268cdf3
    Signed-off-by: a17671 <a17671@motorola.com>
    Reviewed-on: https://gerrit.mot.com/1773951
    SLTApproved: Slta Waiver
    SME-Granted: SME Approvals Granted
    Tested-by: Jira Key
    Reviewed-by: Wei Deng <dengwei1@motorola.com>
    Reviewed-by: Qing Chang <qing@motorola.com>
    Submit-Approved: Jira Key
    a17671 authored and goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    99a32a2 View commit details
    Browse the repository at this point in the history
  18. ufs:Add Samsung UFS HPB driver panic fix

    root cause from Samsung:
    Interrupt context called blk_get_request when task_lock is used.
    To avoid this issue, we added another block layer API that
    Does not create io_context. i
    io_context is related to task that creates IO,
    so this change can prevent irrelevent io_context to be created.
    Operating request is no problem without io_context as well.
    
    Change-Id: Idecd9fcc7af1c49742a401c0b52511c930325422
    Signed-off-by: a17671 <a17671@motorola.com>
    Reviewed-on: https://gerrit.mot.com/1820427
    SLTApproved: Slta Waiver
    SME-Granted: SME Approvals Granted
    Tested-by: Jira Key
    Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
    Submit-Approved: Jira Key
    a17671 authored and goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    ec9f9bc View commit details
    Browse the repository at this point in the history
  19. ufs:Integrate KioXia UFS HPB driver fix

    KioXia HPB driver did not handle the suspend/resume
    Cases, if the phone and the UFS device enter suspend mode
    While HPB driver still sends read buffer command
    To UFS device, it may not get response from UFS device
    And sometimes breaks the block layer elevator algorithm
    Then all the other bio request could get blocked
    
    Change-Id: I5b61c6c1ab0ffb1cf841cd35a80138dadda0d91b
    Signed-off-by: a17671 <a17671@motorola.com>
    Reviewed-on: https://gerrit.mot.com/1825352
    SLTApproved: Slta Waiver
    SME-Granted: SME Approvals Granted
    Tested-by: Jira Key
    Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
    Submit-Approved: Jira Key
    a17671 authored and goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    f27e753 View commit details
    Browse the repository at this point in the history
  20. ufs:Integrate Samsung UFS HPB driver fix

    Samsung add the RQF_PM flag
    To avoid the possible elevator break
    In case of the Suspending rpm_status
    
    Change-Id: I82a3a5cb5406a851ba7c7c3503b5819c2b002413
    Signed-off-by: a17671 <a17671@motorola.com>
    Reviewed-on: https://gerrit.mot.com/1826131
    SLTApproved: Slta Waiver
    SME-Granted: SME Approvals Granted
    Tested-by: Jira Key
    Reviewed-by: Wang Wang <wangwang1@mt.com>
    Submit-Approved: Jira Key
    a17671 authored and goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    9f1d5ff View commit details
    Browse the repository at this point in the history
  21. scsi:Fix block layer elevator stuck issue

    Current block layer elevator may be stuck
    If PM is in the suspending status. QCOM
    Gave a fix in SR 05006893, their formal CR
    Is 2852181
    
    Change-Id: Ieb5bbfebefa2d497291263d900f2c8cc186fe8d7
    Signed-off-by: a17671 <a17671@motorola.com>
    Reviewed-on: https://gerrit.mot.com/1852288
    SLTApproved: Slta Waiver
    SME-Granted: SME Approvals Granted
    Tested-by: Jira Key
    Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
    Submit-Approved: Jira Key
    a17671 authored and goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    76747e7 View commit details
    Browse the repository at this point in the history
  22. ufs:Integrate Samsung stack overflow fix

    Samsung gave another HPB driver patch
    To fix the stack overflow issue caused by
    Recurssive add pre-request into the queue
    
    Change-Id: I03e9f72219cd2a738d577e7adee4ab302ce120d8
    Signed-off-by: a17671 <a17671@motorola.com>
    Reviewed-on: https://gerrit.mot.com/1835172
    SME-Granted: SME Approvals Granted
    SLTApproved: Slta Waiver
    Tested-by: Jira Key
    Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
    Submit-Approved: Jira Key
    a17671 authored and goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    1c572a5 View commit details
    Browse the repository at this point in the history
  23. ufs:Add Samsung HPB nr_pending fix

    Samsung HPB driver has unblanced pm operations
    Which cause the nr_pending negative value
    This will have impact of runtime pm management
    
    Change-Id: Ie21a02b3c92cb2495e0be9db0885f275ecfbcfb5
    Signed-off-by: a17671 <a17671@motorola.com>
    Reviewed-on: https://gerrit.mot.com/1890611
    SLTApproved: Slta Waiver
    SME-Granted: SME Approvals Granted
    Tested-by: Jira Key
    Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
    Submit-Approved: Jira Key
    a17671 authored and goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    7fe1729 View commit details
    Browse the repository at this point in the history
  24. scsi:ufs:Disable interrupt in reset path

    During error scenarios, while error handler is
    in middle of resetting the host controller, we
    might get a line reset which may result isr handler
    trying to access UFS register. But since controller
    is in reset state, SW won't have access to controller
    register which will lead to noc error.
    Per qcom suggestion to pickup the change from 5.4 kernel
    
    Change-Id: Idaf75f512ac1df18f777b192f7d85366360f724f
    Signed-off-by: a17671 <a17671@motorola.com>
    Reviewed-on: https://gerrit.mot.com/1926918
    SME-Granted: SME Approvals Granted
    SLTApproved: Slta Waiver
    Tested-by: Jira Key
    Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
    Submit-Approved: Jira Key
    a17671 authored and goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    195b319 View commit details
    Browse the repository at this point in the history
  25. ufs:Add Samsung UFS3.1 drivers headers

    Header file changes for Samsung
    HPB_FS and the UFSFEATURE_31
    
    Change-Id: I972820a59f5c70916f0f636796a8703c15ab482d
    Signed-off-by: a17671 <a17671@motorola.com>
    Reviewed-on: https://gerrit.mot.com/1773953
    SLTApproved: Slta Waiver
    SME-Granted: SME Approvals Granted
    Tested-by: Jira Key
    Reviewed-by: Wei Deng <dengwei1@motorola.com>
    Reviewed-by: Qing Chang <qing@motorola.com>
    Submit-Approved: Jira Key
    a17671 authored and goodmeow committed Apr 20, 2022
    Configuration menu
    Copy the full SHA
    888c6ec View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    a6e661e View commit details
    Browse the repository at this point in the history