Commit fca3dc8
net: macb: remove illusion about TBQPH/RBQPH being per-queue
The MACB driver acts as if TBQPH/RBQPH are configurable on a per queue
basis; this is a lie. A single register configures the upper 32 bits of
each DMA descriptor buffers for all queues.
Concrete actions:
- Drop GEM_TBQPH/GEM_RBQPH macros which have a queue index argument.
Only use MACB_TBQPH/MACB_RBQPH constants.
- Drop struct macb_queue->TBQPH/RBQPH fields.
- In macb_init_buffers(): do a single write to TBQPH and RBQPH for all
queues instead of a write per queue.
- In macb_tx_error_task(): drop the write to TBQPH.
- In macb_alloc_consistent(): if allocations give different upper
32-bits, fail. Previously, it would have lead to silent memory
corruption as queues would have used the upper 32 bits of the alloc
from queue 0 and their own low 32 bits.
- In macb_suspend(): if we use the tie off descriptor for suspend, do
the write once for all queues instead of once per queue.
Fixes: fff8019 ("net: macb: Add 64 bit addressing support for GEM")
Fixes: ae1f2a5 ("net: macb: Added support for many RX queues")
Reviewed-by: Sean Anderson <sean.anderson@linux.dev>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250923-macb-fixes-v6-2-772d655cdeb6@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 9665aa1 commit fca3dc8
2 files changed
+24
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
217 | 216 | | |
218 | 217 | | |
219 | | - | |
220 | 218 | | |
221 | 219 | | |
222 | 220 | | |
| |||
1214 | 1212 | | |
1215 | 1213 | | |
1216 | 1214 | | |
1217 | | - | |
1218 | 1215 | | |
1219 | 1216 | | |
1220 | | - | |
1221 | 1217 | | |
1222 | 1218 | | |
1223 | 1219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
498 | | - | |
499 | | - | |
500 | 498 | | |
501 | | - | |
502 | | - | |
503 | | - | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
504 | 506 | | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
505 | 510 | | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
| |||
1166 | 1166 | | |
1167 | 1167 | | |
1168 | 1168 | | |
1169 | | - | |
1170 | | - | |
1171 | | - | |
1172 | | - | |
1173 | 1169 | | |
1174 | 1170 | | |
1175 | 1171 | | |
| |||
2546 | 2542 | | |
2547 | 2543 | | |
2548 | 2544 | | |
| 2545 | + | |
2549 | 2546 | | |
2550 | 2547 | | |
2551 | 2548 | | |
2552 | 2549 | | |
2553 | 2550 | | |
2554 | 2551 | | |
2555 | 2552 | | |
2556 | | - | |
| 2553 | + | |
| 2554 | + | |
| 2555 | + | |
2557 | 2556 | | |
2558 | 2557 | | |
2559 | 2558 | | |
| |||
2567 | 2566 | | |
2568 | 2567 | | |
2569 | 2568 | | |
2570 | | - | |
2571 | | - | |
| 2569 | + | |
| 2570 | + | |
| 2571 | + | |
| 2572 | + | |
| 2573 | + | |
2572 | 2574 | | |
2573 | 2575 | | |
2574 | 2576 | | |
| |||
4309 | 4311 | | |
4310 | 4312 | | |
4311 | 4313 | | |
4312 | | - | |
4313 | | - | |
4314 | | - | |
4315 | | - | |
4316 | | - | |
4317 | | - | |
4318 | 4314 | | |
4319 | 4315 | | |
4320 | 4316 | | |
| |||
4323 | 4319 | | |
4324 | 4320 | | |
4325 | 4321 | | |
4326 | | - | |
4327 | | - | |
4328 | | - | |
4329 | | - | |
4330 | | - | |
4331 | | - | |
4332 | 4322 | | |
4333 | 4323 | | |
4334 | 4324 | | |
| |||
5452 | 5442 | | |
5453 | 5443 | | |
5454 | 5444 | | |
| 5445 | + | |
| 5446 | + | |
| 5447 | + | |
| 5448 | + | |
| 5449 | + | |
5455 | 5450 | | |
5456 | 5451 | | |
5457 | 5452 | | |
| |||
5461 | 5456 | | |
5462 | 5457 | | |
5463 | 5458 | | |
5464 | | - | |
5465 | | - | |
5466 | | - | |
5467 | | - | |
5468 | 5459 | | |
5469 | 5460 | | |
5470 | 5461 | | |
| |||
0 commit comments