Commit e4bdd11
net: macb: move Rx buffers alloc from link up to open
mog_alloc_rx_buffers(), getting called at open, does not do rx buffer
alloc on GEM. The bulk of the work is done by gem_rx_refill() filling
up all slots with valid buffers.
gem_rx_refill() is called at link up by
gem_init_rings() == bp->macbgem_ops.mog_init_rings().
Move operation to macb_open(), mostly to allow it to fail early and
loudly rather than init the device with Rx mostly broken.
About `bool fail_early`:
- When called from macb_open(), ring init fails as soon as a queue
cannot be refilled.
- When called from macb_hresp_error_task(), we do our best to reinit
the device: we still iterate over all queues and try refilling all
even if a previous queue failed.
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Signed-off-by: Paolo Valerio <pvalerio@redhat.com>1 parent f02621a commit e4bdd11
2 files changed
+28
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1218 | 1218 | | |
1219 | 1219 | | |
1220 | 1220 | | |
1221 | | - | |
| 1221 | + | |
1222 | 1222 | | |
1223 | 1223 | | |
1224 | 1224 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1424 | 1424 | | |
1425 | 1425 | | |
1426 | 1426 | | |
1427 | | - | |
| 1427 | + | |
1428 | 1428 | | |
1429 | 1429 | | |
1430 | 1430 | | |
1431 | 1431 | | |
1432 | 1432 | | |
1433 | 1433 | | |
| 1434 | + | |
1434 | 1435 | | |
1435 | 1436 | | |
1436 | 1437 | | |
| |||
1447 | 1448 | | |
1448 | 1449 | | |
1449 | 1450 | | |
| 1451 | + | |
1450 | 1452 | | |
1451 | 1453 | | |
1452 | 1454 | | |
| |||
1485 | 1487 | | |
1486 | 1488 | | |
1487 | 1489 | | |
| 1490 | + | |
1488 | 1491 | | |
1489 | 1492 | | |
1490 | 1493 | | |
| |||
1942 | 1945 | | |
1943 | 1946 | | |
1944 | 1947 | | |
1945 | | - | |
| 1948 | + | |
1946 | 1949 | | |
1947 | 1950 | | |
1948 | 1951 | | |
| |||
2730 | 2733 | | |
2731 | 2734 | | |
2732 | 2735 | | |
2733 | | - | |
2734 | | - | |
2735 | 2736 | | |
2736 | 2737 | | |
2737 | 2738 | | |
| |||
2743 | 2744 | | |
2744 | 2745 | | |
2745 | 2746 | | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
2746 | 2752 | | |
2747 | 2753 | | |
2748 | 2754 | | |
| |||
2763 | 2769 | | |
2764 | 2770 | | |
2765 | 2771 | | |
2766 | | - | |
| 2772 | + | |
2767 | 2773 | | |
2768 | 2774 | | |
2769 | 2775 | | |
| 2776 | + | |
2770 | 2777 | | |
| 2778 | + | |
2771 | 2779 | | |
2772 | 2780 | | |
2773 | 2781 | | |
| |||
2783 | 2791 | | |
2784 | 2792 | | |
2785 | 2793 | | |
2786 | | - | |
| 2794 | + | |
| 2795 | + | |
| 2796 | + | |
| 2797 | + | |
| 2798 | + | |
| 2799 | + | |
| 2800 | + | |
| 2801 | + | |
| 2802 | + | |
| 2803 | + | |
| 2804 | + | |
2787 | 2805 | | |
2788 | 2806 | | |
2789 | 2807 | | |
| 2808 | + | |
2790 | 2809 | | |
2791 | 2810 | | |
2792 | | - | |
| 2811 | + | |
2793 | 2812 | | |
2794 | 2813 | | |
2795 | 2814 | | |
| |||
2806 | 2825 | | |
2807 | 2826 | | |
2808 | 2827 | | |
| 2828 | + | |
2809 | 2829 | | |
2810 | 2830 | | |
2811 | 2831 | | |
| |||
3173 | 3193 | | |
3174 | 3194 | | |
3175 | 3195 | | |
3176 | | - | |
3177 | 3196 | | |
3178 | 3197 | | |
3179 | 3198 | | |
| |||
0 commit comments