serial: replace the state mutex with the tty port mutex