/* Send the termios settings for this port to the slave. This sleeps waiting for the command to complete - so must have user context.  */
static int stli_setport(struct tty_struct *tty)
/* Send the termios settings for this port to the slave. This sleeps waiting for the command to complete - so must have user context.  */
static int stli_setport(struct tty_struct *tty)
{
	struct stliport *portp = tty->driver_data;
	struct stlibrd *brdp;
	asyport_t aport;
	if (portp == NULL)
		return -ENODEV;
	if (portp->brdnr >= stli_nrbrds)
		return -ENODEV;
	brdp = stli_brds[portp->brdnr];
	if (brdp == NULL)
		return -ENODEV;
	stli_mkasyport(tty, portp, &aport, tty->termios);
	return(stli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0));
}