]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: ufs: Add checking lifetime attribute for WriteBooster
authorJinyoung Choi <j-young.choi@samsung.com>
Thu, 27 Jan 2022 03:00:25 +0000 (12:00 +0900)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 31 Jan 2022 21:44:57 +0000 (16:44 -0500)
commit83cd01c9235fd8bdbc6d347509842628db1d35d2
treecd8ead4325be86044e6ca8e1b7180dcb6a01eee6
parentd40a801e2a0681164e23a75aa69378b166653c8b
scsi: ufs: Add checking lifetime attribute for WriteBooster

Because WB performs writes in SLC mode, it is not possible to use
WriteBooster indefinitely. Vendors can set a lifetime limit in the device.
If the lifetime exceeds this limit, the device ican disable the WB feature.

The feature is defined in the "bWriteBoosterBufferLifeTimeEst (IDN = 1E)"
attribute.

With lifetime exceeding the limit value, the current driver continuously
performs the following query:

- Write Flag: WB_ENABLE / DISABLE
- Read attr: Available Buffer Size
- Read attr: Current Buffer Size

This patch recognizes that WriteBooster is no longer supported by the
device, and prevents unnecessary queries.

Link: https://lore.kernel.org/r/1891546521.01643252701746.JavaMail.epsvc@epcpadp3
Reviewed-by: Asutosh Das <quic_asutoshd@quicinc.com>
Acked-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Jinyoung Choi <j-young.choi@samsung.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufs.h
drivers/scsi/ufs/ufshcd.c