Commit 5a43dc9
committed
firewire: core: detect device quirk when reading configuration ROM
Every time the bus manager runs, the cached configuration ROM content of
the IRM device is investigated to detect device-specific quirks. This
detection can be performed in advance when reading the configuration ROM.
This commit adds device quirk flags to the fw_device structure, and
initializes them after reading the bus information block of the
configuration ROM. The quirk flags are immutable once the configuration
ROM has been read. Although they are likely accessed concurrently only by
the bus manager, this commit ensures safe access by preventing torn writes
and reads using the WRITE_ONCE()/READ_ONCE() macros.
Link: https://lore.kernel.org/r/20251013140311.97159-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>1 parent 3a86608 commit 5a43dc9
3 files changed
Lines changed: 41 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | | - | |
91 | 89 | | |
92 | 90 | | |
93 | 91 | | |
| |||
308 | 306 | | |
309 | 307 | | |
310 | 308 | | |
311 | | - | |
312 | | - | |
313 | 309 | | |
314 | 310 | | |
315 | | - | |
| 311 | + | |
316 | 312 | | |
317 | 313 | | |
318 | 314 | | |
| |||
328 | 324 | | |
329 | 325 | | |
330 | 326 | | |
| 327 | + | |
331 | 328 | | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
340 | 333 | | |
341 | 334 | | |
342 | 335 | | |
| |||
373 | 366 | | |
374 | 367 | | |
375 | 368 | | |
376 | | - | |
| 369 | + | |
377 | 370 | | |
378 | 371 | | |
379 | 372 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
545 | 560 | | |
546 | 561 | | |
547 | 562 | | |
| |||
582 | 597 | | |
583 | 598 | | |
584 | 599 | | |
| 600 | + | |
585 | 601 | | |
586 | 602 | | |
587 | 603 | | |
| |||
612 | 628 | | |
613 | 629 | | |
614 | 630 | | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
615 | 636 | | |
616 | 637 | | |
617 | 638 | | |
| |||
1122 | 1143 | | |
1123 | 1144 | | |
1124 | 1145 | | |
1125 | | - | |
| 1146 | + | |
1126 | 1147 | | |
1127 | 1148 | | |
1128 | | - | |
| 1149 | + | |
1129 | 1150 | | |
1130 | 1151 | | |
1131 | 1152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
173 | 181 | | |
174 | 182 | | |
175 | 183 | | |
| |||
203 | 211 | | |
204 | 212 | | |
205 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
206 | 217 | | |
207 | 218 | | |
208 | 219 | | |
| |||
0 commit comments