generic: mvswitch: add detach callback