1 |
commit: 652a47cd4bcad3632bff3a6ca6e7275e30f5207d |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 12 11:29:10 2022 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 12 11:29:10 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=652a47cd |
7 |
|
8 |
Linux patch 5.10.115 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1114_linux-5.10.115.patch | 2390 +++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 2394 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index 439eef26..46bc953b 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -499,6 +499,10 @@ Patch: 1113_linux-5.10.114.patch |
21 |
From: http://www.kernel.org |
22 |
Desc: Linux 5.10.114 |
23 |
|
24 |
+Patch: 1114_linux-5.10.115.patch |
25 |
+From: http://www.kernel.org |
26 |
+Desc: Linux 5.10.115 |
27 |
+ |
28 |
Patch: 1500_XATTR_USER_PREFIX.patch |
29 |
From: https://bugs.gentoo.org/show_bug.cgi?id=470644 |
30 |
Desc: Support for namespace user.pax.* on tmpfs. |
31 |
|
32 |
diff --git a/1114_linux-5.10.115.patch b/1114_linux-5.10.115.patch |
33 |
new file mode 100644 |
34 |
index 00000000..eea14ce9 |
35 |
--- /dev/null |
36 |
+++ b/1114_linux-5.10.115.patch |
37 |
@@ -0,0 +1,2390 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index b76e6d0aa85de..86d3e137d7f2d 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,7 +1,7 @@ |
43 |
+ # SPDX-License-Identifier: GPL-2.0 |
44 |
+ VERSION = 5 |
45 |
+ PATCHLEVEL = 10 |
46 |
+-SUBLEVEL = 114 |
47 |
++SUBLEVEL = 115 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = Dare mighty things |
50 |
+ |
51 |
+diff --git a/arch/mips/include/asm/timex.h b/arch/mips/include/asm/timex.h |
52 |
+index b05bb70a2e46f..8026baf46e729 100644 |
53 |
+--- a/arch/mips/include/asm/timex.h |
54 |
++++ b/arch/mips/include/asm/timex.h |
55 |
+@@ -40,9 +40,9 @@ |
56 |
+ typedef unsigned int cycles_t; |
57 |
+ |
58 |
+ /* |
59 |
+- * On R4000/R4400 before version 5.0 an erratum exists such that if the |
60 |
+- * cycle counter is read in the exact moment that it is matching the |
61 |
+- * compare register, no interrupt will be generated. |
62 |
++ * On R4000/R4400 an erratum exists such that if the cycle counter is |
63 |
++ * read in the exact moment that it is matching the compare register, |
64 |
++ * no interrupt will be generated. |
65 |
+ * |
66 |
+ * There is a suggested workaround and also the erratum can't strike if |
67 |
+ * the compare interrupt isn't being used as the clock source device. |
68 |
+@@ -63,7 +63,7 @@ static inline int can_use_mips_counter(unsigned int prid) |
69 |
+ if (!__builtin_constant_p(cpu_has_counter)) |
70 |
+ asm volatile("" : "=m" (cpu_data[0].options)); |
71 |
+ if (likely(cpu_has_counter && |
72 |
+- prid >= (PRID_IMP_R4000 | PRID_REV_ENCODE_44(5, 0)))) |
73 |
++ prid > (PRID_IMP_R4000 | PRID_REV_ENCODE_44(15, 15)))) |
74 |
+ return 1; |
75 |
+ else |
76 |
+ return 0; |
77 |
+diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c |
78 |
+index caa01457dce60..ed339d7979f3f 100644 |
79 |
+--- a/arch/mips/kernel/time.c |
80 |
++++ b/arch/mips/kernel/time.c |
81 |
+@@ -141,15 +141,10 @@ static __init int cpu_has_mfc0_count_bug(void) |
82 |
+ case CPU_R4400MC: |
83 |
+ /* |
84 |
+ * The published errata for the R4400 up to 3.0 say the CPU |
85 |
+- * has the mfc0 from count bug. |
86 |
++ * has the mfc0 from count bug. This seems the last version |
87 |
++ * produced. |
88 |
+ */ |
89 |
+- if ((current_cpu_data.processor_id & 0xff) <= 0x30) |
90 |
+- return 1; |
91 |
+- |
92 |
+- /* |
93 |
+- * we assume newer revisions are ok |
94 |
+- */ |
95 |
+- return 0; |
96 |
++ return 1; |
97 |
+ } |
98 |
+ |
99 |
+ return 0; |
100 |
+diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c |
101 |
+index 7f2d0c0ecc804..176ef00bdd15e 100644 |
102 |
+--- a/arch/parisc/kernel/processor.c |
103 |
++++ b/arch/parisc/kernel/processor.c |
104 |
+@@ -419,8 +419,7 @@ show_cpuinfo (struct seq_file *m, void *v) |
105 |
+ } |
106 |
+ seq_printf(m, " (0x%02lx)\n", boot_cpu_data.pdc.capabilities); |
107 |
+ |
108 |
+- seq_printf(m, "model\t\t: %s\n" |
109 |
+- "model name\t: %s\n", |
110 |
++ seq_printf(m, "model\t\t: %s - %s\n", |
111 |
+ boot_cpu_data.pdc.sys_model_name, |
112 |
+ cpuinfo->dev ? |
113 |
+ cpuinfo->dev->name : "Unknown"); |
114 |
+diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c |
115 |
+index 18e952fed021b..6c3d38b5a8add 100644 |
116 |
+--- a/arch/x86/kernel/kvm.c |
117 |
++++ b/arch/x86/kernel/kvm.c |
118 |
+@@ -66,6 +66,7 @@ static DEFINE_PER_CPU_DECRYPTED(struct kvm_vcpu_pv_apf_data, apf_reason) __align |
119 |
+ DEFINE_PER_CPU_DECRYPTED(struct kvm_steal_time, steal_time) __aligned(64) __visible; |
120 |
+ static int has_steal_clock = 0; |
121 |
+ |
122 |
++static int has_guest_poll = 0; |
123 |
+ /* |
124 |
+ * No need for any "IO delay" on KVM |
125 |
+ */ |
126 |
+@@ -624,14 +625,26 @@ static int kvm_cpu_down_prepare(unsigned int cpu) |
127 |
+ |
128 |
+ static int kvm_suspend(void) |
129 |
+ { |
130 |
++ u64 val = 0; |
131 |
++ |
132 |
+ kvm_guest_cpu_offline(false); |
133 |
+ |
134 |
++#ifdef CONFIG_ARCH_CPUIDLE_HALTPOLL |
135 |
++ if (kvm_para_has_feature(KVM_FEATURE_POLL_CONTROL)) |
136 |
++ rdmsrl(MSR_KVM_POLL_CONTROL, val); |
137 |
++ has_guest_poll = !(val & 1); |
138 |
++#endif |
139 |
+ return 0; |
140 |
+ } |
141 |
+ |
142 |
+ static void kvm_resume(void) |
143 |
+ { |
144 |
+ kvm_cpu_online(raw_smp_processor_id()); |
145 |
++ |
146 |
++#ifdef CONFIG_ARCH_CPUIDLE_HALTPOLL |
147 |
++ if (kvm_para_has_feature(KVM_FEATURE_POLL_CONTROL) && has_guest_poll) |
148 |
++ wrmsrl(MSR_KVM_POLL_CONTROL, 0); |
149 |
++#endif |
150 |
+ } |
151 |
+ |
152 |
+ static struct syscore_ops kvm_syscore_ops = { |
153 |
+diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c |
154 |
+index 41b0dc37720e0..6e1ea5e85e598 100644 |
155 |
+--- a/arch/x86/kvm/cpuid.c |
156 |
++++ b/arch/x86/kvm/cpuid.c |
157 |
+@@ -668,6 +668,11 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function) |
158 |
+ union cpuid10_eax eax; |
159 |
+ union cpuid10_edx edx; |
160 |
+ |
161 |
++ if (!static_cpu_has(X86_FEATURE_ARCH_PERFMON)) { |
162 |
++ entry->eax = entry->ebx = entry->ecx = entry->edx = 0; |
163 |
++ break; |
164 |
++ } |
165 |
++ |
166 |
+ perf_get_x86_pmu_capability(&cap); |
167 |
+ |
168 |
+ /* |
169 |
+diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c |
170 |
+index de11149e28e09..a3ef793fce5f1 100644 |
171 |
+--- a/arch/x86/kvm/lapic.c |
172 |
++++ b/arch/x86/kvm/lapic.c |
173 |
+@@ -113,7 +113,8 @@ static inline u32 kvm_x2apic_id(struct kvm_lapic *apic) |
174 |
+ |
175 |
+ static bool kvm_can_post_timer_interrupt(struct kvm_vcpu *vcpu) |
176 |
+ { |
177 |
+- return pi_inject_timer && kvm_vcpu_apicv_active(vcpu); |
178 |
++ return pi_inject_timer && kvm_vcpu_apicv_active(vcpu) && |
179 |
++ (kvm_mwait_in_guest(vcpu->kvm) || kvm_hlt_in_guest(vcpu->kvm)); |
180 |
+ } |
181 |
+ |
182 |
+ bool kvm_can_use_hv_timer(struct kvm_vcpu *vcpu) |
183 |
+@@ -2106,10 +2107,9 @@ int kvm_lapic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val) |
184 |
+ break; |
185 |
+ |
186 |
+ case APIC_SELF_IPI: |
187 |
+- if (apic_x2apic_mode(apic)) { |
188 |
+- kvm_lapic_reg_write(apic, APIC_ICR, |
189 |
+- APIC_DEST_SELF | (val & APIC_VECTOR_MASK)); |
190 |
+- } else |
191 |
++ if (apic_x2apic_mode(apic)) |
192 |
++ kvm_apic_send_ipi(apic, APIC_DEST_SELF | (val & APIC_VECTOR_MASK), 0); |
193 |
++ else |
194 |
+ ret = 1; |
195 |
+ break; |
196 |
+ default: |
197 |
+diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c |
198 |
+index 99ea1ec12ffe0..70ef5b542681c 100644 |
199 |
+--- a/arch/x86/kvm/mmu/mmu.c |
200 |
++++ b/arch/x86/kvm/mmu/mmu.c |
201 |
+@@ -3140,6 +3140,8 @@ static void mmu_free_root_page(struct kvm *kvm, hpa_t *root_hpa, |
202 |
+ return; |
203 |
+ |
204 |
+ sp = to_shadow_page(*root_hpa & PT64_BASE_ADDR_MASK); |
205 |
++ if (WARN_ON(!sp)) |
206 |
++ return; |
207 |
+ |
208 |
+ if (kvm_mmu_put_root(kvm, sp)) { |
209 |
+ if (sp->tdp_mmu_page) |
210 |
+diff --git a/arch/x86/kvm/svm/pmu.c b/arch/x86/kvm/svm/pmu.c |
211 |
+index 0e9c2322d3988..49e5be735f147 100644 |
212 |
+--- a/arch/x86/kvm/svm/pmu.c |
213 |
++++ b/arch/x86/kvm/svm/pmu.c |
214 |
+@@ -44,6 +44,22 @@ static struct kvm_event_hw_type_mapping amd_event_mapping[] = { |
215 |
+ [7] = { 0xd1, 0x00, PERF_COUNT_HW_STALLED_CYCLES_BACKEND }, |
216 |
+ }; |
217 |
+ |
218 |
++/* duplicated from amd_f17h_perfmon_event_map. */ |
219 |
++static struct kvm_event_hw_type_mapping amd_f17h_event_mapping[] = { |
220 |
++ [0] = { 0x76, 0x00, PERF_COUNT_HW_CPU_CYCLES }, |
221 |
++ [1] = { 0xc0, 0x00, PERF_COUNT_HW_INSTRUCTIONS }, |
222 |
++ [2] = { 0x60, 0xff, PERF_COUNT_HW_CACHE_REFERENCES }, |
223 |
++ [3] = { 0x64, 0x09, PERF_COUNT_HW_CACHE_MISSES }, |
224 |
++ [4] = { 0xc2, 0x00, PERF_COUNT_HW_BRANCH_INSTRUCTIONS }, |
225 |
++ [5] = { 0xc3, 0x00, PERF_COUNT_HW_BRANCH_MISSES }, |
226 |
++ [6] = { 0x87, 0x02, PERF_COUNT_HW_STALLED_CYCLES_FRONTEND }, |
227 |
++ [7] = { 0x87, 0x01, PERF_COUNT_HW_STALLED_CYCLES_BACKEND }, |
228 |
++}; |
229 |
++ |
230 |
++/* amd_pmc_perf_hw_id depends on these being the same size */ |
231 |
++static_assert(ARRAY_SIZE(amd_event_mapping) == |
232 |
++ ARRAY_SIZE(amd_f17h_event_mapping)); |
233 |
++ |
234 |
+ static unsigned int get_msr_base(struct kvm_pmu *pmu, enum pmu_type type) |
235 |
+ { |
236 |
+ struct kvm_vcpu *vcpu = pmu_to_vcpu(pmu); |
237 |
+@@ -128,19 +144,25 @@ static inline struct kvm_pmc *get_gp_pmc_amd(struct kvm_pmu *pmu, u32 msr, |
238 |
+ |
239 |
+ static unsigned int amd_pmc_perf_hw_id(struct kvm_pmc *pmc) |
240 |
+ { |
241 |
++ struct kvm_event_hw_type_mapping *event_mapping; |
242 |
+ u8 event_select = pmc->eventsel & ARCH_PERFMON_EVENTSEL_EVENT; |
243 |
+ u8 unit_mask = (pmc->eventsel & ARCH_PERFMON_EVENTSEL_UMASK) >> 8; |
244 |
+ int i; |
245 |
+ |
246 |
++ if (guest_cpuid_family(pmc->vcpu) >= 0x17) |
247 |
++ event_mapping = amd_f17h_event_mapping; |
248 |
++ else |
249 |
++ event_mapping = amd_event_mapping; |
250 |
++ |
251 |
+ for (i = 0; i < ARRAY_SIZE(amd_event_mapping); i++) |
252 |
+- if (amd_event_mapping[i].eventsel == event_select |
253 |
+- && amd_event_mapping[i].unit_mask == unit_mask) |
254 |
++ if (event_mapping[i].eventsel == event_select |
255 |
++ && event_mapping[i].unit_mask == unit_mask) |
256 |
+ break; |
257 |
+ |
258 |
+ if (i == ARRAY_SIZE(amd_event_mapping)) |
259 |
+ return PERF_COUNT_HW_MAX; |
260 |
+ |
261 |
+- return amd_event_mapping[i].event_type; |
262 |
++ return event_mapping[i].event_type; |
263 |
+ } |
264 |
+ |
265 |
+ /* return PERF_COUNT_HW_MAX as AMD doesn't have fixed events */ |
266 |
+diff --git a/block/blk-map.c b/block/blk-map.c |
267 |
+index 21630dccac628..ede73f4f70147 100644 |
268 |
+--- a/block/blk-map.c |
269 |
++++ b/block/blk-map.c |
270 |
+@@ -488,7 +488,7 @@ static struct bio *bio_copy_kern(struct request_queue *q, void *data, |
271 |
+ if (bytes > len) |
272 |
+ bytes = len; |
273 |
+ |
274 |
+- page = alloc_page(q->bounce_gfp | gfp_mask); |
275 |
++ page = alloc_page(q->bounce_gfp | __GFP_ZERO | gfp_mask); |
276 |
+ if (!page) |
277 |
+ goto cleanup; |
278 |
+ |
279 |
+diff --git a/drivers/firewire/core-card.c b/drivers/firewire/core-card.c |
280 |
+index 54be88167c60b..f3b3953cac834 100644 |
281 |
+--- a/drivers/firewire/core-card.c |
282 |
++++ b/drivers/firewire/core-card.c |
283 |
+@@ -668,6 +668,7 @@ EXPORT_SYMBOL_GPL(fw_card_release); |
284 |
+ void fw_core_remove_card(struct fw_card *card) |
285 |
+ { |
286 |
+ struct fw_card_driver dummy_driver = dummy_driver_template; |
287 |
++ unsigned long flags; |
288 |
+ |
289 |
+ card->driver->update_phy_reg(card, 4, |
290 |
+ PHY_LINK_ACTIVE | PHY_CONTENDER, 0); |
291 |
+@@ -682,7 +683,9 @@ void fw_core_remove_card(struct fw_card *card) |
292 |
+ dummy_driver.stop_iso = card->driver->stop_iso; |
293 |
+ card->driver = &dummy_driver; |
294 |
+ |
295 |
++ spin_lock_irqsave(&card->lock, flags); |
296 |
+ fw_destroy_nodes(card); |
297 |
++ spin_unlock_irqrestore(&card->lock, flags); |
298 |
+ |
299 |
+ /* Wait for all users, especially device workqueue jobs, to finish. */ |
300 |
+ fw_card_put(card); |
301 |
+diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c |
302 |
+index fb6c651214f32..b0cc3f1e9bb00 100644 |
303 |
+--- a/drivers/firewire/core-cdev.c |
304 |
++++ b/drivers/firewire/core-cdev.c |
305 |
+@@ -1480,6 +1480,7 @@ static void outbound_phy_packet_callback(struct fw_packet *packet, |
306 |
+ { |
307 |
+ struct outbound_phy_packet_event *e = |
308 |
+ container_of(packet, struct outbound_phy_packet_event, p); |
309 |
++ struct client *e_client; |
310 |
+ |
311 |
+ switch (status) { |
312 |
+ /* expected: */ |
313 |
+@@ -1496,9 +1497,10 @@ static void outbound_phy_packet_callback(struct fw_packet *packet, |
314 |
+ } |
315 |
+ e->phy_packet.data[0] = packet->timestamp; |
316 |
+ |
317 |
++ e_client = e->client; |
318 |
+ queue_event(e->client, &e->event, &e->phy_packet, |
319 |
+ sizeof(e->phy_packet) + e->phy_packet.length, NULL, 0); |
320 |
+- client_put(e->client); |
321 |
++ client_put(e_client); |
322 |
+ } |
323 |
+ |
324 |
+ static int ioctl_send_phy_packet(struct client *client, union ioctl_arg *arg) |
325 |
+diff --git a/drivers/firewire/core-topology.c b/drivers/firewire/core-topology.c |
326 |
+index ec68ed27b0a5f..4cdbfef79f2e1 100644 |
327 |
+--- a/drivers/firewire/core-topology.c |
328 |
++++ b/drivers/firewire/core-topology.c |
329 |
+@@ -374,16 +374,13 @@ static void report_found_node(struct fw_card *card, |
330 |
+ card->bm_retries = 0; |
331 |
+ } |
332 |
+ |
333 |
++/* Must be called with card->lock held */ |
334 |
+ void fw_destroy_nodes(struct fw_card *card) |
335 |
+ { |
336 |
+- unsigned long flags; |
337 |
+- |
338 |
+- spin_lock_irqsave(&card->lock, flags); |
339 |
+ card->color++; |
340 |
+ if (card->local_node != NULL) |
341 |
+ for_each_fw_node(card, card->local_node, report_lost_node); |
342 |
+ card->local_node = NULL; |
343 |
+- spin_unlock_irqrestore(&card->lock, flags); |
344 |
+ } |
345 |
+ |
346 |
+ static void move_tree(struct fw_node *node0, struct fw_node *node1, int port) |
347 |
+@@ -509,6 +506,8 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation, |
348 |
+ struct fw_node *local_node; |
349 |
+ unsigned long flags; |
350 |
+ |
351 |
++ spin_lock_irqsave(&card->lock, flags); |
352 |
++ |
353 |
+ /* |
354 |
+ * If the selfID buffer is not the immediate successor of the |
355 |
+ * previously processed one, we cannot reliably compare the |
356 |
+@@ -520,8 +519,6 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation, |
357 |
+ card->bm_retries = 0; |
358 |
+ } |
359 |
+ |
360 |
+- spin_lock_irqsave(&card->lock, flags); |
361 |
+- |
362 |
+ card->broadcast_channel_allocated = card->broadcast_channel_auto_allocated; |
363 |
+ card->node_id = node_id; |
364 |
+ /* |
365 |
+diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c |
366 |
+index ac487c96bb717..6c20815cc8d16 100644 |
367 |
+--- a/drivers/firewire/core-transaction.c |
368 |
++++ b/drivers/firewire/core-transaction.c |
369 |
+@@ -73,24 +73,25 @@ static int try_cancel_split_timeout(struct fw_transaction *t) |
370 |
+ static int close_transaction(struct fw_transaction *transaction, |
371 |
+ struct fw_card *card, int rcode) |
372 |
+ { |
373 |
+- struct fw_transaction *t; |
374 |
++ struct fw_transaction *t = NULL, *iter; |
375 |
+ unsigned long flags; |
376 |
+ |
377 |
+ spin_lock_irqsave(&card->lock, flags); |
378 |
+- list_for_each_entry(t, &card->transaction_list, link) { |
379 |
+- if (t == transaction) { |
380 |
+- if (!try_cancel_split_timeout(t)) { |
381 |
++ list_for_each_entry(iter, &card->transaction_list, link) { |
382 |
++ if (iter == transaction) { |
383 |
++ if (!try_cancel_split_timeout(iter)) { |
384 |
+ spin_unlock_irqrestore(&card->lock, flags); |
385 |
+ goto timed_out; |
386 |
+ } |
387 |
+- list_del_init(&t->link); |
388 |
+- card->tlabel_mask &= ~(1ULL << t->tlabel); |
389 |
++ list_del_init(&iter->link); |
390 |
++ card->tlabel_mask &= ~(1ULL << iter->tlabel); |
391 |
++ t = iter; |
392 |
+ break; |
393 |
+ } |
394 |
+ } |
395 |
+ spin_unlock_irqrestore(&card->lock, flags); |
396 |
+ |
397 |
+- if (&t->link != &card->transaction_list) { |
398 |
++ if (t) { |
399 |
+ t->callback(card, rcode, NULL, 0, t->callback_data); |
400 |
+ return 0; |
401 |
+ } |
402 |
+@@ -935,7 +936,7 @@ EXPORT_SYMBOL(fw_core_handle_request); |
403 |
+ |
404 |
+ void fw_core_handle_response(struct fw_card *card, struct fw_packet *p) |
405 |
+ { |
406 |
+- struct fw_transaction *t; |
407 |
++ struct fw_transaction *t = NULL, *iter; |
408 |
+ unsigned long flags; |
409 |
+ u32 *data; |
410 |
+ size_t data_length; |
411 |
+@@ -947,20 +948,21 @@ void fw_core_handle_response(struct fw_card *card, struct fw_packet *p) |
412 |
+ rcode = HEADER_GET_RCODE(p->header[1]); |
413 |
+ |
414 |
+ spin_lock_irqsave(&card->lock, flags); |
415 |
+- list_for_each_entry(t, &card->transaction_list, link) { |
416 |
+- if (t->node_id == source && t->tlabel == tlabel) { |
417 |
+- if (!try_cancel_split_timeout(t)) { |
418 |
++ list_for_each_entry(iter, &card->transaction_list, link) { |
419 |
++ if (iter->node_id == source && iter->tlabel == tlabel) { |
420 |
++ if (!try_cancel_split_timeout(iter)) { |
421 |
+ spin_unlock_irqrestore(&card->lock, flags); |
422 |
+ goto timed_out; |
423 |
+ } |
424 |
+- list_del_init(&t->link); |
425 |
+- card->tlabel_mask &= ~(1ULL << t->tlabel); |
426 |
++ list_del_init(&iter->link); |
427 |
++ card->tlabel_mask &= ~(1ULL << iter->tlabel); |
428 |
++ t = iter; |
429 |
+ break; |
430 |
+ } |
431 |
+ } |
432 |
+ spin_unlock_irqrestore(&card->lock, flags); |
433 |
+ |
434 |
+- if (&t->link == &card->transaction_list) { |
435 |
++ if (!t) { |
436 |
+ timed_out: |
437 |
+ fw_notice(card, "unsolicited response (source %x, tlabel %x)\n", |
438 |
+ source, tlabel); |
439 |
+diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c |
440 |
+index 4d5054211550b..2ceed9287435f 100644 |
441 |
+--- a/drivers/firewire/sbp2.c |
442 |
++++ b/drivers/firewire/sbp2.c |
443 |
+@@ -408,7 +408,7 @@ static void sbp2_status_write(struct fw_card *card, struct fw_request *request, |
444 |
+ void *payload, size_t length, void *callback_data) |
445 |
+ { |
446 |
+ struct sbp2_logical_unit *lu = callback_data; |
447 |
+- struct sbp2_orb *orb; |
448 |
++ struct sbp2_orb *orb = NULL, *iter; |
449 |
+ struct sbp2_status status; |
450 |
+ unsigned long flags; |
451 |
+ |
452 |
+@@ -433,17 +433,18 @@ static void sbp2_status_write(struct fw_card *card, struct fw_request *request, |
453 |
+ |
454 |
+ /* Lookup the orb corresponding to this status write. */ |
455 |
+ spin_lock_irqsave(&lu->tgt->lock, flags); |
456 |
+- list_for_each_entry(orb, &lu->orb_list, link) { |
457 |
++ list_for_each_entry(iter, &lu->orb_list, link) { |
458 |
+ if (STATUS_GET_ORB_HIGH(status) == 0 && |
459 |
+- STATUS_GET_ORB_LOW(status) == orb->request_bus) { |
460 |
+- orb->rcode = RCODE_COMPLETE; |
461 |
+- list_del(&orb->link); |
462 |
++ STATUS_GET_ORB_LOW(status) == iter->request_bus) { |
463 |
++ iter->rcode = RCODE_COMPLETE; |
464 |
++ list_del(&iter->link); |
465 |
++ orb = iter; |
466 |
+ break; |
467 |
+ } |
468 |
+ } |
469 |
+ spin_unlock_irqrestore(&lu->tgt->lock, flags); |
470 |
+ |
471 |
+- if (&orb->link != &lu->orb_list) { |
472 |
++ if (orb) { |
473 |
+ orb->callback(orb, &status); |
474 |
+ kref_put(&orb->kref, free_orb); /* orb callback reference */ |
475 |
+ } else { |
476 |
+diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c |
477 |
+index a78167b2c9ca2..e936e1eb1f95c 100644 |
478 |
+--- a/drivers/gpio/gpio-pca953x.c |
479 |
++++ b/drivers/gpio/gpio-pca953x.c |
480 |
+@@ -761,11 +761,11 @@ static bool pca953x_irq_pending(struct pca953x_chip *chip, unsigned long *pendin |
481 |
+ bitmap_xor(cur_stat, new_stat, old_stat, gc->ngpio); |
482 |
+ bitmap_and(trigger, cur_stat, chip->irq_mask, gc->ngpio); |
483 |
+ |
484 |
++ bitmap_copy(chip->irq_stat, new_stat, gc->ngpio); |
485 |
++ |
486 |
+ if (bitmap_empty(trigger, gc->ngpio)) |
487 |
+ return false; |
488 |
+ |
489 |
+- bitmap_copy(chip->irq_stat, new_stat, gc->ngpio); |
490 |
+- |
491 |
+ bitmap_and(cur_stat, chip->irq_trig_fall, old_stat, gc->ngpio); |
492 |
+ bitmap_and(old_stat, chip->irq_trig_raise, new_stat, gc->ngpio); |
493 |
+ bitmap_or(new_stat, old_stat, cur_stat, gc->ngpio); |
494 |
+diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c |
495 |
+index 2f895a2b8411d..921a99578ff0e 100644 |
496 |
+--- a/drivers/gpio/gpiolib-of.c |
497 |
++++ b/drivers/gpio/gpiolib-of.c |
498 |
+@@ -912,7 +912,7 @@ static void of_gpiochip_init_valid_mask(struct gpio_chip *chip) |
499 |
+ i, &start); |
500 |
+ of_property_read_u32_index(np, "gpio-reserved-ranges", |
501 |
+ i + 1, &count); |
502 |
+- if (start >= chip->ngpio || start + count >= chip->ngpio) |
503 |
++ if (start >= chip->ngpio || start + count > chip->ngpio) |
504 |
+ continue; |
505 |
+ |
506 |
+ bitmap_clear(chip->valid_mask, start, count); |
507 |
+diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c |
508 |
+index 0e359a299f9ec..3f4403e778140 100644 |
509 |
+--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c |
510 |
++++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c |
511 |
+@@ -2822,7 +2822,7 @@ static void dp_test_get_audio_test_data(struct dc_link *link, bool disable_video |
512 |
+ &dpcd_pattern_type.value, |
513 |
+ sizeof(dpcd_pattern_type)); |
514 |
+ |
515 |
+- channel_count = dpcd_test_mode.bits.channel_count + 1; |
516 |
++ channel_count = min(dpcd_test_mode.bits.channel_count + 1, AUDIO_CHANNELS_COUNT); |
517 |
+ |
518 |
+ // read pattern periods for requested channels when sawTooth pattern is requested |
519 |
+ if (dpcd_pattern_type.value == AUDIO_TEST_PATTERN_SAWTOOTH || |
520 |
+diff --git a/drivers/hwmon/adt7470.c b/drivers/hwmon/adt7470.c |
521 |
+index 740f39a54ab08..71e357956ce4c 100644 |
522 |
+--- a/drivers/hwmon/adt7470.c |
523 |
++++ b/drivers/hwmon/adt7470.c |
524 |
+@@ -20,6 +20,7 @@ |
525 |
+ #include <linux/kthread.h> |
526 |
+ #include <linux/slab.h> |
527 |
+ #include <linux/util_macros.h> |
528 |
++#include <linux/sched.h> |
529 |
+ |
530 |
+ /* Addresses to scan */ |
531 |
+ static const unsigned short normal_i2c[] = { 0x2C, 0x2E, 0x2F, I2C_CLIENT_END }; |
532 |
+@@ -260,11 +261,10 @@ static int adt7470_update_thread(void *p) |
533 |
+ adt7470_read_temperatures(client, data); |
534 |
+ mutex_unlock(&data->lock); |
535 |
+ |
536 |
+- set_current_state(TASK_INTERRUPTIBLE); |
537 |
+ if (kthread_should_stop()) |
538 |
+ break; |
539 |
+ |
540 |
+- schedule_timeout(msecs_to_jiffies(data->auto_update_interval)); |
541 |
++ schedule_timeout_interruptible(msecs_to_jiffies(data->auto_update_interval)); |
542 |
+ } |
543 |
+ |
544 |
+ return 0; |
545 |
+diff --git a/drivers/infiniband/sw/siw/siw_cm.c b/drivers/infiniband/sw/siw/siw_cm.c |
546 |
+index 66764f7ef072a..6e7399c2ca8c9 100644 |
547 |
+--- a/drivers/infiniband/sw/siw/siw_cm.c |
548 |
++++ b/drivers/infiniband/sw/siw/siw_cm.c |
549 |
+@@ -968,14 +968,15 @@ static void siw_accept_newconn(struct siw_cep *cep) |
550 |
+ |
551 |
+ siw_cep_set_inuse(new_cep); |
552 |
+ rv = siw_proc_mpareq(new_cep); |
553 |
+- siw_cep_set_free(new_cep); |
554 |
+- |
555 |
+ if (rv != -EAGAIN) { |
556 |
+ siw_cep_put(cep); |
557 |
+ new_cep->listen_cep = NULL; |
558 |
+- if (rv) |
559 |
++ if (rv) { |
560 |
++ siw_cep_set_free(new_cep); |
561 |
+ goto error; |
562 |
++ } |
563 |
+ } |
564 |
++ siw_cep_set_free(new_cep); |
565 |
+ } |
566 |
+ return; |
567 |
+ |
568 |
+diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c |
569 |
+index b21c8224b1c84..21749859ad459 100644 |
570 |
+--- a/drivers/iommu/intel/iommu.c |
571 |
++++ b/drivers/iommu/intel/iommu.c |
572 |
+@@ -1626,7 +1626,8 @@ static void iommu_flush_iotlb_psi(struct intel_iommu *iommu, |
573 |
+ unsigned long pfn, unsigned int pages, |
574 |
+ int ih, int map) |
575 |
+ { |
576 |
+- unsigned int mask = ilog2(__roundup_pow_of_two(pages)); |
577 |
++ unsigned int aligned_pages = __roundup_pow_of_two(pages); |
578 |
++ unsigned int mask = ilog2(aligned_pages); |
579 |
+ uint64_t addr = (uint64_t)pfn << VTD_PAGE_SHIFT; |
580 |
+ u16 did = domain->iommu_did[iommu->seq_id]; |
581 |
+ |
582 |
+@@ -1638,10 +1639,30 @@ static void iommu_flush_iotlb_psi(struct intel_iommu *iommu, |
583 |
+ if (domain_use_first_level(domain)) { |
584 |
+ domain_flush_piotlb(iommu, domain, addr, pages, ih); |
585 |
+ } else { |
586 |
++ unsigned long bitmask = aligned_pages - 1; |
587 |
++ |
588 |
++ /* |
589 |
++ * PSI masks the low order bits of the base address. If the |
590 |
++ * address isn't aligned to the mask, then compute a mask value |
591 |
++ * needed to ensure the target range is flushed. |
592 |
++ */ |
593 |
++ if (unlikely(bitmask & pfn)) { |
594 |
++ unsigned long end_pfn = pfn + pages - 1, shared_bits; |
595 |
++ |
596 |
++ /* |
597 |
++ * Since end_pfn <= pfn + bitmask, the only way bits |
598 |
++ * higher than bitmask can differ in pfn and end_pfn is |
599 |
++ * by carrying. This means after masking out bitmask, |
600 |
++ * high bits starting with the first set bit in |
601 |
++ * shared_bits are all equal in both pfn and end_pfn. |
602 |
++ */ |
603 |
++ shared_bits = ~(pfn ^ end_pfn) & ~bitmask; |
604 |
++ mask = shared_bits ? __ffs(shared_bits) : BITS_PER_LONG; |
605 |
++ } |
606 |
++ |
607 |
+ /* |
608 |
+ * Fallback to domain selective flush if no PSI support or |
609 |
+- * the size is too big. PSI requires page size to be 2 ^ x, |
610 |
+- * and the base address is naturally aligned to the size. |
611 |
++ * the size is too big. |
612 |
+ */ |
613 |
+ if (!cap_pgsel_inv(iommu->cap) || |
614 |
+ mask > cap_max_amask_val(iommu->cap)) |
615 |
+diff --git a/drivers/md/dm.c b/drivers/md/dm.c |
616 |
+index b3d8d9e0e6f6e..ab0e2338e47ec 100644 |
617 |
+--- a/drivers/md/dm.c |
618 |
++++ b/drivers/md/dm.c |
619 |
+@@ -612,13 +612,15 @@ static void end_io_acct(struct mapped_device *md, struct bio *bio, |
620 |
+ { |
621 |
+ unsigned long duration = jiffies - start_time; |
622 |
+ |
623 |
+- bio_end_io_acct(bio, start_time); |
624 |
+- |
625 |
+ if (unlikely(dm_stats_used(&md->stats))) |
626 |
+ dm_stats_account_io(&md->stats, bio_data_dir(bio), |
627 |
+ bio->bi_iter.bi_sector, bio_sectors(bio), |
628 |
+ true, duration, stats_aux); |
629 |
+ |
630 |
++ smp_wmb(); |
631 |
++ |
632 |
++ bio_end_io_acct(bio, start_time); |
633 |
++ |
634 |
+ /* nudge anyone waiting on suspend queue */ |
635 |
+ if (unlikely(wq_has_sleeper(&md->wait))) |
636 |
+ wake_up(&md->wait); |
637 |
+@@ -2348,6 +2350,8 @@ static int dm_wait_for_bios_completion(struct mapped_device *md, long task_state |
638 |
+ } |
639 |
+ finish_wait(&md->wait, &wait); |
640 |
+ |
641 |
++ smp_rmb(); |
642 |
++ |
643 |
+ return r; |
644 |
+ } |
645 |
+ |
646 |
+diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c |
647 |
+index 7494d595035e3..87807ef010a96 100644 |
648 |
+--- a/drivers/mmc/core/mmc.c |
649 |
++++ b/drivers/mmc/core/mmc.c |
650 |
+@@ -1378,13 +1378,17 @@ static int mmc_select_hs400es(struct mmc_card *card) |
651 |
+ goto out_err; |
652 |
+ } |
653 |
+ |
654 |
++ /* |
655 |
++ * Bump to HS timing and frequency. Some cards don't handle |
656 |
++ * SEND_STATUS reliably at the initial frequency. |
657 |
++ */ |
658 |
+ mmc_set_timing(host, MMC_TIMING_MMC_HS); |
659 |
++ mmc_set_bus_speed(card); |
660 |
++ |
661 |
+ err = mmc_switch_status(card, true); |
662 |
+ if (err) |
663 |
+ goto out_err; |
664 |
+ |
665 |
+- mmc_set_clock(host, card->ext_csd.hs_max_dtr); |
666 |
+- |
667 |
+ /* Switch card to DDR with strobe bit */ |
668 |
+ val = EXT_CSD_DDR_BUS_WIDTH_8 | EXT_CSD_BUS_WIDTH_STROBE; |
669 |
+ err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, |
670 |
+@@ -1442,7 +1446,7 @@ out_err: |
671 |
+ static int mmc_select_hs200(struct mmc_card *card) |
672 |
+ { |
673 |
+ struct mmc_host *host = card->host; |
674 |
+- unsigned int old_timing, old_signal_voltage; |
675 |
++ unsigned int old_timing, old_signal_voltage, old_clock; |
676 |
+ int err = -EINVAL; |
677 |
+ u8 val; |
678 |
+ |
679 |
+@@ -1473,8 +1477,17 @@ static int mmc_select_hs200(struct mmc_card *card) |
680 |
+ false, true); |
681 |
+ if (err) |
682 |
+ goto err; |
683 |
++ |
684 |
++ /* |
685 |
++ * Bump to HS timing and frequency. Some cards don't handle |
686 |
++ * SEND_STATUS reliably at the initial frequency. |
687 |
++ * NB: We can't move to full (HS200) speeds until after we've |
688 |
++ * successfully switched over. |
689 |
++ */ |
690 |
+ old_timing = host->ios.timing; |
691 |
++ old_clock = host->ios.clock; |
692 |
+ mmc_set_timing(host, MMC_TIMING_MMC_HS200); |
693 |
++ mmc_set_clock(card->host, card->ext_csd.hs_max_dtr); |
694 |
+ |
695 |
+ /* |
696 |
+ * For HS200, CRC errors are not a reliable way to know the |
697 |
+@@ -1487,8 +1500,10 @@ static int mmc_select_hs200(struct mmc_card *card) |
698 |
+ * mmc_select_timing() assumes timing has not changed if |
699 |
+ * it is a switch error. |
700 |
+ */ |
701 |
+- if (err == -EBADMSG) |
702 |
++ if (err == -EBADMSG) { |
703 |
++ mmc_set_clock(host, old_clock); |
704 |
+ mmc_set_timing(host, old_timing); |
705 |
++ } |
706 |
+ } |
707 |
+ err: |
708 |
+ if (err) { |
709 |
+diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c |
710 |
+index e00167bcfaf6d..b5cb83bb9b851 100644 |
711 |
+--- a/drivers/mmc/host/rtsx_pci_sdmmc.c |
712 |
++++ b/drivers/mmc/host/rtsx_pci_sdmmc.c |
713 |
+@@ -37,10 +37,7 @@ struct realtek_pci_sdmmc { |
714 |
+ bool double_clk; |
715 |
+ bool eject; |
716 |
+ bool initial_mode; |
717 |
+- int power_state; |
718 |
+-#define SDMMC_POWER_ON 1 |
719 |
+-#define SDMMC_POWER_OFF 0 |
720 |
+- |
721 |
++ int prev_power_state; |
722 |
+ int sg_count; |
723 |
+ s32 cookie; |
724 |
+ int cookie_sg_count; |
725 |
+@@ -902,14 +899,21 @@ static int sd_set_bus_width(struct realtek_pci_sdmmc *host, |
726 |
+ return err; |
727 |
+ } |
728 |
+ |
729 |
+-static int sd_power_on(struct realtek_pci_sdmmc *host) |
730 |
++static int sd_power_on(struct realtek_pci_sdmmc *host, unsigned char power_mode) |
731 |
+ { |
732 |
+ struct rtsx_pcr *pcr = host->pcr; |
733 |
+ int err; |
734 |
+ |
735 |
+- if (host->power_state == SDMMC_POWER_ON) |
736 |
++ if (host->prev_power_state == MMC_POWER_ON) |
737 |
+ return 0; |
738 |
+ |
739 |
++ if (host->prev_power_state == MMC_POWER_UP) { |
740 |
++ rtsx_pci_write_register(pcr, SD_BUS_STAT, SD_CLK_TOGGLE_EN, 0); |
741 |
++ goto finish; |
742 |
++ } |
743 |
++ |
744 |
++ msleep(100); |
745 |
++ |
746 |
+ rtsx_pci_init_cmd(pcr); |
747 |
+ rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_SELECT, 0x07, SD_MOD_SEL); |
748 |
+ rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_SHARE_MODE, |
749 |
+@@ -928,11 +932,17 @@ static int sd_power_on(struct realtek_pci_sdmmc *host) |
750 |
+ if (err < 0) |
751 |
+ return err; |
752 |
+ |
753 |
++ mdelay(1); |
754 |
++ |
755 |
+ err = rtsx_pci_write_register(pcr, CARD_OE, SD_OUTPUT_EN, SD_OUTPUT_EN); |
756 |
+ if (err < 0) |
757 |
+ return err; |
758 |
+ |
759 |
+- host->power_state = SDMMC_POWER_ON; |
760 |
++ /* send at least 74 clocks */ |
761 |
++ rtsx_pci_write_register(pcr, SD_BUS_STAT, SD_CLK_TOGGLE_EN, SD_CLK_TOGGLE_EN); |
762 |
++ |
763 |
++finish: |
764 |
++ host->prev_power_state = power_mode; |
765 |
+ return 0; |
766 |
+ } |
767 |
+ |
768 |
+@@ -941,7 +951,7 @@ static int sd_power_off(struct realtek_pci_sdmmc *host) |
769 |
+ struct rtsx_pcr *pcr = host->pcr; |
770 |
+ int err; |
771 |
+ |
772 |
+- host->power_state = SDMMC_POWER_OFF; |
773 |
++ host->prev_power_state = MMC_POWER_OFF; |
774 |
+ |
775 |
+ rtsx_pci_init_cmd(pcr); |
776 |
+ |
777 |
+@@ -967,7 +977,7 @@ static int sd_set_power_mode(struct realtek_pci_sdmmc *host, |
778 |
+ if (power_mode == MMC_POWER_OFF) |
779 |
+ err = sd_power_off(host); |
780 |
+ else |
781 |
+- err = sd_power_on(host); |
782 |
++ err = sd_power_on(host, power_mode); |
783 |
+ |
784 |
+ return err; |
785 |
+ } |
786 |
+@@ -1404,10 +1414,11 @@ static int rtsx_pci_sdmmc_drv_probe(struct platform_device *pdev) |
787 |
+ |
788 |
+ host = mmc_priv(mmc); |
789 |
+ host->pcr = pcr; |
790 |
++ mmc->ios.power_delay_ms = 5; |
791 |
+ host->mmc = mmc; |
792 |
+ host->pdev = pdev; |
793 |
+ host->cookie = -1; |
794 |
+- host->power_state = SDMMC_POWER_OFF; |
795 |
++ host->prev_power_state = MMC_POWER_OFF; |
796 |
+ INIT_WORK(&host->work, sd_request); |
797 |
+ platform_set_drvdata(pdev, host); |
798 |
+ pcr->slots[RTSX_SD_CARD].p_dev = pdev; |
799 |
+diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c |
800 |
+index 588b9a5641179..192cb8b20b472 100644 |
801 |
+--- a/drivers/mmc/host/sdhci-msm.c |
802 |
++++ b/drivers/mmc/host/sdhci-msm.c |
803 |
+@@ -16,6 +16,7 @@ |
804 |
+ #include <linux/regulator/consumer.h> |
805 |
+ #include <linux/interconnect.h> |
806 |
+ #include <linux/pinctrl/consumer.h> |
807 |
++#include <linux/reset.h> |
808 |
+ |
809 |
+ #include "sdhci-pltfm.h" |
810 |
+ #include "cqhci.h" |
811 |
+@@ -2228,6 +2229,43 @@ static inline void sdhci_msm_get_of_property(struct platform_device *pdev, |
812 |
+ of_property_read_u32(node, "qcom,dll-config", &msm_host->dll_config); |
813 |
+ } |
814 |
+ |
815 |
++static int sdhci_msm_gcc_reset(struct device *dev, struct sdhci_host *host) |
816 |
++{ |
817 |
++ struct reset_control *reset; |
818 |
++ int ret = 0; |
819 |
++ |
820 |
++ reset = reset_control_get_optional_exclusive(dev, NULL); |
821 |
++ if (IS_ERR(reset)) |
822 |
++ return dev_err_probe(dev, PTR_ERR(reset), |
823 |
++ "unable to acquire core_reset\n"); |
824 |
++ |
825 |
++ if (!reset) |
826 |
++ return ret; |
827 |
++ |
828 |
++ ret = reset_control_assert(reset); |
829 |
++ if (ret) { |
830 |
++ reset_control_put(reset); |
831 |
++ return dev_err_probe(dev, ret, "core_reset assert failed\n"); |
832 |
++ } |
833 |
++ |
834 |
++ /* |
835 |
++ * The hardware requirement for delay between assert/deassert |
836 |
++ * is at least 3-4 sleep clock (32.7KHz) cycles, which comes to |
837 |
++ * ~125us (4/32768). To be on the safe side add 200us delay. |
838 |
++ */ |
839 |
++ usleep_range(200, 210); |
840 |
++ |
841 |
++ ret = reset_control_deassert(reset); |
842 |
++ if (ret) { |
843 |
++ reset_control_put(reset); |
844 |
++ return dev_err_probe(dev, ret, "core_reset deassert failed\n"); |
845 |
++ } |
846 |
++ |
847 |
++ usleep_range(200, 210); |
848 |
++ reset_control_put(reset); |
849 |
++ |
850 |
++ return ret; |
851 |
++} |
852 |
+ |
853 |
+ static int sdhci_msm_probe(struct platform_device *pdev) |
854 |
+ { |
855 |
+@@ -2276,6 +2314,10 @@ static int sdhci_msm_probe(struct platform_device *pdev) |
856 |
+ |
857 |
+ msm_host->saved_tuning_phase = INVALID_TUNING_PHASE; |
858 |
+ |
859 |
++ ret = sdhci_msm_gcc_reset(&pdev->dev, host); |
860 |
++ if (ret) |
861 |
++ goto pltfm_free; |
862 |
++ |
863 |
+ /* Setup SDCC bus voter clock. */ |
864 |
+ msm_host->bus_clk = devm_clk_get(&pdev->dev, "bus"); |
865 |
+ if (!IS_ERR(msm_host->bus_clk)) { |
866 |
+diff --git a/drivers/net/can/grcan.c b/drivers/net/can/grcan.c |
867 |
+index 39802f107eb1b..4923f9ac6a43b 100644 |
868 |
+--- a/drivers/net/can/grcan.c |
869 |
++++ b/drivers/net/can/grcan.c |
870 |
+@@ -241,13 +241,14 @@ struct grcan_device_config { |
871 |
+ .rxsize = GRCAN_DEFAULT_BUFFER_SIZE, \ |
872 |
+ } |
873 |
+ |
874 |
+-#define GRCAN_TXBUG_SAFE_GRLIB_VERSION 0x4100 |
875 |
++#define GRCAN_TXBUG_SAFE_GRLIB_VERSION 4100 |
876 |
+ #define GRLIB_VERSION_MASK 0xffff |
877 |
+ |
878 |
+ /* GRCAN private data structure */ |
879 |
+ struct grcan_priv { |
880 |
+ struct can_priv can; /* must be the first member */ |
881 |
+ struct net_device *dev; |
882 |
++ struct device *ofdev_dev; |
883 |
+ struct napi_struct napi; |
884 |
+ |
885 |
+ struct grcan_registers __iomem *regs; /* ioremap'ed registers */ |
886 |
+@@ -924,7 +925,7 @@ static void grcan_free_dma_buffers(struct net_device *dev) |
887 |
+ struct grcan_priv *priv = netdev_priv(dev); |
888 |
+ struct grcan_dma *dma = &priv->dma; |
889 |
+ |
890 |
+- dma_free_coherent(&dev->dev, dma->base_size, dma->base_buf, |
891 |
++ dma_free_coherent(priv->ofdev_dev, dma->base_size, dma->base_buf, |
892 |
+ dma->base_handle); |
893 |
+ memset(dma, 0, sizeof(*dma)); |
894 |
+ } |
895 |
+@@ -949,7 +950,7 @@ static int grcan_allocate_dma_buffers(struct net_device *dev, |
896 |
+ |
897 |
+ /* Extra GRCAN_BUFFER_ALIGNMENT to allow for alignment */ |
898 |
+ dma->base_size = lsize + ssize + GRCAN_BUFFER_ALIGNMENT; |
899 |
+- dma->base_buf = dma_alloc_coherent(&dev->dev, |
900 |
++ dma->base_buf = dma_alloc_coherent(priv->ofdev_dev, |
901 |
+ dma->base_size, |
902 |
+ &dma->base_handle, |
903 |
+ GFP_KERNEL); |
904 |
+@@ -1113,8 +1114,10 @@ static int grcan_close(struct net_device *dev) |
905 |
+ |
906 |
+ priv->closing = true; |
907 |
+ if (priv->need_txbug_workaround) { |
908 |
++ spin_unlock_irqrestore(&priv->lock, flags); |
909 |
+ del_timer_sync(&priv->hang_timer); |
910 |
+ del_timer_sync(&priv->rr_timer); |
911 |
++ spin_lock_irqsave(&priv->lock, flags); |
912 |
+ } |
913 |
+ netif_stop_queue(dev); |
914 |
+ grcan_stop_hardware(dev); |
915 |
+@@ -1134,7 +1137,7 @@ static int grcan_close(struct net_device *dev) |
916 |
+ return 0; |
917 |
+ } |
918 |
+ |
919 |
+-static int grcan_transmit_catch_up(struct net_device *dev, int budget) |
920 |
++static void grcan_transmit_catch_up(struct net_device *dev) |
921 |
+ { |
922 |
+ struct grcan_priv *priv = netdev_priv(dev); |
923 |
+ unsigned long flags; |
924 |
+@@ -1142,7 +1145,7 @@ static int grcan_transmit_catch_up(struct net_device *dev, int budget) |
925 |
+ |
926 |
+ spin_lock_irqsave(&priv->lock, flags); |
927 |
+ |
928 |
+- work_done = catch_up_echo_skb(dev, budget, true); |
929 |
++ work_done = catch_up_echo_skb(dev, -1, true); |
930 |
+ if (work_done) { |
931 |
+ if (!priv->resetting && !priv->closing && |
932 |
+ !(priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)) |
933 |
+@@ -1156,8 +1159,6 @@ static int grcan_transmit_catch_up(struct net_device *dev, int budget) |
934 |
+ } |
935 |
+ |
936 |
+ spin_unlock_irqrestore(&priv->lock, flags); |
937 |
+- |
938 |
+- return work_done; |
939 |
+ } |
940 |
+ |
941 |
+ static int grcan_receive(struct net_device *dev, int budget) |
942 |
+@@ -1239,19 +1240,13 @@ static int grcan_poll(struct napi_struct *napi, int budget) |
943 |
+ struct net_device *dev = priv->dev; |
944 |
+ struct grcan_registers __iomem *regs = priv->regs; |
945 |
+ unsigned long flags; |
946 |
+- int tx_work_done, rx_work_done; |
947 |
+- int rx_budget = budget / 2; |
948 |
+- int tx_budget = budget - rx_budget; |
949 |
++ int work_done; |
950 |
+ |
951 |
+- /* Half of the budget for receiving messages */ |
952 |
+- rx_work_done = grcan_receive(dev, rx_budget); |
953 |
++ work_done = grcan_receive(dev, budget); |
954 |
+ |
955 |
+- /* Half of the budget for transmitting messages as that can trigger echo |
956 |
+- * frames being received |
957 |
+- */ |
958 |
+- tx_work_done = grcan_transmit_catch_up(dev, tx_budget); |
959 |
++ grcan_transmit_catch_up(dev); |
960 |
+ |
961 |
+- if (rx_work_done < rx_budget && tx_work_done < tx_budget) { |
962 |
++ if (work_done < budget) { |
963 |
+ napi_complete(napi); |
964 |
+ |
965 |
+ /* Guarantee no interference with a running reset that otherwise |
966 |
+@@ -1268,7 +1263,7 @@ static int grcan_poll(struct napi_struct *napi, int budget) |
967 |
+ spin_unlock_irqrestore(&priv->lock, flags); |
968 |
+ } |
969 |
+ |
970 |
+- return rx_work_done + tx_work_done; |
971 |
++ return work_done; |
972 |
+ } |
973 |
+ |
974 |
+ /* Work tx bug by waiting while for the risky situation to clear. If that fails, |
975 |
+@@ -1600,6 +1595,7 @@ static int grcan_setup_netdev(struct platform_device *ofdev, |
976 |
+ memcpy(&priv->config, &grcan_module_config, |
977 |
+ sizeof(struct grcan_device_config)); |
978 |
+ priv->dev = dev; |
979 |
++ priv->ofdev_dev = &ofdev->dev; |
980 |
+ priv->regs = base; |
981 |
+ priv->can.bittiming_const = &grcan_bittiming_const; |
982 |
+ priv->can.do_set_bittiming = grcan_set_bittiming; |
983 |
+@@ -1652,6 +1648,7 @@ exit_free_candev: |
984 |
+ static int grcan_probe(struct platform_device *ofdev) |
985 |
+ { |
986 |
+ struct device_node *np = ofdev->dev.of_node; |
987 |
++ struct device_node *sysid_parent; |
988 |
+ u32 sysid, ambafreq; |
989 |
+ int irq, err; |
990 |
+ void __iomem *base; |
991 |
+@@ -1660,10 +1657,15 @@ static int grcan_probe(struct platform_device *ofdev) |
992 |
+ /* Compare GRLIB version number with the first that does not |
993 |
+ * have the tx bug (see start_xmit) |
994 |
+ */ |
995 |
+- err = of_property_read_u32(np, "systemid", &sysid); |
996 |
+- if (!err && ((sysid & GRLIB_VERSION_MASK) |
997 |
+- >= GRCAN_TXBUG_SAFE_GRLIB_VERSION)) |
998 |
+- txbug = false; |
999 |
++ sysid_parent = of_find_node_by_path("/ambapp0"); |
1000 |
++ if (sysid_parent) { |
1001 |
++ of_node_get(sysid_parent); |
1002 |
++ err = of_property_read_u32(sysid_parent, "systemid", &sysid); |
1003 |
++ if (!err && ((sysid & GRLIB_VERSION_MASK) >= |
1004 |
++ GRCAN_TXBUG_SAFE_GRLIB_VERSION)) |
1005 |
++ txbug = false; |
1006 |
++ of_node_put(sysid_parent); |
1007 |
++ } |
1008 |
+ |
1009 |
+ err = of_property_read_u32(np, "freq", &ambafreq); |
1010 |
+ if (err) { |
1011 |
+diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c |
1012 |
+index 5ee8809bc2711..c355824ddb814 100644 |
1013 |
+--- a/drivers/net/dsa/mt7530.c |
1014 |
++++ b/drivers/net/dsa/mt7530.c |
1015 |
+@@ -1663,6 +1663,7 @@ mt7530_setup(struct dsa_switch *ds) |
1016 |
+ ret = of_get_phy_mode(mac_np, &interface); |
1017 |
+ if (ret && ret != -ENODEV) { |
1018 |
+ of_node_put(mac_np); |
1019 |
++ of_node_put(phy_node); |
1020 |
+ return ret; |
1021 |
+ } |
1022 |
+ id = of_mdio_parse_addr(ds->dev, phy_node); |
1023 |
+diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c |
1024 |
+index cb0c270418a4d..b818d5f342d53 100644 |
1025 |
+--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c |
1026 |
++++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c |
1027 |
+@@ -2575,6 +2575,10 @@ static int bnxt_poll_p5(struct napi_struct *napi, int budget) |
1028 |
+ u32 idx = le32_to_cpu(nqcmp->cq_handle_low); |
1029 |
+ struct bnxt_cp_ring_info *cpr2; |
1030 |
+ |
1031 |
++ /* No more budget for RX work */ |
1032 |
++ if (budget && work_done >= budget && idx == BNXT_RX_HDL) |
1033 |
++ break; |
1034 |
++ |
1035 |
+ cpr2 = cpr->cp_ring_arr[idx]; |
1036 |
+ work_done += __bnxt_poll_work(bp, cpr2, |
1037 |
+ budget - work_done); |
1038 |
+@@ -10453,7 +10457,7 @@ static bool bnxt_rfs_capable(struct bnxt *bp) |
1039 |
+ |
1040 |
+ if (bp->flags & BNXT_FLAG_CHIP_P5) |
1041 |
+ return bnxt_rfs_supported(bp); |
1042 |
+- if (!(bp->flags & BNXT_FLAG_MSIX_CAP) || !bnxt_can_reserve_rings(bp)) |
1043 |
++ if (!(bp->flags & BNXT_FLAG_MSIX_CAP) || !bnxt_can_reserve_rings(bp) || !bp->rx_nr_rings) |
1044 |
+ return false; |
1045 |
+ |
1046 |
+ vnics = 1 + bp->rx_nr_rings; |
1047 |
+@@ -12481,10 +12485,9 @@ static int bnxt_init_dflt_ring_mode(struct bnxt *bp) |
1048 |
+ goto init_dflt_ring_err; |
1049 |
+ |
1050 |
+ bp->tx_nr_rings_per_tc = bp->tx_nr_rings; |
1051 |
+- if (bnxt_rfs_supported(bp) && bnxt_rfs_capable(bp)) { |
1052 |
+- bp->flags |= BNXT_FLAG_RFS; |
1053 |
+- bp->dev->features |= NETIF_F_NTUPLE; |
1054 |
+- } |
1055 |
++ |
1056 |
++ bnxt_set_dflt_rfs(bp); |
1057 |
++ |
1058 |
+ init_dflt_ring_err: |
1059 |
+ bnxt_ulp_irq_restart(bp, rc); |
1060 |
+ return rc; |
1061 |
+diff --git a/drivers/net/ethernet/huawei/hinic/hinic_hw_wq.c b/drivers/net/ethernet/huawei/hinic/hinic_hw_wq.c |
1062 |
+index 5dc3743f80915..f04ac00e3e703 100644 |
1063 |
+--- a/drivers/net/ethernet/huawei/hinic/hinic_hw_wq.c |
1064 |
++++ b/drivers/net/ethernet/huawei/hinic/hinic_hw_wq.c |
1065 |
+@@ -771,7 +771,7 @@ struct hinic_hw_wqe *hinic_get_wqe(struct hinic_wq *wq, unsigned int wqe_size, |
1066 |
+ /* If we only have one page, still need to get shadown wqe when |
1067 |
+ * wqe rolling-over page |
1068 |
+ */ |
1069 |
+- if (curr_pg != end_pg || MASKED_WQE_IDX(wq, end_prod_idx) < *prod_idx) { |
1070 |
++ if (curr_pg != end_pg || end_prod_idx < *prod_idx) { |
1071 |
+ void *shadow_addr = &wq->shadow_wqe[curr_pg * wq->max_wqe_size]; |
1072 |
+ |
1073 |
+ copy_wqe_to_shadow(wq, shadow_addr, num_wqebbs, *prod_idx); |
1074 |
+@@ -841,7 +841,10 @@ struct hinic_hw_wqe *hinic_read_wqe(struct hinic_wq *wq, unsigned int wqe_size, |
1075 |
+ |
1076 |
+ *cons_idx = curr_cons_idx; |
1077 |
+ |
1078 |
+- if (curr_pg != end_pg) { |
1079 |
++ /* If we only have one page, still need to get shadown wqe when |
1080 |
++ * wqe rolling-over page |
1081 |
++ */ |
1082 |
++ if (curr_pg != end_pg || end_cons_idx < curr_cons_idx) { |
1083 |
+ void *shadow_addr = &wq->shadow_wqe[curr_pg * wq->max_wqe_size]; |
1084 |
+ |
1085 |
+ copy_wqe_to_shadow(wq, shadow_addr, num_wqebbs, *cons_idx); |
1086 |
+diff --git a/drivers/net/ethernet/mediatek/mtk_sgmii.c b/drivers/net/ethernet/mediatek/mtk_sgmii.c |
1087 |
+index 32d83421226a2..5897940a418b6 100644 |
1088 |
+--- a/drivers/net/ethernet/mediatek/mtk_sgmii.c |
1089 |
++++ b/drivers/net/ethernet/mediatek/mtk_sgmii.c |
1090 |
+@@ -26,6 +26,7 @@ int mtk_sgmii_init(struct mtk_sgmii *ss, struct device_node *r, u32 ana_rgc3) |
1091 |
+ break; |
1092 |
+ |
1093 |
+ ss->regmap[i] = syscon_node_to_regmap(np); |
1094 |
++ of_node_put(np); |
1095 |
+ if (IS_ERR(ss->regmap[i])) |
1096 |
+ return PTR_ERR(ss->regmap[i]); |
1097 |
+ } |
1098 |
+diff --git a/drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.c b/drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.c |
1099 |
+index ed4fb79b4db76..75b6060f7a9ae 100644 |
1100 |
+--- a/drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.c |
1101 |
++++ b/drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.c |
1102 |
+@@ -31,6 +31,7 @@ static const char *const mlx5_rsc_sgmt_name[] = { |
1103 |
+ struct mlx5_rsc_dump { |
1104 |
+ u32 pdn; |
1105 |
+ struct mlx5_core_mkey mkey; |
1106 |
++ u32 number_of_menu_items; |
1107 |
+ u16 fw_segment_type[MLX5_SGMT_TYPE_NUM]; |
1108 |
+ }; |
1109 |
+ |
1110 |
+@@ -50,21 +51,37 @@ static int mlx5_rsc_dump_sgmt_get_by_name(char *name) |
1111 |
+ return -EINVAL; |
1112 |
+ } |
1113 |
+ |
1114 |
+-static void mlx5_rsc_dump_read_menu_sgmt(struct mlx5_rsc_dump *rsc_dump, struct page *page) |
1115 |
++#define MLX5_RSC_DUMP_MENU_HEADER_SIZE (MLX5_ST_SZ_BYTES(resource_dump_info_segment) + \ |
1116 |
++ MLX5_ST_SZ_BYTES(resource_dump_command_segment) + \ |
1117 |
++ MLX5_ST_SZ_BYTES(resource_dump_menu_segment)) |
1118 |
++ |
1119 |
++static int mlx5_rsc_dump_read_menu_sgmt(struct mlx5_rsc_dump *rsc_dump, struct page *page, |
1120 |
++ int read_size, int start_idx) |
1121 |
+ { |
1122 |
+ void *data = page_address(page); |
1123 |
+ enum mlx5_sgmt_type sgmt_idx; |
1124 |
+ int num_of_items; |
1125 |
+ char *sgmt_name; |
1126 |
+ void *member; |
1127 |
++ int size = 0; |
1128 |
+ void *menu; |
1129 |
+ int i; |
1130 |
+ |
1131 |
+- menu = MLX5_ADDR_OF(menu_resource_dump_response, data, menu); |
1132 |
+- num_of_items = MLX5_GET(resource_dump_menu_segment, menu, num_of_records); |
1133 |
++ if (!start_idx) { |
1134 |
++ menu = MLX5_ADDR_OF(menu_resource_dump_response, data, menu); |
1135 |
++ rsc_dump->number_of_menu_items = MLX5_GET(resource_dump_menu_segment, menu, |
1136 |
++ num_of_records); |
1137 |
++ size = MLX5_RSC_DUMP_MENU_HEADER_SIZE; |
1138 |
++ data += size; |
1139 |
++ } |
1140 |
++ num_of_items = rsc_dump->number_of_menu_items; |
1141 |
++ |
1142 |
++ for (i = 0; start_idx + i < num_of_items; i++) { |
1143 |
++ size += MLX5_ST_SZ_BYTES(resource_dump_menu_record); |
1144 |
++ if (size >= read_size) |
1145 |
++ return start_idx + i; |
1146 |
+ |
1147 |
+- for (i = 0; i < num_of_items; i++) { |
1148 |
+- member = MLX5_ADDR_OF(resource_dump_menu_segment, menu, record[i]); |
1149 |
++ member = data + MLX5_ST_SZ_BYTES(resource_dump_menu_record) * i; |
1150 |
+ sgmt_name = MLX5_ADDR_OF(resource_dump_menu_record, member, segment_name); |
1151 |
+ sgmt_idx = mlx5_rsc_dump_sgmt_get_by_name(sgmt_name); |
1152 |
+ if (sgmt_idx == -EINVAL) |
1153 |
+@@ -72,6 +89,7 @@ static void mlx5_rsc_dump_read_menu_sgmt(struct mlx5_rsc_dump *rsc_dump, struct |
1154 |
+ rsc_dump->fw_segment_type[sgmt_idx] = MLX5_GET(resource_dump_menu_record, |
1155 |
+ member, segment_type); |
1156 |
+ } |
1157 |
++ return 0; |
1158 |
+ } |
1159 |
+ |
1160 |
+ static int mlx5_rsc_dump_trigger(struct mlx5_core_dev *dev, struct mlx5_rsc_dump_cmd *cmd, |
1161 |
+@@ -168,6 +186,7 @@ static int mlx5_rsc_dump_menu(struct mlx5_core_dev *dev) |
1162 |
+ struct mlx5_rsc_dump_cmd *cmd = NULL; |
1163 |
+ struct mlx5_rsc_key key = {}; |
1164 |
+ struct page *page; |
1165 |
++ int start_idx = 0; |
1166 |
+ int size; |
1167 |
+ int err; |
1168 |
+ |
1169 |
+@@ -189,7 +208,7 @@ static int mlx5_rsc_dump_menu(struct mlx5_core_dev *dev) |
1170 |
+ if (err < 0) |
1171 |
+ goto destroy_cmd; |
1172 |
+ |
1173 |
+- mlx5_rsc_dump_read_menu_sgmt(dev->rsc_dump, page); |
1174 |
++ start_idx = mlx5_rsc_dump_read_menu_sgmt(dev->rsc_dump, page, size, start_idx); |
1175 |
+ |
1176 |
+ } while (err > 0); |
1177 |
+ |
1178 |
+diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c b/drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c |
1179 |
+index 673f1c82d3815..c9d5d8d93994d 100644 |
1180 |
+--- a/drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c |
1181 |
++++ b/drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c |
1182 |
+@@ -309,8 +309,8 @@ int mlx5e_port_manual_buffer_config(struct mlx5e_priv *priv, |
1183 |
+ if (err) |
1184 |
+ return err; |
1185 |
+ |
1186 |
+- err = update_buffer_lossy(max_mtu, curr_pfc_en, prio2buffer, port_buff_cell_sz, |
1187 |
+- xoff, &port_buffer, &update_buffer); |
1188 |
++ err = update_buffer_lossy(max_mtu, curr_pfc_en, prio2buffer, xoff, |
1189 |
++ port_buff_cell_sz, &port_buffer, &update_buffer); |
1190 |
+ if (err) |
1191 |
+ return err; |
1192 |
+ } |
1193 |
+diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c |
1194 |
+index 0469f53dfb99e..511c431465625 100644 |
1195 |
+--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c |
1196 |
++++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c |
1197 |
+@@ -1629,6 +1629,8 @@ mlx5_tc_ct_flush_ft_entry(void *ptr, void *arg) |
1198 |
+ static void |
1199 |
+ mlx5_tc_ct_del_ft_cb(struct mlx5_tc_ct_priv *ct_priv, struct mlx5_ct_ft *ft) |
1200 |
+ { |
1201 |
++ struct mlx5e_priv *priv; |
1202 |
++ |
1203 |
+ if (!refcount_dec_and_test(&ft->refcount)) |
1204 |
+ return; |
1205 |
+ |
1206 |
+@@ -1638,6 +1640,8 @@ mlx5_tc_ct_del_ft_cb(struct mlx5_tc_ct_priv *ct_priv, struct mlx5_ct_ft *ft) |
1207 |
+ rhashtable_free_and_destroy(&ft->ct_entries_ht, |
1208 |
+ mlx5_tc_ct_flush_ft_entry, |
1209 |
+ ct_priv); |
1210 |
++ priv = netdev_priv(ct_priv->netdev); |
1211 |
++ flush_workqueue(priv->wq); |
1212 |
+ mlx5_tc_ct_free_pre_ct_tables(ft); |
1213 |
+ mapping_remove(ct_priv->zone_mapping, ft->zone_restore_id); |
1214 |
+ kfree(ft); |
1215 |
+diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c |
1216 |
+index f23c67575073a..7c0ae7c38eefd 100644 |
1217 |
+--- a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c |
1218 |
++++ b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c |
1219 |
+@@ -1210,6 +1210,16 @@ static int mlx5e_trust_initialize(struct mlx5e_priv *priv) |
1220 |
+ if (err) |
1221 |
+ return err; |
1222 |
+ |
1223 |
++ if (priv->dcbx_dp.trust_state == MLX5_QPTS_TRUST_PCP && priv->dcbx.dscp_app_cnt) { |
1224 |
++ /* |
1225 |
++ * Align the driver state with the register state. |
1226 |
++ * Temporary state change is required to enable the app list reset. |
1227 |
++ */ |
1228 |
++ priv->dcbx_dp.trust_state = MLX5_QPTS_TRUST_DSCP; |
1229 |
++ mlx5e_dcbnl_delete_app(priv); |
1230 |
++ priv->dcbx_dp.trust_state = MLX5_QPTS_TRUST_PCP; |
1231 |
++ } |
1232 |
++ |
1233 |
+ mlx5e_params_calc_trust_tx_min_inline_mode(priv->mdev, &priv->channels.params, |
1234 |
+ priv->dcbx_dp.trust_state); |
1235 |
+ |
1236 |
+diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c |
1237 |
+index 1ad1692a5b2d7..f1bf7f6758d0d 100644 |
1238 |
+--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c |
1239 |
++++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c |
1240 |
+@@ -2396,6 +2396,17 @@ static int __parse_cls_flower(struct mlx5e_priv *priv, |
1241 |
+ match.key->vlan_priority); |
1242 |
+ |
1243 |
+ *match_level = MLX5_MATCH_L2; |
1244 |
++ |
1245 |
++ if (!flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_CVLAN) && |
1246 |
++ match.mask->vlan_eth_type && |
1247 |
++ MLX5_CAP_FLOWTABLE_TYPE(priv->mdev, |
1248 |
++ ft_field_support.outer_second_vid, |
1249 |
++ fs_type)) { |
1250 |
++ MLX5_SET(fte_match_set_misc, misc_c, |
1251 |
++ outer_second_cvlan_tag, 1); |
1252 |
++ spec->match_criteria_enable |= |
1253 |
++ MLX5_MATCH_MISC_PARAMETERS; |
1254 |
++ } |
1255 |
+ } |
1256 |
+ } else if (*match_level != MLX5_MATCH_NONE) { |
1257 |
+ /* cvlan_tag enabled in match criteria and |
1258 |
+diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c b/drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c |
1259 |
+index 9b472e793ee36..e29db4c39b37f 100644 |
1260 |
+--- a/drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c |
1261 |
++++ b/drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c |
1262 |
+@@ -134,14 +134,19 @@ static void mlx5_stop_sync_reset_poll(struct mlx5_core_dev *dev) |
1263 |
+ del_timer_sync(&fw_reset->timer); |
1264 |
+ } |
1265 |
+ |
1266 |
+-static void mlx5_sync_reset_clear_reset_requested(struct mlx5_core_dev *dev, bool poll_health) |
1267 |
++static int mlx5_sync_reset_clear_reset_requested(struct mlx5_core_dev *dev, bool poll_health) |
1268 |
+ { |
1269 |
+ struct mlx5_fw_reset *fw_reset = dev->priv.fw_reset; |
1270 |
+ |
1271 |
++ if (!test_and_clear_bit(MLX5_FW_RESET_FLAGS_RESET_REQUESTED, &fw_reset->reset_flags)) { |
1272 |
++ mlx5_core_warn(dev, "Reset request was already cleared\n"); |
1273 |
++ return -EALREADY; |
1274 |
++ } |
1275 |
++ |
1276 |
+ mlx5_stop_sync_reset_poll(dev); |
1277 |
+- clear_bit(MLX5_FW_RESET_FLAGS_RESET_REQUESTED, &fw_reset->reset_flags); |
1278 |
+ if (poll_health) |
1279 |
+ mlx5_start_health_poll(dev); |
1280 |
++ return 0; |
1281 |
+ } |
1282 |
+ |
1283 |
+ #define MLX5_RESET_POLL_INTERVAL (HZ / 10) |
1284 |
+@@ -185,13 +190,17 @@ static int mlx5_fw_reset_set_reset_sync_nack(struct mlx5_core_dev *dev) |
1285 |
+ return mlx5_reg_mfrl_set(dev, MLX5_MFRL_REG_RESET_LEVEL3, 0, 2, false); |
1286 |
+ } |
1287 |
+ |
1288 |
+-static void mlx5_sync_reset_set_reset_requested(struct mlx5_core_dev *dev) |
1289 |
++static int mlx5_sync_reset_set_reset_requested(struct mlx5_core_dev *dev) |
1290 |
+ { |
1291 |
+ struct mlx5_fw_reset *fw_reset = dev->priv.fw_reset; |
1292 |
+ |
1293 |
++ if (test_and_set_bit(MLX5_FW_RESET_FLAGS_RESET_REQUESTED, &fw_reset->reset_flags)) { |
1294 |
++ mlx5_core_warn(dev, "Reset request was already set\n"); |
1295 |
++ return -EALREADY; |
1296 |
++ } |
1297 |
+ mlx5_stop_health_poll(dev, true); |
1298 |
+- set_bit(MLX5_FW_RESET_FLAGS_RESET_REQUESTED, &fw_reset->reset_flags); |
1299 |
+ mlx5_start_sync_reset_poll(dev); |
1300 |
++ return 0; |
1301 |
+ } |
1302 |
+ |
1303 |
+ static void mlx5_fw_live_patch_event(struct work_struct *work) |
1304 |
+@@ -225,7 +234,9 @@ static void mlx5_sync_reset_request_event(struct work_struct *work) |
1305 |
+ err ? "Failed" : "Sent"); |
1306 |
+ return; |
1307 |
+ } |
1308 |
+- mlx5_sync_reset_set_reset_requested(dev); |
1309 |
++ if (mlx5_sync_reset_set_reset_requested(dev)) |
1310 |
++ return; |
1311 |
++ |
1312 |
+ err = mlx5_fw_reset_set_reset_sync_ack(dev); |
1313 |
+ if (err) |
1314 |
+ mlx5_core_warn(dev, "PCI Sync FW Update Reset Ack Failed. Error code: %d\n", err); |
1315 |
+@@ -325,7 +336,8 @@ static void mlx5_sync_reset_now_event(struct work_struct *work) |
1316 |
+ struct mlx5_core_dev *dev = fw_reset->dev; |
1317 |
+ int err; |
1318 |
+ |
1319 |
+- mlx5_sync_reset_clear_reset_requested(dev, false); |
1320 |
++ if (mlx5_sync_reset_clear_reset_requested(dev, false)) |
1321 |
++ return; |
1322 |
+ |
1323 |
+ mlx5_core_warn(dev, "Sync Reset now. Device is going to reset.\n"); |
1324 |
+ |
1325 |
+@@ -354,10 +366,8 @@ static void mlx5_sync_reset_abort_event(struct work_struct *work) |
1326 |
+ reset_abort_work); |
1327 |
+ struct mlx5_core_dev *dev = fw_reset->dev; |
1328 |
+ |
1329 |
+- if (!test_bit(MLX5_FW_RESET_FLAGS_RESET_REQUESTED, &fw_reset->reset_flags)) |
1330 |
++ if (mlx5_sync_reset_clear_reset_requested(dev, true)) |
1331 |
+ return; |
1332 |
+- |
1333 |
+- mlx5_sync_reset_clear_reset_requested(dev, true); |
1334 |
+ mlx5_core_warn(dev, "PCI Sync FW Update Reset Aborted.\n"); |
1335 |
+ } |
1336 |
+ |
1337 |
+diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c |
1338 |
+index 823d9a7184fe6..6c4479c310975 100644 |
1339 |
+--- a/drivers/net/ethernet/smsc/smsc911x.c |
1340 |
++++ b/drivers/net/ethernet/smsc/smsc911x.c |
1341 |
+@@ -2422,7 +2422,7 @@ static int smsc911x_drv_probe(struct platform_device *pdev) |
1342 |
+ if (irq == -EPROBE_DEFER) { |
1343 |
+ retval = -EPROBE_DEFER; |
1344 |
+ goto out_0; |
1345 |
+- } else if (irq <= 0) { |
1346 |
++ } else if (irq < 0) { |
1347 |
+ pr_warn("Could not allocate irq resource\n"); |
1348 |
+ retval = -ENODEV; |
1349 |
+ goto out_0; |
1350 |
+diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c |
1351 |
+index a9087dae767de..fb065b074553e 100644 |
1352 |
+--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c |
1353 |
++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c |
1354 |
+@@ -243,6 +243,7 @@ static int intel_mgbe_common_data(struct pci_dev *pdev, |
1355 |
+ plat->has_gmac4 = 1; |
1356 |
+ plat->force_sf_dma_mode = 0; |
1357 |
+ plat->tso_en = 1; |
1358 |
++ plat->sph_disable = 1; |
1359 |
+ |
1360 |
+ plat->rx_sched_algorithm = MTL_RX_ALGORITHM_SP; |
1361 |
+ |
1362 |
+diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c |
1363 |
+index cad6588840d8b..958bbcfc2668d 100644 |
1364 |
+--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c |
1365 |
++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c |
1366 |
+@@ -895,6 +895,7 @@ static int sun8i_dwmac_register_mdio_mux(struct stmmac_priv *priv) |
1367 |
+ |
1368 |
+ ret = mdio_mux_init(priv->device, mdio_mux, mdio_mux_syscon_switch_fn, |
1369 |
+ &gmac->mux_handle, priv, priv->mii); |
1370 |
++ of_node_put(mdio_mux); |
1371 |
+ return ret; |
1372 |
+ } |
1373 |
+ |
1374 |
+diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |
1375 |
+index a46c32257de42..e9aa9a5eba6be 100644 |
1376 |
+--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |
1377 |
++++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |
1378 |
+@@ -5046,7 +5046,7 @@ int stmmac_dvr_probe(struct device *device, |
1379 |
+ dev_info(priv->device, "TSO feature enabled\n"); |
1380 |
+ } |
1381 |
+ |
1382 |
+- if (priv->dma_cap.sphen) { |
1383 |
++ if (priv->dma_cap.sphen && !priv->plat->sph_disable) { |
1384 |
+ ndev->hw_features |= NETIF_F_GRO; |
1385 |
+ priv->sph = true; |
1386 |
+ dev_info(priv->device, "SPH feature enabled\n"); |
1387 |
+diff --git a/drivers/net/ethernet/ti/cpsw_new.c b/drivers/net/ethernet/ti/cpsw_new.c |
1388 |
+index 31cefd6ef6806..a1ee205d6a889 100644 |
1389 |
+--- a/drivers/net/ethernet/ti/cpsw_new.c |
1390 |
++++ b/drivers/net/ethernet/ti/cpsw_new.c |
1391 |
+@@ -1255,8 +1255,10 @@ static int cpsw_probe_dt(struct cpsw_common *cpsw) |
1392 |
+ data->slave_data = devm_kcalloc(dev, CPSW_SLAVE_PORTS_NUM, |
1393 |
+ sizeof(struct cpsw_slave_data), |
1394 |
+ GFP_KERNEL); |
1395 |
+- if (!data->slave_data) |
1396 |
++ if (!data->slave_data) { |
1397 |
++ of_node_put(tmp_node); |
1398 |
+ return -ENOMEM; |
1399 |
++ } |
1400 |
+ |
1401 |
+ /* Populate all the child nodes here... |
1402 |
+ */ |
1403 |
+@@ -1353,6 +1355,7 @@ static int cpsw_probe_dt(struct cpsw_common *cpsw) |
1404 |
+ |
1405 |
+ err_node_put: |
1406 |
+ of_node_put(port_np); |
1407 |
++ of_node_put(tmp_node); |
1408 |
+ return ret; |
1409 |
+ } |
1410 |
+ |
1411 |
+diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c |
1412 |
+index 4bd44fbc6ecfa..e29b5523b19bd 100644 |
1413 |
+--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c |
1414 |
++++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c |
1415 |
+@@ -820,10 +820,10 @@ static int xemaclite_mdio_write(struct mii_bus *bus, int phy_id, int reg, |
1416 |
+ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev) |
1417 |
+ { |
1418 |
+ struct mii_bus *bus; |
1419 |
+- int rc; |
1420 |
+ struct resource res; |
1421 |
+ struct device_node *np = of_get_parent(lp->phy_node); |
1422 |
+ struct device_node *npp; |
1423 |
++ int rc, ret; |
1424 |
+ |
1425 |
+ /* Don't register the MDIO bus if the phy_node or its parent node |
1426 |
+ * can't be found. |
1427 |
+@@ -833,8 +833,14 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev) |
1428 |
+ return -ENODEV; |
1429 |
+ } |
1430 |
+ npp = of_get_parent(np); |
1431 |
+- |
1432 |
+- of_address_to_resource(npp, 0, &res); |
1433 |
++ ret = of_address_to_resource(npp, 0, &res); |
1434 |
++ of_node_put(npp); |
1435 |
++ if (ret) { |
1436 |
++ dev_err(dev, "%s resource error!\n", |
1437 |
++ dev->of_node->full_name); |
1438 |
++ of_node_put(np); |
1439 |
++ return ret; |
1440 |
++ } |
1441 |
+ if (lp->ndev->mem_start != res.start) { |
1442 |
+ struct phy_device *phydev; |
1443 |
+ phydev = of_phy_find_device(lp->phy_node); |
1444 |
+@@ -843,6 +849,7 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev) |
1445 |
+ "MDIO of the phy is not registered yet\n"); |
1446 |
+ else |
1447 |
+ put_device(&phydev->mdio.dev); |
1448 |
++ of_node_put(np); |
1449 |
+ return 0; |
1450 |
+ } |
1451 |
+ |
1452 |
+@@ -855,6 +862,7 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev) |
1453 |
+ bus = mdiobus_alloc(); |
1454 |
+ if (!bus) { |
1455 |
+ dev_err(dev, "Failed to allocate mdiobus\n"); |
1456 |
++ of_node_put(np); |
1457 |
+ return -ENOMEM; |
1458 |
+ } |
1459 |
+ |
1460 |
+@@ -867,6 +875,7 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev) |
1461 |
+ bus->parent = dev; |
1462 |
+ |
1463 |
+ rc = of_mdiobus_register(bus, np); |
1464 |
++ of_node_put(np); |
1465 |
+ if (rc) { |
1466 |
+ dev_err(dev, "Failed to register mdio bus.\n"); |
1467 |
+ goto err_register; |
1468 |
+diff --git a/drivers/nfc/nfcmrvl/main.c b/drivers/nfc/nfcmrvl/main.c |
1469 |
+index 529be35ac1782..54d228acc0f5d 100644 |
1470 |
+--- a/drivers/nfc/nfcmrvl/main.c |
1471 |
++++ b/drivers/nfc/nfcmrvl/main.c |
1472 |
+@@ -194,6 +194,7 @@ void nfcmrvl_nci_unregister_dev(struct nfcmrvl_private *priv) |
1473 |
+ { |
1474 |
+ struct nci_dev *ndev = priv->ndev; |
1475 |
+ |
1476 |
++ nci_unregister_device(ndev); |
1477 |
+ if (priv->ndev->nfc_dev->fw_download_in_progress) |
1478 |
+ nfcmrvl_fw_dnld_abort(priv); |
1479 |
+ |
1480 |
+@@ -202,7 +203,6 @@ void nfcmrvl_nci_unregister_dev(struct nfcmrvl_private *priv) |
1481 |
+ if (gpio_is_valid(priv->config.reset_n_io)) |
1482 |
+ gpio_free(priv->config.reset_n_io); |
1483 |
+ |
1484 |
+- nci_unregister_device(ndev); |
1485 |
+ nci_free_device(ndev); |
1486 |
+ kfree(priv); |
1487 |
+ } |
1488 |
+diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c |
1489 |
+index af051fb886998..0c603e069f21d 100644 |
1490 |
+--- a/drivers/pci/controller/pci-aardvark.c |
1491 |
++++ b/drivers/pci/controller/pci-aardvark.c |
1492 |
+@@ -114,6 +114,7 @@ |
1493 |
+ #define PCIE_MSI_ADDR_HIGH_REG (CONTROL_BASE_ADDR + 0x54) |
1494 |
+ #define PCIE_MSI_STATUS_REG (CONTROL_BASE_ADDR + 0x58) |
1495 |
+ #define PCIE_MSI_MASK_REG (CONTROL_BASE_ADDR + 0x5C) |
1496 |
++#define PCIE_MSI_ALL_MASK GENMASK(31, 0) |
1497 |
+ #define PCIE_MSI_PAYLOAD_REG (CONTROL_BASE_ADDR + 0x9C) |
1498 |
+ #define PCIE_MSI_DATA_MASK GENMASK(15, 0) |
1499 |
+ |
1500 |
+@@ -577,6 +578,7 @@ static void advk_pcie_setup_hw(struct advk_pcie *pcie) |
1501 |
+ advk_writel(pcie, reg, PCIE_CORE_CTRL2_REG); |
1502 |
+ |
1503 |
+ /* Clear all interrupts */ |
1504 |
++ advk_writel(pcie, PCIE_MSI_ALL_MASK, PCIE_MSI_STATUS_REG); |
1505 |
+ advk_writel(pcie, PCIE_ISR0_ALL_MASK, PCIE_ISR0_REG); |
1506 |
+ advk_writel(pcie, PCIE_ISR1_ALL_MASK, PCIE_ISR1_REG); |
1507 |
+ advk_writel(pcie, PCIE_IRQ_ALL_MASK, HOST_CTRL_INT_STATUS_REG); |
1508 |
+@@ -589,7 +591,7 @@ static void advk_pcie_setup_hw(struct advk_pcie *pcie) |
1509 |
+ advk_writel(pcie, PCIE_ISR1_ALL_MASK, PCIE_ISR1_MASK_REG); |
1510 |
+ |
1511 |
+ /* Unmask all MSIs */ |
1512 |
+- advk_writel(pcie, 0, PCIE_MSI_MASK_REG); |
1513 |
++ advk_writel(pcie, ~(u32)PCIE_MSI_ALL_MASK, PCIE_MSI_MASK_REG); |
1514 |
+ |
1515 |
+ /* Enable summary interrupt for GIC SPI source */ |
1516 |
+ reg = PCIE_IRQ_ALL_MASK & (~PCIE_IRQ_ENABLE_INTS_MASK); |
1517 |
+@@ -1386,23 +1388,19 @@ static void advk_pcie_remove_irq_domain(struct advk_pcie *pcie) |
1518 |
+ static void advk_pcie_handle_msi(struct advk_pcie *pcie) |
1519 |
+ { |
1520 |
+ u32 msi_val, msi_mask, msi_status, msi_idx; |
1521 |
+- u16 msi_data; |
1522 |
++ int virq; |
1523 |
+ |
1524 |
+ msi_mask = advk_readl(pcie, PCIE_MSI_MASK_REG); |
1525 |
+ msi_val = advk_readl(pcie, PCIE_MSI_STATUS_REG); |
1526 |
+- msi_status = msi_val & ~msi_mask; |
1527 |
++ msi_status = msi_val & ((~msi_mask) & PCIE_MSI_ALL_MASK); |
1528 |
+ |
1529 |
+ for (msi_idx = 0; msi_idx < MSI_IRQ_NUM; msi_idx++) { |
1530 |
+ if (!(BIT(msi_idx) & msi_status)) |
1531 |
+ continue; |
1532 |
+ |
1533 |
+- /* |
1534 |
+- * msi_idx contains bits [4:0] of the msi_data and msi_data |
1535 |
+- * contains 16bit MSI interrupt number |
1536 |
+- */ |
1537 |
+ advk_writel(pcie, BIT(msi_idx), PCIE_MSI_STATUS_REG); |
1538 |
+- msi_data = advk_readl(pcie, PCIE_MSI_PAYLOAD_REG) & PCIE_MSI_DATA_MASK; |
1539 |
+- generic_handle_irq(msi_data); |
1540 |
++ virq = irq_find_mapping(pcie->msi_inner_domain, msi_idx); |
1541 |
++ generic_handle_irq(virq); |
1542 |
+ } |
1543 |
+ |
1544 |
+ advk_writel(pcie, PCIE_ISR0_MSI_INT_PENDING, |
1545 |
+diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c |
1546 |
+index 2adfab552e22a..f4edfe383e9d9 100644 |
1547 |
+--- a/drivers/s390/block/dasd.c |
1548 |
++++ b/drivers/s390/block/dasd.c |
1549 |
+@@ -1462,6 +1462,13 @@ int dasd_start_IO(struct dasd_ccw_req *cqr) |
1550 |
+ if (!cqr->lpm) |
1551 |
+ cqr->lpm = dasd_path_get_opm(device); |
1552 |
+ } |
1553 |
++ /* |
1554 |
++ * remember the amount of formatted tracks to prevent double format on |
1555 |
++ * ESE devices |
1556 |
++ */ |
1557 |
++ if (cqr->block) |
1558 |
++ cqr->trkcount = atomic_read(&cqr->block->trkcount); |
1559 |
++ |
1560 |
+ if (cqr->cpmode == 1) { |
1561 |
+ rc = ccw_device_tm_start(device->cdev, cqr->cpaddr, |
1562 |
+ (long) cqr, cqr->lpm); |
1563 |
+@@ -1680,6 +1687,7 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, |
1564 |
+ unsigned long now; |
1565 |
+ int nrf_suppressed = 0; |
1566 |
+ int fp_suppressed = 0; |
1567 |
++ struct request *req; |
1568 |
+ u8 *sense = NULL; |
1569 |
+ int expires; |
1570 |
+ |
1571 |
+@@ -1780,7 +1788,12 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, |
1572 |
+ } |
1573 |
+ |
1574 |
+ if (dasd_ese_needs_format(cqr->block, irb)) { |
1575 |
+- if (rq_data_dir((struct request *)cqr->callback_data) == READ) { |
1576 |
++ req = dasd_get_callback_data(cqr); |
1577 |
++ if (!req) { |
1578 |
++ cqr->status = DASD_CQR_ERROR; |
1579 |
++ return; |
1580 |
++ } |
1581 |
++ if (rq_data_dir(req) == READ) { |
1582 |
+ device->discipline->ese_read(cqr, irb); |
1583 |
+ cqr->status = DASD_CQR_SUCCESS; |
1584 |
+ cqr->stopclk = now; |
1585 |
+@@ -2799,8 +2812,7 @@ static void __dasd_cleanup_cqr(struct dasd_ccw_req *cqr) |
1586 |
+ * complete a request partially. |
1587 |
+ */ |
1588 |
+ if (proc_bytes) { |
1589 |
+- blk_update_request(req, BLK_STS_OK, |
1590 |
+- blk_rq_bytes(req) - proc_bytes); |
1591 |
++ blk_update_request(req, BLK_STS_OK, proc_bytes); |
1592 |
+ blk_mq_requeue_request(req, true); |
1593 |
+ } else if (likely(!blk_should_fake_timeout(req->q))) { |
1594 |
+ blk_mq_complete_request(req); |
1595 |
+diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c |
1596 |
+index ad44d22e88591..7749deb614d75 100644 |
1597 |
+--- a/drivers/s390/block/dasd_eckd.c |
1598 |
++++ b/drivers/s390/block/dasd_eckd.c |
1599 |
+@@ -3026,13 +3026,24 @@ static int dasd_eckd_format_device(struct dasd_device *base, |
1600 |
+ } |
1601 |
+ |
1602 |
+ static bool test_and_set_format_track(struct dasd_format_entry *to_format, |
1603 |
+- struct dasd_block *block) |
1604 |
++ struct dasd_ccw_req *cqr) |
1605 |
+ { |
1606 |
++ struct dasd_block *block = cqr->block; |
1607 |
+ struct dasd_format_entry *format; |
1608 |
+ unsigned long flags; |
1609 |
+ bool rc = false; |
1610 |
+ |
1611 |
+ spin_lock_irqsave(&block->format_lock, flags); |
1612 |
++ if (cqr->trkcount != atomic_read(&block->trkcount)) { |
1613 |
++ /* |
1614 |
++ * The number of formatted tracks has changed after request |
1615 |
++ * start and we can not tell if the current track was involved. |
1616 |
++ * To avoid data corruption treat it as if the current track is |
1617 |
++ * involved |
1618 |
++ */ |
1619 |
++ rc = true; |
1620 |
++ goto out; |
1621 |
++ } |
1622 |
+ list_for_each_entry(format, &block->format_list, list) { |
1623 |
+ if (format->track == to_format->track) { |
1624 |
+ rc = true; |
1625 |
+@@ -3052,6 +3063,7 @@ static void clear_format_track(struct dasd_format_entry *format, |
1626 |
+ unsigned long flags; |
1627 |
+ |
1628 |
+ spin_lock_irqsave(&block->format_lock, flags); |
1629 |
++ atomic_inc(&block->trkcount); |
1630 |
+ list_del_init(&format->list); |
1631 |
+ spin_unlock_irqrestore(&block->format_lock, flags); |
1632 |
+ } |
1633 |
+@@ -3088,7 +3100,7 @@ dasd_eckd_ese_format(struct dasd_device *startdev, struct dasd_ccw_req *cqr, |
1634 |
+ sector_t curr_trk; |
1635 |
+ int rc; |
1636 |
+ |
1637 |
+- req = cqr->callback_data; |
1638 |
++ req = dasd_get_callback_data(cqr); |
1639 |
+ block = cqr->block; |
1640 |
+ base = block->base; |
1641 |
+ private = base->private; |
1642 |
+@@ -3113,8 +3125,11 @@ dasd_eckd_ese_format(struct dasd_device *startdev, struct dasd_ccw_req *cqr, |
1643 |
+ } |
1644 |
+ format->track = curr_trk; |
1645 |
+ /* test if track is already in formatting by another thread */ |
1646 |
+- if (test_and_set_format_track(format, block)) |
1647 |
++ if (test_and_set_format_track(format, cqr)) { |
1648 |
++ /* this is no real error so do not count down retries */ |
1649 |
++ cqr->retries++; |
1650 |
+ return ERR_PTR(-EEXIST); |
1651 |
++ } |
1652 |
+ |
1653 |
+ fdata.start_unit = curr_trk; |
1654 |
+ fdata.stop_unit = curr_trk; |
1655 |
+@@ -3213,12 +3228,11 @@ static int dasd_eckd_ese_read(struct dasd_ccw_req *cqr, struct irb *irb) |
1656 |
+ cqr->proc_bytes = blk_count * blksize; |
1657 |
+ return 0; |
1658 |
+ } |
1659 |
+- if (dst && !skip_block) { |
1660 |
+- dst += off; |
1661 |
++ if (dst && !skip_block) |
1662 |
+ memset(dst, 0, blksize); |
1663 |
+- } else { |
1664 |
++ else |
1665 |
+ skip_block--; |
1666 |
+- } |
1667 |
++ dst += blksize; |
1668 |
+ blk_count++; |
1669 |
+ } |
1670 |
+ } |
1671 |
+diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h |
1672 |
+index fa552f9f16667..9d9685c25253d 100644 |
1673 |
+--- a/drivers/s390/block/dasd_int.h |
1674 |
++++ b/drivers/s390/block/dasd_int.h |
1675 |
+@@ -188,6 +188,7 @@ struct dasd_ccw_req { |
1676 |
+ void (*callback)(struct dasd_ccw_req *, void *data); |
1677 |
+ void *callback_data; |
1678 |
+ unsigned int proc_bytes; /* bytes for partial completion */ |
1679 |
++ unsigned int trkcount; /* count formatted tracks */ |
1680 |
+ }; |
1681 |
+ |
1682 |
+ /* |
1683 |
+@@ -575,6 +576,7 @@ struct dasd_block { |
1684 |
+ |
1685 |
+ struct list_head format_list; |
1686 |
+ spinlock_t format_lock; |
1687 |
++ atomic_t trkcount; |
1688 |
+ }; |
1689 |
+ |
1690 |
+ struct dasd_attention_data { |
1691 |
+@@ -723,6 +725,18 @@ dasd_check_blocksize(int bsize) |
1692 |
+ return 0; |
1693 |
+ } |
1694 |
+ |
1695 |
++/* |
1696 |
++ * return the callback data of the original request in case there are |
1697 |
++ * ERP requests build on top of it |
1698 |
++ */ |
1699 |
++static inline void *dasd_get_callback_data(struct dasd_ccw_req *cqr) |
1700 |
++{ |
1701 |
++ while (cqr->refers) |
1702 |
++ cqr = cqr->refers; |
1703 |
++ |
1704 |
++ return cqr->callback_data; |
1705 |
++} |
1706 |
++ |
1707 |
+ /* externals in dasd.c */ |
1708 |
+ #define DASD_PROFILE_OFF 0 |
1709 |
+ #define DASD_PROFILE_ON 1 |
1710 |
+diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c |
1711 |
+index 62784b99a8074..c246ccc6bf057 100644 |
1712 |
+--- a/fs/btrfs/tree-log.c |
1713 |
++++ b/fs/btrfs/tree-log.c |
1714 |
+@@ -5334,6 +5334,18 @@ static int btrfs_log_inode(struct btrfs_trans_handle *trans, |
1715 |
+ mutex_lock(&inode->log_mutex); |
1716 |
+ } |
1717 |
+ |
1718 |
++ /* |
1719 |
++ * For symlinks, we must always log their content, which is stored in an |
1720 |
++ * inline extent, otherwise we could end up with an empty symlink after |
1721 |
++ * log replay, which is invalid on linux (symlink(2) returns -ENOENT if |
1722 |
++ * one attempts to create an empty symlink). |
1723 |
++ * We don't need to worry about flushing delalloc, because when we create |
1724 |
++ * the inline extent when the symlink is created (we never have delalloc |
1725 |
++ * for symlinks). |
1726 |
++ */ |
1727 |
++ if (S_ISLNK(inode->vfs_inode.i_mode)) |
1728 |
++ inode_only = LOG_INODE_ALL; |
1729 |
++ |
1730 |
+ /* |
1731 |
+ * a brute force approach to making sure we get the most uptodate |
1732 |
+ * copies of everything. |
1733 |
+@@ -5724,7 +5736,7 @@ process_leaf: |
1734 |
+ } |
1735 |
+ |
1736 |
+ ctx->log_new_dentries = false; |
1737 |
+- if (type == BTRFS_FT_DIR || type == BTRFS_FT_SYMLINK) |
1738 |
++ if (type == BTRFS_FT_DIR) |
1739 |
+ log_mode = LOG_INODE_ALL; |
1740 |
+ ret = btrfs_log_inode(trans, root, BTRFS_I(di_inode), |
1741 |
+ log_mode, ctx); |
1742 |
+diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c |
1743 |
+index 77199d3560429..b6d60e69043ae 100644 |
1744 |
+--- a/fs/nfs/nfs4proc.c |
1745 |
++++ b/fs/nfs/nfs4proc.c |
1746 |
+@@ -369,6 +369,14 @@ static void nfs4_setup_readdir(u64 cookie, __be32 *verifier, struct dentry *dent |
1747 |
+ kunmap_atomic(start); |
1748 |
+ } |
1749 |
+ |
1750 |
++static void nfs4_fattr_set_prechange(struct nfs_fattr *fattr, u64 version) |
1751 |
++{ |
1752 |
++ if (!(fattr->valid & NFS_ATTR_FATTR_PRECHANGE)) { |
1753 |
++ fattr->pre_change_attr = version; |
1754 |
++ fattr->valid |= NFS_ATTR_FATTR_PRECHANGE; |
1755 |
++ } |
1756 |
++} |
1757 |
++ |
1758 |
+ static void nfs4_test_and_free_stateid(struct nfs_server *server, |
1759 |
+ nfs4_stateid *stateid, |
1760 |
+ const struct cred *cred) |
1761 |
+@@ -6464,7 +6472,9 @@ static void nfs4_delegreturn_release(void *calldata) |
1762 |
+ pnfs_roc_release(&data->lr.arg, &data->lr.res, |
1763 |
+ data->res.lr_ret); |
1764 |
+ if (inode) { |
1765 |
+- nfs_post_op_update_inode_force_wcc(inode, &data->fattr); |
1766 |
++ nfs4_fattr_set_prechange(&data->fattr, |
1767 |
++ inode_peek_iversion_raw(inode)); |
1768 |
++ nfs_refresh_inode(inode, &data->fattr); |
1769 |
+ nfs_iput_and_deactive(inode); |
1770 |
+ } |
1771 |
+ kfree(calldata); |
1772 |
+diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h |
1773 |
+index b56e1dedcf2fd..40df88728a6f4 100644 |
1774 |
+--- a/include/linux/stmmac.h |
1775 |
++++ b/include/linux/stmmac.h |
1776 |
+@@ -203,5 +203,6 @@ struct plat_stmmacenet_data { |
1777 |
+ bool vlan_fail_q_en; |
1778 |
+ u8 vlan_fail_q; |
1779 |
+ unsigned int eee_usecs_rate; |
1780 |
++ bool sph_disable; |
1781 |
+ }; |
1782 |
+ #endif |
1783 |
+diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h |
1784 |
+index 54363527feea4..e58342ace11f2 100644 |
1785 |
+--- a/kernel/irq/internals.h |
1786 |
++++ b/kernel/irq/internals.h |
1787 |
+@@ -29,12 +29,14 @@ extern struct irqaction chained_action; |
1788 |
+ * IRQTF_WARNED - warning "IRQ_WAKE_THREAD w/o thread_fn" has been printed |
1789 |
+ * IRQTF_AFFINITY - irq thread is requested to adjust affinity |
1790 |
+ * IRQTF_FORCED_THREAD - irq action is force threaded |
1791 |
++ * IRQTF_READY - signals that irq thread is ready |
1792 |
+ */ |
1793 |
+ enum { |
1794 |
+ IRQTF_RUNTHREAD, |
1795 |
+ IRQTF_WARNED, |
1796 |
+ IRQTF_AFFINITY, |
1797 |
+ IRQTF_FORCED_THREAD, |
1798 |
++ IRQTF_READY, |
1799 |
+ }; |
1800 |
+ |
1801 |
+ /* |
1802 |
+diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c |
1803 |
+index 1a7723604399c..ca36c6179aa76 100644 |
1804 |
+--- a/kernel/irq/irqdesc.c |
1805 |
++++ b/kernel/irq/irqdesc.c |
1806 |
+@@ -405,6 +405,7 @@ static struct irq_desc *alloc_desc(int irq, int node, unsigned int flags, |
1807 |
+ lockdep_set_class(&desc->lock, &irq_desc_lock_class); |
1808 |
+ mutex_init(&desc->request_mutex); |
1809 |
+ init_rcu_head(&desc->rcu); |
1810 |
++ init_waitqueue_head(&desc->wait_for_threads); |
1811 |
+ |
1812 |
+ desc_set_defaults(irq, desc, node, affinity, owner); |
1813 |
+ irqd_set(&desc->irq_data, flags); |
1814 |
+@@ -573,6 +574,7 @@ int __init early_irq_init(void) |
1815 |
+ raw_spin_lock_init(&desc[i].lock); |
1816 |
+ lockdep_set_class(&desc[i].lock, &irq_desc_lock_class); |
1817 |
+ mutex_init(&desc[i].request_mutex); |
1818 |
++ init_waitqueue_head(&desc[i].wait_for_threads); |
1819 |
+ desc_set_defaults(i, &desc[i], node, NULL, NULL); |
1820 |
+ } |
1821 |
+ return arch_early_irq_init(); |
1822 |
+diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c |
1823 |
+index 79dc02b956dc3..92d94615cbbbd 100644 |
1824 |
+--- a/kernel/irq/manage.c |
1825 |
++++ b/kernel/irq/manage.c |
1826 |
+@@ -1148,6 +1148,31 @@ static void irq_wake_secondary(struct irq_desc *desc, struct irqaction *action) |
1827 |
+ raw_spin_unlock_irq(&desc->lock); |
1828 |
+ } |
1829 |
+ |
1830 |
++/* |
1831 |
++ * Internal function to notify that a interrupt thread is ready. |
1832 |
++ */ |
1833 |
++static void irq_thread_set_ready(struct irq_desc *desc, |
1834 |
++ struct irqaction *action) |
1835 |
++{ |
1836 |
++ set_bit(IRQTF_READY, &action->thread_flags); |
1837 |
++ wake_up(&desc->wait_for_threads); |
1838 |
++} |
1839 |
++ |
1840 |
++/* |
1841 |
++ * Internal function to wake up a interrupt thread and wait until it is |
1842 |
++ * ready. |
1843 |
++ */ |
1844 |
++static void wake_up_and_wait_for_irq_thread_ready(struct irq_desc *desc, |
1845 |
++ struct irqaction *action) |
1846 |
++{ |
1847 |
++ if (!action || !action->thread) |
1848 |
++ return; |
1849 |
++ |
1850 |
++ wake_up_process(action->thread); |
1851 |
++ wait_event(desc->wait_for_threads, |
1852 |
++ test_bit(IRQTF_READY, &action->thread_flags)); |
1853 |
++} |
1854 |
++ |
1855 |
+ /* |
1856 |
+ * Interrupt handler thread |
1857 |
+ */ |
1858 |
+@@ -1159,6 +1184,8 @@ static int irq_thread(void *data) |
1859 |
+ irqreturn_t (*handler_fn)(struct irq_desc *desc, |
1860 |
+ struct irqaction *action); |
1861 |
+ |
1862 |
++ irq_thread_set_ready(desc, action); |
1863 |
++ |
1864 |
+ if (force_irqthreads && test_bit(IRQTF_FORCED_THREAD, |
1865 |
+ &action->thread_flags)) |
1866 |
+ handler_fn = irq_forced_thread_fn; |
1867 |
+@@ -1583,8 +1610,6 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) |
1868 |
+ } |
1869 |
+ |
1870 |
+ if (!shared) { |
1871 |
+- init_waitqueue_head(&desc->wait_for_threads); |
1872 |
+- |
1873 |
+ /* Setup the type (level, edge polarity) if configured: */ |
1874 |
+ if (new->flags & IRQF_TRIGGER_MASK) { |
1875 |
+ ret = __irq_set_trigger(desc, |
1876 |
+@@ -1674,14 +1699,8 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) |
1877 |
+ |
1878 |
+ irq_setup_timings(desc, new); |
1879 |
+ |
1880 |
+- /* |
1881 |
+- * Strictly no need to wake it up, but hung_task complains |
1882 |
+- * when no hard interrupt wakes the thread up. |
1883 |
+- */ |
1884 |
+- if (new->thread) |
1885 |
+- wake_up_process(new->thread); |
1886 |
+- if (new->secondary) |
1887 |
+- wake_up_process(new->secondary->thread); |
1888 |
++ wake_up_and_wait_for_irq_thread_ready(desc, new); |
1889 |
++ wake_up_and_wait_for_irq_thread_ready(desc, new->secondary); |
1890 |
+ |
1891 |
+ register_irq_proc(irq, desc); |
1892 |
+ new->dir = NULL; |
1893 |
+diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c |
1894 |
+index 844c35803739e..b41009a283caf 100644 |
1895 |
+--- a/kernel/rcu/tree.c |
1896 |
++++ b/kernel/rcu/tree.c |
1897 |
+@@ -2456,7 +2456,7 @@ static void rcu_do_batch(struct rcu_data *rdp) |
1898 |
+ div = READ_ONCE(rcu_divisor); |
1899 |
+ div = div < 0 ? 7 : div > sizeof(long) * 8 - 2 ? sizeof(long) * 8 - 2 : div; |
1900 |
+ bl = max(rdp->blimit, pending >> div); |
1901 |
+- if (unlikely(bl > 100)) { |
1902 |
++ if (in_serving_softirq() && unlikely(bl > 100)) { |
1903 |
+ long rrn = READ_ONCE(rcu_resched_ns); |
1904 |
+ |
1905 |
+ rrn = rrn < NSEC_PER_MSEC ? NSEC_PER_MSEC : rrn > NSEC_PER_SEC ? NSEC_PER_SEC : rrn; |
1906 |
+@@ -2490,19 +2490,23 @@ static void rcu_do_batch(struct rcu_data *rdp) |
1907 |
+ * Stop only if limit reached and CPU has something to do. |
1908 |
+ * Note: The rcl structure counts down from zero. |
1909 |
+ */ |
1910 |
+- if (-rcl.len >= bl && !offloaded && |
1911 |
+- (need_resched() || |
1912 |
+- (!is_idle_task(current) && !rcu_is_callbacks_kthread()))) |
1913 |
+- break; |
1914 |
+- if (unlikely(tlimit)) { |
1915 |
+- /* only call local_clock() every 32 callbacks */ |
1916 |
+- if (likely((-rcl.len & 31) || local_clock() < tlimit)) |
1917 |
+- continue; |
1918 |
+- /* Exceeded the time limit, so leave. */ |
1919 |
+- break; |
1920 |
+- } |
1921 |
+- if (offloaded) { |
1922 |
+- WARN_ON_ONCE(in_serving_softirq()); |
1923 |
++ if (in_serving_softirq()) { |
1924 |
++ if (-rcl.len >= bl && (need_resched() || |
1925 |
++ (!is_idle_task(current) && !rcu_is_callbacks_kthread()))) |
1926 |
++ break; |
1927 |
++ |
1928 |
++ /* |
1929 |
++ * Make sure we don't spend too much time here and deprive other |
1930 |
++ * softirq vectors of CPU cycles. |
1931 |
++ */ |
1932 |
++ if (unlikely(tlimit)) { |
1933 |
++ /* only call local_clock() every 32 callbacks */ |
1934 |
++ if (likely((-rcl.len & 31) || local_clock() < tlimit)) |
1935 |
++ continue; |
1936 |
++ /* Exceeded the time limit, so leave. */ |
1937 |
++ break; |
1938 |
++ } |
1939 |
++ } else { |
1940 |
+ local_bh_enable(); |
1941 |
+ lockdep_assert_irqs_enabled(); |
1942 |
+ cond_resched_tasks_rcu_qs(); |
1943 |
+diff --git a/net/can/isotp.c b/net/can/isotp.c |
1944 |
+index c515bbd46c679..f2f0bc7f0cb4c 100644 |
1945 |
+--- a/net/can/isotp.c |
1946 |
++++ b/net/can/isotp.c |
1947 |
+@@ -1144,6 +1144,11 @@ static int isotp_bind(struct socket *sock, struct sockaddr *uaddr, int len) |
1948 |
+ |
1949 |
+ lock_sock(sk); |
1950 |
+ |
1951 |
++ if (so->bound) { |
1952 |
++ err = -EINVAL; |
1953 |
++ goto out; |
1954 |
++ } |
1955 |
++ |
1956 |
+ /* do not register frame reception for functional addressing */ |
1957 |
+ if (so->opt.flags & CAN_ISOTP_SF_BROADCAST) |
1958 |
+ do_rx_reg = 0; |
1959 |
+@@ -1154,10 +1159,6 @@ static int isotp_bind(struct socket *sock, struct sockaddr *uaddr, int len) |
1960 |
+ goto out; |
1961 |
+ } |
1962 |
+ |
1963 |
+- if (so->bound && addr->can_ifindex == so->ifindex && |
1964 |
+- rx_id == so->rxid && tx_id == so->txid) |
1965 |
+- goto out; |
1966 |
+- |
1967 |
+ dev = dev_get_by_index(net, addr->can_ifindex); |
1968 |
+ if (!dev) { |
1969 |
+ err = -ENODEV; |
1970 |
+@@ -1184,19 +1185,6 @@ static int isotp_bind(struct socket *sock, struct sockaddr *uaddr, int len) |
1971 |
+ |
1972 |
+ dev_put(dev); |
1973 |
+ |
1974 |
+- if (so->bound && do_rx_reg) { |
1975 |
+- /* unregister old filter */ |
1976 |
+- if (so->ifindex) { |
1977 |
+- dev = dev_get_by_index(net, so->ifindex); |
1978 |
+- if (dev) { |
1979 |
+- can_rx_unregister(net, dev, so->rxid, |
1980 |
+- SINGLE_MASK(so->rxid), |
1981 |
+- isotp_rcv, sk); |
1982 |
+- dev_put(dev); |
1983 |
+- } |
1984 |
+- } |
1985 |
+- } |
1986 |
+- |
1987 |
+ /* switch to new settings */ |
1988 |
+ so->ifindex = ifindex; |
1989 |
+ so->rxid = rx_id; |
1990 |
+diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c |
1991 |
+index 0c321996c6eb0..3817988a5a1d4 100644 |
1992 |
+--- a/net/ipv4/igmp.c |
1993 |
++++ b/net/ipv4/igmp.c |
1994 |
+@@ -2401,9 +2401,10 @@ int ip_mc_source(int add, int omode, struct sock *sk, struct |
1995 |
+ newpsl->sl_addr[i] = psl->sl_addr[i]; |
1996 |
+ /* decrease mem now to avoid the memleak warning */ |
1997 |
+ atomic_sub(IP_SFLSIZE(psl->sl_max), &sk->sk_omem_alloc); |
1998 |
+- kfree_rcu(psl, rcu); |
1999 |
+ } |
2000 |
+ rcu_assign_pointer(pmc->sflist, newpsl); |
2001 |
++ if (psl) |
2002 |
++ kfree_rcu(psl, rcu); |
2003 |
+ psl = newpsl; |
2004 |
+ } |
2005 |
+ rv = 1; /* > 0 for insert logic below if sl_count is 0 */ |
2006 |
+@@ -2501,11 +2502,13 @@ int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf, int ifindex) |
2007 |
+ psl->sl_count, psl->sl_addr, 0); |
2008 |
+ /* decrease mem now to avoid the memleak warning */ |
2009 |
+ atomic_sub(IP_SFLSIZE(psl->sl_max), &sk->sk_omem_alloc); |
2010 |
+- kfree_rcu(psl, rcu); |
2011 |
+- } else |
2012 |
++ } else { |
2013 |
+ (void) ip_mc_del_src(in_dev, &msf->imsf_multiaddr, pmc->sfmode, |
2014 |
+ 0, NULL, 0); |
2015 |
++ } |
2016 |
+ rcu_assign_pointer(pmc->sflist, newpsl); |
2017 |
++ if (psl) |
2018 |
++ kfree_rcu(psl, rcu); |
2019 |
+ pmc->sfmode = msf->imsf_fmode; |
2020 |
+ err = 0; |
2021 |
+ done: |
2022 |
+diff --git a/net/nfc/core.c b/net/nfc/core.c |
2023 |
+index 6800470dd6df7..3b2983813ff13 100644 |
2024 |
+--- a/net/nfc/core.c |
2025 |
++++ b/net/nfc/core.c |
2026 |
+@@ -38,7 +38,7 @@ int nfc_fw_download(struct nfc_dev *dev, const char *firmware_name) |
2027 |
+ |
2028 |
+ device_lock(&dev->dev); |
2029 |
+ |
2030 |
+- if (!device_is_registered(&dev->dev)) { |
2031 |
++ if (dev->shutting_down) { |
2032 |
+ rc = -ENODEV; |
2033 |
+ goto error; |
2034 |
+ } |
2035 |
+@@ -94,7 +94,7 @@ int nfc_dev_up(struct nfc_dev *dev) |
2036 |
+ |
2037 |
+ device_lock(&dev->dev); |
2038 |
+ |
2039 |
+- if (!device_is_registered(&dev->dev)) { |
2040 |
++ if (dev->shutting_down) { |
2041 |
+ rc = -ENODEV; |
2042 |
+ goto error; |
2043 |
+ } |
2044 |
+@@ -142,7 +142,7 @@ int nfc_dev_down(struct nfc_dev *dev) |
2045 |
+ |
2046 |
+ device_lock(&dev->dev); |
2047 |
+ |
2048 |
+- if (!device_is_registered(&dev->dev)) { |
2049 |
++ if (dev->shutting_down) { |
2050 |
+ rc = -ENODEV; |
2051 |
+ goto error; |
2052 |
+ } |
2053 |
+@@ -206,7 +206,7 @@ int nfc_start_poll(struct nfc_dev *dev, u32 im_protocols, u32 tm_protocols) |
2054 |
+ |
2055 |
+ device_lock(&dev->dev); |
2056 |
+ |
2057 |
+- if (!device_is_registered(&dev->dev)) { |
2058 |
++ if (dev->shutting_down) { |
2059 |
+ rc = -ENODEV; |
2060 |
+ goto error; |
2061 |
+ } |
2062 |
+@@ -245,7 +245,7 @@ int nfc_stop_poll(struct nfc_dev *dev) |
2063 |
+ |
2064 |
+ device_lock(&dev->dev); |
2065 |
+ |
2066 |
+- if (!device_is_registered(&dev->dev)) { |
2067 |
++ if (dev->shutting_down) { |
2068 |
+ rc = -ENODEV; |
2069 |
+ goto error; |
2070 |
+ } |
2071 |
+@@ -290,7 +290,7 @@ int nfc_dep_link_up(struct nfc_dev *dev, int target_index, u8 comm_mode) |
2072 |
+ |
2073 |
+ device_lock(&dev->dev); |
2074 |
+ |
2075 |
+- if (!device_is_registered(&dev->dev)) { |
2076 |
++ if (dev->shutting_down) { |
2077 |
+ rc = -ENODEV; |
2078 |
+ goto error; |
2079 |
+ } |
2080 |
+@@ -334,7 +334,7 @@ int nfc_dep_link_down(struct nfc_dev *dev) |
2081 |
+ |
2082 |
+ device_lock(&dev->dev); |
2083 |
+ |
2084 |
+- if (!device_is_registered(&dev->dev)) { |
2085 |
++ if (dev->shutting_down) { |
2086 |
+ rc = -ENODEV; |
2087 |
+ goto error; |
2088 |
+ } |
2089 |
+@@ -400,7 +400,7 @@ int nfc_activate_target(struct nfc_dev *dev, u32 target_idx, u32 protocol) |
2090 |
+ |
2091 |
+ device_lock(&dev->dev); |
2092 |
+ |
2093 |
+- if (!device_is_registered(&dev->dev)) { |
2094 |
++ if (dev->shutting_down) { |
2095 |
+ rc = -ENODEV; |
2096 |
+ goto error; |
2097 |
+ } |
2098 |
+@@ -446,7 +446,7 @@ int nfc_deactivate_target(struct nfc_dev *dev, u32 target_idx, u8 mode) |
2099 |
+ |
2100 |
+ device_lock(&dev->dev); |
2101 |
+ |
2102 |
+- if (!device_is_registered(&dev->dev)) { |
2103 |
++ if (dev->shutting_down) { |
2104 |
+ rc = -ENODEV; |
2105 |
+ goto error; |
2106 |
+ } |
2107 |
+@@ -493,7 +493,7 @@ int nfc_data_exchange(struct nfc_dev *dev, u32 target_idx, struct sk_buff *skb, |
2108 |
+ |
2109 |
+ device_lock(&dev->dev); |
2110 |
+ |
2111 |
+- if (!device_is_registered(&dev->dev)) { |
2112 |
++ if (dev->shutting_down) { |
2113 |
+ rc = -ENODEV; |
2114 |
+ kfree_skb(skb); |
2115 |
+ goto error; |
2116 |
+@@ -550,7 +550,7 @@ int nfc_enable_se(struct nfc_dev *dev, u32 se_idx) |
2117 |
+ |
2118 |
+ device_lock(&dev->dev); |
2119 |
+ |
2120 |
+- if (!device_is_registered(&dev->dev)) { |
2121 |
++ if (dev->shutting_down) { |
2122 |
+ rc = -ENODEV; |
2123 |
+ goto error; |
2124 |
+ } |
2125 |
+@@ -599,7 +599,7 @@ int nfc_disable_se(struct nfc_dev *dev, u32 se_idx) |
2126 |
+ |
2127 |
+ device_lock(&dev->dev); |
2128 |
+ |
2129 |
+- if (!device_is_registered(&dev->dev)) { |
2130 |
++ if (dev->shutting_down) { |
2131 |
+ rc = -ENODEV; |
2132 |
+ goto error; |
2133 |
+ } |
2134 |
+@@ -1126,6 +1126,7 @@ int nfc_register_device(struct nfc_dev *dev) |
2135 |
+ dev->rfkill = NULL; |
2136 |
+ } |
2137 |
+ } |
2138 |
++ dev->shutting_down = false; |
2139 |
+ device_unlock(&dev->dev); |
2140 |
+ |
2141 |
+ rc = nfc_genl_device_added(dev); |
2142 |
+@@ -1158,12 +1159,10 @@ void nfc_unregister_device(struct nfc_dev *dev) |
2143 |
+ rfkill_unregister(dev->rfkill); |
2144 |
+ rfkill_destroy(dev->rfkill); |
2145 |
+ } |
2146 |
++ dev->shutting_down = true; |
2147 |
+ device_unlock(&dev->dev); |
2148 |
+ |
2149 |
+ if (dev->ops->check_presence) { |
2150 |
+- device_lock(&dev->dev); |
2151 |
+- dev->shutting_down = true; |
2152 |
+- device_unlock(&dev->dev); |
2153 |
+ del_timer_sync(&dev->check_pres_timer); |
2154 |
+ cancel_work_sync(&dev->check_pres_work); |
2155 |
+ } |
2156 |
+diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c |
2157 |
+index 78acc4e9ac932..b8939ebaa6d3e 100644 |
2158 |
+--- a/net/nfc/netlink.c |
2159 |
++++ b/net/nfc/netlink.c |
2160 |
+@@ -1244,7 +1244,7 @@ int nfc_genl_fw_download_done(struct nfc_dev *dev, const char *firmware_name, |
2161 |
+ struct sk_buff *msg; |
2162 |
+ void *hdr; |
2163 |
+ |
2164 |
+- msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); |
2165 |
++ msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_ATOMIC); |
2166 |
+ if (!msg) |
2167 |
+ return -ENOMEM; |
2168 |
+ |
2169 |
+@@ -1260,7 +1260,7 @@ int nfc_genl_fw_download_done(struct nfc_dev *dev, const char *firmware_name, |
2170 |
+ |
2171 |
+ genlmsg_end(msg, hdr); |
2172 |
+ |
2173 |
+- genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_KERNEL); |
2174 |
++ genlmsg_multicast(&nfc_genl_family, msg, 0, 0, GFP_ATOMIC); |
2175 |
+ |
2176 |
+ return 0; |
2177 |
+ |
2178 |
+diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c |
2179 |
+index bd123f1d09230..0ca25e3cc5806 100644 |
2180 |
+--- a/net/sunrpc/xprtsock.c |
2181 |
++++ b/net/sunrpc/xprtsock.c |
2182 |
+@@ -2826,9 +2826,6 @@ static struct rpc_xprt *xs_setup_local(struct xprt_create *args) |
2183 |
+ } |
2184 |
+ xprt_set_bound(xprt); |
2185 |
+ xs_format_peer_addresses(xprt, "local", RPCBIND_NETID_LOCAL); |
2186 |
+- ret = ERR_PTR(xs_local_setup_socket(transport)); |
2187 |
+- if (ret) |
2188 |
+- goto out_err; |
2189 |
+ break; |
2190 |
+ default: |
2191 |
+ ret = ERR_PTR(-EAFNOSUPPORT); |
2192 |
+diff --git a/sound/firewire/fireworks/fireworks_hwdep.c b/sound/firewire/fireworks/fireworks_hwdep.c |
2193 |
+index e93eb4616c5f4..c739173c668f3 100644 |
2194 |
+--- a/sound/firewire/fireworks/fireworks_hwdep.c |
2195 |
++++ b/sound/firewire/fireworks/fireworks_hwdep.c |
2196 |
+@@ -34,6 +34,7 @@ hwdep_read_resp_buf(struct snd_efw *efw, char __user *buf, long remained, |
2197 |
+ type = SNDRV_FIREWIRE_EVENT_EFW_RESPONSE; |
2198 |
+ if (copy_to_user(buf, &type, sizeof(type))) |
2199 |
+ return -EFAULT; |
2200 |
++ count += sizeof(type); |
2201 |
+ remained -= sizeof(type); |
2202 |
+ buf += sizeof(type); |
2203 |
+ |
2204 |
+diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c |
2205 |
+index b5168959fcf63..a5b1fd62a99cf 100644 |
2206 |
+--- a/sound/pci/hda/patch_realtek.c |
2207 |
++++ b/sound/pci/hda/patch_realtek.c |
2208 |
+@@ -8969,6 +8969,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
2209 |
+ SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS), |
2210 |
+ SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940", ALC298_FIXUP_LENOVO_SPK_VOLUME), |
2211 |
+ SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS), |
2212 |
++ SND_PCI_QUIRK(0x17aa, 0x3820, "Yoga Duet 7 13ITL6", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), |
2213 |
+ SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS), |
2214 |
+ SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF), |
2215 |
+ SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), |
2216 |
+diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c |
2217 |
+index 0b3b7909efc92..5f8c96dea094a 100644 |
2218 |
+--- a/sound/soc/codecs/da7219.c |
2219 |
++++ b/sound/soc/codecs/da7219.c |
2220 |
+@@ -446,7 +446,7 @@ static int da7219_tonegen_freq_put(struct snd_kcontrol *kcontrol, |
2221 |
+ struct soc_mixer_control *mixer_ctrl = |
2222 |
+ (struct soc_mixer_control *) kcontrol->private_value; |
2223 |
+ unsigned int reg = mixer_ctrl->reg; |
2224 |
+- __le16 val; |
2225 |
++ __le16 val_new, val_old; |
2226 |
+ int ret; |
2227 |
+ |
2228 |
+ /* |
2229 |
+@@ -454,13 +454,19 @@ static int da7219_tonegen_freq_put(struct snd_kcontrol *kcontrol, |
2230 |
+ * Therefore we need to convert to little endian here to align with |
2231 |
+ * HW registers. |
2232 |
+ */ |
2233 |
+- val = cpu_to_le16(ucontrol->value.integer.value[0]); |
2234 |
++ val_new = cpu_to_le16(ucontrol->value.integer.value[0]); |
2235 |
+ |
2236 |
+ mutex_lock(&da7219->ctrl_lock); |
2237 |
+- ret = regmap_raw_write(da7219->regmap, reg, &val, sizeof(val)); |
2238 |
++ ret = regmap_raw_read(da7219->regmap, reg, &val_old, sizeof(val_old)); |
2239 |
++ if (ret == 0 && (val_old != val_new)) |
2240 |
++ ret = regmap_raw_write(da7219->regmap, reg, |
2241 |
++ &val_new, sizeof(val_new)); |
2242 |
+ mutex_unlock(&da7219->ctrl_lock); |
2243 |
+ |
2244 |
+- return ret; |
2245 |
++ if (ret < 0) |
2246 |
++ return ret; |
2247 |
++ |
2248 |
++ return val_old != val_new; |
2249 |
+ } |
2250 |
+ |
2251 |
+ |
2252 |
+diff --git a/sound/soc/codecs/wm8958-dsp2.c b/sound/soc/codecs/wm8958-dsp2.c |
2253 |
+index 3bce9a14f0f31..f7256761d0432 100644 |
2254 |
+--- a/sound/soc/codecs/wm8958-dsp2.c |
2255 |
++++ b/sound/soc/codecs/wm8958-dsp2.c |
2256 |
+@@ -530,7 +530,7 @@ static int wm8958_mbc_put(struct snd_kcontrol *kcontrol, |
2257 |
+ |
2258 |
+ wm8958_dsp_apply(component, mbc, wm8994->mbc_ena[mbc]); |
2259 |
+ |
2260 |
+- return 0; |
2261 |
++ return 1; |
2262 |
+ } |
2263 |
+ |
2264 |
+ #define WM8958_MBC_SWITCH(xname, xval) {\ |
2265 |
+@@ -656,7 +656,7 @@ static int wm8958_vss_put(struct snd_kcontrol *kcontrol, |
2266 |
+ |
2267 |
+ wm8958_dsp_apply(component, vss, wm8994->vss_ena[vss]); |
2268 |
+ |
2269 |
+- return 0; |
2270 |
++ return 1; |
2271 |
+ } |
2272 |
+ |
2273 |
+ |
2274 |
+@@ -730,7 +730,7 @@ static int wm8958_hpf_put(struct snd_kcontrol *kcontrol, |
2275 |
+ |
2276 |
+ wm8958_dsp_apply(component, hpf % 3, ucontrol->value.integer.value[0]); |
2277 |
+ |
2278 |
+- return 0; |
2279 |
++ return 1; |
2280 |
+ } |
2281 |
+ |
2282 |
+ #define WM8958_HPF_SWITCH(xname, xval) {\ |
2283 |
+@@ -824,7 +824,7 @@ static int wm8958_enh_eq_put(struct snd_kcontrol *kcontrol, |
2284 |
+ |
2285 |
+ wm8958_dsp_apply(component, eq, ucontrol->value.integer.value[0]); |
2286 |
+ |
2287 |
+- return 0; |
2288 |
++ return 1; |
2289 |
+ } |
2290 |
+ |
2291 |
+ #define WM8958_ENH_EQ_SWITCH(xname, xval) {\ |
2292 |
+diff --git a/sound/soc/meson/aiu-acodec-ctrl.c b/sound/soc/meson/aiu-acodec-ctrl.c |
2293 |
+index 7078197e0cc50..e11b6a5cd772e 100644 |
2294 |
+--- a/sound/soc/meson/aiu-acodec-ctrl.c |
2295 |
++++ b/sound/soc/meson/aiu-acodec-ctrl.c |
2296 |
+@@ -58,7 +58,7 @@ static int aiu_acodec_ctrl_mux_put_enum(struct snd_kcontrol *kcontrol, |
2297 |
+ |
2298 |
+ snd_soc_dapm_mux_update_power(dapm, kcontrol, mux, e, NULL); |
2299 |
+ |
2300 |
+- return 0; |
2301 |
++ return 1; |
2302 |
+ } |
2303 |
+ |
2304 |
+ static SOC_ENUM_SINGLE_DECL(aiu_acodec_ctrl_mux_enum, AIU_ACODEC_CTRL, |
2305 |
+diff --git a/sound/soc/meson/aiu-codec-ctrl.c b/sound/soc/meson/aiu-codec-ctrl.c |
2306 |
+index 4b773d3e8b073..a807e5007d6ea 100644 |
2307 |
+--- a/sound/soc/meson/aiu-codec-ctrl.c |
2308 |
++++ b/sound/soc/meson/aiu-codec-ctrl.c |
2309 |
+@@ -57,7 +57,7 @@ static int aiu_codec_ctrl_mux_put_enum(struct snd_kcontrol *kcontrol, |
2310 |
+ |
2311 |
+ snd_soc_dapm_mux_update_power(dapm, kcontrol, mux, e, NULL); |
2312 |
+ |
2313 |
+- return 0; |
2314 |
++ return 1; |
2315 |
+ } |
2316 |
+ |
2317 |
+ static SOC_ENUM_SINGLE_DECL(aiu_hdmi_ctrl_mux_enum, AIU_HDMI_CLK_DATA_CTRL, |
2318 |
+diff --git a/sound/soc/meson/g12a-tohdmitx.c b/sound/soc/meson/g12a-tohdmitx.c |
2319 |
+index 9b2b59536ced0..6c99052feafd8 100644 |
2320 |
+--- a/sound/soc/meson/g12a-tohdmitx.c |
2321 |
++++ b/sound/soc/meson/g12a-tohdmitx.c |
2322 |
+@@ -67,7 +67,7 @@ static int g12a_tohdmitx_i2s_mux_put_enum(struct snd_kcontrol *kcontrol, |
2323 |
+ |
2324 |
+ snd_soc_dapm_mux_update_power(dapm, kcontrol, mux, e, NULL); |
2325 |
+ |
2326 |
+- return 0; |
2327 |
++ return 1; |
2328 |
+ } |
2329 |
+ |
2330 |
+ static SOC_ENUM_SINGLE_DECL(g12a_tohdmitx_i2s_mux_enum, TOHDMITX_CTRL0, |
2331 |
+diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c |
2332 |
+index 0d100b4e43f7e..9ef80a48707eb 100644 |
2333 |
+--- a/sound/soc/soc-generic-dmaengine-pcm.c |
2334 |
++++ b/sound/soc/soc-generic-dmaengine-pcm.c |
2335 |
+@@ -83,10 +83,10 @@ static int dmaengine_pcm_hw_params(struct snd_soc_component *component, |
2336 |
+ |
2337 |
+ memset(&slave_config, 0, sizeof(slave_config)); |
2338 |
+ |
2339 |
+- if (pcm->config && pcm->config->prepare_slave_config) |
2340 |
+- prepare_slave_config = pcm->config->prepare_slave_config; |
2341 |
+- else |
2342 |
++ if (!pcm->config) |
2343 |
+ prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config; |
2344 |
++ else |
2345 |
++ prepare_slave_config = pcm->config->prepare_slave_config; |
2346 |
+ |
2347 |
+ if (prepare_slave_config) { |
2348 |
+ ret = prepare_slave_config(substream, params, &slave_config); |
2349 |
+diff --git a/tools/testing/selftests/drivers/net/ocelot/tc_flower_chains.sh b/tools/testing/selftests/drivers/net/ocelot/tc_flower_chains.sh |
2350 |
+index beee0d5646a61..11189f3096270 100755 |
2351 |
+--- a/tools/testing/selftests/drivers/net/ocelot/tc_flower_chains.sh |
2352 |
++++ b/tools/testing/selftests/drivers/net/ocelot/tc_flower_chains.sh |
2353 |
+@@ -185,7 +185,7 @@ setup_prepare() |
2354 |
+ |
2355 |
+ tc filter add dev $eth0 ingress chain $(IS2 0 0) pref 1 \ |
2356 |
+ protocol ipv4 flower skip_sw ip_proto udp dst_port 5201 \ |
2357 |
+- action police rate 50mbit burst 64k \ |
2358 |
++ action police rate 50mbit burst 64k conform-exceed drop/pipe \ |
2359 |
+ action goto chain $(IS2 1 0) |
2360 |
+ } |
2361 |
+ |
2362 |
+diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh b/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh |
2363 |
+index a3402cd8d5b68..9ff22f28032dd 100755 |
2364 |
+--- a/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh |
2365 |
++++ b/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh |
2366 |
+@@ -61,9 +61,12 @@ setup_prepare() |
2367 |
+ |
2368 |
+ vrf_prepare |
2369 |
+ mirror_gre_topo_create |
2370 |
++ # Avoid changing br1's PVID while it is operational as a L3 interface. |
2371 |
++ ip link set dev br1 down |
2372 |
+ |
2373 |
+ ip link set dev $swp3 master br1 |
2374 |
+ bridge vlan add dev br1 vid 555 pvid untagged self |
2375 |
++ ip link set dev br1 up |
2376 |
+ ip address add dev br1 192.0.2.129/28 |
2377 |
+ ip address add dev br1 2001:db8:2::1/64 |
2378 |
+ |
2379 |
+diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c |
2380 |
+index dc21dc49b426f..e36745995f224 100644 |
2381 |
+--- a/tools/testing/selftests/seccomp/seccomp_bpf.c |
2382 |
++++ b/tools/testing/selftests/seccomp/seccomp_bpf.c |
2383 |
+@@ -951,7 +951,7 @@ TEST(ERRNO_valid) |
2384 |
+ ASSERT_EQ(0, ret); |
2385 |
+ |
2386 |
+ EXPECT_EQ(parent, syscall(__NR_getppid)); |
2387 |
+- EXPECT_EQ(-1, read(0, NULL, 0)); |
2388 |
++ EXPECT_EQ(-1, read(-1, NULL, 0)); |
2389 |
+ EXPECT_EQ(E2BIG, errno); |
2390 |
+ } |
2391 |
+ |
2392 |
+@@ -970,7 +970,7 @@ TEST(ERRNO_zero) |
2393 |
+ |
2394 |
+ EXPECT_EQ(parent, syscall(__NR_getppid)); |
2395 |
+ /* "errno" of 0 is ok. */ |
2396 |
+- EXPECT_EQ(0, read(0, NULL, 0)); |
2397 |
++ EXPECT_EQ(0, read(-1, NULL, 0)); |
2398 |
+ } |
2399 |
+ |
2400 |
+ /* |
2401 |
+@@ -991,7 +991,7 @@ TEST(ERRNO_capped) |
2402 |
+ ASSERT_EQ(0, ret); |
2403 |
+ |
2404 |
+ EXPECT_EQ(parent, syscall(__NR_getppid)); |
2405 |
+- EXPECT_EQ(-1, read(0, NULL, 0)); |
2406 |
++ EXPECT_EQ(-1, read(-1, NULL, 0)); |
2407 |
+ EXPECT_EQ(4095, errno); |
2408 |
+ } |
2409 |
+ |
2410 |
+@@ -1022,7 +1022,7 @@ TEST(ERRNO_order) |
2411 |
+ ASSERT_EQ(0, ret); |
2412 |
+ |
2413 |
+ EXPECT_EQ(parent, syscall(__NR_getppid)); |
2414 |
+- EXPECT_EQ(-1, read(0, NULL, 0)); |
2415 |
++ EXPECT_EQ(-1, read(-1, NULL, 0)); |
2416 |
+ EXPECT_EQ(12, errno); |
2417 |
+ } |
2418 |
+ |
2419 |
+@@ -2575,7 +2575,7 @@ void *tsync_sibling(void *data) |
2420 |
+ ret = prctl(PR_GET_NO_NEW_PRIVS, 0, 0, 0, 0); |
2421 |
+ if (!ret) |
2422 |
+ return (void *)SIBLING_EXIT_NEWPRIVS; |
2423 |
+- read(0, NULL, 0); |
2424 |
++ read(-1, NULL, 0); |
2425 |
+ return (void *)SIBLING_EXIT_UNKILLED; |
2426 |
+ } |
2427 |
+ |