[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110603230514.334df229@lxorguk.ukuu.org.uk>
Date: Fri, 3 Jun 2011 23:05:14 +0100
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Russ Gorby <russ.gorby@...el.com>
Cc: Greg Kroah-Hartman <gregkh@...e.de>, linux-kernel@...r.kernel.org,
suhail.ahmed@...el.com
Subject: Re: [PATCH 4/5] tty: n_gsm: initiate close of all DLCIs during mux
shutdown
On Fri, 3 Jun 2011 12:03:40 -0700
Russ Gorby <russ.gorby@...el.com> wrote:
> Although DLCI-0 is closed during ldisc close, we found the
> applications were better served when open DLCI shutdowns where
> initiated at that time as well.
They should all see a hangup on the gsm client tty anyway ?
> - for (i = 0; i < NUM_DLCI; i++)
> + for (i = NUM_DLCI-1; i >= 0; i--) {
> + dlci = gsm->dlci[i];
> + if (dlci) {
> + if (i != 0)
> + gsm_dlci_begin_close(dlci);
> + else {
> + dlci->dead = 1;
> + gsm_dlci_begin_close(dlci);
> + t = wait_event_timeout(gsm->event,
> + dlci->state == DLCI_CLOSED,
> + gsm->t2 * HZ / 100);
> + if (!t) {
> + pr_info("%s: timeout dlci0 close",
> + __func__);
> + gsm_dlci_close(dlci);
> + }
> + }
> + }
> + }
> + for (i = NUM_DLCI-1; i >= 0; i--)
I'd like to understand better why it is needed and also why you don't
want for the others to close but just set it off ?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists