summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/safe_serial.c
Commit message (Collapse)AuthorAgeFilesLines
* USB: Remove dead references to "SAFE_SERIAL" CONFIG variables.Robert P. J. Day2007-10-121-11/+0Star
| | | | | | | | | Remove the references to CONFIG_USBD_SAFE_SERIAL_{VENDOR,PRODUCT}, which aren't defined in any Kconfig file. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Typo: "USB_SAFE_PADDED" -> "USB_SERIAL_SAFE_PADDED".Robert P. J. Day2007-08-221-3/+3
| | | | | | | | Fix typo in safe_serial.c to match the actual CONFIG variable. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: serial: safe_serial: clean up urb->status usageGreg Kroah-Hartman2007-07-131-2/+4
| | | | | | | | | | | | 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> Cc: Stuart Lynne <sl@lineo.com> Cc: Tom Rushworth <tbr@lineo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB serial: add driver pointer to all usb-serial driversJohannes Hölzl2007-02-081-0/+1
| | | | | | | | | | | | | | 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>
* IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells2006-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* usb-serial: possible irq lock inversion (PPP vs. usb/serial)Peter Zijlstra2006-09-291-3/+3
| | | | | ========================================================= [ INFO: possible irq lock inversion dependency detected ]
* [PATCH] USB: move usb-serial.h to include/linux/usb/Greg Kroah-Hartman2006-07-131-1/+1
| | | | | | | | | | USB serial outside of the kernel tree can not build properly due to usb-serial.h being buried down in the source tree. This patch moves the location of the file to include/linux/usb and fixes up all of the usb serial drivers to handle the move properly. Cc: Sergei Organov <osv@javad.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Remove obsolete #include <linux/config.h>Jörn Engel2006-06-301-1/+0Star
| | | | | Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* [PATCH] USB: Use ARRAY_SIZE macroTobias Klauser2006-01-041-1/+1
| | | | | | | | | | Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove duplicates of ARRAY_SIZE. Some trailing whitespaces are also removed. Patch is compile-tested on i386. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] USB: mark various usb tables constArjan van de Ven2006-01-041-1/+1
| | | | | | | | | | patch below marks various USB tables and variables as const so that they end up in .rodata section and don't cacheline share with things that get written to. For the non-array variables it also allows gcc to optimize more. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] USB: remove .owner field from struct usb_driverGreg Kroah-Hartman2006-01-041-1/+0Star
| | | | | | It is no longer needed, so let's remove it, saving a bit of memory. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] USB: allow usb drivers to disable dynamic idsGreg Kroah-Hartman2006-01-041-0/+1
| | | | | | | | | | | This lets drivers, like the usb-serial ones, disable the ability to add ids from sysfs. The usb-serial drivers are "odd" in that they are really usb-serial bus drivers, not usb bus drivers, so the dynamic id logic will have to go into the usb-serial bus core for those drivers to get that ability. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] USB Serial: move name to driver structureGreg Kroah-Hartman2005-10-291-1/+1
| | | | | | | | This fixes up a lot of problems in sysfs with some of the usb serial drivers, they had incorrect driver names. Also saves a tiny ammount of memory. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] USB Serial: get rid of the .owner field in usb_serial_driverGreg Kroah-Hartman2005-10-291-1/+3
| | | | | | Don't duplicate something that's already in struct driver. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] USB Serial: rename usb_serial_device_type to usb_serial_driverGreg Kroah-Hartman2005-10-291-1/+1
| | | | | | | I'm tired of trying to explain why a "device_type" is really a driver. This better describes exactly what this structure is. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] safe_serial: use preprocessor directive for errorRandy Dunlap2005-10-291-1/+1
| | | | | | | | | Use valid #preprocessor instruction to generate an error. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> drivers/usb/serial/safe_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
* [PATCH] USB: add ability for usb-serial drivers to determine if their write ↵Greg Kroah-Hartman2005-06-271-4/+9
| | | | | | | | urb is currently being used. This removes a lot of racy and buggy code by trying to check the status of the urb. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Linux-2.6.12-rc2Linus Torvalds2005-04-171-0/+451
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!