n_gsm.c : Open gsmtty in blocking mode whitout taking count of Carrier Detect
authorVincent Pillet <vincentx.pillet@intel.com>
Wed, 9 May 2012 14:39:17 +0000 (16:39 +0200)
committerbuildbot <buildbot@intel.com>
Fri, 8 Jun 2012 15:47:51 +0000 (08:47 -0700)
commit558fa46e9c178e8908cba875baf8720d381d275a
tree49c9eb44f94d0c7bf3055a21e96d481bffef1b28
parenta15ddc6e8ed8faf2b47dd10de8c9542341207e76
n_gsm.c : Open gsmtty in blocking mode whitout taking count of Carrier Detect

BZ: 28988

Some modem (IMC, but other as well) do not set CD when DLCI for AT command are
opened. CLOCAL can't be used before the first open, as file descriptor is
needed (fd is given once CD is received)

We add here a new parameter to the MUX during initialization IOCTL.
Parameter name : clocal.
clocal = 1 : Force CLOCAL, ie. do not wait for Carrier Detect from modem
clocal = 0 : Wait for Carrier Detect from modem

Default value in MUX is 1.

As tty_port_block_til_ready will exit due to CLOCAL, we need also to wait UA
from modem. We have also to wait UA in gsmtty_close.

CLOCAL can be unset later as usual.

Change-Id: I01d78449dac3d21196aaa8f4f984baf8a3fb578f
Signed-off-by: Vincent Pillet <vincentx.pillet@intel.com>
Reviewed-on: http://android.intel.com:8080/51984
Reviewed-by: Predon, Frederic <frederic.predon@intel.com>
Reviewed-by: Lebsir, SamiX <samix.lebsir@intel.com>
Tested-by: Lebsir, SamiX <samix.lebsir@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/tty/n_gsm.c
include/linux/gsmmux.h