aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTilman Schmidt <tilman@imap.cc>2009-05-13 08:44:18 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-17 23:51:27 -0400
commitb88bd95655c7bc059606529e01467594978d7b72 (patch)
treef5669760db7d97186d1c59b5bcf2b57f1bca5b56
parent5a1888ea994bf6b28179255a376e83dfa53c81c5 (diff)
gigaset: remove UNDOCREQ config option
Drop the kernel config option GIGASET_UNDOCREQ, permanently activating the code it controlled, as there have been no reports of problems caused by its activation but many problems caused by it being disabled. Also fix a few bad comments while we're at it. Impact: cleanup Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--Documentation/isdn/README.gigaset33
-rw-r--r--drivers/isdn/gigaset/Kconfig7
-rw-r--r--drivers/isdn/gigaset/usb-gigaset.c62
3 files changed, 28 insertions, 74 deletions
diff --git a/Documentation/isdn/README.gigaset b/Documentation/isdn/README.gigaset
index f6e9eaa75967..f9963103ae3d 100644
--- a/Documentation/isdn/README.gigaset
+++ b/Documentation/isdn/README.gigaset
@@ -149,10 +149,8 @@ GigaSet 307x Device Driver
149 configuration files and chat scripts in the gigaset-VERSION/ppp directory 149 configuration files and chat scripts in the gigaset-VERSION/ppp directory
150 in the driver packages from http://sourceforge.net/projects/gigaset307x/. 150 in the driver packages from http://sourceforge.net/projects/gigaset307x/.
151 Please note that the USB drivers are not able to change the state of the 151 Please note that the USB drivers are not able to change the state of the
152 control lines (the M105 driver can be configured to use some undocumented 152 control lines. This means you must use "Stupid Mode" if you are using
153 control requests, if you really need the control lines, though). This means 153 wvdial or you should use the nocrtscts option of pppd.
154 you must use "Stupid Mode" if you are using wvdial or you should use the
155 nocrtscts option of pppd.
156 You must also assure that the ppp_async module is loaded with the parameter 154 You must also assure that the ppp_async module is loaded with the parameter
157 flag_time=0. You can do this e.g. by adding a line like 155 flag_time=0. You can do this e.g. by adding a line like
158 156
@@ -190,20 +188,7 @@ GigaSet 307x Device Driver
190 You can also use /sys/class/tty/ttyGxy/cidmode for changing the CID mode 188 You can also use /sys/class/tty/ttyGxy/cidmode for changing the CID mode
191 setting (ttyGxy is ttyGU0 or ttyGB0). 189 setting (ttyGxy is ttyGU0 or ttyGB0).
192 190
1932.6. M105 Undocumented USB Requests 1912.6. Unregistered Wireless Devices (M101/M105)
194 ------------------------------
195 The Gigaset M105 USB data box understands a couple of useful, but
196 undocumented USB commands. These requests are not used in normal
197 operation (for wireless access to the base), but are needed for access
198 to the M105's own configuration mode (registration to the base, baudrate
199 and line format settings, device status queries) via the gigacontr
200 utility. Their use is controlled by the kernel configuration option
201 "Support for undocumented USB requests" (CONFIG_GIGASET_UNDOCREQ). If you
202 encounter error code -ENOTTY when trying to use some features of the
203 M105, try setting that option to "y" via 'make {x,menu}config' and
204 recompiling the driver.
205
2062.7. Unregistered Wireless Devices (M101/M105)
207 ----------------------------------------- 192 -----------------------------------------
208 The main purpose of the ser_gigaset and usb_gigaset drivers is to allow 193 The main purpose of the ser_gigaset and usb_gigaset drivers is to allow
209 the M101 and M105 wireless devices to be used as ISDN devices for ISDN 194 the M101 and M105 wireless devices to be used as ISDN devices for ISDN
@@ -215,8 +200,7 @@ GigaSet 307x Device Driver
215 driver. In that situation, a restricted set of functions is available 200 driver. In that situation, a restricted set of functions is available
216 which includes, in particular, those necessary for registering the device 201 which includes, in particular, those necessary for registering the device
217 to a base or for switching it between Fixed Part and Portable Part 202 to a base or for switching it between Fixed Part and Portable Part
218 modes. For the M105, these commands require the "Support for undocumented 203 modes.
219 USB requests" configuration option (see section 2.6.) to be enabled.
220 204
2213. Troubleshooting 2053. Troubleshooting
222 --------------- 206 ---------------
@@ -247,19 +231,12 @@ GigaSet 307x Device Driver
247 Select Unimodem mode for all DECT data adapters. (see section 2.4.) 231 Select Unimodem mode for all DECT data adapters. (see section 2.4.)
248 232
249 Problem: 233 Problem:
250 You want to configure your USB DECT data adapter (M105) but gigacontr
251 reports an error: "/dev/ttyGU0: Inappropriate ioctl for device".
252 Solution:
253 Recompile the usb_gigaset driver with the kernel configuration option
254 CONFIG_GIGASET_UNDOCREQ set to 'y'. (see section 2.6.)
255
256 Problem:
257 Messages like this: 234 Messages like this:
258 usb_gigaset 3-2:1.0: Could not initialize the device. 235 usb_gigaset 3-2:1.0: Could not initialize the device.
259 appear in your syslog. 236 appear in your syslog.
260 Solution: 237 Solution:
261 Check whether your M10x wireless device is correctly registered to the 238 Check whether your M10x wireless device is correctly registered to the
262 Gigaset base. (see section 2.7.) 239 Gigaset base. (see section 2.6.)
263 240
2643.2. Telling the driver to provide more information 2413.2. Telling the driver to provide more information
265 ---------------------------------------------- 242 ----------------------------------------------
diff --git a/drivers/isdn/gigaset/Kconfig b/drivers/isdn/gigaset/Kconfig
index 754b90d412e4..18ab8652aa57 100644
--- a/drivers/isdn/gigaset/Kconfig
+++ b/drivers/isdn/gigaset/Kconfig
@@ -43,11 +43,4 @@ config GIGASET_DEBUG
43 This enables debugging code in the Gigaset drivers. 43 This enables debugging code in the Gigaset drivers.
44 If in doubt, say yes. 44 If in doubt, say yes.
45 45
46config GIGASET_UNDOCREQ
47 bool "Support for undocumented USB requests"
48 help
49 This enables support for USB requests we only know from
50 reverse engineering (currently M105 only). If you need
51 features like configuration mode of M105, say yes.
52
53endif # ISDN_DRV_GIGASET 46endif # ISDN_DRV_GIGASET
diff --git a/drivers/isdn/gigaset/usb-gigaset.c b/drivers/isdn/gigaset/usb-gigaset.c
index d78385166099..4deb1ab0dbf8 100644
--- a/drivers/isdn/gigaset/usb-gigaset.c
+++ b/drivers/isdn/gigaset/usb-gigaset.c
@@ -153,8 +153,6 @@ static inline unsigned tiocm_to_gigaset(unsigned state)
153 return ((state & TIOCM_DTR) ? 1 : 0) | ((state & TIOCM_RTS) ? 2 : 0); 153 return ((state & TIOCM_DTR) ? 1 : 0) | ((state & TIOCM_RTS) ? 2 : 0);
154} 154}
155 155
156#ifdef CONFIG_GIGASET_UNDOCREQ
157/* WARNING: EXPERIMENTAL! */
158static int gigaset_set_modem_ctrl(struct cardstate *cs, unsigned old_state, 156static int gigaset_set_modem_ctrl(struct cardstate *cs, unsigned old_state,
159 unsigned new_state) 157 unsigned new_state)
160{ 158{
@@ -176,6 +174,11 @@ static int gigaset_set_modem_ctrl(struct cardstate *cs, unsigned old_state,
176 return 0; 174 return 0;
177} 175}
178 176
177/*
178 * Set M105 configuration value
179 * using undocumented device commands reverse engineered from USB traces
180 * of the Siemens Windows driver
181 */
179static int set_value(struct cardstate *cs, u8 req, u16 val) 182static int set_value(struct cardstate *cs, u8 req, u16 val)
180{ 183{
181 struct usb_device *udev = cs->hw.usb->udev; 184 struct usb_device *udev = cs->hw.usb->udev;
@@ -205,8 +208,10 @@ static int set_value(struct cardstate *cs, u8 req, u16 val)
205 return r < 0 ? r : (r2 < 0 ? r2 : 0); 208 return r < 0 ? r : (r2 < 0 ? r2 : 0);
206} 209}
207 210
208/* WARNING: HIGHLY EXPERIMENTAL! */ 211/*
209// don't use this in an interrupt/BH 212 * set the baud rate on the internal serial adapter
213 * using the undocumented parameter setting command
214 */
210static int gigaset_baud_rate(struct cardstate *cs, unsigned cflag) 215static int gigaset_baud_rate(struct cardstate *cs, unsigned cflag)
211{ 216{
212 u16 val; 217 u16 val;
@@ -237,8 +242,10 @@ static int gigaset_baud_rate(struct cardstate *cs, unsigned cflag)
237 return set_value(cs, 1, val); 242 return set_value(cs, 1, val);
238} 243}
239 244
240/* WARNING: HIGHLY EXPERIMENTAL! */ 245/*
241// don't use this in an interrupt/BH 246 * set the line format on the internal serial adapter
247 * using the undocumented parameter setting command
248 */
242static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag) 249static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag)
243{ 250{
244 u16 val = 0; 251 u16 val = 0;
@@ -274,24 +281,6 @@ static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag)
274 return set_value(cs, 3, val); 281 return set_value(cs, 3, val);
275} 282}
276 283
277#else
278static int gigaset_set_modem_ctrl(struct cardstate *cs, unsigned old_state,
279 unsigned new_state)
280{
281 return -ENOTTY;
282}
283
284static int gigaset_set_line_ctrl(struct cardstate *cs, unsigned cflag)
285{
286 return -ENOTTY;
287}
288
289static int gigaset_baud_rate(struct cardstate *cs, unsigned cflag)
290{
291 return -ENOTTY;
292}
293#endif
294
295 284
296 /*================================================================================================================*/ 285 /*================================================================================================================*/
297static int gigaset_init_bchannel(struct bc_state *bcs) 286static int gigaset_init_bchannel(struct bc_state *bcs)
@@ -362,10 +351,8 @@ static void gigaset_modem_fill(unsigned long data)
362 } while (again); 351 } while (again);
363} 352}
364 353
365/** 354/*
366 * gigaset_read_int_callback 355 * Interrupt Input URB completion routine
367 *
368 * It is called if the data was received from the device.
369 */ 356 */
370static void gigaset_read_int_callback(struct urb *urb) 357static void gigaset_read_int_callback(struct urb *urb)
371{ 358{
@@ -567,18 +554,19 @@ static int gigaset_chars_in_buffer(struct cardstate *cs)
567 return cs->cmdbytes; 554 return cs->cmdbytes;
568} 555}
569 556
557/*
558 * set the break characters on the internal serial adapter
559 * using undocumented device commands reverse engineered from USB traces
560 * of the Siemens Windows driver
561 */
570static int gigaset_brkchars(struct cardstate *cs, const unsigned char buf[6]) 562static int gigaset_brkchars(struct cardstate *cs, const unsigned char buf[6])
571{ 563{
572#ifdef CONFIG_GIGASET_UNDOCREQ
573 struct usb_device *udev = cs->hw.usb->udev; 564 struct usb_device *udev = cs->hw.usb->udev;
574 565
575 gigaset_dbg_buffer(DEBUG_USBREQ, "brkchars", 6, buf); 566 gigaset_dbg_buffer(DEBUG_USBREQ, "brkchars", 6, buf);
576 memcpy(cs->hw.usb->bchars, buf, 6); 567 memcpy(cs->hw.usb->bchars, buf, 6);
577 return usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x19, 0x41, 568 return usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x19, 0x41,
578 0, 0, &buf, 6, 2000); 569 0, 0, &buf, 6, 2000);
579#else
580 return -ENOTTY;
581#endif
582} 570}
583 571
584static int gigaset_freebcshw(struct bc_state *bcs) 572static int gigaset_freebcshw(struct bc_state *bcs)
@@ -625,7 +613,6 @@ static int gigaset_initcshw(struct cardstate *cs)
625 ucs->bchars[5] = 0x13; 613 ucs->bchars[5] = 0x13;
626 ucs->bulk_out_buffer = NULL; 614 ucs->bulk_out_buffer = NULL;
627 ucs->bulk_out_urb = NULL; 615 ucs->bulk_out_urb = NULL;
628 //ucs->urb_cmd_out = NULL;
629 ucs->read_urb = NULL; 616 ucs->read_urb = NULL;
630 tasklet_init(&cs->write_tasklet, 617 tasklet_init(&cs->write_tasklet,
631 &gigaset_modem_fill, (unsigned long) cs); 618 &gigaset_modem_fill, (unsigned long) cs);
@@ -742,7 +729,7 @@ static int gigaset_probe(struct usb_interface *interface,
742 cs->dev = &interface->dev; 729 cs->dev = &interface->dev;
743 730
744 /* save address of controller structure */ 731 /* save address of controller structure */
745 usb_set_intfdata(interface, cs); // dev_set_drvdata(&interface->dev, cs); 732 usb_set_intfdata(interface, cs);
746 733
747 endpoint = &hostif->endpoint[0].desc; 734 endpoint = &hostif->endpoint[0].desc;
748 735
@@ -921,8 +908,7 @@ static const struct gigaset_ops ops = {
921 gigaset_m10x_input, 908 gigaset_m10x_input,
922}; 909};
923 910
924/** 911/*
925 * usb_gigaset_init
926 * This function is called while kernel-module is loaded 912 * This function is called while kernel-module is loaded
927 */ 913 */
928static int __init usb_gigaset_init(void) 914static int __init usb_gigaset_init(void)
@@ -952,9 +938,7 @@ error:
952 return -1; 938 return -1;
953} 939}
954 940
955 941/*
956/**
957 * usb_gigaset_exit
958 * This function is called while unloading the kernel-module 942 * This function is called while unloading the kernel-module
959 */ 943 */
960static void __exit usb_gigaset_exit(void) 944static void __exit usb_gigaset_exit(void)