linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Gorby, Russ" <russ.gorby@intel.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Ahmed, Suhail" <suhail.ahmed@intel.com>
Subject: RE: [PATCH 4/5] tty: n_gsm: initiate close of all DLCIs during mux shutdown
Date: Mon, 6 Jun 2011 17:09:37 +0000	[thread overview]
Message-ID: <330DDCE36F8D7D47BF87CF587C91A247023149@ORSMSX101.amr.corp.intel.com> (raw)
In-Reply-To: <20110603230514.334df229@lxorguk.ukuu.org.uk>



>-----Original Message-----
>From: Alan Cox [mailto:alan@lxorguk.ukuu.org.uk]
>Sent: Friday, June 03, 2011 3:05 PM
>To: Gorby, Russ
>Cc: Greg Kroah-Hartman; linux-kernel@vger.kernel.org; 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@intel.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 ?

[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.

  reply	other threads:[~2011-06-06 17:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <[PATCH 0/5] N_GSM patchset : 06/03/2011>
2011-06-03 19:03 ` [PATCH 0/5] N_GSM patchset : 06/03/2011 Russ Gorby
2011-06-03 19:03 ` [PATCH 1/5] tty: n_gsm: Add raw-ip support Russ Gorby
2011-06-06  9:28   ` Alan Cox
2011-06-06 19:50     ` Gorby, Russ
2011-06-03 19:03 ` [PATCH 2/5] tty: n_gsm: expose gsmtty device nodes at ldisc open time Russ Gorby
2011-06-03 22:02   ` Alan Cox
2011-06-03 19:03 ` [PATCH 3/5] tty: n_gsm: Added refcount usage to gsm_mux and gsm_dlci structs Russ Gorby
2011-06-03 22:08   ` Alan Cox
2011-06-03 19:03 ` [PATCH 4/5] tty: n_gsm: initiate close of all DLCIs during mux shutdown Russ Gorby
2011-06-03 22:05   ` Alan Cox
2011-06-06 17:09     ` Gorby, Russ [this message]
2011-06-03 19:03 ` [PATCH 5/5] tty: n_gsm: Fixed NULL ptr OOPs in tty_write_room() Russ Gorby
2011-06-03 22:10   ` Alan Cox
2011-06-06 17:13     ` Gorby, Russ

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=330DDCE36F8D7D47BF87CF587C91A247023149@ORSMSX101.amr.corp.intel.com \
    --to=russ.gorby@intel.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=suhail.ahmed@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).