Input: i8042 - restore control register when enabling port fails
When enabling interrupts for a port fails, the interrupt enable and
port enable bits remain set in i8042_ctr. Later writes of i8042_ctr
to the hardware could accidentally retry enabling interrupts. Clear
the bits on failure.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Input: i8042 - give more trust to PNP data on i386
On some boxes that don't have PS/2 mice connected at startup BIOS
completely disables AUX port and attempts to access it result in
hosed keyboard. Historically we do not trust ACPI/PNP data on
i386 and try to poke AUX port even if we did not find an active
PNP node for it. However in cases when BIOS writers got KBD port
properly described we can assume that they did the right thing
for AUX port as well.
These serial touchscreens are found on some Fujitsu lifebook
P-series laptops, and the B6210. Using this requires a new
version of inputattach and doing:
inputattach -fjt /dev/ttyS0
Big thanks to Stephen Hemminger for testing it and making it
work on his B6210 laptop.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Semih Hazar [Wed, 18 Jul 2007 04:36:04 +0000 (00:36 -0400)]
Input: ads7846 - re-check pendown status before reporting events
Pendown status from the PENIRQ pin is currently read only at the beginning
of a sample set. If the pen is lifted just after sampling has began then
sampled values become wrong.
This patch adds an optional platform penirq_recheck_delay attribute. If
non-zero, samples are only reported to the input subsystem if PENIRQ is
still active that long after the samples taken.
Signed-off-by: Semih Hazar <semih.hazar@indefia.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Semih Hazar [Wed, 18 Jul 2007 04:35:56 +0000 (00:35 -0400)]
Input: ads7846 - introduce sample settling delay
The ads7846 driver has support for filtering, but when the chip gets
deselected between samples this causes noise. This patch adds support
for an optional settling delay time, so that two consecutive samples
will be taken with the specified delay time apart. This ensures that
the chip won't be deselected, so the noise won't appear.
Filtering can still be done, but will have less work to do since each
time a new sample is taken the same delay applies.
Signed-off-by: Semih Hazar <semih.hazar@indefia.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Jan Kratochvil [Wed, 18 Jul 2007 04:35:40 +0000 (00:35 -0400)]
Input: xpad - add support for leds on xbox 360 pad
Export LEDs on Xbox360 pad via led subsystem as a single device in
/sys/class/leds/xpad[0-9]+.
Xbox360 pad has four leds, which form a circle. Unfortunately the leds
can't be controlled independently and can only display a predefined
set of patterns (for example one is turned on wile others are off or
a rotating pattern - 1-2-3-4). To activate a pattern one needs to send
a specific command to the device (see http://www.free60.org/wiki/Gamepad).
Led subsystem allows us to set brightness, but there is nothing like
brightness on this device. So brightness is actually interpreted as
the command (only values between 0 and 14 are accepted).
Signed-off-by: Jan Kratochvil <honza@jikos.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Paul Mundt [Wed, 18 Jul 2007 00:18:36 +0000 (09:18 +0900)]
slob: Kill off duplicate kzalloc() definition.
With the slab zeroing allocations cleanups Christoph stubbed in a generic
kzalloc(), which was missed on SLOB. Follow the SLAB/SLUB changes and
kill off the __kzalloc() wrapper that SLOB was using.
Reported-by: Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The old IDE driver is not ready to take generic SCSI commands, even if
it uses them for some specific issues (ie the tray open/close ioctls for
IDE CD-ROM's). Pointed out by Bartlomiej.
I'm sure we'll have it fixed properly soon enough, but for now we should
not allow it to cause problems.
Merge branch 'bsg' of git://git.kernel.dk/data/git/linux-2.6-block
* 'bsg' of git://git.kernel.dk/data/git/linux-2.6-block:
bsg: fix missing space in version print
Don't define empty struct bsg_class_device if !CONFIG_BLK_DEV_BSG
bsg: Kconfig updates
bsg: minor cleanup
bsg: device hash table cleanup
bsg: fix initialization error handling bugs
bsg: mark FUJITA Tomonori as bsg maintainer
bsg: convert to dynamic major
bsg: address various review comments
Merge branch 'isdn-cleanup' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
* 'isdn-cleanup' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
[ISDN] HiSax hfc_pci: minor cleanups
[ISDN] HiSax bkm_a4t: split setup into two smaller functions
[ISDN] HiSax enternow: split setup into 3 smaller functions
[ISDN] HiSax netjet_u: split setup into 3 smaller functions
[ISDN] HiSax netjet_s: code movement, prep for hotplug
[ISDN] HiSax: move card state alloc/setup code into separate functions
[ISDN] HiSax: move card setup into separate function
Merge branch 'uninit-var' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
* 'uninit-var' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
arch/i386/* fs/* ipc/*: mark variables with uninitialized_var()
drivers/*: mark variables with uninitialized_var()
Merge branch 'warnings' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
* 'warnings' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
drivers/atm/ambassador: kill uninit'd var warning, and fix bug
[libata] sata_mv: use pci_try_set_mwi()
drivers/infiniband/hw/mthca/mthca_qp: kill uninit'd var warning
drivers/net/wan/sbni: kill uninit'd var warning
drivers/mtd/ubi/eba: minor cleanup: tighten scope of a local var
drivers/telephony/ixj: cleanup and fix gcc warning
drivers/net/wan/pc300_drv: fix bug caught by gcc warning
drivers/usb/misc/auerswald: fix status check, remove redundant check
[netdrvr] eepro100, ne2k-pci: abort resume if pci_enable_device() fails
[netdrvr] natsemi: Fix device removal bug
kernel/auditfilter: kill bogus uninit'd-var compiler warning
Al Viro [Tue, 17 Jul 2007 21:29:46 +0000 (22:29 +0100)]
smp_call_function_single() should be a macro on UP
... or we end up with header include order problems from hell.
E.g. on m68k this is 100% fatal - local_irq_enable() there
wants preempt_count(), which wants task_struct fields, which
we won't have when we are in smp.h pulled from sched.h.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Garzik [Mon, 16 Jul 2007 01:48:07 +0000 (21:48 -0400)]
[ISDN] HiSax hfc_pci: minor cleanups
* trim trailing whitespace
* remove CONFIG_PCI ifdefs, this driver is always PCI (Kconfig enforced)
* remove return statements at the tail of a function
* remove indentation levels by returning an error code immediately.
Makes the code much more readable, and easier to update to PCI hotplug
API.
Jeff Garzik [Sun, 15 Jul 2007 08:25:35 +0000 (04:25 -0400)]
[ISDN] HiSax netjet_s: code movement, prep for hotplug
1) Remove CONFIG_PCI ifdefs. PCI is required in Kconfig.
2) Break up setup_netjet_s() into three separate internal functions.
This helps facilitate upcoming use of PCI hotplug API, and in addition
makes the code much easier to follow.
No code is changed, just moved around. I even kept the out-of-favor
"return(0)" style used in the current source code.
Fixes the following build error:
CC sound/pci/mixart/mixart_hwdep.o
sound/pci/mixart/mixart_hwdep.c: In function ‘mixart_hwdep_dsp_load’:
sound/pci/mixart/mixart_hwdep.c:610: error: implicit declaration of function ‘vmalloc’
sound/pci/mixart/mixart_hwdep.c:617: error: implicit declaration of function ‘vfree’
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
CC drivers/parisc/hppb.o
drivers/parisc/hppb.c: In function ‘hppb_probe’:
drivers/parisc/hppb.c:73: error: implicit declaration of function ‘ccio_request_resource’
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Garzik [Tue, 17 Jul 2007 09:39:58 +0000 (05:39 -0400)]
drivers/*: mark variables with uninitialized_var()
Mark variables in drivers/* with uninitialized_var() if such a warning
appears, and analysis proves that the var is initialized properly on all
paths it is used.
Jeff Garzik [Tue, 17 Jul 2007 06:32:21 +0000 (02:32 -0400)]
drivers/atm/ambassador: kill uninit'd var warning, and fix bug
An uninitialized variable warning illuminated an area where indeed the
variable was being used without initialization. Unfortunately, after
verifying all such paths were fixed, the warning still appears. So we
follow the initialization practice of other variables in this function.
Jeff Garzik [Tue, 17 Jul 2007 06:03:49 +0000 (02:03 -0400)]
drivers/infiniband/hw/mthca/mthca_qp: kill uninit'd var warning
drivers/infiniband/hw/mthca/mthca_qp.c: In function
‘mthca_tavor_post_send’:
drivers/infiniband/hw/mthca/mthca_qp.c:1594: warning: ‘f0’ may be used
uninitialized in this function
drivers/infiniband/hw/mthca/mthca_qp.c: In function
‘mthca_arbel_post_send’:
drivers/infiniband/hw/mthca/mthca_qp.c:1949: warning: ‘f0’ may be used
uninitialized in this function
Initializing 'f0' is not strictly necessary in either case, AFAICS.
I was considering use of uninitialized_var(), but looking at the
complex flow of control in each function, I feel it is wiser and
safer to simply zero the var and be certain of ourselves.
Jeff Garzik [Tue, 17 Jul 2007 05:35:08 +0000 (01:35 -0400)]
drivers/telephony/ixj: cleanup and fix gcc warning
1) Fix gcc uninit'd var warnings by adding 'default' switch stmt labels
in two cases. It was lightning-strikes unlikely that a problem would
ever arise, but not impossible.
Jeff Garzik [Tue, 17 Jul 2007 04:01:09 +0000 (00:01 -0400)]
[netdrvr] natsemi: Fix device removal bug
This episode illustrates how an overused warning can train people to
ignore that warning, which winds up hiding bugs.
The warning
drivers/net/natsemi.c: In function ‘natsemi_remove1’:
drivers/net/natsemi.c:3222: warning: ignoring return value of
‘device_create_file’, declared with attribute warn_unused_result
is oft-ignored, even though at close inspection one notices this occurs
in the /remove/ function, not normally where creation occurs. A quick
s/create/remove/ and we are fixed, with the warning gone.
kernel/auditfilter.c: In function ‘audit_receive_filter’:
kernel/auditfilter.c:1213: warning: ‘ndw’ may be used uninitialized in this function
kernel/auditfilter.c:1213: warning: ‘ndp’ may be used uninitialized in this function
...with a simplification of the code. audit_put_nd() can accept NULL
arguments, just like kfree(). It is cleaner to init two existing vars
to NULL, remove the redundant test variable 'putnd_needed' branches, and call
audit_put_nd() directly.
Introduce is_owner_or_cap() to wrap CAP_FOWNER use with fsuid check
Introduce is_owner_or_cap() macro in fs.h, and convert over relevant
users to it. This is done because we want to avoid bugs in the future
where we check for only effective fsuid of the current task against a
file's owning uid, without simultaneously checking for CAP_FOWNER as
well, thus violating its semantics.
[ XFS uses special macros and structures, and in general looked ...
untouchable, so we leave it alone -- but it has been looked over. ]
The (current->fsuid != inode->i_uid) check in generic_permission() and
exec_permission_lite() is left alone, because those operations are
covered by CAP_DAC_OVERRIDE and CAP_DAC_READ_SEARCH. Similarly operations
falling under the purview of CAP_CHOWN and CAP_LEASE are also left alone.
Signed-off-by: Satyam Sharma <ssatyam@cse.iitk.ac.in> Cc: Al Viro <viro@ftp.linux.org.uk> Acked-by: Serge E. Hallyn <serge@hallyn.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (80 commits)
KVM: Use CPU_DYING for disabling virtualization
KVM: Tune hotplug/suspend IPIs
KVM: Keep track of which cpus have virtualization enabled
SMP: Allow smp_call_function_single() to current cpu
i386: Allow smp_call_function_single() to current cpu
x86_64: Allow smp_call_function_single() to current cpu
HOTPLUG: Adapt thermal throttle to CPU_DYING
HOTPLUG: Adapt cpuset hotplug callback to CPU_DYING
HOTPLUG: Add CPU_DYING notifier
KVM: Clean up #includes
KVM: Remove kvmfs in favor of the anonymous inodes source
KVM: SVM: Reliably detect if SVM was disabled by BIOS
KVM: VMX: Remove unnecessary code in vmx_tlb_flush()
KVM: MMU: Fix Wrong tlb flush order
KVM: VMX: Reinitialize the real-mode tss when entering real mode
KVM: Avoid useless memory write when possible
KVM: Fix x86 emulator writeback
KVM: Add support for in-kernel pio handlers
KVM: VMX: Fix interrupt checking on lightweight exit
KVM: Adds support for in-kernel mmio handlers
...
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
[IA64] Clean away some code inside some non-existent CONFIG ifdefs
[IA64] ar.itc access must really be after xtime_lock.sequence has been read
[IA64] correctly count CPU objects in the ia64/sn hwperf interface
[IA64] arbitary speed tty ioctl support
[IA64] use machvec=dig on hpzx1 platforms
Al Viro [Tue, 17 Jul 2007 07:49:35 +0000 (08:49 +0100)]
missing exports of csum_...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Tue, 17 Jul 2007 07:49:35 +0000 (08:49 +0100)]
sparc32 has working dma-mapping only with CONFIG_PCI
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Tue, 17 Jul 2007 07:49:35 +0000 (08:49 +0100)]
saner typechecking in generic unaligned.h
Verify that types would match for assignment (under sizeof, so we are safe from
side effects or any code actually getting generated), then explicitly cast
everywhere to the fixed-sized types. Kills a bunch of bogus warnings about
constants being truncated (gcc, sparse), finds a pile of endianness problems
hidden by old noise (sparse).
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
md: change bitmap_unplug and others to void functions
bitmap_unplug only ever returns 0, so it may as well be void. Two callers try
to print a message if it returns non-zero, but that message is already printed
by bitmap_file_kick.
write_page returns an error which is not consistently checked. It always
causes BITMAP_WRITE_ERROR to be set on an error, and that can more
conveniently be checked.
When the return of write_page is checked, an error causes bitmap_file_kick to
be called - so move that call into write_page - and protect against recursive
calls into bitmap_file_kick.
bitmap_update_sb returns an error that is never checked.
So make these 'void' and be consistent about checking the bit.
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
md: check that internal bitmap does not overlap other data
We current completely trust user-space to set up metadata describing an
consistant array. In particlar, that the metadata, data, and bitmap do not
overlap.
But userspace can be buggy, and it is better to report an error than corrupt
data. So put in some appropriate checks.
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Don't use 'unsigned' variable to track sync vs non-sync IO, as the only thing
we want to do with them is a signed comparison, and fix up the comment which
had become quite wrong.
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
md: improve message about invalid superblock during autodetect
People try to use raid auto-detect with version-1 superblocks (which is not
supported) and get confused when they are told they have an invalid
superblock.
So be more explicit, and say it it is not a valid v0.90 superblock.
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jan Engelhardt [Tue, 17 Jul 2007 11:06:11 +0000 (04:06 -0700)]
Use menuconfig objects II - MD
Change Kconfig objects from "menu, config" into "menuconfig" so
that the user can disable the whole feature without having to
enter the menu first.
Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Acked-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tony Lindgren [Tue, 17 Jul 2007 11:06:09 +0000 (04:06 -0700)]
OMAP: add TI TWL92330/Menelaus Power Management chip driver
Add Texas Instruments TWL92330/Menelaus Power Management chip driver. This
includes voltage regulators, Dual slot memory card tranceivers and
real-time clock(RTC).
The support for RTC is integrated with this driver only; it is not separate
module. Passes 'rtctest' on OMAP H4 EVM, other than lack of "periodic"
(1/N second) IRQs. System wakeup alarms (from suspend-to-RAM) work too.
The battery keeps the RTC active over power off, so once you set clock
(rdate/ntpdate/etc, then "hwclock -w") then RTC_HCTOSYS at boot time will
behave as expected.
Imre Deak [Tue, 17 Jul 2007 11:05:54 +0000 (04:05 -0700)]
OMAP: add TI OMAP framebuffer driver
- Add Texas Instruments OMAP framebuffer driver. This driver is being used
for various OMAP1/2 series based boards and products e.g Nokia N800 Internet
Tablet, H4, H3, Siemens SX1 etc.
- LCD panel registration and controller code is separated in different file
and interfaces.
Signed-off-by: Trilok Soni <soni.trilok@gmail.com> Cc: Tony Lindgren <tony@atomide.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The Cell Broadband Engine contains a 64-bit PowerPC core with 2 hardware
threads (called PPEs) and 8 Synergistic Processing Engines (called SPEs).
When booting Linux, 2 penguins logos are shown on the graphical console by
the standard frame buffer console logo code.
To emphasize the existence of the SPEs (which can be used under Linux), we
added a second row of (smaller) helper penguin logos, one for each SPE.
A sample screenshot can be found at
http://www.kernel.org/pub/linux/kernel/people/geoff/cell/debian-penguin-shot.png
(or on the ps3linux T-shirts we wore at OLS :-)
This patch:
Extract the code to draw one line of logos into fb_show_logo_line()
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Acked-By: James Simmons <jsimmons@infradead.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
VGA console driver can misunderstand the current mode(Text/Graphic) under
"disable console blanking" setting. When "disable console blank" is set
(blankinterval=0), "do_unblank_screen()" function returns without changing
"blank_state", and when "blank_state" is "blank_off", "do_blank_screen()
function returns without invoking sw->con_blank() function. That's why VGA
console driver can misunderstand the current mode.
Signed-off-by: Nobuhiro Tachino <ntachino@redhat.com> Signed-off-by: Taku Izumi <izumi2005@soft.fujitsu.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: "Luck, Tony" <tony.luck@intel.com> Acked-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Paul Mundt [Tue, 17 Jul 2007 11:05:48 +0000 (04:05 -0700)]
fb: epson1355fb: kill off dead sh support
The SH board that was the only user for this code was removed entirely from
the kernel quite some time ago, so there's no reason to leave the stubs in
place. Additionally this driver was completely broken anyways, so there's
not really a lot of point in fixing it up either.
I can't imagine that this driver gets any testing on ARM either, given that
FB_BLANK_UNBLANKING doesn't exist, and kills the build regardless of which
platform is compiling. This fixes that, too.
It wouldn't be a lot of work to finish the platform device conversion and
go with a generic 8-bit read/write_reg and kill off the architecture
dependence completely, should someone have any use for this driver.
Signed-off-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
- the pseudo_palette is only 16 elements long.
- do not write to the pseudo_palette if regno (array index) is more than 15
- remove code that writes to the 17th entry of the pseudo_palette
Signed-off-by: Antonino Daplas <adaplas@gmail.com> Acked-by: Petr Vandrovec <vandrove@vc.cvut.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>