Commit 7a052ae
xhci: dbc: Avoid event polling busyloop if pending rx transfers are inactive.
BugLink: https://bugs.launchpad.net/bugs/2115252
commit cab63934c33b12c0d1e9f4da7450928057f2c142 upstream.
Event polling delay is set to 0 if there are any pending requests in
either rx or tx requests lists. Checking for pending requests does
not work well for "IN" transfers as the tty driver always queues
requests to the list and TRBs to the ring, preparing to receive data
from the host.
This causes unnecessary busylooping and cpu hogging.
Only set the event polling delay to 0 if there are pending tx "write"
transfers, or if it was less than 10ms since last active data transfer
in any direction.
Cc: Łukasz Bartosik <ukaszb@chromium.org>
Fixes: fb18e5b ("xhci: dbc: poll at different rate depending on data transfer activity")
Cc: stable@vger.kernel.org
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20250505125630.561699-3-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Manuel Diewald <manuel.diewald@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>1 parent e931c98 commit 7a052ae
2 files changed
+19
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
823 | 823 | | |
824 | 824 | | |
825 | 825 | | |
| 826 | + | |
826 | 827 | | |
827 | 828 | | |
828 | 829 | | |
| |||
909 | 910 | | |
910 | 911 | | |
911 | 912 | | |
| 913 | + | |
912 | 914 | | |
913 | 915 | | |
914 | 916 | | |
| |||
927 | 929 | | |
928 | 930 | | |
929 | 931 | | |
930 | | - | |
| 932 | + | |
931 | 933 | | |
932 | 934 | | |
933 | 935 | | |
| |||
936 | 938 | | |
937 | 939 | | |
938 | 940 | | |
| 941 | + | |
939 | 942 | | |
940 | 943 | | |
941 | 944 | | |
| |||
954 | 957 | | |
955 | 958 | | |
956 | 959 | | |
957 | | - | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
958 | 967 | | |
959 | | - | |
| 968 | + | |
960 | 969 | | |
961 | 970 | | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
962 | 975 | | |
963 | 976 | | |
964 | 977 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| |||
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
| 146 | + | |
145 | 147 | | |
146 | 148 | | |
147 | 149 | | |
| |||
187 | 189 | | |
188 | 190 | | |
189 | 191 | | |
| 192 | + | |
190 | 193 | | |
191 | 194 | | |
192 | 195 | | |
| |||
0 commit comments