RE: [PATCH 4/5] tty: n_gsm: initiate close of all DLCIs during muxshutdown
From: Gorby, Russ
Date: Mon Jun 06 2011 - 13:09:46 EST
>-----Original Message-----
>From: Alan Cox [mailto:alan@xxxxxxxxxxxxxxxxxxx]
>Sent: Friday, June 03, 2011 3:05 PM
>To: Gorby, Russ
>Cc: Greg Kroah-Hartman; linux-kernel@xxxxxxxxxxxxxxx; Ahmed, Suhail
>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@xxxxxxxxx> 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 ?
[Gorby, Russ] I suppose it is possible the issue this code helped alleviate was due to modem firmware or
Other s/w bugs or timing issues, but since we're waiting for DLCI0 to close it made sense to at least start the
Close of the other channels first. If you don't want to take this patch at this point, I can revalidate if it is needed
at a later time and resubmit then if so.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/