On 8/23/24 7:29 PM, Manivannan Sadhasivam wrote:
What if other vendors start adding the workaround in the core driver citing GKI requirement (provided it also removes some code as you justified)? Will it be acceptable? NO.
It's not up to you to define new rules for upstream kernel development. Anyone is allowed to publish patches that rework kernel code, whether or not the purpose of such a patch is to work around a SoC bug. Additionally, it has already happened that one of your colleagues submitted a workaround for a SoC bug to the UFS core driver. From the description of commit 0f52fcb99ea2 ("scsi: ufs: Try to save power mode change and UIC cmd completion timeout"): "This is to deal with the scenario in which completion has been raised but the one waiting for the completion cannot be awaken in time due to kernel scheduling problem." That description makes zero sense to me. My conclusion from commit 0f52fcb99ea2 is that it is a workaround for a bug in a UFS host controller, namely that a particular UFS host controller not always generates a UIC completion interrupt when it should. Bart.