Merge "hal: check for usb card state before setting in/out device"