]> pilppa.com Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
16 years agoFix omap1 clock issues
Tony Lindgren [Wed, 24 Sep 2008 11:21:48 +0000 (14:21 +0300)]
Fix omap1 clock issues

This fixes booting, and is a step toward fixing things properly:

- Make enable_reg u32 instead of u16
- Get rid of VIRTUAL_IO_ADDRESS for clocks
- Use __raw_read/write instead of omap_read/write for clock registers

This patch adds a bunch of compile warnings until omap1 clock
also uses offsets.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoFix sections for omap-mcbsp platform driver
Uwe Kleine-König [Wed, 17 Sep 2008 21:11:28 +0000 (23:11 +0200)]
Fix sections for omap-mcbsp platform driver

Don't use __init but __devinit to define probe function.  A pointer to
omap_mcbsp_probe is passed to the core via platform_driver_register and
so the function must not disappear when the init code is freed.  Using
__init and having HOTPLUG=y the following probably oopses:

echo -n omap-mcbsp.1 > /sys/bus/platform/driver/omap-mcbsp/unbind
echo -n omap-mcbsp.1 > /sys/bus/platform/driver/omap-mcbsp/bind

While at it move the remove function to the .devexit.text section.

Signed-off-by: Uwe Kleine-König <ukleinek@strlen.de>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoARM: OMAP: Add RX/TX interrupts for 2430 and 34xx McBSP ports 3-5
Jarkko Nikula [Tue, 16 Sep 2008 12:56:53 +0000 (15:56 +0300)]
ARM: OMAP: Add RX/TX interrupts for 2430 and 34xx McBSP ports 3-5

Without RX and TX interrupt definitions, the omap_mcbsp_request will
fail on OMAP2430 and OMAP34xx for ports 3-5 since default io_type is
OMAP_MCBSP_IRQ_IO.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoARM: OMAP: Fixes to omap_mcbsp_request function
Jarkko Nikula [Mon, 22 Sep 2008 13:47:51 +0000 (16:47 +0300)]
ARM: OMAP: Fixes to omap_mcbsp_request function

Bootloader may let McBSP logic running so make sure that block is idle
before requesting IRQs. Also make sure that TX and RX waitqueues are
initialized before request_irq.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoRevert "Fix booting of omap1"
Tony Lindgren [Wed, 24 Sep 2008 08:07:17 +0000 (11:07 +0300)]
Revert "Fix booting of omap1"

This reverts commit 3fa3f8c8f56d0013b3802319c601581d73882ff4.

Some regs are offsets for omap2/3.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoFix booting of omap1
Tony Lindgren [Wed, 24 Sep 2008 07:56:18 +0000 (10:56 +0300)]
Fix booting of omap1

This got broken because of mismerge from arm-devel.

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoFix compile for twl4030-power
Tony Lindgren [Tue, 23 Sep 2008 12:56:51 +0000 (15:56 +0300)]
Fix compile for twl4030-power

Fix compile for twl4030-power

Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agowatchdog: cleanup a bit omap_wdt.c
Felipe Balbi [Tue, 23 Sep 2008 11:33:51 +0000 (14:33 +0300)]
watchdog: cleanup a bit omap_wdt.c

Trivial cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agowatchdog: another ioremap() fix
Felipe Balbi [Tue, 23 Sep 2008 11:33:50 +0000 (14:33 +0300)]
watchdog: another ioremap() fix

convert to use ioremap() and __raw_{read/write} friends.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: George G. Davis <gdavis@mvista.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agowatchdog: sync mainline changes
Felipe Balbi [Tue, 23 Sep 2008 11:33:49 +0000 (14:33 +0300)]
watchdog: sync mainline changes

Some changes to omap_wdt.c were lost due to, probably,
mis-merges and developers working separately on
linux-omap and mainline.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3EVM: TWL4030 Keypad irq error fix
arun c [Sat, 20 Sep 2008 06:51:40 +0000 (02:51 -0400)]
OMAP3EVM: TWL4030 Keypad irq error fix

without this the below error messages were coming continuously

TWL4030 module irq 369 is disabled but can't be masked!
<2>TWL4030 module irq 369 is disabled but can't be masked!

Signed-off-by: Arun C <arunedarath@mistralsolutions.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoFix build for beagleboard
Peter 'p2' De Schrijver [Tue, 16 Sep 2008 12:29:23 +0000 (15:29 +0300)]
Fix build for beagleboard

Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoARM:OMAP2: follow new twl4030 RTC init convention in Overo board file
Steve Sakoman [Sun, 14 Sep 2008 05:19:57 +0000 (22:19 -0700)]
ARM:OMAP2: follow new twl4030 RTC init convention in Overo board file

Overo was omitted from the changes in 74fcfe9c589f1060b5e5a791e9c0c54212d7c1b8

This patch brings Overo RTC setup into line with the other omap boards

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030: board init updates
David Brownell [Sun, 21 Sep 2008 21:12:23 +0000 (14:12 -0700)]
twl4030: board init updates

For boards with twl4030/tps65950 chips, update board setup code to
provide the appropriate board info.

This should evolve a bunch more over time; right now too much of this
data is globally defined (like IRQ and GPIO numbering).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agotwl4030: new-style driver conversion
David Brownell [Sun, 21 Sep 2008 21:08:47 +0000 (14:08 -0700)]
twl4030: new-style driver conversion

More updates preparing for upstream merge of twl4030 driver:

 Basic fixes
   - twl4030-core becomes a new-style I2C driver
   - declare and use platform_data structure for that core
   - stop hard-wiring the irq numbers
   - check functionality that's really used:  I2C, not SMBus
 Cleanup:
   - remove needless "client string"
   - remove some fake "bool" types
   - include catalog part numbers (TPS659{5,3,2}0)
   - diagnostics should identify the driver!

To use this, all boards with these chips will need to declare this chip
when they declare their active I2C busses (done in a separate patch).

NOTE:  the TWL4030_IRQ_* symbols still need to vanish, along with other
global resource assignments associated with these chips.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoThis patch set up the unused madc request structure members to NULL.
Madhusudhan Chikkature [Tue, 23 Sep 2008 10:48:54 +0000 (13:48 +0300)]
This patch set up the unused madc request structure members to NULL.

Signed-off-by: Madhusudhan Chikkature<madhu.cr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3 IRQ: add some missing IRQs for secure peripherals
Paul Walmsley [Tue, 16 Sep 2008 08:27:35 +0000 (02:27 -0600)]
OMAP3 IRQ: add some missing IRQs for secure peripherals

Add in some missing IRQs for secure peripherals, defined in
OMAP34xx Multimedia High Security Device Silicon Revision 3.0 Security
Addendum Version B (SWPU119B)

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3 clock: add wait for USIM module to become active
Paul Walmsley [Tue, 16 Sep 2008 14:58:40 +0000 (08:58 -0600)]
OMAP3 clock: add wait for USIM module to become active

This patch adds the register definitions and clock tree fields required
to wait for the USIM module to come out of idle when the USIM clocks are
enabled.  Register bit definitions are from the 34xx HS Addendum Rev B.
There, the clock is in fact named "USIM_ICLK".

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2/3 clock: convert omap2_clk_wait_ready() to use the idlest_bit field
Paul Walmsley [Tue, 16 Sep 2008 14:58:38 +0000 (08:58 -0600)]
OMAP2/3 clock: convert omap2_clk_wait_ready() to use the idlest_bit field

Simplify omap2_clk_wait_ready() to use the new idlest_bit field in
struct clk, rather than the hunk of conditionals that were there
previously.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2/3 clock: encode target IDLEST bits and clean omap2_clk_wait_ready()
Paul Walmsley [Tue, 16 Sep 2008 14:58:34 +0000 (08:58 -0600)]
OMAP2/3 clock: encode target IDLEST bits and clean omap2_clk_wait_ready()

For each OMAP module that has a target IDLEST bit, add the appropriate
bits to the clock tree on both the module interface clock and the appropriate
functional clock.  Add a new clock bit, "WAIT_READY", that indicates that
the clock code must wait for the clock's module to come out of idle after
both the target functional clock and interface clocks are enabled.  Fix
some clock flag comments while there to indicate that clocks marked
as "3430ES2" clocks also are valid for later 3430 revisions.

Several OMAP3xxx clocks must be split into platform-specific variants,
since some early silicon revisions do not have target idle state bits
available. DSS, HSOTGUSB, and SSI clocks are affected.  In the future, it
would be ideal to #ifdef out those clocks for kernels that don't need to
run on 3430ES1 chips to save memory.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2/3 PRCM: convert IDLEST register bit macros to use the _SHIFT/_MASK style
Paul Walmsley [Tue, 16 Sep 2008 14:58:33 +0000 (08:58 -0600)]
OMAP2/3 PRCM: convert IDLEST register bit macros to use the _SHIFT/_MASK style

Originally when the PRCM register macros were defined, bit shift macros
used a "_SHIFT" suffix, and mask macros used none.  This became a source
of bugs and confusion, as the mask macros were mistakenly used for shift
values.  Gradually, the mask macros have been updated, piece by piece,
to add a "_MASK" suffix on the end to clarify.  This patch applies this
change to the CM_IDLEST_* register bits.

The patch also adds a few bits that were missing, mostly from the 3430ES1
to ES2 revisions.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2 PRCM: fix CM_IDLEST bits incorrectly marked as 2xxx-common
Paul Walmsley [Tue, 16 Sep 2008 14:58:32 +0000 (08:58 -0600)]
OMAP2 PRCM: fix CM_IDLEST bits incorrectly marked as 2xxx-common

This patch fixes a few OMAP2xxx CM_IDLEST bits that were incorrectly
marked as being OMAP2xxx-wide, when they were actually 2420-specific.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2/3 clock: use clk->prcm_mod for all struct clk register addressing
Paul Walmsley [Mon, 22 Sep 2008 14:51:14 +0000 (17:51 +0300)]
OMAP2/3 clock: use clk->prcm_mod for all struct clk register addressing

Use the clk->prcm_mod field for all register addresses in struct clk.
Remove all usage of the *_REGADDR() and *_OFFSET() macros from the
clock tree.  This eliminates a set of (__force void __iomem *) casts
and removes all of the OMAP2xxx register address rewriting.  Shrink
the width of the enable_reg/clksel_reg registers to 16 bits, saving 4
bytes per struct clk.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2/3 clock: simplify omap2_clksel_get_src_field()
Paul Walmsley [Thu, 18 Sep 2008 17:47:21 +0000 (11:47 -0600)]
OMAP2/3 clock: simplify omap2_clksel_get_src_field()

Get rid of void __iomem * usage in omap2_clksel_get_src_field.
Prepend the function name with an underscore to highlight that it is a
static function.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2/3 clock: remove omap2_get_clksel()
Paul Walmsley [Thu, 18 Sep 2008 17:47:18 +0000 (11:47 -0600)]
OMAP2/3 clock: remove omap2_get_clksel()

Remove omap2_get_clksel() and just use clk->clksel_reg and
clk->clksel_mask directly.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2/3 clock: convert omap2_wait_clock_ready() to use clk.prcm_mod
Paul Walmsley [Thu, 18 Sep 2008 17:47:15 +0000 (11:47 -0600)]
OMAP2/3 clock: convert omap2_wait_clock_ready() to use clk.prcm_mod

Convert omap2_wait_clock_ready() to use clk.prcm_mod rather than a
void __iomem *.  This removes some cruft from clock24xx.c and sets
up further cruft removal in a subsequent patch.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2/3 clock: use prcm_mod field in omap2_clk_wait_ready()
Paul Walmsley [Thu, 18 Sep 2008 17:47:12 +0000 (11:47 -0600)]
OMAP2/3 clock: use prcm_mod field in omap2_clk_wait_ready()

Use the newly-added clk.prcm_mod field in omap2_clk_wait_ready(),
removing some internal register arithmetic.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2/3 clock: use symbolic constants in omap2_clk_wait_ready()
Paul Walmsley [Thu, 18 Sep 2008 17:47:09 +0000 (11:47 -0600)]
OMAP2/3 clock: use symbolic constants in omap2_clk_wait_ready()

Convert the bare constants in the register arithmetic in
omap2_clk_wait_ready() to use meaningful symbolic names.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2/3 clock: add _omap2_clk_{read,write}_reg()
Paul Walmsley [Thu, 18 Sep 2008 17:47:06 +0000 (11:47 -0600)]
OMAP2/3 clock: add _omap2_clk_{read,write}_reg()

Create new static functions to read/write registers used in the struct
clk, _omap2_clk_{read,write}_reg().  A subsequent patch will use these
to ensure the correct register read/write instruction is used, which depends
on whether the clock registers are in the CM, PRM, or SCM.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3 clock: add "prcm_mod" field to OMAP3xxx clocks
Paul Walmsley [Thu, 18 Sep 2008 17:47:03 +0000 (11:47 -0600)]
OMAP3 clock: add "prcm_mod" field to OMAP3xxx clocks

Annotate each OMAP2xxx real hardware clock controlled by the PRCM with
the PRCM module offset.

A subsequent patch will use this to simplify register addressing in the
struct clk.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2 clock: add clk.prcm_mod field; annotate OMAP2xxx clocks
Paul Walmsley [Thu, 18 Sep 2008 17:47:00 +0000 (11:47 -0600)]
OMAP2 clock: add clk.prcm_mod field; annotate OMAP2xxx clocks

Add a "prcm_mod" field to the struct clk in OMAP2/3, and annotate each
OMAP2xxx real hardware clock controlled by the PRCM with the PRCM
module offset.  (A subsequent patch will annotate OMAP3 clocks.)

Add flags for this field that allow the registers to
be marked as existing in the PRM, CM, or System Control Module.

A subsequent patch will use this to simplify register addressing in the
struct clk.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2/3 clock: shorten some variable names in clock.c for legibility
Paul Walmsley [Thu, 18 Sep 2008 17:46:57 +0000 (11:46 -0600)]
OMAP2/3 clock: shorten some variable names in clock.c for legibility

Some unnecessarily verbose variable names are used in several clock.c
functions; clean these up per CodingStyle.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3 clock: split mcbspX_src_fck from mcbspX_fck
Paul Walmsley [Thu, 18 Sep 2008 17:46:54 +0000 (11:46 -0600)]
OMAP3 clock: split mcbspX_src_fck from mcbspX_fck

McBSP clock source control registers are located in the System Control
Module, not the PRCM.  However, the clock enable/disable registers are
in the CM.  Since the following patches require all registers in a
struct clk to be in only one of {CM, PRM, SCM}, we must split the
source clock selection into a separate struct clk from the clock
enable/disable control.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3 clock: recalculate DPLL subtree after bypass entry/exit
Paul Walmsley [Thu, 18 Sep 2008 16:30:34 +0000 (10:30 -0600)]
OMAP3 clock: recalculate DPLL subtree after bypass entry/exit

The DPLL's rate changes when it enters or leaves bypass, so the DPLL's
rate and the rates of all dependent clocks need to be recalculated
when this happens.

Also, fix test for bypass to test against the appropriate bypass clock,
rather than the parent clock (which is not the bypass clock for DPLL1
and DPLL2).

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3 clock: DPLLs should enter bypass if new rate is sys_ck
Paul Walmsley [Thu, 18 Sep 2008 16:30:31 +0000 (10:30 -0600)]
OMAP3 clock: DPLLs should enter bypass if new rate is sys_ck

This patch causes a DPLL to enter bypass when it is instructed to set
its rate to that of its bypass clock.  Previously this was only possible
after setting the DPLL rate, then disabling and re-enabling it.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3 clock: omap3_clkoutx2_recalc() should test DPLL IDLEST to determine if DPLL...
Paul Walmsley [Thu, 18 Sep 2008 16:30:28 +0000 (10:30 -0600)]
OMAP3 clock: omap3_clkoutx2_recalc() should test DPLL IDLEST to determine if DPLL is bypassed

Convert the DPLL bypass test in omap3_clkoutx2_recalc() to test DPLL IDLEST
bits rather than the CM_CLKEN register.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3 clock: move DPLL bypass rate calculation into omap2_get_dpll_rate()
Paul Walmsley [Thu, 18 Sep 2008 16:30:24 +0000 (10:30 -0600)]
OMAP3 clock: move DPLL bypass rate calculation into omap2_get_dpll_rate()

Removes the clksel-based DPLL rate handling from the OMAP3 clock tree.
In its place, omap2_get_dpll_rate() now has code to determine whether the DPLL
is bypassed.  This obsoletes several clocks, which are removed by this patch.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3 clock: note the bypass source clock for DPLLs
Paul Walmsley [Thu, 18 Sep 2008 16:30:05 +0000 (10:30 -0600)]
OMAP3 clock: note the bypass source clock for DPLLs

Most DPLLs use sys_clk as their bypass rate source.  But DPLL1 and DPLL2
use high-frequency bypass clocks dpll1_fclk and dpll2_fclk as their parents
during bypass.  Add a new struct dpll_data field to track the DPLL's bypass
source clock.

Kevin Hilman <khilman@deeprootsystems.com> helped catch this - thanks Kevin.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3 clock: add idlest_reg, idlest_mask for DPLL3
Paul Walmsley [Thu, 18 Sep 2008 16:30:02 +0000 (10:30 -0600)]
OMAP3 clock: add idlest_reg, idlest_mask for DPLL3

DPLL3 dpll_data was missing idlest_* fields - add them.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP3 clock: convert dpll_data.idlest_bit to idlest_mask
Paul Walmsley [Thu, 18 Sep 2008 16:29:58 +0000 (10:29 -0600)]
OMAP3 clock: convert dpll_data.idlest_bit to idlest_mask

Convert struct dpll_data.idlest_bit field to idlest_mask.  Needed since
later patches are converting the DPLL bypass state test to use the IDLEST
registers, and OMAP2 uses two bits for DPLL IDLEST rather than one.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoMerge current mainline tree into linux-omap tree
Tony Lindgren [Mon, 22 Sep 2008 14:26:10 +0000 (17:26 +0300)]
Merge current mainline tree into linux-omap tree

Merge branches 'master' and 'linus'

Conflicts:

arch/arm/plat-omap/devices.c

16 years agoLinux 2.6.27-rc7 v2.6.27-rc7
Linus Torvalds [Sun, 21 Sep 2008 22:29:55 +0000 (15:29 -0700)]
Linux 2.6.27-rc7

16 years agoMerge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
Linus Torvalds [Sun, 21 Sep 2008 19:41:19 +0000 (12:41 -0700)]
Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6

* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  hwmon: (ad7414) Make ad7414_update_device() static
  hwmon: (it87) Fix fan tachometer reading in IT8712F rev 0x7 (I)
  hwmon: (atxp1) Fix device detection logic

16 years agoMerge branch 'kvm-updates/2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 21 Sep 2008 19:40:56 +0000 (12:40 -0700)]
Merge branch 'kvm-updates/2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm

* 'kvm-updates/2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm:
  KVM: ia64: 'struct fdesc' build fix

16 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Sun, 21 Sep 2008 19:40:30 +0000 (12:40 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] vmlinux.lds.S: handle .text.*
  [MIPS] Fix potential latency problem due to non-atomic cpu_wait.
  [MIPS] SMTC: Clear TIF_FPUBOUND on clone / fork.
  [MIPS] Fix 64-bit IP checksum code

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
Linus Torvalds [Sun, 21 Sep 2008 19:38:45 +0000 (12:38 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  mmc_test: initialize mmc_test_lock statically
  mmc_block: handle error from mmc_register_driver()
  atmel-mci: Set MMC_CAP_NEEDS_POLL if no detect_pin
  atmel-mci: Fix bogus debugfs file size
  atmel-mci: Fix memory leak in atmci_regs_show
  atmel-mci: debugfs: enable clock before dumping regs
  tmio_mmc: fix compilation with debug enabled

16 years agoMAINTAINERS: Various fixes
Jean Delvare [Sat, 20 Sep 2008 10:34:33 +0000 (12:34 +0200)]
MAINTAINERS: Various fixes

* Normalize some S: entries to match the enumeration at the beginning
  of the file.
* Change one mailing list entry from S: to L:.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMAINTAINERS: Trivial whitespace cleanups
Jean Delvare [Sat, 20 Sep 2008 10:33:08 +0000 (12:33 +0200)]
MAINTAINERS: Trivial whitespace cleanups

* Drop trailing whitespace.
* Replace spaces and combinations of spaces and tabs by single tabs.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[MIPS] vmlinux.lds.S: handle .text.*
Atsushi Nemoto [Tue, 5 Aug 2008 14:45:14 +0000 (23:45 +0900)]
[MIPS] vmlinux.lds.S: handle .text.*

The -ffunction-sections puts each text in .text.function_name section.
Without this patch, most functions are placed outside _text..._etext
area and it breaks show_stacktrace(), etc.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Fix potential latency problem due to non-atomic cpu_wait.
Atsushi Nemoto [Sun, 11 Nov 2007 17:05:18 +0000 (02:05 +0900)]
[MIPS] Fix potential latency problem due to non-atomic cpu_wait.

If an interrupt happened between checking of NEED_RESCHED and WAIT
instruction, adjust EPC to restart from checking of NEED_RESCHED.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] SMTC: Clear TIF_FPUBOUND on clone / fork.
Ralf Baechle [Tue, 9 Sep 2008 13:19:10 +0000 (15:19 +0200)]
[MIPS] SMTC: Clear TIF_FPUBOUND on clone / fork.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Fix 64-bit IP checksum code
Atsushi Nemoto [Sat, 20 Sep 2008 15:20:04 +0000 (17:20 +0200)]
[MIPS] Fix 64-bit IP checksum code

Use unsigned loads to avoid possible misscalculation of IP checksums.  This
bug was instruced in f761106cd728bcf65b7fe161b10221ee00cf7132 (lmo) /
ed99e2bc1dc5dc54eb5a019f4975562dbef20103 (kernel.org).

[Original fix by Atsushi.  Improved instruction scheduling and fix for
unaligned unsigned load by me -- Ralf]

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years agommc_test: initialize mmc_test_lock statically
Akinobu Mita [Sat, 13 Sep 2008 10:03:32 +0000 (19:03 +0900)]
mmc_test: initialize mmc_test_lock statically

The mutex mmc_test_lock is initialized at every time mmc_test device
is probed. Probing another mmc_test device may break the mutex, if
the probe function is called while the mutex is locked.

This patch fixes it by statically initializing mmc_test_lock.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
16 years agommc_block: handle error from mmc_register_driver()
Akinobu Mita [Sat, 13 Sep 2008 10:02:07 +0000 (19:02 +0900)]
mmc_block: handle error from mmc_register_driver()

Check error from mmc_register_driver() and properly unwind
block device registration.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
16 years agoatmel-mci: Set MMC_CAP_NEEDS_POLL if no detect_pin
Haavard Skinnemoen [Fri, 19 Sep 2008 19:09:30 +0000 (21:09 +0200)]
atmel-mci: Set MMC_CAP_NEEDS_POLL if no detect_pin

This allows the mmc core to detect card insertion/removal for slots that
don't have any CD pin wired up.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
16 years agoatmel-mci: Fix bogus debugfs file size
Haavard Skinnemoen [Fri, 19 Sep 2008 19:09:29 +0000 (21:09 +0200)]
atmel-mci: Fix bogus debugfs file size

We used to store a binary register snapshot in the "regs" file, so we
set the file size to be the size of this snapshot. This is no longer
valid since we switched to using seq_file.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
16 years agoatmel-mci: Fix memory leak in atmci_regs_show
Haavard Skinnemoen [Fri, 19 Sep 2008 19:09:28 +0000 (21:09 +0200)]
atmel-mci: Fix memory leak in atmci_regs_show

The debugfs hook atmci_regs_show allocates a temporary buffer for
storing a register snapshot, but it doesn't free it before returning.
Plug this leak.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
16 years agoatmel-mci: debugfs: enable clock before dumping regs
Haavard Skinnemoen [Fri, 19 Sep 2008 19:09:27 +0000 (21:09 +0200)]
atmel-mci: debugfs: enable clock before dumping regs

Make sure that the peripheral clock is enabled before reading the MMIO
registers for the debugfs "regs" dump.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
16 years agotmio_mmc: fix compilation with debug enabled
Dmitry Baryshkov [Wed, 3 Sep 2008 15:33:30 +0000 (19:33 +0400)]
tmio_mmc: fix compilation with debug enabled

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Acked-by: Ian Molton <spyro@f2s.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
16 years agohwmon: (ad7414) Make ad7414_update_device() static
Adrian Bunk [Sat, 20 Sep 2008 08:25:20 +0000 (10:25 +0200)]
hwmon: (ad7414) Make ad7414_update_device() static

This patch makes the needlessly global ad7414_update_device() static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Sean MacLennan <smaclennan@pikatech.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (it87) Fix fan tachometer reading in IT8712F rev 0x7 (I)
Andrew Paprocki [Sat, 20 Sep 2008 08:25:19 +0000 (10:25 +0200)]
hwmon: (it87) Fix fan tachometer reading in IT8712F rev 0x7 (I)

The IT8712F v0.9.1 datasheet applies to revisions >= 0x8 (J).
The driver was incorrectly attempting to enable 16-bit fan
readings on rev 0x7 (I) which led to incorrect RPM values.

Signed-off-by: Andrew Paprocki <andrew@ishiboo.com>
Tested-by: John Gumb <john.gumb@tandberg.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agohwmon: (atxp1) Fix device detection logic
Jean Delvare [Sat, 20 Sep 2008 08:25:19 +0000 (10:25 +0200)]
hwmon: (atxp1) Fix device detection logic

The atxp1 device detection code has a major logic flaw, fix it. Not
sure how we managed to miss this when the driver was merged...

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Sebastian Witt <se.witt@gmx.net>
16 years agoKVM: ia64: 'struct fdesc' build fix
Jes Sorensen [Fri, 12 Sep 2008 12:12:08 +0000 (14:12 +0200)]
KVM: ia64: 'struct fdesc' build fix

Commit 4611a77 ("[IA64] fix compile failure with non modular builds")
introduced struct fdesc into asm/elf.h, which duplicates KVM's definition.
Remove the latter to avoid the build error.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
16 years agoMerge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Fri, 19 Sep 2008 23:24:03 +0000 (16:24 -0700)]
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6

* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] cio: fix orb initialization in cio_start_key
  [S390] cio: Fix driver_data handling for ccwgroup devices.

16 years agoMerge git://oss.sgi.com:8090/xfs/linux-2.6
Linus Torvalds [Fri, 19 Sep 2008 23:21:59 +0000 (16:21 -0700)]
Merge git://oss.sgi.com:8090/xfs/linux-2.6

* git://oss.sgi.com:8090/xfs/linux-2.6:
  [XFS] Don't do I/O beyond eof when unreserving space
  [XFS] Fix use-after-free with buffers
  [XFS] Prevent lockdep false positives when locking two inodes.
  [XFS] Fix barrier status change detection.
  [XFS] Prevent direct I/O from mapping extents beyond eof
  [XFS] Fix regression introduced by remount fixup
  [XFS] Move memory allocations for log tracing out of the critical path

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Fri, 19 Sep 2008 23:18:21 +0000 (16:18 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IPoIB: Fix deadlock on RTNL between bcast join comp and ipoib_stop()
  RDMA/nes: Fix client side QP destroy
  IB/mlx4: Fix up fast register page list format
  mlx4_core: Set RAE and init mtt_sz field in FRMR MPT entries

16 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 19 Sep 2008 23:17:12 +0000 (16:17 -0700)]
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: fix deadlock in setting scheduler parameter to zero
  sched: fix 2.6.27-rc5 couldn't boot on tulsa machine randomly

16 years agoMerge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 19 Sep 2008 23:16:50 +0000 (16:16 -0700)]
Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  clockevents: make device shutdown robust
  clocksource, acpi_pm.c: fix check for monotonicity
  clockevents: remove WARN_ON which was used to gather information

16 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 19 Sep 2008 23:11:09 +0000 (16:11 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: completely disable NOPL on 32 bits
  x86/paravirt: Remove duplicate paravirt_pagetable_setup_{start, done}()
  xen: fix for xen guest with mem > 3.7G
  x86: fix possible x86_64 and EFI regression
  arch/x86/kernel/kdebugfs.c: introduce missing kfree

16 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Fri, 19 Sep 2008 23:05:05 +0000 (16:05 -0700)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  Fix compile failure with non modular builds
  powerpc: Holly board needs dtbImage target
  powerpc: Fix interrupt values for DMA2 in MPC8610 HPCD device tree

16 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Fri, 19 Sep 2008 23:04:42 +0000 (16:04 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 5255/1: Update jornada ssp to remove build errors/warnings
  [ARM] omap: back out 'internal_clock' support
  [ARM] 5249/1: davinci: remove redundant check in davinci_psc_config()

16 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen...
Linus Torvalds [Fri, 19 Sep 2008 23:03:38 +0000 (16:03 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6

* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6:
  avr32: nmi_enter() without nmi_exit()
  avr32: fix sys_sync_file_range() call convention
  avr32: add generic_find_next_le_bit bit function
  avr32: add .gitignore files
  atstk1000: fix build breakage with BOARD_ATSTK100X_SW2_CUSTOM=y

16 years agoMerge branch 'for-linus' of git://neil.brown.name/md
Linus Torvalds [Fri, 19 Sep 2008 23:02:52 +0000 (16:02 -0700)]
Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  md: Don't wait UNINTERRUPTIBLE for other resync to finish

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Fri, 19 Sep 2008 23:02:05 +0000 (16:02 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc64: Fix SMP bootup with CONFIG_STACK_DEBUG or ftrace.
  sparc64: Fix OOPS in psycho_pcierr_intr_other().

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 19 Sep 2008 23:01:37 +0000 (16:01 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  e100: Use pci_pme_active to clear PME_Status and disable PME#
  e1000: prevent corruption of EEPROM/NVM
  forcedeth: call restore mac addr in nv_shutdown path
  bnx2: Promote vector field in bnx2_irq structure from u16 to unsigned int
  sctp: Fix oops when INIT-ACK indicates that peer doesn't support AUTH
  sctp: do not enable peer features if we can't do them.
  sctp: set the skb->ip_summed correctly when sending over loopback.
  udp: Fix rcv socket locking

16 years agoavr32: nmi_enter() without nmi_exit()
Manfred Spraul [Wed, 20 Aug 2008 13:39:59 +0000 (15:39 +0200)]
avr32: nmi_enter() without nmi_exit()

While updating the rcu code, I noticed that do_nmi() for AVR32 is odd:
There is an nmi_enter() call without an nmi_exit().
This can't be correct, it breaks rcu (at least the preempt version) and
lockdep.

[haavard.skinnemoen@atmel.com: fixed another case that returned directly]
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
16 years agoavr32: fix sys_sync_file_range() call convention
Hans-Christian Egtvedt [Wed, 17 Sep 2008 11:39:45 +0000 (13:39 +0200)]
avr32: fix sys_sync_file_range() call convention

On AVR32, all parameters beyond the 5th are passed on the stack. System
calls don't use the stack -- they borrow a callee-saved register
instead. This means that syscalls that take 6 parameters must be called
through a stub that pushes the last parameter on the stack.

This patch adds a stub for sync_file_range syscall on AVR32
architecture.  Tested with uClibc snapshot.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
16 years agoavr32: add generic_find_next_le_bit bit function
Hans-Christian Egtvedt [Wed, 10 Sep 2008 13:52:04 +0000 (15:52 +0200)]
avr32: add generic_find_next_le_bit bit function

This patch implements the generic_find_next_le_bit bit function for AVR32
architecture. This is used by EXT4 file system.

Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
16 years agoavr32: add .gitignore files
Markus Heidelberg [Sun, 7 Sep 2008 22:22:45 +0000 (00:22 +0200)]
avr32: add .gitignore files

Ignore Kernel binaries, kernel/vmlinux.lds and a log file.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
16 years agoatstk1000: fix build breakage with BOARD_ATSTK100X_SW2_CUSTOM=y
Haavard Skinnemoen [Fri, 19 Sep 2008 15:56:54 +0000 (17:56 +0200)]
atstk1000: fix build breakage with BOARD_ATSTK100X_SW2_CUSTOM=y

The #ifdef surrounding the code adding the mmc controller had a typo,
causing it to be compiled even when mmc was supposed to be disabled.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
16 years agomd: Don't wait UNINTERRUPTIBLE for other resync to finish
NeilBrown [Fri, 19 Sep 2008 01:49:54 +0000 (11:49 +1000)]
md: Don't wait UNINTERRUPTIBLE for other resync to finish

When two md arrays share some block device (e.g each uses different
partitions on the one device), a resync of one array will wait for
the resync on the other to finish.

This can be a long time and as it currently waits TASK_UNINTERRUPTIBLE,
the softlockup code notices and complains.

So use TASK_INTERRUPTIBLE instead and make sure to flush signals
before calling schedule.

Signed-off-by: NeilBrown <neilb@suse.de>
16 years agoe100: Use pci_pme_active to clear PME_Status and disable PME#
Rafael J. Wysocki [Thu, 7 Aug 2008 22:18:04 +0000 (00:18 +0200)]
e100: Use pci_pme_active to clear PME_Status and disable PME#

Currently e100 uses pci_enable_wake() to clear pending wake-up events
and disable PME# during intitialization, but that function is not
suitable for this purpose, because it immediately returns error code
if device_may_wakeup() returns false for given device.

Make e100 use pci_pme_active(), which carries out exactly the
required operations, instead.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoe1000: prevent corruption of EEPROM/NVM
Christopher Li [Fri, 5 Sep 2008 21:04:05 +0000 (14:04 -0700)]
e1000: prevent corruption of EEPROM/NVM

Andrey reports e1000 corruption, and that a patch in vmware's ESX fixed
it.

The EEPROM corruption is triggered by concurrent access of the EEPROM
read/write. Putting a lock around it solve the problem.

[akpm@linux-foundation.org: use DEFINE_SPINLOCK to avoid confusing lockdep]
Signed-off-by: Christopher Li <chrisl@vmware.com>
Reported-by: Andrey Borzenkov <arvidjaar@mail.ru>
Cc: Zach Amsden <zach@vmware.com>
Cc: Pratap Subrahmanyam <pratap@vmware.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
Cc: Bruce Allan <bruce.w.allan@intel.com>
Cc: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
Cc: John Ronciak <john.ronciak@intel.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoforcedeth: call restore mac addr in nv_shutdown path
Yinghai Lu [Sat, 13 Sep 2008 20:10:31 +0000 (13:10 -0700)]
forcedeth: call restore mac addr in nv_shutdown path

after

| commit f735a2a1a4f2a0f5cd823ce323e82675990469e2
| Author: Tobias Diedrich <ranma+kernel@tdiedrich.de>
| Date:   Sun May 18 15:02:37 2008 +0200
|
|    [netdrvr] forcedeth: setup wake-on-lan before shutting down
|
|    When hibernating in 'shutdown' mode, after saving the image the suspend hook
|    is not called again.
|    However, if the device is in promiscous mode, wake-on-lan will not work.
|    This adds a shutdown hook to setup wake-on-lan before the final shutdown.
|
|    Signed-off-by: Tobias Diedrich <ranma+kernel@tdiedrich.de>
|    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

my servers with nvidia ck804 and mcp55 will reverse mac address with kexec.

it turns out that we need to restore the mac addr in nv_shutdown().

[akpm@linux-foundation.org: fix typo in printk]
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Tobias Diedrich <ranma+kernel@tdiedrich.de>
Cc: Ayaz Abdulla <aabdulla@nvidia.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agobnx2: Promote vector field in bnx2_irq structure from u16 to unsigned int
Benjamin Li [Thu, 18 Sep 2008 23:46:11 +0000 (16:46 -0700)]
bnx2: Promote vector field in bnx2_irq structure from u16 to unsigned int

The bnx2 driver stores/uses the irq value from the pci_dev internally.
But when it stores the irq value, it has been performing an
integer demotion.  Because of the recent changes made to
arch/x86/kernel/io_apic.c, the new method in creating the irq value
(using build_irq_for_pci_dev()) has exposed this bug on x86 systems.

Because of this demotion when calling request_irq() from
bnx2_request_irq(), the driver would get a return code of -EINVAL.
This is because the kernel could not find the requested irq descriptor.
By storing the irq value properly, the kernel can find the correct
irq descriptor and the bnx2 driver can operate normally.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosctp: Fix oops when INIT-ACK indicates that peer doesn't support AUTH
Vlad Yasevich [Thu, 18 Sep 2008 23:28:27 +0000 (16:28 -0700)]
sctp: Fix oops when INIT-ACK indicates that peer doesn't support AUTH

If INIT-ACK is received with SupportedExtensions parameter which
indicates that the peer does not support AUTH, the packet will be
silently ignore, and sctp_process_init() do cleanup all of the
transports in the association.
When T1-Init timer is expires, OOPS happen while we try to choose
a different init transport.

The solution is to only clean up the non-active transports, i.e
the ones that the peer added.  However, that introduces a problem
with sctp_connectx(), because we don't mark the proper state for
the transports provided by the user.  So, we'll simply mark
user-provided transports as ACTIVE.  That will allow INIT
retransmissions to work properly in the sctp_connectx() context
and prevent the crash.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosctp: do not enable peer features if we can't do them.
Vlad Yasevich [Thu, 18 Sep 2008 23:27:38 +0000 (16:27 -0700)]
sctp: do not enable peer features if we can't do them.

Do not enable peer features like addip and auth, if they
are administratively disabled localy.  If the peer resports
that he supports something that we don't, neither end can
use it so enabling it is pointless.  This solves a problem
when talking to a peer that has auth and addip enabled while
we do not.  Found by Andrei Pelinescu-Onciul <andrei@iptel.org>.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ARM] 5255/1: Update jornada ssp to remove build errors/warnings
Kristoffer Ericson [Thu, 18 Sep 2008 11:19:39 +0000 (12:19 +0100)]
[ARM] 5255/1: Update jornada ssp to remove build errors/warnings

* Adds ssp functions into header so we don't get
"implicit declaration" error at builtime.
* Converts jornada_ssp_start/end functions into voids with
proper declarations (to avoid "prototype..." warning).
* Sorts include files in alphabetical order
* Minor comment changes

Signed-off-by: Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years agosctp: set the skb->ip_summed correctly when sending over loopback.
Vlad Yasevich [Thu, 18 Sep 2008 09:48:25 +0000 (02:48 -0700)]
sctp: set the skb->ip_summed correctly when sending over loopback.

Loopback used to clobber the ip_summed filed which sctp then used
to figure out if it needed to do checksumming or not.  Now that
loopback doesn't do that any more, sctp needs to set the ip_summed
field correctly.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ARM] omap: back out 'internal_clock' support
Russell King [Wed, 17 Sep 2008 19:58:11 +0000 (20:58 +0100)]
[ARM] omap: back out 'internal_clock' support

The structures weren't ready for this change:

arch/arm/plat-omap/devices.c:320: error: 'struct omap_mmc_conf' has no member named 'internal_clock'
arch/arm/plat-omap/devices.c:326: error: implicit declaration of function 'omap_ctrl_readl'
arch/arm/plat-omap/devices.c:326: error: 'OMAP2_CONTROL_DEVCONF0' undeclared (first use in this function)
arch/arm/plat-omap/devices.c:328: error: implicit declaration of function 'omap_ctrl_writel'

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 5249/1: davinci: remove redundant check in davinci_psc_config()
roelkluin [Mon, 15 Sep 2008 19:56:44 +0000 (20:56 +0100)]
[ARM] 5249/1: davinci: remove redundant check in davinci_psc_config()

id is unsigned, check is redundant.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years agoFix compile failure with non modular builds
James Bottomley [Tue, 9 Sep 2008 14:04:18 +0000 (14:04 +0000)]
Fix compile failure with non modular builds

Commit deac93df26b20cf8438339b5935b5f5643bc30c9 ("lib: Correct printk
%pF to work on all architectures") broke the non modular builds by
moving an essential function into modules.c.  Fix this by moving it
out again and into asm/sections.h as an inline.  To do this, the
definition of struct ppc64_opd_entry has been lifted out of modules.c
and put in asm/elf.h where it belongs.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years agopowerpc: Holly board needs dtbImage target
Josh Boyer [Tue, 9 Sep 2008 04:00:28 +0000 (04:00 +0000)]
powerpc: Holly board needs dtbImage target

One of the changes in the bootwrapper makefile introduced the dtbImage
targets for boards that need a simple zImage with a DTB embedded in
them (595be948cce574ff2d5dde5d0426a636a4363c70, "[POWERPC]
bootwrapper: Build multiple cuImages").  When this was done, it broke
booting on the Holly board as the zImage.holly wrapper did not get the
DTB embedded properly.

This changes the target for the Holly board to a dtbImage so that the
wrapper includes the vmlinux, wrapper bits, and DTB.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[XFS] Don't do I/O beyond eof when unreserving space
Lachlan McIlroy [Wed, 17 Sep 2008 06:52:50 +0000 (16:52 +1000)]
[XFS] Don't do I/O beyond eof when unreserving space

When unreserving space with boundaries that are not block aligned we round
up the start and round down the end boundaries and then use this function,
xfs_zero_remaining_bytes(), to zero the parts of the blocks that got
dropped during the rounding. The problem is we don't consider if these
blocks are beyond eof. Worse still is if we encounter delayed allocations
beyond eof we will try to use the magic delayed allocation block number as
a real block number. If the file size is ever extended to expose these
blocks then we'll go through xfs_zero_eof() to zero them anyway.

SGI-PV: 983683

SGI-Modid: xfs-linux-melb:xfs-kern:32055a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
16 years ago[XFS] Fix use-after-free with buffers
Lachlan McIlroy [Wed, 17 Sep 2008 06:52:13 +0000 (16:52 +1000)]
[XFS] Fix use-after-free with buffers

We have a use-after-free issue where log completions access buffers via
the buffer log item and the buffer has already been freed. Fix this by
taking a reference on the buffer when attaching the buffer log item and
release the hold when the buffer log item is detached and we no longer
need the buffer. Also create a new function xfs_buf_item_free() to combine
some common code.

SGI-PV: 985757

SGI-Modid: xfs-linux-melb:xfs-kern:32025a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
16 years ago[XFS] Prevent lockdep false positives when locking two inodes.
David Chinner [Wed, 17 Sep 2008 06:51:21 +0000 (16:51 +1000)]
[XFS] Prevent lockdep false positives when locking two inodes.

If we call xfs_lock_two_inodes() to grab both the iolock and the ilock,
then drop the ilocks on both inodes, then grab them again (as
xfs_swap_extents() does) then lockdep will report a locking order problem.
This is a false positive.

To avoid this, disallow xfs_lock_two_inodes() fom locking both inode locks
at once - force calers to make two separate calls. This means that nested
dropping and regaining of the ilocks will retain the same lockdep subclass
and so lockdep will not see anything wrong with this code.

SGI-PV: 986238

SGI-Modid: xfs-linux-melb:xfs-kern:31999a

Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Peter Leckie <pleckie@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
16 years ago[XFS] Fix barrier status change detection.
David Chinner [Wed, 17 Sep 2008 06:50:50 +0000 (16:50 +1000)]
[XFS] Fix barrier status change detection.

The current code in xlog_iodone() uses the wrong macro to check if the
barrier has been cleared due to an EOPNOTSUPP error form the lower layer.

SGI-PV: 986143

SGI-Modid: xfs-linux-melb:xfs-kern:31984a

Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Nathaniel W. Turner <nate@houseofnate.net>
Signed-off-by: Peter Leckie <pleckie@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
16 years ago[XFS] Prevent direct I/O from mapping extents beyond eof
Lachlan McIlroy [Wed, 17 Sep 2008 06:50:14 +0000 (16:50 +1000)]
[XFS] Prevent direct I/O from mapping extents beyond eof

With the help from some tracing I found that we try to map extents beyond
eof when doing a direct I/O read. It appears that the way to inform the
generic direct I/O path (ie do_direct_IO()) that we have breached eof is
to return an unmapped buffer from xfs_get_blocks_direct(). This will cause
do_direct_IO() to jump to the hole handling code where is will check for
eof and then abort.

This problem was found because a direct I/O read was trying to map beyond
eof and was encountering delayed allocations. The delayed allocations
beyond eof are speculative allocations and they didn't get converted when
the direct I/O flushed the file because there was only enough space in the
current AG to convert and write out the dirty pages within eof. Note that
xfs_iomap_write_allocate() wont necessarily convert all the delayed
allocation passed to it - it will return after allocating the first extent
- so if the delayed allocation extends beyond eof then it will stay that
way.

SGI-PV: 983683

SGI-Modid: xfs-linux-melb:xfs-kern:31929a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
16 years ago[XFS] Fix regression introduced by remount fixup
Christoph Hellwig [Wed, 17 Sep 2008 06:49:33 +0000 (16:49 +1000)]
[XFS] Fix regression introduced by remount fixup

Logically we would return an error in xfs_fs_remount code to prevent users
from believing they might have changed mount options using remount which
can't be changed.

But unfortunately mount(8) adds all options from mtab and fstab to the
mount arguments in some cases so we can't blindly reject options, but have
to check for each specified option if it actually differs from the
currently set option and only reject it if that's the case.

Until that is implemented we return success for every remount request, and
silently ignore all options that we can't actually change.

SGI-PV: 985710

SGI-Modid: xfs-linux-melb:xfs-kern:31908a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
16 years ago[XFS] Move memory allocations for log tracing out of the critical path
Lachlan McIlroy [Wed, 17 Sep 2008 06:45:37 +0000 (16:45 +1000)]
[XFS] Move memory allocations for log tracing out of the critical path

Memory allocations for log->l_grant_trace and iclog->ic_trace are done on
demand when the first event is logged. In xlog_state_get_iclog_space() we
call xlog_trace_iclog() under a spinlock and allocating memory here can
cause us to sleep with a spinlock held and deadlock the system.

For the log grant tracing we use KM_NOSLEEP but that means we can lose
trace entries. Since there is no locking to serialize the log grant
tracing we could race and have multiple allocations and leak memory.

So move the allocations to where we initialize the log/iclog structures.
Use KM_NOFS to avoid recursing into the filesystem and drop log->l_trace
since it's not even used.

SGI-PV: 983738

SGI-Modid: xfs-linux-melb:xfs-kern:31896a

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>