Commit 0f52fcb
scsi: ufs: Try to save power mode change and UIC cmd completion timeout
Use the uic_cmd->cmd_active as a flag to track the lifecycle of an UIC cmd.
The flag is set before sending the UIC cmd and cleared in IRQ handler. When
a PMC or UIC cmd completion timeout happens, if the flag is not set,
instead of returning timeout error, we still treat it as a successful
operation. 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.
Link: https://lore.kernel.org/r/1604384682-15837-3-git-send-email-cang@codeaurora.org
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent da3fecb commit 0f52fcb
2 files changed
Lines changed: 26 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2115 | 2115 | | |
2116 | 2116 | | |
2117 | 2117 | | |
2118 | | - | |
| 2118 | + | |
2119 | 2119 | | |
2120 | | - | |
| 2120 | + | |
2121 | 2121 | | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
2122 | 2132 | | |
2123 | 2133 | | |
2124 | 2134 | | |
| |||
2150 | 2160 | | |
2151 | 2161 | | |
2152 | 2162 | | |
| 2163 | + | |
2153 | 2164 | | |
2154 | 2165 | | |
2155 | 2166 | | |
| |||
3807 | 3818 | | |
3808 | 3819 | | |
3809 | 3820 | | |
| 3821 | + | |
| 3822 | + | |
| 3823 | + | |
| 3824 | + | |
| 3825 | + | |
| 3826 | + | |
| 3827 | + | |
3810 | 3828 | | |
3811 | 3829 | | |
3812 | 3830 | | |
3813 | 3831 | | |
| 3832 | + | |
3814 | 3833 | | |
3815 | 3834 | | |
3816 | 3835 | | |
| |||
4902 | 4921 | | |
4903 | 4922 | | |
4904 | 4923 | | |
| 4924 | + | |
| 4925 | + | |
4905 | 4926 | | |
4906 | 4927 | | |
4907 | 4928 | | |
4908 | 4929 | | |
4909 | 4930 | | |
| 4931 | + | |
4910 | 4932 | | |
4911 | 4933 | | |
4912 | 4934 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| |||
0 commit comments