summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* drivers/net/bonding/: : use pr_fmtJoe Perches2009-12-135-690/+465
| | | | | | | | | | | | Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt Remove DRV_NAME from pr_<level>s Consolidate long format strings Remove some extra tab indents Remove some unnecessary ()s from pr_<level>s arguments Align pr_<level> arguments Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* can: CAN_MCP251X should depend on HAS_DMAGeert Uytterhoeven2009-12-131-1/+1
| | | | | | | | | | | When building for Sun 3: drivers/net/can/mcp251x.c:1074: undefined reference to `dma_free_coherent' drivers/net/can/mcp251x.c:976: undefined reference to `dma_alloc_coherent' drivers/net/can/mcp251x.c:1050: undefined reference to `dma_free_coherent' Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net/usb: Correct code taking the size of a pointerJulia Lawall2009-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | sizeof(dev->dev_addr) is the size of a pointer. A few lines above, the size of this field is obtained using netdev->addr_len for a call to memcpy, so do the same here. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression *x; expression f; type T; @@ *f(...,(T)x,...) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net/cpmac.c: Correct code taking the size of a pointerJulia Lawall2009-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | sizeof(dev->dev_addr) is the size of a pointer. On the other hand, sizeof(pdata->dev_addr) is the size of an array, so use that instead. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression *x; expression f; type T; @@ *f(...,(T)x,...) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net/sfc: Correct code taking the size of a pointerJulia Lawall2009-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The function efx_iterate_state contains the code memcpy(&payload->msg, payload_msg, sizeof(payload_msg)); This is the only use of payload_msg. The type of payload_msg is changed from a pointer to an array, so that the result of sizeof really is the length of the string. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression *x; expression f; type T; @@ *f(...,(T)x,...) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/atm: Correct code taking the size of a pointerJulia Lawall2009-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | sizeof(TstSchedTbl) is just the size of the pointer. Change it to the size of the referenced data. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression *x; expression f; type T; @@ *f(...,(T)x,...) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
* 3c574_cs: disable irq before calling el3_interruptKen Kawasaki2009-12-132-0/+8
| | | | | | | | | 3c574_cs, 3c589_cs: disable irq before calling el3_interrupt in the media_check function. Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
* mlx4_core: return a negative error valueroel kluin2009-12-131-1/+1
| | | | | | | The return value should be negative. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* can: Fix data length code handling in rx pathOliver Hartkopp2009-12-138-25/+26
| | | | | | | | | | | | | | | | | | | A valid CAN dataframe can have a data length code (DLC) of 0 .. 8 data bytes. When reading the CAN controllers register the 4-bit value may contain values from 0 .. 15 which may exceed the reserved space in the socket buffer! The ISO 11898-1 Chapter 8.4.2.3 (DLC field) says that register values > 8 should be reduced to 8 without any error reporting or frame drop. This patch introduces a new helper macro to cast a given 4-bit data length code (dlc) to __u8 and ensure the DLC value to be max. 8 bytes. The different handlings in the rx path of the CAN netdevice drivers are fixed. Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: Fix userspace RTM_NEWLINK notifications.Eric W. Biederman2009-12-132-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | I received some bug reports about userspace programs having problems because after RTM_NEWLINK was received they could not immediate access files under /proc/sys/net/ because they had not been registered yet. The original problem was trivially fixed by moving the userspace notification from rtnetlink_event() to the end of register_netdevice(). When testing that change I discovered I was still getting RTM_NEWLINK events before I could access proc and I was also getting RTM_NEWLINK events after I was seeing RTM_DELLINK. Things practically guaranteed to confuse userspace. After a little more investigation these extra notifications proved to be from the new notifiers NETDEV_POST_INIT and NETDEV_UNREGISTER_BATCH hitting the default case in rtnetlink_event, and triggering unnecessary RTM_NEWLINK messages. rtnetlink_event now explicitly handles NETDEV_UNREGISTER_BATCH and NETDEV_POST_INIT to avoid sending the incorrect userspace notifications. Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* udp: udp_lib_get_port() fixEric Dumazet2009-12-131-4/+3
| | | | | | | | | | Now we can have a large udp hash table, udp_lib_get_port() loop should be converted to a do {} while (cond) form, or we dont enter it at all if hash table size is exactly 65536. Reported-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* be2net: fix error in rx completion processing.Ajit Khaparde2009-12-111-2/+2
| | | | | | | | There are certain skews of the NIC which have multiple bits set in adapter->cap. Use & instead of == to process rx completions. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* igbvf: avoid reset storms due to mailbox issuesAlexander Duyck2009-12-112-1/+8
| | | | | | | | | | | | From: Alexander Duyck <alexander.h.duyck@intel.com> This change makes it so that reset/interrupt storms can be avoided when there are mailbox issues. The new behavior is to only allow the device to trigger mailbox related resets only once every 10 seconds. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* igb: fix handling of mailbox collisions between PF/VFAlexander Duyck2009-12-111-9/+13
| | | | | | | | | This patch changes the handling of collisions between the use of the PF/VF sides of the mailbox. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* usb: remove rare pm primitive for conversion to new APIOliver Neukum2009-12-111-2/+2
| | | | | | | | | This patch removes a rare use of the USB power management API which won't be supported after the conversion to the new generic runtime power management framework. Functionality is not altered. Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of /home/davem/src/GIT/linux-2.6/David S. Miller2009-12-113064-222946/+331666
|\ | | | | | | | | Conflicts: include/net/tcp.h
| * Merge branch 'next' of ↵Linus Torvalds2009-12-1116-74/+248
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq: [ACPI/CPUFREQ] Introduce bios_limit per cpu cpufreq sysfs interface [CPUFREQ] make internal cpufreq_add_dev_* static [CPUFREQ] use an enum for speedstep processor identification [CPUFREQ] Document units for transition latency [CPUFREQ] Use global sysfs cpufreq structure for conservative governor tunings [CPUFREQ] Documentation: ABI: /sys/devices/system/cpu/cpu#/cpufreq/ [CPUFREQ] powernow-k6: set transition latency value so ondemand governor can be used [CPUFREQ] cpumask: don't put a cpumask on the stack in x86...cpufreq/powernow-k8.c
| | * [ACPI/CPUFREQ] Introduce bios_limit per cpu cpufreq sysfs interfaceThomas Renninger2009-11-248-24/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This interface is mainly intended (and implemented) for ACPI _PPC BIOS frequency limitations, but other cpufreq drivers can also use it for similar use-cases. Why is this needed: Currently it's not obvious why cpufreq got limited. People see cpufreq/scaling_max_freq reduced, but this could have happened by: - any userspace prog writing to scaling_max_freq - thermal limitations - hardware (_PPC in ACPI case) limitiations Therefore export bios_limit (in kHz) to: - Point the user that it's the BIOS (broken or intended) which limits frequency - Export it as a sysfs interface for userspace progs. While this was a rarely used feature on laptops, there will appear more and more server implemenations providing "Green IT" features like allowing the service processor to limit the frequency. People want to know about HW/BIOS frequency limitations. All ACPI P-state driven cpufreq drivers are covered with this patch: - powernow-k8 - powernow-k7 - acpi-cpufreq Tested with a patched DSDT which limits the first two cores (_PPC returns 1) via _PPC, exposed by bios_limit: # echo 2200000 >cpu2/cpufreq/scaling_max_freq # cat cpu*/cpufreq/scaling_max_freq 2600000 2600000 2200000 2200000 # #scaling_max_freq shows general user/thermal/BIOS limitations # cat cpu*/cpufreq/bios_limit 2600000 2600000 2800000 2800000 # #bios_limit only shows the HW/BIOS limitation CC: Pallipadi Venkatesh <venkatesh.pallipadi@intel.com> CC: Len Brown <lenb@kernel.org> CC: davej@codemonkey.org.uk CC: linux@dominikbrodowski.net Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Dave Jones <davej@redhat.com>
| | * [CPUFREQ] make internal cpufreq_add_dev_* staticAlex Chiang2009-11-241-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No need to export these symbols; make them static. cpufreq_add_dev_policy cpufreq_add_dev_symlink cpufreq_add_dev_interface Signed-off-by: Alex Chiang <achiang@hp.com> Signed-off-by: Dave Jones <davej@redhat.com>
| | * [CPUFREQ] use an enum for speedstep processor identificationRusty Russell2009-11-244-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "unsigned int processor" everywhere confused Rusty, leading to breakage when he passed in smp_processor_id(). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Jones <davej@redhat.com>
| | * [CPUFREQ] Document units for transition latencyMark Brown2009-11-241-3/+3
| | | | | | | | | | | | | | | | | | | | | They're documented in the header but not in Documentation. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Dave Jones <davej@redhat.com>
| | * [CPUFREQ] Use global sysfs cpufreq structure for conservative governor tuningsThomas Renninger2009-11-241-19/+110
| | | | | | | | | | | | | | | | | | | | | Same adustments that have been added to the ondemand recently. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Dave Jones <davej@redhat.com>
| | * [CPUFREQ] Documentation: ABI: /sys/devices/system/cpu/cpu#/cpufreq/Alex Chiang2009-11-241-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a complex interface and is already described in Documentation/cpu-freq/, especially in the user-guide.txt file. No need to copy/paste all that information. Let's just alert the reader to the presence of the user-guide. Signed-off-by: Alex Chiang <achiang@hp.com> Signed-off-by: Dave Jones <davej@redhat.com>
| | * [CPUFREQ] powernow-k6: set transition latency value so ondemand governor can ↵Krzysztof Helt2009-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | be used Set the transition latency to value smaller than CPUFREQ_ETERNAL so governors other than "performance" work (like the "ondemand" one). The value is found in "AMD PowerNow! Technology Platform Design Guide for Embedded Processors" dated December 2000 (AMD doc #24267A). There is the answer to one of FAQs on page 40 which states that suggested complete transition period is 200 us. Tested on K6-2+ CPU with K6-3 core (model 13, stepping 4). Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Dave Jones <davej@redhat.com>
| | * [CPUFREQ] cpumask: don't put a cpumask on the stack in ↵Rusty Russell2009-11-241-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | x86...cpufreq/powernow-k8.c It's still mugging the current process's cpumask, but as comment in 1ff6e97f1d says, it's not a trivial fix. So, at least we can use a cpumask_var_t to do the Wrong Thing the Right Way :) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> To: cpufreq@vger.kernel.org Cc: Mark Langsdorf <mark.langsdorf@amd.com> Signed-off-by: Dave Jones <davej@redhat.com>
| * | Staging: batman: fix debug Kconfig optionGreg Kroah-Hartman2009-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The debug batman option needs to depend on the correct config option. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> [ "No means no!" - Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6Linus Torvalds2009-12-1136-3820/+921
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (58 commits) tty: split the lock up a bit further tty: Move the leader test in disassociate tty: Push the bkl down a bit in the hangup code tty: Push the lock down further into the ldisc code tty: push the BKL down into the handlers a bit tty: moxa: split open lock tty: moxa: Kill the use of lock_kernel tty: moxa: Fix modem op locking tty: moxa: Kill off the throttle method tty: moxa: Locking clean up tty: moxa: rework the locking a bit tty: moxa: Use more tty_port ops tty: isicom: fix deadlock on shutdown tty: mxser: Use the new locking rules to fix setserial properly tty: mxser: use the tty_port_open method tty: isicom: sort out the board init logic tty: isicom: switch to the new tty_port_open helper tty: tty_port: Add a kref object to the tty port tty: istallion: tty port open/close methods tty: stallion: Convert to the tty_port_open/close methods ...
| | * | tty: split the lock up a bit furtherAlan Cox2009-12-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tty count sanity check may need the BKL, that isn't clear. However it is clear that the count use of the lock is internal and independant of the bigger use of the lock. Furthermore the file list locking is also separately locked already Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * | tty: Move the leader test in disassociateAlan Cox2009-12-112-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two call points, both want to check that tty->signal->leader is set. Move the test into disassociate_ctty() as that will make locking changes easier in a bit Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * | tty: Push the bkl down a bit in the hangup codeAlan Cox2009-12-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We know that the redirect field is handled via its own locking in all places Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * | tty: Push the lock down further into the ldisc codeAlan Cox2009-12-112-5/+9
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * | tty: push the BKL down into the handlers a bitAlan Cox2009-12-114-63/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Start trying to untangle the remaining BKL mess Updated to fix missing unlock_kernel noted by Dan Carpenter Signed-off-by: Alan "I must be out of my tree" Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * | tty: moxa: split open lockAlan Cox2009-12-111-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | moxa_openlock is used for several situations where we want to handle the case of an ioctl that crosses many ports (not just the open tty), and also cases where an open races a deinit (eg a pci unplug) and we hangup a port before we can cope with that. The non open race cases can use the moxa_lock spinlock. This simplifies sorting out the remaining mess. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * | tty: moxa: Kill the use of lock_kernelAlan Cox2009-12-111-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It isn't needed here any more Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * | tty: moxa: Fix modem op lockingAlan Cox2009-12-111-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is overkill and mostly not needed Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * | tty: moxa: Kill off the throttle methodAlan Cox2009-12-111-20/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The tty flag can be tested so the shadow flag isn't needed Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * | tty: moxa: Locking clean upAlan Cox2009-12-111-33/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The open lock is needed to fix up the case of a board reset occuring during tty open but too early for a sane hangup response. - The lock can however got for other cases - Use the port mutex for get/setserial - Fix up the confused lack of locking on the THROTTLE and other bits in the private flags. Just use set/test/clear bit and it covers the cases we need Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * | tty: moxa: rework the locking a bitAlan Cox2009-12-111-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a lock for moxafunc() to protect the cases where were get collisions between two function requests at the same time. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * | tty: moxa: Use more tty_port opsAlan Cox2009-12-111-116/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework a few bits of this into tty_port format Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * | tty: isicom: fix deadlock on shutdownAlan Cox2009-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alexander Strakh <strakh@ispras.ru> reported KERNEL_VERSION: 2.6.31 DESCRIBE: Driver drivers/char/isicom.c might sleep in atomic context, because it calls tty_port_xmit_buf under spin_lock. ./drivers/char/isicom.c: 1307 static void isicom_hangup(struct tty_struct *tty) 1308 { ... 1315 spin_lock_irqsave(&port->card->card_lock, flags); 1316 isicom_shutdown_port(port); ... Path to might_sleep macro from isicom_hangup: 1. isicom_hangup calls spin_lock_irqsave (drivers/char/isicom.c:1315) and then calls isicom_shutdown_port. 2. isiscom_shutdown_port calls tty_port_free_xmit_buf at drivers/char/isicom.c:906 3. tty_port_free_xmit_buf calls mutex_lock at drivers/char/tty_port:48 Found by Linux Driver Verification Project. Reported-by: Alexander Strakh <strakh@ispras.ru> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * | tty: mxser: Use the new locking rules to fix setserial properlyAlan Cox2009-12-111-67/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Propogate the init/shutdown mutex through the setserial logic. Use the proper locks for the various bits still using the BKL. Kill the BKL in this driver. Updated to fix the bug noted by Dan Carpenter Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * | tty: mxser: use the tty_port_open methodAlan Cox2009-12-111-76/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At first this looks a fairly trivial conversion but we can't quite push everything into the right format yet. The open side is easy but care is needed over the setserial methods. Fix up the locking now that we've adopted the port->mutex locking rule for the initialization. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * | tty: isicom: sort out the board init logicAlan Cox2009-12-112-30/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split this into two flags - INIT meaning the board is set up and ACTIVE meaning the board has ports open. Remove the broken HUPCL casing and push the counts somewhere sensible. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * | tty: isicom: switch to the new tty_port_open helperAlan Cox2009-12-111-67/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trivial conversion in this case so might as well do it while testing the port_open design is right Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * | tty: tty_port: Add a kref object to the tty portAlan Cox2009-12-112-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users of tty port need a way to refcount ports when hotplugging is involved. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * | tty: istallion: tty port open/close methodsAlan Cox2009-12-111-117/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Slice/dice/repeat as with the stallion driver this is just code shuffling and removal Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * | tty: stallion: Convert to the tty_port_open/close methodsAlan Cox2009-12-111-81/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver is already structured this way so just slice and dice Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * | tty: tty_port: Move the IO_ERROR clearAlan Cox2009-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices want to set IO_ERROR in their activate methods so that you can be handed a 'dead' port for operations like setserial. Thus we need to clear the flag before activate so that activate can choose to set the flag and still return 0. This is fine as the file handle/tty are not accessible to the user yet. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * | tty: tty_port: Add IO_ERROR bit handlingAlan Cox2009-12-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To propogate tty_port_open/close to a few other devices we need to start handling the IO_ERROR flag on the tty. We can do this pretty trivially. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * | tty: riscom8: switch to the tty_port_open APIAlan Cox2009-12-111-48/+41
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud