Tejun Heo [Fri, 10 Feb 2006 14:58:48 +0000 (23:58 +0900)]
[PATCH] sata_sil24: add hardreset
Now that libata is smart enough to handle both soft and hard resets,
add hardreset method. Note that sil24 hardreset doesn't supply
signature; still, the new reset mechanism can make good use of it.
Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Tejun Heo [Fri, 10 Feb 2006 14:58:48 +0000 (23:58 +0900)]
[PATCH] libata: make new reset act identical to ->phy_reset register-wise
This patch makes std component operations act identical to ->phy_reset
register-wise except for SError clearing on sata_std_hardreset.
Note that if a driver only implements/uses hardreset, it should not
use ata_std_probeinit() to avoid extra sata_phy_resume() and
ata_busy_sleep() compared to ->phy_reset.
Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Tejun Heo [Fri, 10 Feb 2006 06:10:48 +0000 (15:10 +0900)]
[PATCH] libata: implement ata_scsi_timed_out()
Implement ata_scsi_timed_out(), to be used as
scsi_host_template->eh_timed_out callback for all libata drivers.
Without this function, the following race exists.
If a qc completes after SCSI timer expires but before libata EH kicks
in, the qc gets completed but the scsicmd still gets passed to libata
EH resulting in ->eng_timeout invocation with NULL qc, which none is
handling properly.
This patch makes sure that scmd and qc share the same lifetime.
Original idea from Jeff Garzik <jgarzik@pobox.com>.
Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Tejun Heo [Fri, 10 Feb 2006 06:10:48 +0000 (15:10 +0900)]
[PATCH] libata: add ATA_QCFLAG_EH_SCHEDULED
Add ATA_QCFLAG_EH_SCHEDULED. If this flag is set, the qc is owned by
EH and normal completion path is not allowed to finish it. This patch
doesn't actually use this flag.
Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
"Sigh. Can everyone please stop assuming gcc can output to /dev/null?
On several platforms, ld tries to lseek in the output file, and fails
if it can't."
Tejun Heo [Thu, 2 Feb 2006 09:20:00 +0000 (18:20 +0900)]
[PATCH] libata: add probeinit component operation to ata_drive_probe_reset()
This patch adds probeinit component operation to
ata_drive_probe_reset(). If present, this new operation is called
before performing any reset. The operations's roll is to prepare @ap
for following probe-reset operations.
Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Tejun Heo [Thu, 2 Feb 2006 09:20:00 +0000 (18:20 +0900)]
[PATCH] libata: fix ata_std_probe_reset() SATA detection
ap->cbl is initialized during postreset and thus unknown on entry to
ata_std_probe_reset(). This patch makes ata_std_probe_reset() use
ATA_FLAG_SATA flag instead of ap->cbl to detect SATA port.
Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Tejun Heo [Wed, 1 Feb 2006 15:56:10 +0000 (00:56 +0900)]
[PATCH] libata: implement ATA_FLAG_IN_EH port flag
ATA_FLAG_IN_EH flag is set on entry to EH and cleared on completion.
This patch just sets and clears the flag. Following patches will
build normal qc execution / EH synchronization aroung this flag.
Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Kristian Slavov [Thu, 9 Feb 2006 00:10:53 +0000 (16:10 -0800)]
[IPV6]: Address autoconfiguration does not work after device down/up cycle
If you set network interface down and up again, the IPv6 address
autoconfiguration does not work. 'ip addr' shows that the link-local
address is in tentative state. We don't even react to periodical router
advertisements.
During NETDEV_DOWN we clear IF_READY, and we don't set it back in
NETDEV_UP. While starting to perform DAD on the link-local address, we
notice that the device is not in IF_READY, and we abort autoconfiguration
process (which would eventually send router solicitations).
Acked-by: Juha-Matti Tapio <jmtapio@verkkotelakka.net> Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Tony Lindgren [Wed, 8 Feb 2006 22:06:45 +0000 (22:06 +0000)]
[ARM] 3279/1: OMAP: 1/3 Fix low-level io init
Patch from Tony Lindgren
This patch adds the missing cache flushes to common low-level
init that are needed to access the IO region. These flushes
are normally done at the end of devicemaps_init(), but we
need to detect the OMAP core type early.
Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Kumar Gala [Wed, 8 Feb 2006 21:34:35 +0000 (21:34 +0000)]
[SERIAL] 8250 serial console update uart_8250_port ier
On some embedded PowerPC (MPC834x) systems an extra byte would some
times be required to flush data out of the fifo.
serial8250_console_write() was updating the IER in hardware without
also updating the copy in uart_8250_port. This causes issues functions
like serial8250_start_tx() and __stop_tx() to misbehave.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
[ARM] 3283/1: S3C2400 - defines the number of serial ports
Patch from Lucas Correia Villa Real
This patch defines the number of serial ports on the S3C2400.
Signed-off-by: Lucas Correia Villa Real <lucasvr@gobolinux.org> Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Nicolas Pitre [Wed, 8 Feb 2006 21:19:38 +0000 (21:19 +0000)]
[ARM] 3311/1: clean up include/asm-arm/mutex.h
Patch from Nicolas Pitre
Since:
if (unlikely(__res || __ex_flag))
produces worse code on ARM than:
if (unlikely(__res | __ex_flag))
I therefore made it more explicit:
__res |= __ex_flag;
if (unlikely(__res != 0))
so it is not seen as a typo again.
Also made everything static inline rather than macros for better readability
(both produce the same code after all).
And finally added missing \t from multi-line assembly code.
Signed-off-by: Nicolas Pitre <nico@cam.org> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Nicolas Pitre [Wed, 8 Feb 2006 21:19:37 +0000 (21:19 +0000)]
[ARM] 3310/1: add a comment about the possible __kuser_cmpxchg transient false
negative
Patch from Nicolas Pitre
The pre ARMv5 implementation can be aborted if an exception occurs in
the middle of it. Because of that, the ARMv6 implementation doesn't
re-attempt the operation on a failed strex either. Let's make this
transient nature of such a false positive more explicit in the
definition.
Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Nicolas Pitre [Wed, 8 Feb 2006 21:19:37 +0000 (21:19 +0000)]
[ARM] 3309/1: disable the pre-ARMv5 NPTL kernel helper in the non MMU case
Patch from Nicolas Pitre
The cmpxchg emulation on pre-ARMv5 relies on user code executed from a
kernel address. If the operation cannot complete atomically, it is
aborted from the usr_entry macro by clearing the Z flag. This clearing
of the Z flag is done whenever the user pc is above TASK_SIZE.
However this "pc >= TASK_SIZE" test cannot work in the non MMU case.
Worse: the current code will corrupt the Z flag on every entry to the
kernel.
Let's disable it in the non MMU case for now. Using NPTL on non MMU
targets needs to be worked out anyway.
Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Nicolas Pitre [Wed, 8 Feb 2006 21:19:36 +0000 (21:19 +0000)]
[ARM] 3308/1: old ABI compat: struct sockaddr_un
Patch from Nicolas Pitre
struct sockaddr_un loses its padding with EABI. Since the size of the
structure is used as a validation test in unix_mkname(), we need to
change the length argument to 110 whenever it is 112.
Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Nicolas Pitre [Wed, 8 Feb 2006 21:09:08 +0000 (21:09 +0000)]
[ARM] 3307/1: old ABI compat: mark it experimental
Patch from Nicolas Pitre
Although OABI_COMPAT works fine in most cases, it is still experimental
and could be for ever since it is nearly impossible to handle
everything, e.g. ioctls.
Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
[ARM] 3302/1: make pci=firmware the default for ixp2000
Patch from Lennert Buytenhek
Most ixp2000 boards don't actually work if pci=firmware isn't used, so
the defconfig isn't really the right place to specify this. Instead of
specifying it in the defconfigs, make the relevant board code take care
of setting pci=firmware.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Deepak Saxena <dsaxena@plexity.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
[ARM] 3301/1: remove unnecessary clock default from ixdp2801 defconfig
Patch from Lennert Buytenhek
The ixdp2x01_clock is already 50MHz by default, so no need to
override it with 50MHz in the ixdp2801 defconfig as is done now,
which is confusing as well.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Deepak Saxena <dsaxena@plexity.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
[ARM] 3300/1: make ixdp2x01 co-exist with other ixp2000 machine types
Patch from Lennert Buytenhek
The ixdp2x01 pci init call doesn't check whether it's really running
on an ixdp2x01, making it impossible to compile one kernel that works
on both the ixdp2x01 and another ixp2000 board.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Deepak Saxena <dsaxena@plexity.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Ivan Kokshaysky [Wed, 8 Feb 2006 08:55:06 +0000 (11:55 +0300)]
[PATCH] alpha: set cpu_possible_map much earlier
All the percpu data structure walkers want cpu_possible_map to be
initialized early, but alpha instead populated "hwrpb_cpu_present_mask"
early in setup_smp(), and then initialized cpu_possible_map only much
later.
Thanks go to Heiko Carstens and Dipankar Sarma for noticing.
This fixes it and we can get rid of hwrpb_cpu_present_mask entirely.
Tejun Heo [Wed, 8 Feb 2006 09:01:31 +0000 (01:01 -0800)]
[PATCH] block: implement elv_insert and use it (fix ordcolor flipping bug)
q->ordcolor must only be flipped on initial queueing of a hardbarrier
request.
Constructing ordered sequence and requeueing used to pass through
__elv_add_request() which flips q->ordcolor when it sees a barrier
request.
This patch separates out elv_insert() from __elv_add_request() and uses
elv_insert() when constructing ordered sequence and requeueing.
elv_insert() inserts the given request at the specified position and
does nothing else.
Linus Torvalds [Wed, 8 Feb 2006 15:51:17 +0000 (07:51 -0800)]
ppc: fix up trivial Kconfig config selection
Quoth BenH:
"Ok, looks like I forgot to update the Kconfig for the new i2c driver,
it should select I2C_POWERMAC instead. Do you want a new patch or
can you just fix it there ?"
When issuing an SG_IO ioctl through sd that resulted in an unrecoverable
error, a nearly infinite retry loop was discovered. This is due to the
fact that the block layer SG_IO code is not setting up rq->retries. This
patch also fixes up the sg_scsi_ioctl path.
Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: Jens Axboe <axboe@suse.de>
[PATCH] powerpc: Thermal control for dual core G5s
This patch adds a windfarm module, windfarm_pm112, for the dual core G5s
(both 2 and 4 core models), keeping the machine from getting into
vacuum-cleaner mode ;) For proper credits, the patch was initially
written by Paul Mackerras, and slightly reworked by me to add overtemp
handling among others. The patch also removes the sysfs attributes from
windfarm_pm81 and windfarm_pm91 and instead adds code to the windfarm
core to automagically expose attributes for sensor & controls.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Wed, 1 Feb 2006 10:24:20 +0000 (05:24 -0500)]
[PATCH] drivers/media/video __user annotations and fixes
* compat_alloc_user_space() returns __user pointer
* copying between two userland areas is copy_in_user(), not copy_from_user()
* dereferencing userland pointers is bad
* so's get_user() from local variables
Al Viro [Mon, 19 Dec 2005 21:27:59 +0000 (16:27 -0500)]
[PATCH] arm: fix dependencies for MTD_XIP
MTD_XIP depends on having working asm/mtd-xip.h; it's not just per-architecture
(arm-only, as current Kconfig would have it), but actually per-subarch as
well. Introduced a new symbol (ARCH_MTD_XIP) set by arch Kconfig; MTD_XIP
depends on it.