Commit 8002d6d
serial: 8250_dw: Avoid unnecessary LCR writes
When DW UART is configured with BUSY flag, LCR writes may not always
succeed which can make any LCR write complex and very expensive.
Performing write directly can trigger IRQ and the driver has to perform
complex and distruptive sequence while retrying the write.
Therefore, it's better to avoid doing LCR write that would not change
the value of the LCR register. Add LCR write avoidance code into the
8250_dw driver's .serial_out() functions.
Reported-by: Bandal, Shankar <[email protected]>
Tested-by: Bandal, Shankar <[email protected]>
Tested-by: Murthy, Shanth <[email protected]>
Cc: stable <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Ilpo Järvinen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 59a33d8 commit 8002d6d
1 file changed
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
184 | 200 | | |
185 | 201 | | |
186 | 202 | | |
| |||
207 | 223 | | |
208 | 224 | | |
209 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
210 | 229 | | |
211 | 230 | | |
212 | 231 | | |
213 | 232 | | |
214 | 233 | | |
215 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
216 | 238 | | |
217 | 239 | | |
218 | 240 | | |
| |||
237 | 259 | | |
238 | 260 | | |
239 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
240 | 265 | | |
241 | 266 | | |
242 | 267 | | |
| |||
248 | 273 | | |
249 | 274 | | |
250 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
251 | 279 | | |
252 | 280 | | |
253 | 281 | | |
| |||
261 | 289 | | |
262 | 290 | | |
263 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
264 | 295 | | |
265 | 296 | | |
266 | 297 | | |
| |||
0 commit comments