patch-2.3.49 linux/drivers/usb/acm.c
Next file: linux/drivers/usb/graphire.c
Previous file: linux/drivers/usb/Makefile
Back to the patch index
Back to the overall index
- Lines: 55
- Date:
Mon Feb 28 14:21:15 2000
- Orig file:
v2.3.48/linux/drivers/usb/acm.c
- Orig date:
Sat Feb 26 22:31:50 2000
diff -u --recursive --new-file v2.3.48/linux/drivers/usb/acm.c linux/drivers/usb/acm.c
@@ -193,10 +193,13 @@
newctrl = le16_to_cpup((__u16 *) data);
+#if 0
+ /* Please someone tell me how to do this properly to kill pppd and not kill minicom */
if (acm->tty && !acm->clocal && (acm->ctrlin & ~newctrl & ACM_CTRL_DCD)) {
dbg("calling hangup");
tty_hangup(acm->tty);
}
+#endif
acm->ctrlin = newctrl;
@@ -428,6 +431,7 @@
struct acm *acm = tty->driver_data;
struct termios *termios = tty->termios;
struct acm_line newline;
+ int newctrl = acm->ctrlout;
if (!ACM_READY(acm)) return;
@@ -439,20 +443,20 @@
newline.databits = acm_tty_size[(termios->c_cflag & CSIZE) >> 4];
acm->clocal = termios->c_cflag & CLOCAL;
-
- if (!memcmp(&acm->line, &newline, sizeof(struct acm_line)))
- return;
-
- memcpy(&acm->line, &newline, sizeof(struct acm_line));
-
+
if (!newline.speed) {
- if (acm->ctrlout) acm_set_control(acm, acm->ctrlout = 0);
- return;
+ newline.speed = acm->line.speed;
+ newctrl &= ~ACM_CTRL_DTR;
+ } else newctrl |= ACM_CTRL_DTR;
+
+ if (newctrl != acm->ctrlout)
+ acm_set_control(acm, acm->ctrlout = newctrl);
+
+ if (memcmp(&acm->line, &newline, sizeof(struct acm_line))) {
+ memcpy(&acm->line, &newline, sizeof(struct acm_line));
+ dbg("set line: %d %d %d %d", newline.speed, newline.stopbits, newline.parity, newline.databits);
+ acm_set_line(acm, &acm->line);
}
-
- acm_set_line(acm, &acm->line);
-
- dbg("set line: %d %d %d %d", newline.speed, newline.stopbits, newline.parity, newline.databits);
}
/*
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)