aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-06-22serial: fix off by one errorsRoel Kluin3-7/+7
In zs_console_putchar() occurs: if (zs_transmit_drain(zport, irq)) write_zsdata(zport, ch); However if in zs_transmit_drain() no empty Tx Buffer occurs, limit reaches -1 => true, and the write still occurs. This patch changes postfix to prefix decrements in this and similar functions to prevent similar mistakes in the future. This decreases the iterations with one but the chosen loop count was arbitrary anyway. In sunhv limit reaches -1, not 0, so the test is off by one. Signed-off-by: Roel Kluin <[email protected]> Acked-by: David S. Miller <[email protected]> Acked-by: Maciej W. Rozycki <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-06-22serial: bfin_5xx: fix building as module when early printk is enabledMike Frysinger1-0/+4
Since early printk only makes sense/works when the serial driver is built into the kernel, disable the option for this driver when it is going to be built as a module. Otherwise we get build failures due to the ifdef handling. Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-06-22serial: bfin_5xx: add missing spin_lock initMike Frysinger1-0/+1
The Blackfin serial driver never initialized the spin_lock that is part of the serial core structure, but we never noticed because spin_lock's are rarely enabled on UP systems. Yeah lockdep and friends. Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-06-22bfin_jtag_comm: clean up printk usageMike Frysinger1-15/+15
The original patch garned some feedback and a v2 was posted, but that version seems to have been missed when merging the driver. At any rate, this cleans up the printk usage as suggested by Jiri Slaby. Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-06-22parport_pc: set properly the dma_mask for parport_pc deviceFUJITA Tomonori1-0/+3
parport_pc_probe_port() creates the own 'parport_pc' device if the device argument is NULL. Then parport_pc_probe_port() doesn't initialize the dma_mask and coherent_dma_mask of the device and calls dma_alloc_coherent with it. dma_alloc_coherent fails because dma_alloc_coherent() doesn't accept the uninitialized dma_mask: http://lkml.org/lkml/2009/6/16/150 Long ago, X86_32 and X86_64 had the own dma_alloc_coherent implementations; X86_32 accepted a device having dma_mask that is not initialized however X86_64 didn't. When we merged them, we chose to prohibit a device having dma_mask that is not initialized. I think that it's good to require drivers to set up dma_mask (and coherent_dma_mask) properly if the drivers want DMA. Signed-off-by: FUJITA Tomonori <[email protected]> Reported-by: Malcom Blaney <[email protected]> Tested-by: Malcom Blaney <[email protected]> Cc: [email protected] Signed-off-by: Alan Cox <[email protected]> Acked-by: Jeff Garzik <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-06-22parport_pc: after superio probing restore original register valuesJens Rottmann1-6/+25
CONFIG_PARPORT_PC_SUPERIO probes for various superio chips by writing byte sequences to a set of different potential I/O ranges. But the probed ranges are not exclusive to parallel ports. Some of our boards just happen to have a watchdog in one of them. Took us almost a week to figure out why some distros reboot without warning after running flawlessly for 3 hours. For exactly 170 = 0xAA minutes, that is ... Fixed by restoring original values after probing. Also fixed too small request_region() in detect_and_report_it87(). Signed-off-by: Jens Rottmann <[email protected]> Signed-off-by: Alan Cox <[email protected]> Cc: <[email protected]> Acked-by: Jeff Garzik <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-06-22Revert "char: moxa, prevent opening unavailable ports"Linus Torvalds1-6/+1
This reverts commit a90b037583d5f1ae3e54e9c687c79df82d1d34a4, which already got fixed as commit f0e8527726b9e56649b9eafde3bc0fbc4dd2dd47: the same patch (trivial differences) got applied twice. Requested-by: Alan Cox <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-06-22Merge branch 'topic/seq-midi-fix' into for-linusTakashi Iwai1-4/+4
* topic/seq-midi-fix: sound: seq_midi_event: fix decoding of (N)RPN events
2009-06-22Merge branch 'topic/pcm-jiffies-check' into for-linusTakashi Iwai1-1/+1
* topic/pcm-jiffies-check: sound: fix check for return value in snd_pcm_hw_refine
2009-06-22Merge branch 'topic/misc' into for-linusTakashi Iwai1-1/+5
* topic/misc: ALSA: via82xx: add option to disable 500ms delay in snd_via82xx_codec_wait
2009-06-22Merge branch 'topic/hda' into for-linusTakashi Iwai4-61/+71
* topic/hda: ALSA: hda - Make jack-plug notification selectable ALSA: hda - Add digital-mic support to ALC262 auto model ALSA: hda - Fix check of input source type for realtek codecs ALSA: hda - Add quirk for Sony VAIO Z21MN ALSA: hda - Get back Input Source for ALC262 toshiba-s06 model ALSA: hda - Fix unsigned comparison in patch_sigmatel.c
2009-06-22Merge branch 'topic/ctxfi' into for-linusTakashi Iwai9-113/+376
* topic/ctxfi: ALSA: ctxfi - Add PM support ALSA: ctxfi - Allow unknown PCI SSIDs
2009-06-22Merge branch 'topic/asoc' into for-linusTakashi Iwai1-3/+7
* topic/asoc: ASoC: Blackfin: update the bf5xx_i2s_resume parameters ASoC: Blackfin: keep better track of SPORT configuration state
2009-06-22ALSA: hda - Make jack-plug notification selectableTakashi Iwai3-6/+13
Make the jack-plug notification via input layer selectable via Kconfig. This is often unnecessary, and the similr function will be provided using the ALSA control API in near future anyway. Signed-off-by: Takashi Iwai <[email protected]>
2009-06-22fusion: mptsas, fix lock imbalanceJiri Slaby1-2/+2
Fix two typos in mptsas_not_responding_devices. It was mutex_lock instead of unlock. Signed-off-by: Jiri Slaby <[email protected]> Acked-by: "Desai, Kashyap" <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2009-06-22Merge branch 'next-s3c' of git://aeryn.fluff.org.uk/bjdooks/linux into develRussell King4-7/+13
2009-06-22[ARM] S3C: Fix gpio-config off-by-one bugMarek Szyprowski1-1/+1
Fix gpio-config off-by-one bug. Without this patch, touching GPA0 pin on S3C64XX platform causes kernel oops. Reviewed-by: Kyungmin Park <[email protected]> Signed-off-by: Marek Szyprowski <[email protected]> Signed-off-by: Ben Dooks <[email protected]>
2009-06-22[ARM] S3C64XX: add to_irq() support for EINT() GPIOMarek Szyprowski1-0/+6
N group Add to_irq() function to onvert gpio to irq for external interrupt group (GPN). Signed-off-by: Marek Szyprowski <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Signed-off-by: Ben Dooks <[email protected]>
2009-06-22[ARM] S3C64XX: clock.c: fix typo in usb-host clock ctrlbitPeter Korsgaard1-1/+1
The usb-host clock was using the wrong define (the SCLK enable for the usb-host-bus) to change the HCLK register instead of the HCLK_UHOST bit. Signed-off-by: Peter Korsgaard <[email protected]> Signed-off-by: Ben Dooks <[email protected]>
2009-06-22[ARM] S3C64XX: fix HCLK gate definesPeter Korsgaard1-5/+5
A few typos seems to have sneaked into the HCLK gate defines, causing the usb host clock to not get enabled. Fix them according to the reference manual and throw in the 3d accel bit for good measure. Signed-off-by: Peter Korsgaard <[email protected]> Signed-off-by: Ben Dooks <[email protected]>
2009-06-22ALSA: ctxfi - Add PM supportWai Yew CHAY9-107/+354
Added the suspend/resume support to ctxfi driver. The team tested on the following seems ok: AMD Athlon 64 3500+ / ASUS A8N-E / 512MB DDR ATI / Radeon X1300 20k1 & 20k2 cards Signed-off-by: Wai Yew CHAY <[email protected]> Singed-off-by: Ryan RICHARDS <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2009-06-22netfilter: xt_rateest: fix comparison with selfPatrick McHardy1-1/+1
As noticed by T�r�k Edwin <[email protected]>: Compiling the kernel with clang has shown this warning: net/netfilter/xt_rateest.c:69:16: warning: self-comparison always results in a constant value ret &= pps2 == pps2; ^ Looking at the code: if (info->flags & XT_RATEEST_MATCH_BPS) ret &= bps1 == bps2; if (info->flags & XT_RATEEST_MATCH_PPS) ret &= pps2 == pps2; Judging from the MATCH_BPS case it seems to be a typo, with the intention of comparing pps1 with pps2. http://bugzilla.kernel.org/show_bug.cgi?id=13535 Signed-off-by: Patrick McHardy <[email protected]>
2009-06-22netfilter: xt_quota: fix incomplete initializationJan Engelhardt1-0/+1
Commit v2.6.29-rc5-872-gacc738f ("xtables: avoid pointer to self") forgot to copy the initial quota value supplied by iptables into the private structure, thus counting from whatever was in the memory kmalloc returned. Signed-off-by: Jan Engelhardt <[email protected]> Signed-off-by: Patrick McHardy <[email protected]>
2009-06-22netfilter: nf_log: fix direct userspace memory access in proc handlerPatrick McHardy1-5/+11
Signed-off-by: Patrick McHardy <[email protected]>
2009-06-22netfilter: fix some sparse endianess warningsPatrick McHardy2-8/+8
net/netfilter/xt_NFQUEUE.c:46:9: warning: incorrect type in assignment (different base types) net/netfilter/xt_NFQUEUE.c:46:9: expected unsigned int [unsigned] [usertype] ipaddr net/netfilter/xt_NFQUEUE.c:46:9: got restricted unsigned int net/netfilter/xt_NFQUEUE.c:68:10: warning: incorrect type in assignment (different base types) net/netfilter/xt_NFQUEUE.c:68:10: expected unsigned int [unsigned] <noident> net/netfilter/xt_NFQUEUE.c:68:10: got restricted unsigned int net/netfilter/xt_NFQUEUE.c:69:10: warning: incorrect type in assignment (different base types) net/netfilter/xt_NFQUEUE.c:69:10: expected unsigned int [unsigned] <noident> net/netfilter/xt_NFQUEUE.c:69:10: got restricted unsigned int net/netfilter/xt_NFQUEUE.c:70:10: warning: incorrect type in assignment (different base types) net/netfilter/xt_NFQUEUE.c:70:10: expected unsigned int [unsigned] <noident> net/netfilter/xt_NFQUEUE.c:70:10: got restricted unsigned int net/netfilter/xt_NFQUEUE.c:71:10: warning: incorrect type in assignment (different base types) net/netfilter/xt_NFQUEUE.c:71:10: expected unsigned int [unsigned] <noident> net/netfilter/xt_NFQUEUE.c:71:10: got restricted unsigned int net/netfilter/xt_cluster.c:20:55: warning: incorrect type in return expression (different base types) net/netfilter/xt_cluster.c:20:55: expected unsigned int net/netfilter/xt_cluster.c:20:55: got restricted unsigned int const [usertype] ip net/netfilter/xt_cluster.c:20:55: warning: incorrect type in return expression (different base types) net/netfilter/xt_cluster.c:20:55: expected unsigned int net/netfilter/xt_cluster.c:20:55: got restricted unsigned int const [usertype] ip Signed-off-by: Patrick McHardy <[email protected]>
2009-06-22netfilter: nf_conntrack: fix conntrack lookup racePatrick McHardy1-2/+4
The RCU protected conntrack hash lookup only checks whether the entry has a refcount of zero to decide whether it is stale. This is not sufficient, entries are explicitly removed while there is at least one reference left, possibly more. Explicitly check whether the entry has been marked as dying to fix this. Signed-off-by: Patrick McHardy <[email protected]>
2009-06-22netfilter: nf_conntrack: fix confirmation race conditionPatrick McHardy1-1/+8
New connection tracking entries are inserted into the hash before they are fully set up, namely the CONFIRMED bit is not set and the timer not started yet. This can theoretically lead to a race with timer, which would set the timeout value to a relative value, most likely already in the past. Perform hash insertion as the final step to fix this. Signed-off-by: Patrick McHardy <[email protected]>
2009-06-22netfilter: nf_conntrack: death_by_timeout() fixEric Dumazet1-2/+8
death_by_timeout() might delete a conntrack from hash list and insert it in dying list. nf_ct_delete_from_lists(ct); nf_ct_insert_dying_list(ct); I believe a (lockless) reader could *catch* ct while doing a lookup and miss the end of its chain. (nulls lookup algo must check the null value at the end of lookup and should restart if the null value is not the expected one. cf Documentation/RCU/rculist_nulls.txt for details) We need to change nf_conntrack_init_net() and use a different "null" value, guaranteed not being used in regular lists. Choose very large values, since hash table uses [0..size-1] null values. Signed-off-by: Eric Dumazet <[email protected]> Acked-by: Pablo Neira Ayuso <[email protected]> Signed-off-by: Patrick McHardy <[email protected]>
2009-06-22[S390] Update default configuration.Martin Schwidefsky1-18/+54
Signed-off-by: Martin Schwidefsky <[email protected]>
2009-06-22[S390] kprobes: defer setting of ctlblk stateHeiko Carstens1-11/+7
get_krobe_ctlblk returns a per cpu kprobe control block which holds the state of the current cpu wrt to kprobe. When inserting/removing a kprobe the state of the cpu which replaces the code is changed to KPROBE_SWAP_INST. This however is done when preemption is still enabled. So the state of the current cpu doesn't necessarily reflect the real state. To fix this move the code that changes the state to non-preemptible context. Reported-by: Ananth N Mavinakayanahalli <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2009-06-22[S390] Enable tick based perf_counter on s390.Martin Schwidefsky3-0/+15
Signed-off-by: Martin Schwidefsky <[email protected]>
2009-06-22[S390] dasd: fix refcounting in dasd_change_stateSebastian Ott1-3/+5
To set a dasd online dasd_change_state is called twice. The first cycle will schedule initial analysis of the device, set the rc to -EAGAIN and will not touch the device state any more. The initial analysis will in turn call dasd_change_state to increase the state to the final DASD_STATE_ONLINE. If the dasd_change_state on the second thread outruns the other one both finish with the state set to DASD_STATE_ONLINE and the device refcount will be decreased by 2. Fix this by leaving dasd_change_state on rc == -EAGAIN so that the refcount will always be decreased by 1. Signed-off-by: Sebastian Ott <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2009-06-22[S390] lockless idle time accountingMartin Schwidefsky3-17/+35
Replace the spinlock used in the idle time accounting with a sequence counter mechanism analog to seqlock. Signed-off-by: Martin Schwidefsky <[email protected]>
2009-06-22[S390] driver_data accessMartin Schwidefsky7-13/+13
Replace the remaining direct accesses to the driver_data pointer with calls to the dev_get_drvdata() and dev_set_drvdata() functions. Signed-off-by: Martin Schwidefsky <[email protected]>
2009-06-22[S390] pm: fix build error for !SMPHeiko Carstens1-2/+4
Fix build error for !SMP: arch/s390/power/built-in.o: In function `swsusp_arch_resume': (.text+0x1b4): undefined reference to `smp_get_phys_cpu_id' arch/s390/power/built-in.o: In function `swsusp_arch_resume': (.text+0x288): undefined reference to `smp_switch_boot_cpu_in_resume' make: *** [.tmp_vmlinux1] Error 1 Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2009-06-22[S390] dasd_pm: fix stop flag handlingStefan Haberland2-10/+12
The stop flags are handled in the generic restore function so the stop flag is removed also for FBA and DIAG devices. Signed-off-by: Stefan Haberland <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2009-06-22[S390] ap/zcrypt: Suspend/Resume ap bus and zcryptFelix Beck1-2/+83
Add Suspend/Resume support to ap bus and zcrypt. All enhancements are done in the ap bus. No changes in the crypto card specific part are necessary. Signed-off-by: Felix Beck <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2009-06-22[S390] qdio: Sanitize do_QDIO sanity checksJan Glauber2-8/+3
Remove unneeded sanity checks from do_QDIO since this is the hot path. Change the type of bufnr and count to unsigned int so the check for the maximum value works. Reported-by: Roel Kluin <[email protected]> Signed-off-by: Jan Glauber <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2009-06-22[S390] qdio: leave inbound SBALs primedJan Glauber1-7/+0
It is not required to change the state of primed SBALs. Leaving them primed saves a SQBS instruction under z/VM. Signed-off-by: Jan Glauber <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2009-06-22[S390] qdio: merge AI tasklet into interrupt handlerJan Glauber1-44/+21
Since the adapter interrupt tasklet only schedules the queue tasklets and contains no code that requires serialization in can be merged with the adapter interrupt handler. That possibly safes some CPU cycles. Signed-off-by: Jan Glauber <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2009-06-22[S390] qdio: extract all primed SBALs at onceJan Glauber1-28/+6
For devices without QIOASSIST primed SBALS were extracted in a loop. Remove the loop since get_buf_states can already return more than one primed SBAL. Signed-off-by: Jan Glauber <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2009-06-22[S390] qdio: fix check for running under z/VMJan Glauber1-35/+13
The check whether qdio runs under z/VM was incorrect since SIGA-Sync is not set if the device runs with QIOASSIST. Use MACHINE_IS_VM instead to prevent polling under z/VM. Merge qdio_inbound_q_done and tiqdio_is_inbound_q_done. Signed-off-by: Jan Glauber <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2009-06-22[S390] qdio: move adapter interrupt tasklet codeJan Glauber4-80/+75
Move the adapter interrupt tasklet function to the qdio main code since all the functions used by the tasklet are located there. Signed-off-by: Jan Glauber <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2009-06-22[S390] Use del_timer instead of del_timer_syncMichael Holzheu1-1/+1
When syncing the sclp console queue, we call del_timer_sync() while holding the "sclp_con_lock" spinlock. This lock is also taken in the timer function "sclp_console_timeout". Therefore the sync version of del_timer() cannot be used here. Because the synchronous deletion of the timer is only needed in the suspend callback and in that case only one CPU is remaining and therefore it is not possible that the timer function is running in parallel, we can safely use del_timer() instead of del_timer_sync(). Signed-off-by: Michael Holzheu <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2009-06-22[S390] s390: remove DEBUG_MALLOCPekka Enberg1-9/+0
The kernel now has kmemleak and kmemtrace so there's no reason to keep this ugly s390 hack around. I am not sure how it's supposed to work on SMP anyway as it uses a global variable to temporarily store the return value of all kmalloc() calls: void *b; #define kmalloc(x...) (PRINT_INFO(" kmalloc %p\n",b=kmalloc(x)),b) Cc: <[email protected]> Cc: Heiko Carstens <[email protected]> Signed-off-by: Pekka Enberg <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2009-06-22[S390] vt220 console: convert from bootmem to slabHeiko Carstens1-13/+5
The slab allocator is earlier available so convert the bootmem allocations to slab/gfp allocations. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2009-06-22[S390] sclp console: convert from bootmem to slabHeiko Carstens1-3/+2
The slab allocator is earlier available so convert the bootmem allocations to slab/gfp allocations. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2009-06-22[S390] 3270 console: convert from bootmem to slabHeiko Carstens2-38/+7
The slab allocator is earlier available so convert the bootmem allocations to slab/gfp allocations. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2009-06-22[S390] 3215 console: convert from bootmem to slabHeiko Carstens1-11/+7
The slab allocator is earlier available so convert the bootmem allocations to slab/gfp allocations. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
2009-06-22[S390] time: convert from bootmem to slabHeiko Carstens2-16/+5
The slab allocator is earlier available so convert the bootmem allocations to slab/gfp allocations. Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>