• Oded Gabbay's avatar
    habanalabs: reset after device is actually released · 35862d1c
    Oded Gabbay authored
    The device is actually released only after the refcnt of the hpriv
    structure is 0, which means all its contexts were closed.
    
    If we reset the device while a context is still open, there are
    possibilities for unexpected behavior and crashes. For example, if the
    process has a mapping of a register block that is now currently being
    reset, and the process writes/reads to that block during the reset,
    the device can get stuck.
    Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
    35862d1c
device.c 40.8 KB