aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/gigaset/bas-gigaset.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-07-07isdn/gigaset: drop debug check on isochronous writeTilman Schmidt1-18/+0
With CONFIG_GIGASET_DEBUG set, every isochronous USB frame after an erroneous one was checked for more errors. This produced only noise messages in practice, so drop it. Impact: cleanup Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-07isdn/gigaset: avoid copying AT commands twiceTilman Schmidt1-40/+11
Change the Gigaset driver's internal write_cmd interface to accept a cmdbuf structure instead of a string. This avoids copying formatted AT commands a second time. Impact: optimization Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-18gigaset: include cleanup cleanupTilman Schmidt1-5/+0
Commit 5a0e3ad causes slab.h to be included twice in many of the Gigaset driver's source files, first via the common include file gigaset.h and then a second time directly. Drop the spares, and use the opportunity to clean up a few more similar cases. Impact: cleanup, no functional change Signed-off-by: Tilman Schmidt <tilman@imap.cc> CC: Tejun Heo <tj@kernel.org> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-26gigaset: reduce syslog clutterTilman Schmidt1-12/+6
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>
2009-11-19drivers/isdn/gigaset: tasklet_init - Remove unnecessary leading & from second argJoe Perches1-2/+2
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>
2009-10-29bas_gigaset: checkpatch cleanupTilman Schmidt1-27/+41
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>
2009-10-06gigaset: prepare for CAPI implementationTilman Schmidt1-2/+2
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>
2009-10-06gigaset: improve error recoveryTilman Schmidt1-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>
2009-10-06gigaset: handle isoc frame errors more gracefullyTilman Schmidt1-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>
2009-04-06bas_gigaset: use tasklet_hi_schedule for timing critical taskletsTilman Schmidt1-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>
2009-03-18bas_gigaset: correctly allocate USB interrupt transfer bufferTilman Schmidt1-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>
2008-12-26gigaset: use pr_err() and pr_info()Tilman Schmidt1-5/+7
Switch from private printk wrapper macros to using pr_err() and pr_info() from linux/kernel.h, at the same time unifying a few error messages. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-29gigaset: get rid of info() and warn() macrosTilman Schmidt1-2/+1
Join the move away from the obsolete info() macro, opencoding the remaining uses. While we're at it, also get rid of the warn() macro by promoting the three remaining uses to err(). Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-24gigaset: gigaset_isowbuf_getbytes() may return signed unnoticedTilman Schmidt1-6/+6
ifd->offset is unsigned. gigaset_isowbuf_getbytes() may return signed unnoticed. Revised version of patch originally submitted by Roel Kluin <12o3l@tiscali.nl>. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06Gigaset: permit module unloadTilman Schmidt1-41/+39
Fix the initialization and reference counting of the Gigaset driver modules so that they can be unloaded when they are not actually in use. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Cc: Hansjoerg Lipp <hjlipp@web.de> Cc: Greg KH <gregkh@suse.de> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06gigaset: atomic cleanupTilman Schmidt1-45/+41
Convert atomic_t variables that don't actually use atomic_t functionality to int. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06bas_gigaset: suspend supportTilman Schmidt1-2/+164
Add basic suspend/resume support to the bas_gigaset ISDN driver for the Siemens Gigaset SX255 series of ISDN DECT bases. Only the USB aspects are handled so far; the ISDN subsystem is not notified in any way, for lack of information about how to do that. The driver will refuse to suspend if a connection is active. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Cc: Greg KH <gregkh@suse.de> Cc: Hansjoerg Lipp <hjlipp@web.de> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06gigaset: code cleanupsTilman Schmidt1-22/+23
Some cleanups to the bas-gigaset and usb-gigaset USB ISDN drivers: - simplified error handling - improved debug messages - readability improvements - removal of obsolete defines and comments Signed-off-by: Tilman Schmidt <tilman@imap.cc> Cc: Greg KH <gregkh@suse.de> Cc: Hansjoerg Lipp <hjlipp@web.de> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-06gigaset: clean up urb->status usageTilman Schmidt1-36/+48
Make there only be one reference to urb->status per URB callback, and none outside, in preparation for removal of that field. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Cc: Greg KH <gregkh@suse.de> Cc: Hansjoerg Lipp <hjlipp@web.de> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16gigaset: remove pointless lockingTilman Schmidt1-8/+1
Remove pointless taking of spinlock around reading a single pointer-sized or smaller variable. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Acked-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-29[PATCH] drivers/isdn/gigaset: mark some static data as const (v2)Tilman Schmidt1-2/+2
Mark some static arrays as const that aren't and shouldn't be modified, and remove incorrect static attribute from some variables. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: Hansjoerg Lipp <hjlipp@web.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] fix gregkh-usb-usbcore-remove-unused-bandwith-related-codeAndrew Morton1-2/+2
drivers/isdn/gigaset/bas-gigaset.c: In function 'dump_urb': drivers/isdn/gigaset/bas-gigaset.c:258: error: 'struct urb' has no member named 'bandwidth' Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2006-12-13[PATCH] isdn/gigaset: fix possible missing wakeupTilman Schmidt1-66/+52
Eliminate some possibilities for user processes writing to the Gigaset character device to be left sleeping indefinitely, by adding wakeup calls to error paths and properly disposing of pending write requests when the device is disconnected. It also removes unnecessary NULL checks before usb_free_urb() and usb_kill_urb() calls. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Acked-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07[PATCH] slab: remove SLAB_KERNELChristoph Lameter1-7/+7
SLAB_KERNEL is an alias of GFP_KERNEL. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07[PATCH] slab: remove SLAB_ATOMICChristoph Lameter1-10/+10
SLAB_ATOMIC is an alias of GFP_ATOMIC Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-05IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells1-6/+6
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-09-27USB: Dealias -110 code (more complete)Pete Zaitcev1-1/+1
The purpose of this patch is to split off the case when a device does not reply on the lower level (which is reported by HC hardware), and a case when the device accepted the request, but does not reply at upper level. This redefinition allows to diagnose issues easier, without asking the user if the -110 happened "immediately". The usbmon splits such cases already thanks to its timestamp, but it's not always available. I adjusted all drivers which I found affected (by searching for "urb"). Out of tree drivers may suffer a little bit, but I do not expect much breakage. At worst they may print a few messages. Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-26[PATCH] devfs: Remove the tty_driver devfs_name field as it's no longer neededGreg Kroah-Hartman1-3/+1
Also fixes all drivers that set this field. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-26[PATCH] isdn4linux: Gigaset base driver: improve error recoveryTilman Schmidt1-117/+181
The following patch to the Siemens Gigaset base driver adds graceful recovery for some frequently encountered error conditions, by retrying failed control requests (eg. stalled control pipe), and by closing and reopening the AT command channel when it appears to be stuck. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Acked-by: Hansjoerg Lipp <hjlipp@web.de> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-22[PATCH] isdn4linux: Siemens Gigaset base driver: fix disconnect handlingTilman Schmidt1-270/+327
Fix a possible Oops in the Siemens Gigaset base driver when the device is unplugged while an ISDN connection is still active, and makes sure that the isdn4linux link level (LL) is properly informed if a connection is broken by the USB cable being unplugged. - Avoid unsafe checks of URB status fields outside the URB completion handlers, keep track of in-use URBs myself instead. - If an isochronous transfer URB completes with status==0, also check the status of the frame descriptors. - Verify length of interrupt messages received from the device. - Align the length limit on transmitted AT commands with the device documentation. - In case of AT response receive overrun, keep newly arrived instead of old unread data. - Remove redundant check of device ID in the USB probe function. - Correct and improve some comments and formatting. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Acked-by: Hansjoerg Lipp <hjlipp@web.de> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11[PATCH] isdn4linux: Siemens Gigaset drivers: make some variables non-atomicTilman Schmidt1-26/+22
With Hansjoerg Lipp <hjlipp@web.de> Replace some atomic_t variables in the Gigaset drivers by non-atomic ones, using spinlocks instead to assure atomicity, as proposed in discussions on the linux-kernel mailing list. Signed-off-by: Hansjoerg Lipp <hjlipp@web.de> Signed-off-by: Tilman Schmidt <tilman@imap.cc> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11[PATCH] isdn4linux: Siemens Gigaset drivers: remove forward referencesTilman Schmidt1-2/+2
With Hansjoerg Lipp <hjlipp@web.de> Remove four unnecessary forward function declarations and an obsolete E-mail address from the Siemens Gigaset drivers. Signed-off-by: Hansjoerg Lipp <hjlipp@web.de> Signed-off-by: Tilman Schmidt <tilman@imap.cc> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11[PATCH] isdn4linux: Siemens Gigaset drivers: eliminate from_user argumentTilman Schmidt1-1/+1
With Hansjoerg Lipp <hjlipp@web.de> Eliminate the from_user argument from a debugging function, thus easing the job of sparse. Signed-off-by: Hansjoerg Lipp <hjlipp@web.de> Signed-off-by: Tilman Schmidt <tilman@imap.cc> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11[PATCH] isdn4linux: Siemens Gigaset drivers: remove IFNULL macrosTilman Schmidt1-145/+29
With Hansjoerg Lipp <hjlipp@web.de> Remove the IFNULL debugging macros from the Gigaset drivers. Signed-off-by: Hansjoerg Lipp <hjlipp@web.de> Signed-off-by: Tilman Schmidt <tilman@imap.cc> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11[PATCH] isdn4linux: Siemens Gigaset drivers: sysfs usageTilman Schmidt1-10/+10
With Hansjoerg Lipp <hjlipp@web.de> Correct the way the Gigaset drivers create their sysfs entries. Signed-off-by: Hansjoerg Lipp <hjlipp@web.de> Signed-off-by: Tilman Schmidt <tilman@imap.cc> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11[PATCH] isdn4linux: Siemens Gigaset drivers: logging usageTilman Schmidt1-272/+339
With Hansjoerg Lipp <hjlipp@web.de> Improve error reporting of the Gigaset drivers, by using the dev_err/dev_warn/dev_info macros from device.h instead of err/warn/info from usb.h whereever possible. Also rename the private dbg macro to gig_dbg in order to avoid confusion with the macro of the same name in usb.h. Signed-off-by: Hansjoerg Lipp <hjlipp@web.de> Signed-off-by: Tilman Schmidt <tilman@imap.cc> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11[PATCH] isdn4linux: Siemens Gigaset drivers: code cleanupTilman Schmidt1-20/+21
With Hansjoerg Lipp <hjlipp@web.de> Source code formatting cleanups for the Siemens Gigaset drivers, such as line length, comments, removal of unused declarations, and typo corrections. It does not introduce any functional changes. Signed-off-by: Hansjoerg Lipp <hjlipp@web.de> Signed-off-by: Tilman Schmidt <tilman@imap.cc> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-26[PATCH] isdn4linux: Siemens Gigaset drivers - direct USB connectionHansjoerg Lipp1-0/+2365
And: Tilman Schmidt <tilman@imap.cc> This patch adds the main source file of the connection-specific module "bas_gigaset", the hardware driver for Gigaset base stations connected directly to the computer via USB. It contains the code for handling probe/disconnect, AT command/response transmission, and call setup and termination. Signed-off-by: Hansjoerg Lipp <hjlipp@web.de> Signed-off-by: Tilman Schmidt <tilman@imap.cc> Cc: Karsten Keil <kkeil@suse.de> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>