Commit 4e8ef34
usb: dwc3: fix gadget mode suspend interrupt handler issue
When work in gadget mode, currently driver doesn't update software level
link_state correctly as link state change event is not enabled for most
devices, in function dwc3_gadget_suspend_interrupt(), it will only pass
suspend event to UDC core when software level link state changes, so when
interrupt generated in sequences of suspend -> reset -> conndone ->
suspend, link state is not updated during reset and conndone, so second
suspend interrupt event will not pass to UDC core.
Remove link_state compare in dwc3_gadget_suspend_interrupt() and add a
suspended flag to replace the compare function.
Fixes: 799e9dc ("usb: dwc3: gadget: conditionally disable Link State change events")
Cc: stable <stable@kernel.org>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
Link: https://lore.kernel.org/r/20230512004524.31950-1-quic_linyyuan@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent c854087 commit 4e8ef34
2 files changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1116 | 1116 | | |
1117 | 1117 | | |
1118 | 1118 | | |
| 1119 | + | |
1119 | 1120 | | |
1120 | 1121 | | |
1121 | 1122 | | |
| |||
1332 | 1333 | | |
1333 | 1334 | | |
1334 | 1335 | | |
| 1336 | + | |
1335 | 1337 | | |
1336 | 1338 | | |
1337 | 1339 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2440 | 2440 | | |
2441 | 2441 | | |
2442 | 2442 | | |
| 2443 | + | |
2443 | 2444 | | |
2444 | 2445 | | |
2445 | 2446 | | |
| |||
3942 | 3943 | | |
3943 | 3944 | | |
3944 | 3945 | | |
| 3946 | + | |
| 3947 | + | |
3945 | 3948 | | |
3946 | 3949 | | |
3947 | 3950 | | |
| |||
3966 | 3969 | | |
3967 | 3970 | | |
3968 | 3971 | | |
| 3972 | + | |
| 3973 | + | |
3969 | 3974 | | |
3970 | 3975 | | |
3971 | 3976 | | |
| |||
4184 | 4189 | | |
4185 | 4190 | | |
4186 | 4191 | | |
| 4192 | + | |
| 4193 | + | |
4187 | 4194 | | |
4188 | 4195 | | |
4189 | 4196 | | |
| |||
4281 | 4288 | | |
4282 | 4289 | | |
4283 | 4290 | | |
| 4291 | + | |
4284 | 4292 | | |
4285 | 4293 | | |
4286 | 4294 | | |
| |||
4307 | 4315 | | |
4308 | 4316 | | |
4309 | 4317 | | |
4310 | | - | |
| 4318 | + | |
| 4319 | + | |
4311 | 4320 | | |
| 4321 | + | |
4312 | 4322 | | |
4313 | 4323 | | |
4314 | 4324 | | |
| |||
0 commit comments