• Sean Anderson's avatar
    net: fman: dtsec: Always gracefully stop/start · aae73fde
    Sean Anderson authored
    There are two ways that GRS can be set: graceful_stop and dtsec_isr. It
    is cleared by graceful_start. If it is already set before calling
    graceful_stop, then that means that dtsec_isr set it. In that case, we
    will not set GRS nor will we clear it (which seems like a bug?). For GTS
    the logic is similar, except that there is no one else messing with this
    bit (so we will always set and clear it). Simplify the logic by always
    setting/clearing GRS/GTS. This is less racy that the previous behavior,
    and ensures that we always end up clearing the bits. This can of course
    clear GRS while dtsec_isr is waiting, but because we have already done
    our own waiting it should be fine.
    
    This is the last user of enum comm_mode, so remove it.
    Signed-off-by: default avatarSean Anderson <sean.anderson@seco.com>
    Acked-by: default avatarCamelia Groza <camelia.groza@nxp.com>
    Tested-by: default avatarCamelia Groza <camelia.groza@nxp.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    aae73fde
fman_dtsec.c 40.5 KB