summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/gigaset
Commit message (Collapse)AuthorAgeFilesLines
...
* gigaset: correct range checking off by one errorTilman Schmidt2010-03-161-1/+1
| | | | | | | | | | Correct a potential array overrun due to an off by one error in the range check on the CAPI CONNECT_REQ CIPValue parameter. Found and reported by Dan Carpenter using smatch. Impact: bugfix Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: prune use of tty_buffer_request_roomTilman Schmidt2010-03-151-1/+0
| | | | | | | | | | | Calling tty_buffer_request_room() before tty_insert_flip_string() is unnecessary, costs CPU and for big buffers can mess up the multi-page allocation avoidance. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Acked-by: Karsten Keil <keil@b1-systems.de> CC: Alan Cox <alan@lxorguk.ukuu.org.uk>, stable@kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: correct clearing of at_state strings on RINGTilman Schmidt2010-03-151-8/+4
| | | | | | | | | | | | In RING handling, clear the table of received parameter strings in a loop like everywhere else, instead of by enumeration which had already gotten out of sync. Impact: minor bugfix Signed-off-by: Tilman Schmidt <tilman@imap.cc> Acked-by: Karsten Keil <keil@b1-systems.de> CC: stable@kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: avoid registering CAPI driver more than onceTilman Schmidt2010-03-154-31/+53
| | | | | | | | | | | | | | | Registering/unregistering the Gigaset CAPI driver when a device is connected/disconnected causes an Oops when disconnecting two Gigaset devices in a row, because the same capi_driver structure gets unregistered twice. Fix by making driver registration/unregistration a separate operation (empty in the ISDN4Linux case) called when the main module is loaded/unloaded. Impact: bugfix Signed-off-by: Tilman Schmidt <tilman@imap.cc> Acked-by: Karsten Keil <keil@b1-systems.de> CC: stable@kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
* isdn: remove ishexdigit() in regard to isxdigit()Andy Shevchenko2010-02-261-15/+1
| | | | | | | | | Samll cleanup in drivers/isdn/gigaset/capi.c where own implementation of isxdigit() has been changed to kernel native one. Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> Acked-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: reduce syslog clutterTilman Schmidt2010-02-2610-147/+77
| | | | | | | | | | Improve readability of the Gigaset driver's kernel messages by removing a few unnecessary messages and limiting the emission of some debug messages more narrowly. Impact: logging Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* bas_gigaset: collapse CR/LF at end of AT responseTilman Schmidt2010-02-263-15/+35
| | | | | | | | | | | | Copy the mechanism from ser_/usb_gigaset to avoid producing spurious empty responses for CR/LF sequences from the device. Add a comment in all drivers documenting that behaviour. Correct an off by one error that might result in a one byte buffer overflow when receiving an unexpectedly long reply. Impact: minor bugfix Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* proc_fops: convert drivers/isdn/ to seq_fileAlexey Dobriyan2010-01-141-39/+36
| | | | | | | | | | | | | | | | Convert code away from ->read_proc/->write_proc interfaces. Switch to proc_create()/proc_create_data() which make addition of proc entries reliable wrt NULL ->proc_fops, NULL ->data and so on. Problem with ->read_proc et al is described here commit 786d7e1612f0b0adb6046f19b906609e4fe8b1ba "Fix rmmod/read/write races in /proc entries" [akpm@linux-foundation.org: CONFIG_PROC_FS=n build fix] Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: Karsten Keil <keil@b1-systems.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: don't enable any debugging output by defaultTilman Schmidt2009-12-081-1/+1
| | | | | | | | When built with debugging support, the Gigaset driver enabled some debugging messages by default. Change the default to "all off". Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/isdn/gigaset: tasklet_init - Remove unnecessary leading & from ↵Joe Perches2009-11-195-6/+6
| | | | | | | | | | | | | | | | | | | | | | | second arg Changed function pointer use from non-majority address-of style to majority short form without & via: grep -rPl "\btasklet_init\s*\([^,\)]+,\s*\&" drivers/isdn | while read file ; do \ perl -i -e 'local $/; while (<>) { s@(\btasklet_init\s*\([^,\)]+,\s*)\&@\1@g ; print ; }' $file ;\ done Compile tested allyesconfig x86 Signed-off-by: Joe Perches <joe@perches.com> drivers/isdn/gigaset/bas-gigaset.c | 4 ++-- drivers/isdn/gigaset/common.c | 2 +- drivers/isdn/gigaset/interface.c | 2 +- drivers/isdn/gigaset/ser-gigaset.c | 2 +- drivers/isdn/gigaset/usb-gigaset.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: convert strcmp chain to table lookupTilman Schmidt2009-10-292-23/+25
| | | | | | | | | | Replace the sequence of strcmp calls for interpreting ZSAU parameter strings by a table of known strings and lookup loop to improve readability. Impact: readability improvement, no functional change Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: checkpatch cleanup of ev-layer.cTilman Schmidt2009-10-291-247/+231
| | | | | | | | On more step towards the holy grail of checkpatch.pl silence. Impact: cosmetic Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* bas_gigaset: checkpatch cleanupTilman Schmidt2009-10-292-82/+93
| | | | | | | | On the quest for the holy grail of checkpatch.pl silence. Impact: cosmetic Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* ser_gigaset: checkpatch cleanupTilman Schmidt2009-10-291-19/+37
| | | | | | | | Duly uglified as demanded by checkpatch.pl. Impact: cosmetic Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: checkpatch cleanupTilman Schmidt2009-10-295-89/+74
| | | | | | | | Dum sanctis checkpatch.pl'ae legibus obsequimur. Impact: cosmetic Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* usb_gigaset: code cleanupTilman Schmidt2009-10-294-331/+358
| | | | | | | | | | Reorganize the code of the Gigaset M10x driver to make it more readable, less redundant, better aligned to the style of other parts of the driver, and cause fewer checkpatch.pl complaints. Impact: code reorganization, no functional change Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: fix bad assumptions about CAPI skbuffsTilman Schmidt2009-10-295-50/+70
| | | | | | | | | | | | | | | | | The CAPI interface incorrectly assumed that CAPI messages would always start at the beginning of the data buffer: fix by treating DATA_B3 messages as the link layer header to their payload data. This fix changes the way acknowledgement information is propagated through the hardware specific modules and thereby impacts the ISDN4Linux variant of the driver, too. Also some assumptions about methods not being called from interrupt context turned out to be unwarranted; fix by using dev_kfree_skb_any() wherever non-interrupt context isn't guaranteed. Impact: bugfix Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: fix format string typo in CAPI dial commandTilman Schmidt2009-10-291-1/+1
| | | | | | | | | | | A missing dot lead to garbage characters being included in the dial command generated from a CAPI CONNECT_REQ message, which interestingly enough worked anyway, illustrating the resilience of the device. Impact: bugfix Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: CAPI module readability improvementsTilman Schmidt2009-10-291-63/+81
| | | | | | | | | | | Replace the "ignoring Additional Info" warning message by better readable ones citing the specific subparameters being ignored. Make parts of the code more readable by using a local cmsg pointer variable. Impact: readability improvement Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: add Kernel CAPI interface (v3)Tilman Schmidt2009-10-066-16/+2335
| | | | | | | | Add a Kernel CAPI interface to the Gigaset driver. Impact: optional new functionality Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: allow building without I4LTilman Schmidt2009-10-063-2/+83
| | | | | | | | | Add a dummy LL interface to the Gigaset driver so that it can be built and, in a limited way, used without the ISDN4Linux subsystem. Impact: new configuration alternative Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: prepare for CAPI implementationTilman Schmidt2009-10-067-425/+492
| | | | | | | | | | Reorganize the code of the Gigaset driver, moving all isdn4linux dependencies to the source file i4l.c so that it can be replaced by a file capi.c interfacing to Kernel CAPI instead. Impact: refactoring, no functional change Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: add kerneldoc commentsTilman Schmidt2009-10-066-44/+166
| | | | | | | | Add kerneldoc comments to some functions in the Gigaset driver. Impact: documentation Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: correct debugging output selectionTilman Schmidt2009-10-061-3/+6
| | | | | | | | | Dump payload data consistently only when DEBUG_STREAM_DUMP debug bit is set. Impact: debugging aid Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: improve error recoveryTilman Schmidt2009-10-061-24/+45
| | | | | | | | | When the Gigaset base stops responding, try resetting the USB connection to recover. Impact: error handling improvement Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: fix device ERROR response handlingTilman Schmidt2009-10-061-8/+8
| | | | | | | | | | | Clear out pending command that got rejected with 'ERROR' response. This fixes the bug where unloading the driver module would hang with the message: "gigaset: not searching scheduled commands: busy" after a device communication error. Impact: error handling bugfix Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: announce if built with debuggingTilman Schmidt2009-10-061-1/+7
| | | | | | | | | Mention in the driver load announcement whether the driver was built with debugging messages enabled, to facilitate support. Impact: informational message Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: handle isoc frame errors more gracefullyTilman Schmidt2009-10-061-11/+7
| | | | | | | | Don't drop the remainder of an URB if an isochronous frame has an error. Impact: error handling improvement Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: linearize skbTilman Schmidt2009-10-061-0/+6
| | | | | | | | | | | The code of the Gigaset driver assumes that sk_buff-s coming from the ISDN4Linux subsystem are always linear. Explicitly calling skb_linearize() is cheap if they are, but much more robust in case they ever aren't. Impact: robustness improvement Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: fix reject/hangup handlingTilman Schmidt2009-10-061-0/+5
| | | | | | | | | | Signal D channel disconnect in a few cases where it was missed, including when an incoming call is disconnected before it was accepted. Impact: error handling improvement Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* tty: gigaset: really fix chars_in_bufferTilman Schmidt2009-09-191-12/+7
| | | | | | | | | | | | The tty_operation chars_in_buffer() is not allowed to return a negative value to signal an error. Corrects the problem flagged by commit 23198fda7182969b619613a555f8645fdc3dc334, "tty: fix chars_in_buffers". Signed-off-by: Tilman Schmidt <tilman@imap.cc> Cc: "David S. Miller" <davem@davemloft.net> Cc: stable <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* tty: fix chars_in_buffersAlan Cox2009-07-201-0/+2
| | | | | | | | | | | This function does not have an error return and returning an error is instead interpreted as having a lot of pending bytes. Reported by Jeff Harris who provided a list of some of the remaining offenders. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* gigaset: drop pointless checkTilman Schmidt2009-07-021-6/+0
| | | | | | | Drop a sanity check which doesn't serve any useful purpose anymore. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: accept connection establishment messages in any orderTilman Schmidt2009-07-021-24/+20
| | | | | | | | | | | | ISDN connection setup failed if the "connection active" and "B channel up" messages from the device arrived in a different order than expected. Modify the state machine to accept them in any order. Impact: bugfix Signed-off-by: Tilman Schmidt <tilman@imap.cc> CC: stable <stable@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2009-05-251-1/+1
|\ | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/ath/ath5k/phy.c drivers/net/wireless/iwlwifi/iwl-agn.c drivers/net/wireless/iwlwifi/iwl3945-base.c
| * gigaset: beyond ARRAY_SIZE of iwb->dataRoel Kluin2009-05-211-1/+1
| | | | | | | | | | Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | gigaset: remove unused structure member rcvbytesTilman Schmidt2009-05-173-6/+2
| | | | | | | | | | | | | | | | | | The B channel data structure member rcvbytes was never set to anything else but zero, so drop it. Impact: cleanup Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* | gigaset: remove UNDOCREQ config optionTilman Schmidt2009-05-172-46/+23
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | gigaset: move up Kconfig inclusion pointTilman Schmidt2009-05-171-0/+1
| | | | | | | | | | | | | | | | | | In preparation for porting to kernel CAPI subsystem, include the Gigaset driver's Kconfig directly from ISDN's instead of I4L's. Impact: Kconfig reorganisation, no functional change Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* | gigaset: fix error return codeTilman Schmidt2009-05-171-5/+7
| | | | | | | | | | | | | | | | | | gigaset_register_to_LL() is expected to print a message and return 0 on failure. Make it do so consistently. Impact: error handling bugfix Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* | gigaset: skip unnecessary hex formattingTilman Schmidt2009-05-171-0/+4
| | | | | | | | | | | | | | | | | | Don't generate the hex representation of the payload data if it isn't actually used afterwards. Impact: optimization Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* | gigaset: fix possible oops in error handlingTilman Schmidt2009-05-172-3/+2
| | | | | | | | | | | | | | | | | | Use pr_warning() / pr_err() instead of dev_warn() / dev_err() in two places where the dev pointer isn't guaranteed to be valid. Impact: error handling bugfix Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* | gigaset: remove obsolete references to m10x state tableTilman Schmidt2009-05-173-12/+6
|/ | | | | | | | | The separation of state tables for base and M10x has long been removed. Clean up remaining traces of it. Impact: cleanup Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* gigaset: in file ops, check for device disconnect before anything elseTilman Schmidt2009-04-061-28/+30
| | | | | | | | | | | | | | When the device is disconnected, the dev structure goes away, so trying to report another error via dev_printk is bound to oops. To avoid that, first check whether the device is still connected and return quietly if it isn't. Impact: error handling Signed-off-by: Tilman Schmidt <tilman@imap.cc> Reported-by: Paul Bolle <pebolle@tiscali.nl> Tested-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: David S. Miller <davem@davemloft.net>
* bas_gigaset: use tasklet_hi_schedule for timing critical taskletsTilman Schmidt2009-04-061-2/+2
| | | | | | | | | The tasklets for isochronous data transfer need to run within 8 msec to avoid over/underruns, so schedule them with high priority to fix reported issues with occasional over/underruns. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of /home/davem/src/GIT/linux-2.6/David S. Miller2009-03-261-2/+1
|\ | | | | | | | | Conflicts: drivers/net/wimax/i2400m/usb-notif.c
| * platform: make better use of to_platform_{device,driver}() macrosEric Miao2009-03-241-2/+1
| | | | | | | | | | | | | | | | | | This helps the code look more consistent and cleaner. Signed-off-by: Eric Miao <eric.miao@marvell.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | Merge branch 'master' of ↵David S. Miller2009-03-201-3/+13
|\ \ | |/ | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/virtio_net.c
| * bas_gigaset: correctly allocate USB interrupt transfer bufferTilman Schmidt2009-03-181-3/+13
| | | | | | | | | | | | | | | | | | | | Every USB transfer buffer has to be allocated individually by kmalloc. Impact: bugfix, no functional change Signed-off-by: Tilman Schmidt <tilman@imap.cc> Tested-by: Kolja Waschk <kawk@users.sourceforge.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | gigaset: return -ENOTTY for unimplemented functionsPaul Bolle2009-03-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | A number of functions in the usb_gigaset module will return -EINVAL if CONFIG_GIGASET_UNDOCREQ is not set. Make these return -ENOTTY as it's more specific and it might make it easier to see (from userspace) why these functions actually fail. Impact: some error return codes changed Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud