On Mon, 13 Mar 2006 09:51:20 -0600, Paul Fulghum <[EMAIL PROTECTED]> wrote:
> Signed-off-by: Paul Fulghum <[EMAIL PROTECTED]>
> +++ b/drivers/usb/class/cdc-acm.c 2006-03-13 09:33:23.000000000 -0600
> @@ -517,6 +517,7 @@ static void acm_tty_close(struct tty_str
> usb_kill_urb(acm->ru[i].urb);
> } else
> acm_tty_unregister(acm);
> + acm->tty = NULL;
Paul, this cannot possibly be correct! The acm_tty_unregister frees
its argument.
What we actually want is something like this:
--- linux-2.6.16-rc5/drivers/usb/class/cdc-acm.c 2006-02-26
23:04:29.000000000 -0800
+++ linux-2.6.16-rc5-lem/drivers/usb/class/cdc-acm.c 2006-03-13
10:20:21.000000000 -0800
@@ -256,7 +256,7 @@ static void acm_ctrl_irq(struct urb *urb
newctrl = le16_to_cpu(get_unaligned((__le16 *) data));
- if (acm->tty && !acm->clocal && (acm->ctrlin & ~newctrl
& ACM_CTRL_DCD)) {
+ if (!acm->clocal && (acm->ctrlin & ~newctrl &
ACM_CTRL_DCD)) {
dbg("calling hangup");
tty_hangup(acm->tty);
}
@@ -1049,10 +1049,8 @@ static void acm_disconnect(struct usb_in
return;
}
+ tty_hangup(acm->tty);
up(&open_sem);
-
- if (acm->tty)
- tty_hangup(acm->tty);
}
/*
-- Pete
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel