break;
}
- cli();
+ save_flags(flags); cli();
c = MIN(c, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
SERIAL_XMIT_SIZE - info->xmit_head));
memcpy(info->xmit_buf + info->xmit_head, tmp_buf, c);
up(&tmp_buf_sem);
} else {
while (1) {
- cli();
+ save_flags(flags); cli();
c = MIN(count, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1,
SERIAL_XMIT_SIZE - info->xmit_head));
if (c <= 0) {
#ifdef SERIAL_DEBUG_THROTTLE
char buf[64];
- printk("throttle %s: %d....\n", _tty_name(tty, buf),
+ printk("throttle %s: %d....\n", tty_name(tty, buf),
tty->ldisc.chars_in_buffer(tty));
printk("cy_throttle ttyS%d\n", info->line);
#endif
#ifdef SERIAL_DEBUG_THROTTLE
char buf[64];
- printk("throttle %s: %d....\n", _tty_name(tty, buf),
+ printk("throttle %s: %d....\n", tty_name(tty, buf),
tty->ldisc.chars_in_buffer(tty));
printk("cy_unthrottle ttyS%d\n", info->line);
#endif
memset(&cy_serial_driver, 0, sizeof(struct tty_driver));
cy_serial_driver.magic = TTY_DRIVER_MAGIC;
+#ifdef CONFIG_DEVFS_FS
+ cy_serial_driver.name = "tts/%d";
+#else
cy_serial_driver.name = "ttyS";
+#endif
cy_serial_driver.major = TTY_MAJOR;
cy_serial_driver.minor_start = 64;
cy_serial_driver.num = NR_PORTS;
* major number and the subtype code.
*/
cy_callout_driver = cy_serial_driver;
+#ifdef CONFIG_DEVFS_FS
+ cy_callout_driver.name = "cua/%d";
+#else
cy_callout_driver.name = "cua";
+#endif
cy_callout_driver.major = TTYAUX_MAJOR;
cy_callout_driver.subtype = SERIAL_TYPE_CALLOUT;
memset(&scc_driver, 0, sizeof(scc_driver));
scc_driver.magic = TTY_DRIVER_MAGIC;
scc_driver.driver_name = "scc";
+#ifdef CONFIG_DEVFS_FS
+ scc_driver.name = "tts/%d";
+#else
scc_driver.name = "ttyS";
+#endif
scc_driver.major = TTY_MAJOR;
scc_driver.minor_start = SCC_MINOR_BASE;
scc_driver.num = 2;
scc_driver.break_ctl = scc_break_ctl;
scc_callout_driver = scc_driver;
+#ifdef CONFIG_DEVFS_FS
+ scc_callout_driver.name = "cua/%d";
+#else
scc_callout_driver.name = "cua";
+#endif
scc_callout_driver.major = TTYAUX_MAJOR;
scc_callout_driver.subtype = SERIAL_TYPE_CALLOUT;
#ifdef CONFIG_MVME147_SCC
if (MACH_IS_MVME147)
brgval = (M147_SCC_PCLK + baud/2) / (16 * 2 * baud) - 2;
- else
#endif
#ifdef CONFIG_MVME162_SCC
if (MACH_IS_MVME16x)
brgval = (MVME_SCC_PCLK + baud/2) / (16 * 2 * baud) - 2;
- else
#endif
#ifdef CONFIG_BVME6000_SCC
if (MACH_IS_BVME6000)
}
+/* Comment taken from sx.c (2.4.0):
+ I haven't the foggiest why the decrement use count has to happen
+ here. The whole linux serial drivers stuff needs to be redesigned.
+ My guess is that this is a hack to minimize the impact of a bug
+ elsewhere. Thinking about it some more. (try it sometime) Try
+ running minicom on a serial port that is driven by a modularized
+ driver. Have the modem hangup. Then remove the driver module. Then
+ exit minicom. I expect an "oops". -- REW */
+
static void scc_hungup(void *ptr)
{
scc_disable_tx_interrupts(ptr);
{
scc_disable_tx_interrupts(ptr);
scc_disable_rx_interrupts(ptr);
+ MOD_DEC_USE_COUNT;
}
SCC_ACCESS_INIT(port);
save_flags(flags);
+ cli();
t = SCCread(TX_CTRL_REG);
if (dtr >= 0) t = dtr? (t | TCR_DTR): (t & ~TCR_DTR);
if (rts >= 0) t = rts? (t | TCR_RTS): (t & ~TCR_RTS);
if (port->gs.count == 1) {
MOD_INC_USE_COUNT;
}
- retval = block_til_ready(port, filp);
+ retval = gs_block_til_ready(port, filp);
if (retval) {
MOD_DEC_USE_COUNT;