summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/aircable.c
Commit message (Collapse)AuthorAgeFilesLines
* USB: usb-serial: fix the aircable_init failure pathDave Young2009-02-091-2/+2
| | | | | | | | | The failure path of aircable_init is wrong, fix the order of (goto) labels. Signed-off-by: Dave Young <hidave.darkstar@gmail.com> Acked-by: Naranjo Manuel Francisco <naranjo.manuel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: remove use of err() in drivers/usb/serialGreg Kroah-Hartman2008-10-171-4/+4
| | | | | | | | | err() is going away, so switch to dev_err() or printk() if it's really needed. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* tty: usb-serial krefsAlan Cox2008-10-131-6/+9
| | | | | | | | | | | | | Use kref in the USB serial drivers so that we don't free tty structures from under the URB receive handlers as has historically been the case if you were unlucky. This also gives us a framework for general tty drivers to use tty_port objects and refcount. Contains two err->dev_err changes merged together to fix clashes in the -next tree. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* usb_serial: API all changeAlan Cox2008-07-221-8/+11
| | | | | | | | | | | | | | | | | | | USB serial likes to use port->tty back pointers for the real work it does and to do so without any actual locking. Unfortunately when you consider hangup events, hangup/parallel reopen or even worse hangup followed by parallel close events the tty->port and port->tty pointers are not guaranteed to be the same as port->tty is the active tty while tty->port is the port the tty may or may not still be attached to. So rework the entire API to pass the tty struct. For console cases we need to pass both for now. This shows up multiple drivers that immediately crash with USB console some of which have been fixed in the process. Longer term we need a proper tty as console abstraction Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* usb_serial: some coding style fixesAlan Cox2008-05-021-48/+50
| | | | | | Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drivers/usb annotations and fixesAl Viro2008-04-281-2/+2
| | | | | | | | | | | | * endianness annotations * endianness fixes * missing get_unaligned/put_unaligned It's pretty much all over the place, changes to different files are independent. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Serial-parts-Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* USB: replace remaining __FUNCTION__ occurrencesHarvey Harrison2008-04-251-26/+26
| | | | | | | | __FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: serial: aircable: clean up urb->status usageGreg Kroah-Hartman2007-07-131-7/+9
| | | | | | | | | | This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: <linux-usb-devel@lists.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Fix misspellings collected by members of KJ list.Robert P. J. Day2007-05-091-2/+2
| | | | | | | | Fix the misspellings of "propogate", "writting" and (oh, the shame :-) "kenrel" in the source tree. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* USB: aircable cleanupOliver Neukum2007-04-271-3/+4
| | | | | | | | | - proper endianness macros - scheduling in interrupt in error case Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Naranjo Manuel Francisco <naranjo.manuel@gmail.com>
* USB: Bugfix for aircable: Add module and name to usb_serial_driverJohannes Hölzl2007-02-081-1/+4
| | | | | | | | | | | | | While adding the dynamic-id support to usb serial I found a small bug in the air cable driver: Adds module and name information to the usb_serial_driver instance of aircable. So the aircable driver is correctly shown under /sys/bus/usb-serial/drivers/aircable and has the module link. Signed-off-by: Johannes Hölzl <johannes.hoelzl@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB serial: add driver pointer to all usb-serial driversJohannes Hölzl2007-02-081-7/+9
| | | | | | | | | | | | | | Every usb serial driver should have a pointer to the corresponding usb driver. So the usb serial core can add a new id not only to the usb serial driver, but also to the usb driver. Also the usb drivers of ark3116, mos7720 and mos7840 missed the flag no_dynamic_id=1. This is added now. Signed-off-by: Johannes Hölzl <johannes.hoelzl@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Merge branch 'master' of ↵David Howells2006-12-051-4/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: drivers/infiniband/core/iwcm.c drivers/net/chelsio/cxgb2.c drivers/net/wireless/bcm43xx/bcm43xx_main.c drivers/net/wireless/prism54/islpci_eth.c drivers/usb/core/hub.h drivers/usb/input/hid-core.c net/core/netpoll.c Fix up merge failures with Linus's head and fix new compilation failures. Signed-Off-By: David Howells <dhowells@redhat.com>
| * USB: fix aircable.c: inconsequent NULL checkingNaranjo Manuel Francisco2006-12-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > 2006/11/11, Adrian Bunk <bunk@stusta.de>: > > The Coverity checker spotted the following in > > drivers/usb/serial/aircable.c: > > > > <-- snip --> > > > > ... > > static void aircable_read(void *params) > > { > > ... Hi everyone, Sorry for the long time response but here is the patch, I think this way should work, if anyone has any suggestion let me know. What I do now is, in case I don't have the tty available I reschedule the work, I have tried it and it works with no problem, I even tried removing the device, and didn't find anything strange. Signed-off-by: Naranjo Manuel <naranjo.manuel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: aircable: Use usb_endpoint_* functionsLuiz Fernando N. Capitulino2006-12-011-3/+1Star
| | | | | | | | | | | | Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | WorkStruct: make allyesconfigDavid Howells2006-11-221-5/+8
|/ | | | | | Fix up for make allyesconfig. Signed-Off-By: David Howells <dhowells@redhat.com>
* IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells2006-10-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* aircable: fix printk format warningsRandy Dunlap2006-09-271-2/+2
| | | | | | | | | | Fix printk format warnings: drivers/usb/serial/aircable.c:221: warning: format ‘%Zd’ expects type ‘signed size_t’, but argument 4 has type ‘int’ drivers/usb/serial/aircable.c:283: warning: format ‘%Zd’ expects type ‘signed size_t’, but argument 4 has type ‘int’ Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Add AIRcable USB Bluetooth Dongle DriverManuel Francisco Naranjo2006-09-271-0/+625
Add driver for AIRcable USB Bluetooth dongle. Signed-off-by: Naranjo, Manuel Francisco <naranjo.manuel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>