- 17 2月, 2010 25 次提交
-
-
由 Jan Kiszka 提交于
Use the reference management features of tty_port to look up and drop again the tty_struct associated with a capiminor. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
Properly associate/disassociate a capiminor object with its TTY via the install/cleanup handlers instead of trying to guess first open and last close. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
Install a reference counter for capiminor objects. Acquire it when obtaining a capiminor from the array during capinc_tty_open, drop it when closing the tty again. Another reference is held for the hook-up with capincci. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
No need to allocate a fixed major for this TTY, both capifs and udev make this transparent to the user. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
Register capiminors dynamically with the TTY core so that udev can make them show up as the NCCIs appear or disappear. This removes the need to check if the capiminor requested in capinc_tty_open actually exists. And this completely obsoletes capifs which will be scheduled for removal in a later patch. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
Return proper error code if tty_register_driver fails. In contrast, tty_unregister_driver cannot practically fail, so drop that error handling. Finally, mark capinc_tty_init/exit with __init/__exit. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
Using a plain array of pointers simplifies the management of capiminors. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
Replace open-coded NCCI list management with standard mechanisms. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
capi_read still used interruptible_sleep_on, risking to miss a wakeup this way. Convert it to wait_event_interruptible. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
Both capincci_alloc and capiminor_alloc run in non-atomic context, update their memory allocations accordingly. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
Rename 'ncci_list_mtx' to 'lock', expressing that it now protects a larger set of capidev members: the NCCI list, ap.applid (ie. the registration of the application), and modifications of userflags. We do not need to protect each and every check for ap.applid because, once an application is registered, it will stay for the whole lifetime of the device. Also, there is no need to apply the capidev mutex during release (if there could be concurrent users, we would crash them anyway by freeing the device at the end of capi_release). Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
Fold capidev_alloc and capidev_free into capi_open and capi_release - there are no other users. Someone pushed a lock_kernel into capi_open. Drop it, we don't need it. Also remove the useless test from open that checks for private_data == NULL. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
No need for anything "harder" here (specifically no need for irqsave...). Also, make the list removal the first operation of capidev_free to avoid dumping half-released devices via /proc. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
Make the code a bit more readable be providing stub functions for the !CONFIG_ISDN_CAPI_MIDDLEWARE case. Though a few lines are moved around, this comes with no functional changes. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
Drop the application rw-lock in favour of RCU. This synchronizes capi20_release against capi_ctr_handle_message which may dereference an application from (soft-)IRQ context. Any other access to the application list is now protected by the capi_controller_lock as well. This also allows to safely inspect applications for /proc dumping by holding capi_controller_lock. At this chance, drop some useless release_in_progress checks where we obtained the application pointer from the list (which becomes NULL on release_in_progress). Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
This patch applies the mutex so far only protecting the controller list to (almost) all accesses of controller data structures. It also reworks waiting on state changes in old_capi_manufacturer so that it no longer poll and holds a module reference to the controller owner while waiting (the latter was partly done already). Modification and checking of the blocked state remains racy by design, the caller is responsible for dealing with this. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
Another step towards proper locking: Rework the callback provided to capidrv for controller state changes. This is so far attached to an application, which would require us to hold the corresponding lock across notification calls. But there is no direct relation between a controller up/down event and an application, so let's decouple them and provide a notifier call chain for those events instead. This notifier chain is first of all used internally. Here we request the highest priority to unsure that housekeeping work is done before any other notifications. The chain is exported via [un]register_capictr_notifier to our only user, capidrv, to replace the racy and unfixable capi20_set_callback. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
This step prepares the application of proper controller locking: Push all state changing work into the notify handler that are called by capi_ctr_ready and capi_ctr_down, switch detach_capi_ctr to issue a synchronous ctr_down. Also ensure that we do not go through any action if the state did not change. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
Turn the lock protecting registered capi drivers into a mutex and apply it consistently. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
At least for our internal use, fix the misnomers that refer to a CAPI controller as 'card'. No functional changes. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
The CVS revisions dumped by all CAPI modules are meaningless today. And that some CAPI module is loaded or removed does not necessarily deserve a message. Just keep the message of the central module, capi.ko, drop the rest. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
Auto-mounting the capifs during module init prevents unloading its module. Instead, pin the filesystem as long as some NCCI node exists. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
capifs_mnt->mnt_sb->s_root already contains what we need. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
Instead of looking up the dentry of an NCCI node again in capifs_free_ncci pass the pointer via the capifs user. This patch also reduces the #ifdef mess in capi.c a bit as far as capifs was causing it. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
When something went wrong during capifs_new_ncci, the looked up dentry was not properly released. Neither was the allocated inode. Refactor the function to avoid leaks. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 04 2月, 2010 4 次提交
-
-
由 Roel Kluin 提交于
The error return should be negative. Its only caller that acts upon its return, handle_bmsg(), transmits the positive error but can also return negative errors. Signed-off-by: NRoel Kluin <roel.kluin@gmail.com> Cc: Karsten Keil <isdn@linux-pingi.de> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jiri Slaby 提交于
Remove these compiler warnings: drivers/isdn/hardware/mISDN/w6692.c:534: warning: `setvolume' defined but not used drivers/isdn/hardware/mISDN/w6692.c:561: warning: `enable_pots' defined but not used by moving the functions inside #if 0 ... #endif. And an alternative is to remove them completely if nobody has plans to use them. Signed-off-by: NJiri Slaby <jirislaby@gmail.com> Cc: Karsten Keil <isdn@linux-pingi.de> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Darren Jenkins 提交于
If setup_instance() fails we kfree() the card, and then use it in the next loop iteration. So lets bail out of the loop instead. Coverity CID: 13357 Signed-off-by: NDarren Jenkins <darrenrjenkins@gmail.com> Cc: Karsten Keil <isdn@linux-pingi.de> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Roel Kluin 提交于
With `while (timeout++ < maxdelay)' timeout reaches maxdelay + 1 after the loop This is probably unlikely a problem in practice. Signed-off-by: NRoel Kluin <roel.kluin@gmail.com> Cc: Karsten Keil <isdn@linux-pingi.de> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 14 1月, 2010 1 次提交
-
-
由 Alexey Dobriyan 提交于
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 786d7e16 "Fix rmmod/read/write races in /proc entries" [akpm@linux-foundation.org: CONFIG_PROC_FS=n build fix] Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com> Signed-off-by: NTilman Schmidt <tilman@imap.cc> Signed-off-by: NKarsten Keil <keil@b1-systems.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 04 1月, 2010 1 次提交
-
-
由 Julia Lawall 提交于
The code checked slot_rx twice. Check slot_tx by analogy with the bank case. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression E; @@ ( *E && E | *E || E ) // </smpl> Signed-off-by: NJulia Lawall <julia@diku.dk> Cc: Karsten Keil <isdn@linux-pingi.de> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 19 12月, 2009 1 次提交
-
-
由 Yong Zhang 提交于
The _ONSTACK variant should be used for on-stack completion, otherwise it will break lockdep. Signed-off-by: NYong Zhang <yong.zhang0@gmail.com> Acked-by: NKarsten Keil <keil@b1-systems.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 09 12月, 2009 1 次提交
-
-
由 Tilman Schmidt 提交于
When built with debugging support, the Gigaset driver enabled some debugging messages by default. Change the default to "all off". Signed-off-by: NTilman Schmidt <tilman@imap.cc> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 08 12月, 2009 1 次提交
-
-
由 Dominik Brodowski 提交于
Komuro pointed out that IRQ_FIRST_SHARED is not used at all in the PCMCIA subsystem, so remove it. Also, remove two bogus assignments. CC: Karsten Keil <keil@b1-systems.de> CC: netdev@vger.kernel.org CC: alsa-devel@alsa-project.org CC: Komuro <komurojun-mbn@nifty.com> Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
-
- 04 12月, 2009 1 次提交
-
-
由 André Goddard Rosa 提交于
That is "success", "unknown", "through", "performance", "[re|un]mapping" , "access", "default", "reasonable", "[con]currently", "temperature" , "channel", "[un]used", "application", "example","hierarchy", "therefore" , "[over|under]flow", "contiguous", "threshold", "enough" and others. Signed-off-by: NAndré Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 29 11月, 2009 3 次提交
-
-
由 Dominik Brodowski 提交于
Most of the irq_req_t typedef'd struct can be re-worked quite easily: (1) IRQInfo2 was unused in any case, so drop it. (2) IRQInfo1 was used write-only, so drop it. (3) Instance (private data to be passed to the IRQ handler): Most PCMCIA drivers using pcmcia_request_irq() to actually register an IRQ handler set the "dev_id" to the same pointer as the "priv" pointer in struct pcmcia_device. Modify the two exceptions (ipwireless, ibmtr_cs) to also work this waym and set the IRQ handler's "dev_id" to p_dev->priv unconditionally. (4) Handler is to be of type irq_handler_t. (5) Handler != NULL already tells whether an IRQ handler is present. Therefore, we do not need the IRQ_HANDLER_PRESENT flag in irq_req_t.Attributes. CC: netdev@vger.kernel.org CC: linux-bluetooth@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-scsi@vger.kernel.org CC: alsa-devel@alsa-project.org CC: Jaroslav Kysela <perex@perex.cz> CC: Jiri Kosina <jkosina@suse.cz> CC: Karsten Keil <isdn@linux-pingi.de> for the Bluetooth parts: Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
-
由 Dominik Brodowski 提交于
pcmcia_request_window() only needs a pointer to struct pcmcia_device, not a pointer to a pointer. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-scsi@vger.kernel.org CC: Jiri Kosina <jkosina@suse.cz> Acked-by: Karsten Keil <keil@b1-systems.de> (for ISDN) Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
-
由 Magnus Damm 提交于
No logic changes, just pass struct pcmcia_device to pcmcia_map_mem_page() [linux@dominikbrodowski.net: update to 2.6.31] CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-scsi@vger.kernel.org CC: Jiri Kosina <jkosina@suse.cz> Acked-by: Karsten Keil <keil@b1-systems.de> (for ISDN) Signed-off-by: NMagnus Damm <damm@opensource.se> Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
-
- 20 11月, 2009 1 次提交
-
-
由 Joe Perches 提交于
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: NJoe 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: NDavid S. Miller <davem@davemloft.net>
-
- 16 11月, 2009 1 次提交
-
-
由 David S. Miller 提交于
This reverts commit 38783e67. It causes kernel bugzilla #14594 Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-