/* This routine will shutdown a serial port; interrupts are disabled, and DTR is dropped if the hangup on close termio flag is on.  */
static void shutdown(struct m68k_serial *info)
/* This routine will shutdown a serial port; interrupts are disabled, and DTR is dropped if the hangup on close termio flag is on.  */
static void shutdown(struct m68k_serial *info)
{
	m68328_uart *uart = &uart_addr[info->line];
	unsigned long	flags;
	uart->ustcnt = 0;
	if (!(info->flags & S_INITIALIZED))
		return;
	local_irq_save(flags);
	if (info->xmit_buf) {
		free_page((unsigned long) info->xmit_buf);
		info->xmit_buf = 0;
	}
	if (info->port.tty)
		set_bit(TTY_IO_ERROR, &info->port.tty->flags);
	info->flags &= ~S_INITIALIZED;
	local_irq_restore(flags);
}