Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2869b23e authored by Tilman Schmidt's avatar Tilman Schmidt Committed by Linus Torvalds
Browse files

[PATCH] drivers/isdn/gigaset: new M101 driver (v2)



This patch adds the line discipline based driver for the Gigaset M101
wireless RS232 adapter. It also improves the documentation a bit.

Signed-off-by: default avatarTilman Schmidt <tilman@imap.cc>
Signed-off-by: default avatarHansjoerg Lipp <hjlipp@web.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e13df2c5
Loading
Loading
Loading
Loading
+48 −17
Original line number Diff line number Diff line
@@ -8,29 +8,33 @@ GigaSet 307x Device Driver
     This release supports the connection of the Gigaset 307x/417x family of
     ISDN DECT bases via Gigaset M101 Data, Gigaset M105 Data or direct USB
     connection. The following devices are reported to be compatible:
     307x/417x:
        Gigaset SX255isdn
        Gigaset SX353isdn
        Sinus 45 [AB] isdn (Deutsche Telekom)
        Sinus 721X/XA

     Bases:
        Siemens Gigaset 3070/3075 isdn
        Siemens Gigaset 4170/4175 isdn
        Siemens Gigaset SX205/255
        Siemens Gigaset SX353
        T-Com Sinus 45 [AB] isdn
        T-Com Sinus 721X[A] [SE]
        Vox Chicago 390 ISDN (KPN Telecom)
     M101:
        Sinus 45 Data 1 (Telekom)
     M105:
        Gigaset USB Adapter DECT
        Sinus 45 Data 2 (Telekom)
        Sinus 721 data

     RS232 data boxes:
        Siemens Gigaset M101 Data
        T-Com Sinus 45 Data 1

     USB data boxes:
        Siemens Gigaset M105 Data
        Siemens Gigaset USB Adapter DECT
        T-Com Sinus 45 Data 2
        T-Com Sinus 721 data
        Chicago 390 USB (KPN)

     See also http://www.erbze.info/sinus_gigaset.htm and
              http://gigaset307x.sourceforge.net/

     We had also reports from users of Gigaset M105 who could use the drivers
     with SX 100 and CX 100 ISDN bases (only in unimodem mode, see section 2.4.)
     If you have another device that works with our driver, please let us know.
     For example, Gigaset SX205isdn/Sinus 721 X SE and Gigaset SX303isdn bases
     are just versions without answering machine of models known to work, so
     they should work just as well; but so far we are lacking positive reports
     on these.

     Chances of getting an USB device to work are good if the output of
        lsusb
@@ -60,14 +64,28 @@ GigaSet 307x Device Driver
     To get the device working, you have to load the proper kernel module. You
     can do this using
         modprobe modulename
     where modulename is usb_gigaset (M105) or bas_gigaset (direct USB
     connection to the base).
     where modulename is ser_gigaset (M101), usb_gigaset (M105), or
     bas_gigaset (direct USB connection to the base).

     The module ser_gigaset provides a serial line discipline N_GIGASET_M101
     which drives the device through the regular serial line driver. To use it,
     run the Gigaset M101 daemon "gigasetm101d" (also available from
     http://sourceforge.net/projects/gigaset307x/) with the device file of the
     RS232 port to the M101 as an argument, for example:
	 gigasetm101d /dev/ttyS1
     This will open the device file, set its line discipline to N_GIGASET_M101,
     and then sleep in the background, keeping the device open so that the
     line discipline remains active. To deactivate it, kill the daemon, for
     example with
	 killall gigasetm101d
     before disconnecting the device.

2.2. Device nodes for user space programs
     ------------------------------------
     The device can be accessed from user space (eg. by the user space tools
     mentioned in 1.2.) through the device nodes:

     - /dev/ttyGS0 for M101 (RS232 data boxes)
     - /dev/ttyGU0 for M105 (USB data boxes)
     - /dev/ttyGB0 for the base driver (direct USB connection)

@@ -168,6 +186,19 @@ GigaSet 307x Device Driver
     You can also use /sys/class/tty/ttyGxy/cidmode for changing the CID mode
     setting (ttyGxy is ttyGU0 or ttyGB0).

2.6. M105 Undocumented USB Requests
     ------------------------------

     The Gigaset M105 USB data box understands a couple of useful, but
     undocumented USB commands. These requests are not used in normal
     operation (for wireless access to the base), but are needed for access
     to the M105's own configuration mode (registration to the base, baudrate
     and line format settings, device status queries) via the gigacontr
     utility. Their use is disabled in the driver by default for safety
     reasons but can be enabled by setting the kernel configuration option
     "Support for undocumented USB requests" (GIGASET_UNDOCREQ) to "Y" and
     recompiling.


3.   Troubleshooting
     ---------------
+21 −4
Original line number Diff line number Diff line
@@ -7,7 +7,13 @@ config ISDN_DRV_GIGASET
	select CRC_CCITT
	select BITREVERSE
	help
	  Say m here if you have a Gigaset or Sinus isdn device.
	  This driver supports the Siemens Gigaset SX205/255 family of
	  ISDN DECT bases, including the predecessors Gigaset 3070/3075
	  and 4170/4175 and their T-Com versions Sinus 45isdn and Sinus
	  721X.
	  If you have one of these devices, say M here and for at least
	  one of the connection specific parts that follow.
	  This will build a module called "gigaset".

if ISDN_DRV_GIGASET!=n

@@ -15,14 +21,25 @@ config GIGASET_BASE
	tristate "Gigaset base station support"
	depends on ISDN_DRV_GIGASET && USB
	help
	  Say m here if you need to communicate with the base
	  directly via USB.
	  Say M here if you want to use the USB interface of the Gigaset
	  base for connection to your system.
	  This will build a module called "bas_gigaset".

config GIGASET_M105
	tristate "Gigaset M105 support"
	depends on ISDN_DRV_GIGASET && USB
	help
	  Say m here if you need the driver for the Gigaset M105 device.
	  Say M here if you want to connect to the Gigaset base via DECT
	  using a Gigaset M105 (Sinus 45 Data 2) USB DECT device.
	  This will build a module called "usb_gigaset".

config GIGASET_M101
	tristate "Gigaset M101 support"
	depends on ISDN_DRV_GIGASET
	help
	  Say M here if you want to connect to the Gigaset base via DECT
	  using a Gigaset M101 (Sinus 45 Data 1) RS232 DECT device.
	  This will build a module called "ser_gigaset".

config GIGASET_DEBUG
	bool "Gigaset debugging"
+2 −0
Original line number Diff line number Diff line
gigaset-y := common.o interface.o proc.o ev-layer.o i4l.o
usb_gigaset-y := usb-gigaset.o asyncdata.o
bas_gigaset-y := bas-gigaset.o isocdata.o
ser_gigaset-y := ser-gigaset.o asyncdata.o

obj-$(CONFIG_GIGASET_M105) += usb_gigaset.o gigaset.o
obj-$(CONFIG_GIGASET_BASE) += bas_gigaset.o gigaset.o
obj-$(CONFIG_GIGASET_M105) += ser_gigaset.o gigaset.o
+5 −0
Original line number Diff line number Diff line
@@ -13,6 +13,11 @@
 * =====================================================================
 */

/* not set by Kbuild when building both ser_gigaset and usb_gigaset */
#ifndef KBUILD_MODNAME
#define KBUILD_MODNAME "asy_gigaset"
#endif

#include "gigaset.h"
#include <linux/crc-ccitt.h>
#include <linux/bitrev.h>
+2 −18
Original line number Diff line number Diff line
@@ -906,20 +906,7 @@ void gigaset_shutdown(struct cardstate *cs)
	gig_dbg(DEBUG_CMD, "scheduling SHUTDOWN");
	gigaset_schedule_event(cs);

	if (wait_event_interruptible(cs->waitqueue, !cs->waiting)) {
		warn("%s: aborted", __func__);
		//FIXME
	}

	if (atomic_read(&cs->mstate) != MS_LOCKED) {
		//FIXME?
		//gigaset_baud_rate(cs, B115200);
		//gigaset_set_line_ctrl(cs, CS8);
		//gigaset_set_modem_ctrl(cs, TIOCM_DTR|TIOCM_RTS, 0);
		//cs->control_state = 0;
	} else {
		//FIXME use some saved values?
	}
	wait_event(cs->waitqueue, !cs->waiting);

	cleanup_cs(cs);

@@ -942,10 +929,7 @@ void gigaset_stop(struct cardstate *cs)
	gig_dbg(DEBUG_CMD, "scheduling STOP");
	gigaset_schedule_event(cs);

	if (wait_event_interruptible(cs->waitqueue, !cs->waiting)) {
		warn("%s: aborted", __func__);
		//FIXME
	}
	wait_event(cs->waitqueue, !cs->waiting);

	cleanup_cs(cs);

Loading