• Ioana Ciornei's avatar
    dpaa2-switch: seed the buffer pool after allocating the swp · 7aaa0f31
    Ioana Ciornei authored
    Any interraction with the buffer pool (seeding a buffer, acquire one) is
    made through a software portal (SWP, a DPIO object).
    There are circumstances where the dpaa2-switch driver probes on a DPSW
    before any DPIO devices have been probed. In this case, seeding of the
    buffer pool will lead to a panic since no SWPs are initialized.
    
    To fix this, seed the buffer pool after making sure that the software
    portals have been probed and are ready to be used.
    
    Fixes: 0b1b7137 ("staging: dpaa2-switch: handle Rx path on control interface")
    Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    7aaa0f31
dpaa2-switch.c 84.5 KB