- 17 2月, 2010 40 次提交
-
-
由 Tejun Heo 提交于
Add __percpu sparse annotations to net. These annotations are to make sparse consider percpu variables to be in a different address space and warn if accessed without going through percpu accessors. This patch doesn't affect normal builds. The macro and type tricks around snmp stats make things a bit interesting. DEFINE/DECLARE_SNMP_STAT() macros mark the target field as __percpu and SNMP_UPD_PO_STATS() macro is updated accordingly. All snmp_mib_*() users which used to cast the argument to (void **) are updated to cast it to (void __percpu **). Signed-off-by: NTejun Heo <tj@kernel.org> Acked-by: NDavid S. Miller <davem@davemloft.net> Cc: Patrick McHardy <kaber@trash.net> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Cc: Vlad Yasevich <vladislav.yasevich@hp.com> Cc: netdev@vger.kernel.org Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 David S. Miller 提交于
-
由 jamal 提交于
Eric's version fixed it for pfkey. This one is for xfrm user. I thought about amortizing those two get_acqseq()s but it seems reasonable to have two of these sequence spaces for the two different interfaces. cheers, jamal commit d5168d5addbc999c94aacda8f28a4a173756a72b Author: Jamal Hadi Salim <hadi@cyberus.ca> Date: Tue Feb 16 06:51:22 2010 -0500 xfrm: avoid spinlock in get_acqseq() used by xfrm user This is in the same spirit as commit 28aecb9d by Eric Dumazet. Use atomic_inc_return() in get_acqseq() to avoid taking a spinlock Signed-off-by: NJamal Hadi Salim <hadi@cyberus.ca> Acked-by: NEric Dumazet <eric.dumazet@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Mike Frysinger 提交于
The code has been around for a long time now and is known to work on a bunch of different parts/boards. Signed-off-by: NMike Frysinger <vapier@gentoo.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6由 Linus Torvalds 提交于
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: serial: 8250: add serial transmitter fully empty test
-
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6由 Linus Torvalds 提交于
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: USB: gadget: fix EEM gadget CRC usage USB: otg Kconfig: let USB_OTG_UTILS select USB_ULPI option USB: g_multi: fix CONFIG_USB_G_MULTI_RNDIS usage kfifo: Don't use integer as NULL pointer USB: FHCI: Fix build after kfifo rework kfifo: Make kfifo_initialized work after kfifo_free USB: serial: add usbid for dell wwan card to sierra.c USB: SIS USB2VGA DRIVER: support KAIREN's USB VGA adaptor USB20SVGA-MB-PLUS USB: ehci: phy low power mode bug fixing USB: s3c-hsotg: Export usb_gadget_register_driver() USB: r8a66597-udc: Prototype IS_ERR() and PTR_ERR() USB: ftdi_sio: add device IDs (several ELV, one Mindstorms NXT) USB: storage: Remove unneeded SC/PR from unusual_devs.h USB: ftdi_sio: new device id for papouch AD4USB USB: usbfs: properly clean up the as structure on error paths USB: usbfs: only copy the actual data received
-
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6由 Linus Torvalds 提交于
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: class: Free the class private data in class_release sysfs: sysfs_sd_setattr set iattrs unconditionally
-
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6由 Linus Torvalds 提交于
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (22 commits) be2net: set proper value to version field in req hdr xfrm: Fix xfrm_state_clone leak ipcomp: Avoid duplicate calls to ipcomp_destroy ethtool: allow non-admin user to read GRO settings. ixgbe: fix WOL register setup for 82599 ixgbe: Fix - Do not allow Rx FC on 82598 at 1G due to errata sfc: Fix SFE4002 initialisation mac80211: fix handling of null-rate control in rate_control_get_rate inet: Remove bogus IGMPv3 report handling iwlwifi: fix AMSDU Rx after paged Rx patch tcp: fix ICMP-RTO war via-velocity: Fix races on shared interrupts via-velocity: Take spinlock on set coalesce via-velocity: Remove unused IRQ status parameter from rx_srv and tx_srv rtl8187: Add new device ID iwmc3200wifi: Test of wrong pointer after kzalloc in iwm_mlme_update_bss_table() ath9k: Fix sequence numbers for PAE frames mac80211: fix deferred hardware scan requests iwlwifi: Fix to set correct ht configuration mac80211: Fix probe request filtering in IBSS mode ...
-
由 Jan Kiszka 提交于
Despite all its bugs, the middleware support of our CAPI stack was already in use for many, many moons. And after going through its code, fixing all issues I found, I feel it deserves to officially become a non-experimental feature. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
With dynamic TTY nodes and the help of udev, we no longer need this special filesystem. Schedule it for removal in one year from now. As a last duty to this feature, move its help to right option so that users can read the rationale. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
This strange special rule to fall back to controller 1 cannot be derived from the CAPI specs and looks a lot like it was once dedicated to some out-of-tree driver, probably AVM's broken fcdsl2 (FRITZ!Card DSL v2.0). I found no in-tree user that needs this check, and I'm now taking care of the fcdsl2. So drop these bits from our stack. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
We did not evaluate handle_minor_send's return value, just (void)'ed it away. Time for a cleanup. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
No need for irqsave acquisition of acklock, bh-safe is sufficient. Moverover, move kfree out of the lock and do not take acklock at all in capiminor_del_all_ack as we are the last user of the list here. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
Introduce outlock as a spin lock that protects capiminor's outqueue, outbytes and outskb (formerly known as ttyskb). outlock can be acquired from soft-IRQ context via capinc_write, so make it bh-safe. This finally removes the last reason for keeping the workaround lock around (which was incomplete and partly broken anyway). And as we no longer call handle_recv_skb in atomic context, gen_data_b3_resp_for can use non-atomic allocation now. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
The inbytes counter was only updated but never read. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
The capiminor members datahandle and msgid are incremented outside any lock, so better do this atomically. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
This struct is describing a queue entry, not the queue itself. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
Avoid re-queuing skbs unless the error detected in handle_recv_skb is expected to be recoverable such as lacking memory, a full CAPI queue, a full TTY input buffer, or a not yet existing TTY. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
Sending a message down the CAPI stack may trigger the reception of an answer, but this will go through capi_recv_message and call handle_minor_recv from there. There is no need to walk the receive queue on capinc_tty_write. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
Not needed, tty->count keeps track of this information. At this chance, drop traces of ancient attempts to debug this logic via _DEBUG_REFCOUNT. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
Use a plain spin lock for capiminors_lock, drop inconsistent irqsafe acquisitions (it's only used in process context anyway). Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
The nccip in capiminor used to serve as an indicator that the NCCI was close. But we don't need this, we issue a hangup on capincci_free_minor. So drop this legacy. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
capincci_free and, thus, capincci_free_minor runs in process context, so we can issue the hangup of the associated TTY synchronously. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jan Kiszka 提交于
tty_struct's driver_data cannot be NULL, no need to test for it. Signed-off-by: NJan Kiszka <jan.kiszka@web.de> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 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>
-