Allows a userspace metadata handler to take action upon detecting a device
failure.
Based on an original patch by Neil Brown.
Changes:
-added blocked_wait waitqueue to rdev
-don't qualify Blocked with Faulty always let userspace block writes
-added md_wait_for_blocked_rdev to wait for the block device to be clear, if
userspace misses the notification another one is sent every 5 seconds
-set MD_RECOVERY_NEEDED after clearing "blocked"
-kill DoBlock flag, just test mddev->external
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
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>
Found when trying to reassemble an active externally managed array. Without
this check we hit the more noisy "sysfs duplicate" warning in the later call
to kobject_add.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
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>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
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>
When setting an array to 'readonly' or to 'active' via sysfs, we must make the
appropriate set_disk_ro call too.
Also when switching to "read_auto" (which is like readonly, but blocks on the
first write so that metadata can be marked 'dirty') we need to be more careful
about what state we are changing from.
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>
'safemode' relates to marking an array as 'clean' if there has been no write
traffic for a while (a couple of seconds), to reduce the chance of the array
being found dirty on reboot.
->safemode is set to '1' when there have been no write for a while, and it
gets set to '0' when the superblock is updates with the 'clean' flag set.
This requires a few fixes for 'external' metadata:
- When an array is set to 'clean' via sysfs, 'safemode' must be cleared.
- when we write to an array that has 'safemode' set (there must have been
some delay in updating the metadata), we need to clear safemode.
- Don't try to update external metadata in md_check_recovery for safemode
transitions - it won't work.
Also, don't try to support "immediate safe mode" (safemode==2) for external
metadata, it cannot really work (the safemode timeout can be set very low if
this is really needed).
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>
I keep finding problems where an mddev gets reused and some fields has a value
from a previous usage that confuses the new usage. So clear all fields that
could possible need clearing when calling do_md_stop.
Also initialise the 'level' of a new array to LEVEL_NONE (which isn't 0).
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>
All the metadata update processing for external metadata is on in user-space
or through the sysfs interfaces, so make "md_update_sb" a no-op in that case.
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>
rdev->mddev is no longer valid upon return from entry->store() when the
'remove' command is given.
Cc: <stable@kernel.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
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>
FB_PXA_SMARTPANEL defaults to "n" and removed the cast to void *.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Eric Miao <eric.miao@marvell.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
the new_regs stuff has been removed, and all the setup (modification to those
fbi->reg_*) is protected with IRQ disabled
* disable IRQ is too heavy here, provided that no IRQ context will
touch the fbi->reg_* and the only possible contending place is
in the CPUFREQ_POSTCHANGE (task context), a mutex will be better,
leave this for future improvement
Signed-off-by: eric miao <eric.miao@marvell.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: eric miao <eric.miao@marvell.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
using __raw_{read,write}l() everywhere looks messy, introduce
lcd_{read,write}l() to get this cleaned up a bit
Signed-off-by: eric miao <eric.miao@marvell.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Reasons:
1. straight forward: the name "LCD_COLOR_DSTN_16BPP" is much better
than "LCCR0_Pas | LCCR0_Color | LCCR0_Dual"
2. by defining LCD connection types as constants, it allows only
valid possibilities
3. by removing the dependency of register bits definitions, those
can be later moved into the body of pxafb.c, instead of having
a regs-lcd.h around
Currently, only lubbock, mainstone, zylonite and littleton have been
modified to support these types (see coming patches after this).
Other platforms are encouraged to change their way describing the
LCD controller connections.
Signed-off-by: eric miao <eric.miao@marvell.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Use structure and array for palette buffer and dma descriptors to:
1. better organize code for future expansion like overlays
2. separate palette and dma descriptors from frame buffer
Signed-off-by: eric miao <eric.miao@marvell.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This is part of the effort moving peripheral registers outside of pxa-regs.h,
and using ioremap() make it possible the same IP can be re-used on different
processors with different registers space
As a result, the fixed mapping in pxa_map_io() is removed.
The regs-lcd.h can actually moved to where closer to pxafb.c but some of its
bit definitions are directly used by various platform code, though this is not
a good style.
Signed-off-by: eric miao <eric.miao@marvell.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
So to get a better coding style and centralize the pxafb parameters
handling code.
Signed-off-by: eric miao <eric.miao@marvell.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: eric miao <eric.miao@marvell.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: eric miao <eric.miao@marvell.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
pxafb_parse_options() has very long lines exceeding far beyond 80 characters,
which makes the function looks bad. Un-nest it into smaller functions and use
a temporary string for only what has been overridden instead of the whole
dev_info() message to reduce the line a bit more.
Signed-off-by: eric miao <eric.miao@marvell.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Make the baud rate divisor calculation code a bit more readable and add a
few comments.
Also fix wrong debug information being displayed when !new_1 and
max_speed_hz == 0.
[david-b@pacbell.net: fix it]
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: "Janesh Ramakrishnan" <jramakrishnan@neuropace.com>
Acked-by David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
V4L/DVB (7798): tuners/Kconfig: Change config name and help to reflect dynamic load for tuners
V4L/DVB (7794): cx88: Fix a warning
V4L/DVB (7792): ivtv: correct misspelled "HIMEM4G" to "HIGHMEM4G" in error message
V4L/DVB (7791): ivtv: POLLHUP must be returned on eof
V4L/DVB (7789b): Fix merge conflicts
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Commit c3c52bce69 ("edac: fix module
initialization on several modules 2nd time") added a call to opstate_init
but did not include linux/edac.h that declares it.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Some Kconfig names were changed. This patch reapplies the rename script,
fixing for those drivers merged after the patch that renamed those
items.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
[libata] linux/libata.h: reorganize ata_device struct members a bit
ahci: SB600 ahci can't do MSI, blacklist that capability
libata: More TSSTcorp pain, keep in sync with legacy IDE
pata_via: Fix 6410 misdetect
[libata] pata_atiixp: fix PIO timing data misprogramming
Legacy HP ia64 platforms currently cannot provide
/proc/cpuinfo/physical_id due to legacy SAL/PAL implementations.
However, that physical topology information can be obtained
via ACPI.
Provide an interface that gives ACPI one last chance to provide
physical_id for these legacy platforms. This logic only comes
into play iff:
- ACPI actually provides slot information for the CPU
- we lack a valid socket_id
Otherwise, we don't do anything.
Since x86 uses the ACPI processor driver as well, we provide a nop
stub function for arch_fix_phys_package_id() in asm-x86/topology.h
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (28 commits)
V4L-DVB(7789a): cx18: fix symbol conflict with ivtv driver
V4L/DVB (7789): tuner: remove static dependencies on analog tuner sub-modules
V4L/DVB (7785): [2.6 patch] make mt9{m001,v022}_controls[] static
V4L/DVB (7786): cx18: new driver for the Conexant CX23418 MPEG encoder chip
V4L/DVB (7783): drivers/media/dvb/frontends/s5h1420.c: printk fix
V4L/DVB (7782): pvrusb2: Driver is no longer experimental
V4L/DVB (7781): pvrusb2-dvb: include dvb support by default and update Kconfig help text
V4L/DVB (7780): pvrusb2: always enable support for OnAir Creator / HDTV USB2
V4L/DVB (7779): pvrusb2-dvb: quiet down noise in kernel log for feed debug
Rename common tuner Kconfig names to use the same
Fix V4L/DVB core help messages
V4L/DVB (7769): Move other terrestrial tuners to common/tuners
V4L/DVB (7768): reorganize some DVB-S Kconfig items
V4L/DVB(7767): Move tuners to common/tuners
V4L/DVB (7766): saa7134: add another PCI ID for Beholder M6
V4L/DVB (7765): Add support for Beholder BeholdTV H6
V4L/DVB (7763): ivtv: add tuner support for the AverMedia M116
V4L/DVB (7762): ivtv: fix tuner detection for PAL-N/Nc
V4L/DVB (7761): ivtv: increase the DMA timeout from 100 to 300 ms
V4L/DVB (7759): ivtv: increase version number to 1.2.1
...
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
i2c: Convert most new-style drivers to use module aliasing
i2c: Add support for device alias names
i2c-amd756-s4882: Fix an error path
i2c: Drop unused RTC driver IDs
i2c/tps65010: Add missing intialization of client data
i2c-sis5595: Minor cleanups in sis5595_access
i2c-piix4: Minor cleanups
i2c: Spelling fix (successful)
i2c-stub: No newline in parameter description
LD drivers/media/video/built-in.o
drivers/media/video/cx18/built-in.o: In function `get_service_set':
/home/v4l/tokernel/git/drivers/media/video/cx18/cx18-ioctl.c:118: multiple definition of `get_service_set'
drivers/media/video/ivtv/built-in.o:/home/v4l/tokernel/git/drivers/media/video/ivtv/ivtv-ioctl.c:119: first defined here
drivers/media/video/cx18/built-in.o: In function `expand_service_set':
/home/v4l/tokernel/git/drivers/media/video/cx18/cx18-ioctl.c:92: multiple definition of `expand_service_set'
drivers/media/video/ivtv/built-in.o:/home/v4l/tokernel/git/drivers/media/video/ivtv/ivtv-ioctl.c:92: first defined here
drivers/media/video/cx18/built-in.o: In function `service2vbi':
/home/v4l/tokernel/git/drivers/media/video/cx18/cx18-ioctl.c:44: multiple definition of `service2vbi'
drivers/media/video/ivtv/built-in.o:/home/v4l/tokernel/git/drivers/media/video/ivtv/ivtv-ioctl.c:42: first defined here
make[2]: ** [drivers/media/video/built-in.o] Erro 1
make[1]: ** [drivers/media/video] Erro 2
make: ** [drivers/media/] Erro 2
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch makes the needlessly global mt9{m001,v022}_controls[] static.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Many thanks to Steve Toth from Hauppauge and Nattu Dakshinamurthy from
Conexant for their support. I am in particular thankful to Hauppauge
since without their help this driver would not exist. It should also
be noted that Steve did the work to get the DVB part up and running.
Thank you!
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: G. Andrew Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/dvb/frontends/s5h1420.c: In function `s5h1420_setsymbolrate':
drivers/media/dvb/frontends/s5h1420.c:484: warning: long long unsigned int format, u64 arg (arg 2)
We do not know what type the architecture uses for u64.
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This driver has been in-kernel and reasonably stable for well over a
year. It is in a stable form and is known to work well. Remove its
experimental status.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This was a build option in the past, to avoid conflicts with the cxusb module
for digital televsion support. Now that dtv mode support has been merged into
pvrusb2, the OnAir devices are fully supported by this single module. This no
longer should be a build option.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Get rid of the noise in dmesg during dvb feed changes,
unless the appropriate debug trace flag is enabled.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Those tuners are currently used only under media/dvb. However,
they can support also analog TV. Better to move them to the same place
as the other hybrid tuners. This would make easier to use those tuners also
by analog drivers.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
There are some DVB-S tuners together with DVB-S tags, while
others together with tuners. Better to have all of them together.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
There were several issues in the past, caused by the hybrid tuner design, since
now, the same tuner can be used by drivers/media/dvb and drivers/media/video.
Kconfig items were rearranged, to split V4L/DVB core from their drivers.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>