linux-2.6
15 years ago[ARM] pxa: register Power I2C device only when necessary
Eric Miao [Fri, 28 Nov 2008 07:24:12 +0000 (15:24 +0800)] 
[ARM] pxa: register Power I2C device only when necessary

Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years ago[ARM] pxa: move power I2C device definitions into devices.c
Eric Miao [Fri, 28 Nov 2008 07:01:55 +0000 (15:01 +0800)] 
[ARM] pxa: move power I2C device definitions into devices.c

Let's put these devices into a central place even if they are now
processor specific, as they might be re-used in later processors.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years ago[ARM] pxa: remove unnecessary #include of pxa2xx-gpio.h in clock.c
Eric Miao [Sun, 30 Nov 2008 13:10:05 +0000 (21:10 +0800)] 
[ARM] pxa: remove unnecessary #include of pxa2xx-gpio.h in clock.c

Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years ago[ARM] pxa: include <mach/hardware.h> in pxa-regs.h
Eric Miao [Sun, 30 Nov 2008 15:13:52 +0000 (23:13 +0800)] 
[ARM] pxa: include <mach/hardware.h> in pxa-regs.h

for the reference of __REG() within <mach/hardware.h>

Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years ago[ARM] pxa: further cleanup of pxa-regs.h
Eric Miao [Fri, 28 Nov 2008 06:57:33 +0000 (14:57 +0800)] 
[ARM] pxa: further cleanup of pxa-regs.h

Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years ago[ARM] pxa: move GPIOx_BASE and GPIO register offsets to gpio.c
Eric Miao [Fri, 28 Nov 2008 06:54:39 +0000 (14:54 +0800)] 
[ARM] pxa: move GPIOx_BASE and GPIO register offsets to gpio.c

Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years ago[ARM] pxa: move AC97 register definitions into dedicated regs-ac97.h
Eric Miao [Fri, 28 Nov 2008 06:19:33 +0000 (14:19 +0800)] 
[ARM] pxa: move AC97 register definitions into dedicated regs-ac97.h

The optimal change would be to move the AC97 register definitions into
the AC97 driver, unfortunately, the registers are shared between several
files. Move them into a dedicated regs-ac97.h first.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years ago[ARM] pxa: move UART register definitions into dedicated regs-uart.h
Eric Miao [Fri, 28 Nov 2008 06:08:53 +0000 (14:08 +0800)] 
[ARM] pxa: move UART register definitions into dedicated regs-uart.h

Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years ago[ARM] pxa: move pxa2xx specific PWRMODE definitions into pxa2xx-regs.h
Eric Miao [Fri, 28 Nov 2008 05:49:22 +0000 (13:49 +0800)] 
[ARM] pxa: move pxa2xx specific PWRMODE definitions into pxa2xx-regs.h

Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years ago[ARM] pxa: remove the now unused IMPMCR/IMPMSR register definitions
Eric Miao [Fri, 28 Nov 2008 05:38:03 +0000 (13:38 +0800)] 
[ARM] pxa: remove the now unused IMPMCR/IMPMSR register definitions

There two are internal registers that are used to control the power
management of the Internal Memory (i.e. Internal SRAM). They are
referenced nowhere and removed here to simplify pxa-regs.h a bit.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years ago[ARM] pxa: remove unused PWM register definitions, use generic PWM API
Eric Miao [Thu, 27 Nov 2008 09:08:42 +0000 (17:08 +0800)] 
[ARM] pxa: remove unused PWM register definitions, use generic PWM API

We now have generic PWM API for PXA, the PWM registers definitions are
now used nowhere, and it is not encouraged to manipulate them directly
by driver code.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years ago[ARM] pxa: move FICP register definitions into pxaficp_ir.c
Eric Miao [Fri, 28 Nov 2008 03:13:47 +0000 (11:13 +0800)] 
[ARM] pxa: move FICP register definitions into pxaficp_ir.c

Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years ago[ARM] pxa: move camera (QCI) registers definition out of pxa-regs.h
Eric Miao [Fri, 28 Nov 2008 01:16:52 +0000 (09:16 +0800)] 
[ARM] pxa: move camera (QCI) registers definition out of pxa-regs.h

Signed-off-by: Eric Miao <eric.miao@marvell.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
15 years ago[ARM] pxa: removed unused declarations of pxa_gpio_* in hardware.h
Eric Miao [Sun, 30 Nov 2008 12:58:42 +0000 (20:58 +0800)] 
[ARM] pxa: removed unused declarations of pxa_gpio_* in hardware.h

pxa_gpio_{get,set}_value() are not used anymore, remove them from hardware.h.
Declaration of pxa_gpio_mode() is still being referenced and thus moved into
pxa2xx-gpio.h

Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years ago[ARM] pxa: use <linux/gpio.h> instead of unnecessary <mach/gpio.h>
Eric Miao [Tue, 25 Nov 2008 03:03:03 +0000 (11:03 +0800)] 
[ARM] pxa: use <linux/gpio.h> instead of unnecessary <mach/gpio.h>

Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years ago[ARM] pxa: add support for additional GPIOs on PXA26x
Eric Miao [Wed, 26 Nov 2008 10:12:04 +0000 (18:12 +0800)] 
[ARM] pxa: add support for additional GPIOs on PXA26x

Original patch from Marek Vasut, the problems with PXA26x are:

1. there are additional 4 GPIOs 86,87,88,89 have their direction bits
   inverted in GPDR2, as well as their alternate function bits being
   '1' for their GPIO functionality in GAFRx

2. there is no easy way to decide if the processor is a pxa26x or a
   pxa250/pxa255 at run-time, so the assumption here is the pxa26x
   will be treated as one of the pxa25x variants, and board code
   should have a better knowledge of the processor it is featured

Introduce pxa26x_init_irq() for the second purpose, and treat the
additional GPIOs > 85 on PXA25x specially.

Kconfig option CONFIG_CPU_PXA26x is introduced to optimize the code
a bit when PXA26x support isn't needed. Board config options have
to select this to enable the support for PXA26x.

__gpio_is_inverted() will be optimized way when CONFIG_CPU_PXA26x
isn't selected.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years agoRevert "[ARM] pxa: introduce cpu_is_pxa26x()"
Eric Miao [Wed, 26 Nov 2008 10:25:52 +0000 (18:25 +0800)] 
Revert "[ARM] pxa: introduce cpu_is_pxa26x()"

This reverts commit da1a3dc0ebb4f9209a1939eaa6b18901e0cd7bc0.

The originally proposed way in the above commit is incorrect. And
there is no easy way to distinguish between pxa25x and pxa26x at
run-time.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years ago[ARM] pxa: use 'pxa_last_gpio' instead of 'gpio_nr' in mfp-pxa2xx.c
Eric Miao [Wed, 26 Nov 2008 09:06:42 +0000 (17:06 +0800)] 
[ARM] pxa: use 'pxa_last_gpio' instead of 'gpio_nr' in mfp-pxa2xx.c

The 'gpio_nr' can really be inferred by 'pxa_last_gpio', and since we
already have that variable, remove the unnecessary 'gpio_nr' now.

Also, fix the incorrect GPIO number passed in pxa27x_init_irq().

Note: pxa_last_gpio should be initialized earlier, and this is true
since it's been assigned in machine_desc->init_irq().

Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years ago[ARM] pxa: add muxed gpio wakeup sources on pxa2xx architectures
Robert Jarzmik [Thu, 13 Nov 2008 22:30:00 +0000 (23:30 +0100)] 
[ARM] pxa: add muxed gpio wakeup sources on pxa2xx architectures

PXA SoC have several GPIOs muxed on only one wakeup source.
Add support for these wakeup sources which were missing
in mfp core support.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years ago[ARM] pxa: explicit #include <mach/dma.h> in various drivers
Eric Miao [Mon, 1 Dec 2008 03:43:08 +0000 (11:43 +0800)] 
[ARM] pxa: explicit #include <mach/dma.h> in various drivers

Where 'pxa_dma_desc' and 'pxa_{request,free}_dma' are referenced.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
15 years agoLinux 2.6.28-rc7 v2.6.28-rc7
Linus Torvalds [Tue, 2 Dec 2008 03:59:23 +0000 (19:59 -0800)] 
Linux 2.6.28-rc7

15 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Tue, 2 Dec 2008 03:56:34 +0000 (19:56 -0800)] 
Merge branch 'for_linus' of git://git./linux/kernel/git/mchehab/linux-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (25 commits)
  em28xx: remove backward compat macro added on a previous fix
  V4L/DVB (9748): em28xx: fix compile warning
  V4L/DVB (9743): em28xx: fix oops audio
  V4L/DVB (9742): em28xx-alsa: implement another locking schema
  V4L/DVB (9732): sms1xxx: use new firmware for Hauppauge WinTV MiniStick
  V4L/DVB (9691): gspca: Move the video device to a separate area.
  V4L/DVB (9690): gspca: Lock the subdrivers via module_get/put.
  V4L/DVB (9689): gspca: Memory leak when disconnect while streaming.
  V4L/DVB (9668): em28xx: fix a race condition with hald
  V4L/DVB (9664): af9015: don't reconnect device in USB-bus
  V4L/DVB (9647): em28xx: void having two concurrent control URB's
  V4L/DVB (9646): em28xx: avoid allocating/dealocating memory on every control urb
  V4L/DVB (9645): em28xx: Avoid memory leaks if registration fails
  V4L/DVB (9639): Make dib0700 remote control support work with firmware v1.20
  V4L/DVB (9635): v4l: s2255drv fix firmware test on big-endian
  V4L/DVB (9634): Make sure the i2c gate is open before powering down tuner
  V4L/DVB (9632): make em28xx aux audio input work
  V4L/DVB (9631): Make s2api work for ATSC support
  V4L/DVB (9627): em28xx: Avoid i2c register error for boards without eeprom
  V4L/DVB (9608): Fix section mismatch warning for dm1105 during make
  ...

15 years agodrivers/gpu/drm/i915/i915_irq.c: fix warning
Andrew Morton [Mon, 1 Dec 2008 21:14:08 +0000 (13:14 -0800)] 
drivers/gpu/drm/i915/i915_irq.c: fix warning

drivers/gpu/drm/i915/i915_irq.c: In function 'i915_disable_pipestat':
drivers/gpu/drm/i915/i915_irq.c:101: warning: control may reach end of non-void function 'i915_pipestat' being inlined

Cc: Dave Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoi82875p_edac: fix module remove
Jarkko Lavinen [Mon, 1 Dec 2008 21:14:08 +0000 (13:14 -0800)] 
i82875p_edac: fix module remove

Fix module removal bugs of i82875p_edac.  Also i82975x_edac code seems to
have the same module removal bugs as in i82875p_edac.

The problems were:

1. In module removal i82875p_remove_one() is never called.

   Variable i82875p_registered is newer changed from 1, which
   guarantees i82875p_remove_one() is not called (and even if it were
   called, it would be called in wrong order).

   As a result, the edac_mc workque is not stopped and keeps probing.
   If kernel debugging options are not enabled, user may not notice
   anything going wrong.

   if debugging options are enabled and I do "rmmod i82875p_edac", I
   get:

      edac debug: edac_pci_workq_function() checking
      BUG: unable to handle kernel paging request at f882d16f
      ...
      call trace:
       [<f8834df3>] ? edac_mc_workq_function+0x55/0x7e [edac_core]
       [<c0233974>] ? run_workqueue+0xd7/0x1a5
       [<c023392f>] ? run_workqueue+0x92/0x1a5
       [<f8834d9e>] ? edac_mc_workq_function+0x0/0x7e [edac_core]
       [<c0233af9>] ? worker_thread+0xb7/0xc3
       [<c0236a7b>] ? autoremove_wake_function+0x0/0x33
       [<c0233a42>] ? worker_thread+0x0/0xc3
       [<c0236809>] ? kthread+0x3b/0x61
       [<c02367ce>] ? kthread+0x0/0x61
       [<c0204587>] ? kernel_thread_helper+0x7/0x10

   Fix for this is to get rid of needles variable i82875p_registered
   altogether and run i82875p_remove_one() *before*
   pci_unregister_driver().

2. edac_mc_del_mc() uses mci after freeing mci

   edac_mc_del_mc() calls calls edac_remove_sysfs_mci_device().  The
   kobject refcount of mci drops to 0 and mci is freed.  After this
   mci is accessed via debug print and i82875p_remove_one() still
   uses mci->pvt and tries to free mci again with edac_mc_free().

   The fix for this is add kobject_get(&mci->edac_mci_kobj) after
   edac_mc_alloc(). Then the mci is still available after returning
   from edac_mc_del_mc() with refcount 1, and mci->pvt is still
   available. When i82875p_remove_one() finally calls edac_mc_free(),
   this will cause kobject_put() and mci is released properly.

Signed-off-by: Jarkko Lavinen <jlavi@iki.fi>
Cc: Doug Thompson <norsk5@yahoo.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoi82875p_edac: fix overflow device resource setup
Jarkko Lavinen [Mon, 1 Dec 2008 21:14:06 +0000 (13:14 -0800)] 
i82875p_edac: fix overflow device resource setup

When I do "modprobe i82875p_edac" on my Asus P4C800 MB on kernels 2.6.26
or later, the module load fails due to BAR 0 collision.  On 2.6.25 the
module loads just fine.

The overflow device on the MB seems to be hidden and its resources are not
allocated at normal PCI bus init.  Log shows the missing resource problem:

  EDAC DEBUG: i82875p_probe1()
  PCI: 0000:00:06.0 reg 10 32bit mmio: [fecf0000fecf0fff]
  pci 0000:00:06.0: device not available because of BAR 0
[0xfecf0000-0xfecf0fff] collisions
  EDAC i82875p: i82875p_setup_overfl_dev(): Failed to enable overflow
device

The patch below fixes this by calling pci_bus_assign_resources() after
the overflow device is revealed and added to the bus. With this patch
I am again able to load and use the module.

Signed-off-by: Jarkko Lavinen <jlavi@iki.fi>
Cc: Doug Thompson <norsk5@yahoo.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofbdev: fix FB console blanking
Dmitry Baryshkov [Mon, 1 Dec 2008 21:14:05 +0000 (13:14 -0800)] 
fbdev: fix FB console blanking

The commit aef7db4bd5a3b6068dfa05919a3d685199eed116 fixed the problem with
recursive locking in fb blanking code if blank is caused by user setting
the /sys/class/graphics/fb*/blank.  However this broke the fbcon timeout
blanking.

If you use a driver that defines ->fb_blank operation and at the same time
that driver relies on other driver (e.g.  backlight or lcd class) to blank
the screen, when the fbcon times out and tries to blank the fb, it will
call only fb driver blanker and won't notify the other driver.  Thus FB
output is disabled, but the screen isn't blanked.

Restore fbcon blanking and at the same time apply the proper fix for the
above problem: if fbcon_blank is called with FBINFO_FLAG_USEREVENT, we are
already called through notification from fb_blank, thus we don't have to
blank the fb again.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agontfs: don't fool kernel-doc
Randy Dunlap [Mon, 1 Dec 2008 21:14:04 +0000 (13:14 -0800)] 
ntfs: don't fool kernel-doc

kernel-doc handles macros now (it has for quite some time), so change the
ntfs_debug() macro's kernel-doc to be just before the macro instead of
before a phony function prototype.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Anton Altaparmakov <aia21@cantab.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agokernel-doc: handle varargs cleanly
Randy Dunlap [Mon, 1 Dec 2008 21:14:03 +0000 (13:14 -0800)] 
kernel-doc: handle varargs cleanly

The method for listing varargs in kernel-doc notation is:
 * @...: these arguments are printed by the @fmt argument

but scripts/kernel-doc is confused:  it always lists varargs as:
... variable arguments
and ignores the @...: line's description, but then prints that
line after the list of function parameters as though it's
not part of the function parameters.

This patch makes kernel-doc print the supplied @...  description if it is
present; otherwise a boilerplate "variable arguments" is printed.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agolib/idr.c: fix rcu related race with idr_find
Manfred Spraul [Mon, 1 Dec 2008 21:14:02 +0000 (13:14 -0800)] 
lib/idr.c: fix rcu related race with idr_find

2nd part of the fixes needed for
http://bugzilla.kernel.org/show_bug.cgi?id=11796.

When the idr tree is either grown or shrunk, then the update to the number
of layers and the top pointer were not atomic.  This race caused crashes.

The attached patch fixes that by replicating the layers counter in each
layer, thus idr_find doesn't need idp->layers anymore.

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Cc: Clement Calmels <cboulte@gmail.com>
Cc: Nadia Derbey <Nadia.Derbey@bull.net>
Cc: Pierre Peiffer <peifferp@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoDMA-API.txt: fix description of pci_map_sg/dma_map_sg scatterlists handling
FUJITA Tomonori [Mon, 1 Dec 2008 21:14:01 +0000 (13:14 -0800)] 
DMA-API.txt: fix description of pci_map_sg/dma_map_sg scatterlists handling

- pci_map_sg/dma_map_sg are used with a scatter gather list that doesn't
  come from the block layer (e.g.  some network drivers do).

- how IOMMUs merge adjacent elements of the scatter/gather list is
  independent of how the block layer determines sees elements.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Tejun Heo <htejun@gmail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofrv: fix mmap2 error handling
David Howells [Mon, 1 Dec 2008 21:14:00 +0000 (13:14 -0800)] 
frv: fix mmap2 error handling

Fix the error handling in sys_mmap2().  Currently, if the pgoff check
fails, fput() might have to be called (which it isn't), so do the pgoff
check first, before fget() is called.

Signed-off-by: David Howells <dhowells@redhat.com>
Reported-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotaint: add missing comment
Arjan van de Ven [Mon, 1 Dec 2008 21:14:00 +0000 (13:14 -0800)] 
taint: add missing comment

The description for 'D' was missing in the comment...  (causing me a
minute of WTF followed by looking at more of the code)

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoradeonfb: fix problem with color expansion & alignment
Benjamin Herrenschmidt [Mon, 1 Dec 2008 21:13:58 +0000 (13:13 -0800)] 
radeonfb: fix problem with color expansion & alignment

The engine on some radeon variants locks up if color expansion is called
for non aligned source data.  This patch enables a feature of the core
fbdev to request aligned input pixmaps and uses the HW clipping engine to
clip the output to the requested size

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=11875

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Tested-by: James Cloos <cloos@jhcloos.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agospi: fix spi_s3c24xx_gpio num_chipselect
Ben Dooks [Mon, 1 Dec 2008 21:13:57 +0000 (13:13 -0800)] 
spi: fix spi_s3c24xx_gpio num_chipselect

The spi master driver must have num_chipselect set to allow the bus to
initialise.  Pass this through the platform data.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agospi: fix spi_s3c24xx_gpio device handle lookup
Ben Dooks [Mon, 1 Dec 2008 21:13:56 +0000 (13:13 -0800)] 
spi: fix spi_s3c24xx_gpio device handle lookup

The spidev_to_sg() call in spi_s3c24xx_gpio.c was using the wrong method
to convert the spi device into the private data for the driver.  Fix this
by using spi_master_get_devdata.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agospi: au1550_spi full duplex dma fix
Jan Nikitenko [Mon, 1 Dec 2008 21:13:56 +0000 (13:13 -0800)] 
spi: au1550_spi full duplex dma fix

Fix unsafe order in dma mapping operation: always flush data from the
cache *BEFORE* invalidating it, to allow full duplex transfers where the
same buffer may be used for both writes and reads.  Tested with mmc-spi.

Signed-off-by: Jan Nikitenko <jan.nikitenko@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agospi: fix spi_imx probe oopsing
Julien Boibessot [Mon, 1 Dec 2008 21:13:55 +0000 (13:13 -0800)] 
spi: fix spi_imx probe oopsing

Corrects spi_imx driver oops during initialization/probing: can't use
drv_data before it's allocated.

Signed-off-by: Julien Boibessot <julien.boibessot@armadeus.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoepoll: introduce resource usage limits
Davide Libenzi [Mon, 1 Dec 2008 21:13:55 +0000 (13:13 -0800)] 
epoll: introduce resource usage limits

It has been thought that the per-user file descriptors limit would also
limit the resources that a normal user can request via the epoll
interface.  Vegard Nossum reported a very simple program (a modified
version attached) that can make a normal user to request a pretty large
amount of kernel memory, well within the its maximum number of fds.  To
solve such problem, default limits are now imposed, and /proc based
configuration has been introduced.  A new directory has been created,
named /proc/sys/fs/epoll/ and inside there, there are two configuration
points:

  max_user_instances = Maximum number of devices - per user

  max_user_watches   = Maximum number of "watched" fds - per user

The current default for "max_user_watches" limits the memory used by epoll
to store "watches", to 1/32 of the amount of the low RAM.  As example, a
256MB 32bit machine, will have "max_user_watches" set to roughly 90000.
That should be enough to not break existing heavy epoll users.  The
default value for "max_user_instances" is set to 128, that should be
enough too.

This also changes the userspace, because a new error code can now come out
from EPOLL_CTL_ADD (-ENOSPC).  The EMFILE from epoll_create() was already
listed, so that should be ok.

[akpm@linux-foundation.org: use get_current_user()]
Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: <stable@kernel.org>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Reported-by: Vegard Nossum <vegardno@ifi.uio.no>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agospi: mpc52xx_psc_spi chipselect bugfix
Stefano Babic [Mon, 1 Dec 2008 21:13:53 +0000 (13:13 -0800)] 
spi: mpc52xx_psc_spi chipselect bugfix

According to the manual the "tdfOnExit" flag must be set on the last byte
we want to send.  The PSC controller holds SS low until the flag is set.

However, the flag was set always on the last byte of the FIFO,
independently if it is the last byte of the transfer.  This generates
spurious toggling of the SS signals that breaks the protocol of some
peripherals.  Fix.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agospi: avoid spidev crash when device is removed
Wolfgang Ocker [Mon, 1 Dec 2008 21:13:52 +0000 (13:13 -0800)] 
spi: avoid spidev crash when device is removed

I saw a kernel oops in spidev_remove() when a spidev device was registered
and I unloaded the SPI master driver:

Unable to handle kernel paging request for data at address 0x00000004
Faulting instruction address: 0xc01c0c50
Oops: Kernel access of bad area, sig: 11 [#1]
CDSPR
Modules linked in: spi_ppc4xx(-)
NIP: c01c0c50 LR: c01bf9e4 CTR: c01c0c34
REGS: cec89c30 TRAP: 0300   Not tainted  (2.6.27.3izt)
MSR: 00021000 <ME>  CR: 24000228  XER: 20000007
DEAR: 00000004, ESR: 00800000
TASK = cf889040[2070] 'rmmod' THREAD: cec88000
GPR00: 00000000 cec89ce0 cf889040 cec8e000 00000004 cec8e000 ffffffff 00000000
GPR08: 0000001c c0336380 00000000 c01c0c34 00000001 1001a338 100e0000 100df49c
GPR16: 100b54c0 100df49c 100ddd20 100f05a8 100b5340 100efd68 00000000 00000000
GPR24: 100ec008 100f0428 c0327788 c0327794 cec8e0ac cec8e000 c0336380 00000000
NIP [c01c0c50] spidev_remove+0x1c/0xe4
LR [c01bf9e4] spi_drv_remove+0x2c/0x3c
Call Trace:
[cec89d00] [c01bf9e4] spi_drv_remove+0x2c/0x3c
[cec89d10] [c01859a0] __device_release_driver+0x78/0xb4
[cec89d20] [c0185ab0] device_release_driver+0x28/0x44
[cec89d40] [c0184be8] bus_remove_device+0xac/0xd8
[cec89d60] [c0183094] device_del+0x100/0x194
[cec89d80] [c0183140] device_unregister+0x18/0x30
[cec89da0] [c01bf30c] __unregister+0x20/0x34
[cec89db0] [c0182778] device_for_each_child+0x38/0x74
[cec89de0] [c01bf2d0] spi_unregister_master+0x28/0x44
[cec89e00] [c01bfeac] spi_bitbang_stop+0x1c/0x58
[cec89e20] [d908a5e0] spi_ppc4xx_of_remove+0x24/0x7c [spi_ppc4xx]
[...]

IMHO a call to spi_set_drvdata() is missing in spidev_probe(). The patch
below helped.

Signed-off-by: Wolfgang Ocker <weo@reccoware.de>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agospi documentation: use __initdata on struct
roel kluin [Mon, 1 Dec 2008 21:13:51 +0000 (13:13 -0800)] 
spi documentation: use __initdata on struct

Use __initdata for data, not __init.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agohwmon: applesmc: make applesmc load automatically on startup
Henrik Rydberg [Mon, 1 Dec 2008 21:13:49 +0000 (13:13 -0800)] 
hwmon: applesmc: make applesmc load automatically on startup

make use of the new dmi device loading support to automatically load the
applesmc driver based on the dmi_match table.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Cc: Nicolas Boichat <nicolas@boichat.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoparport_serial: fix array overflow
Takashi Iwai [Mon, 1 Dec 2008 21:13:49 +0000 (13:13 -0800)] 
parport_serial: fix array overflow

The netmos_9xx5_combo type assumes that PCI SSID provides always the
correct value for the number of parallel and serial ports, but there are
indeed broken devices with wrong numbers, which may result in Oops.

This patch simply adds the check of the array range.

Reference: Novell bnc#447067
https://bugzilla.novell.com/show_bug.cgi?id=447067

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomemcg: memory hotplug fix for notifier callback
KAMEZAWA Hiroyuki [Mon, 1 Dec 2008 21:13:48 +0000 (13:13 -0800)] 
memcg: memory hotplug fix for notifier callback

Fixes for memcg/memory hotplug.

While memory hotplug allocate/free memmap, page_cgroup doesn't free
page_cgroup at OFFLINE when page_cgroup is allocated via bootomem.
(Because freeing bootmem requires special care.)

Then, if page_cgroup is allocated by bootmem and memmap is freed/allocated
by memory hotplug, page_cgroup->page == page is no longer true.

But current MEM_ONLINE handler doesn't check it and update
page_cgroup->page if it's not necessary to allocate page_cgroup.  (This
was not found because memmap is not freed if SPARSEMEM_VMEMMAP is y.)

And I noticed that MEM_ONLINE can be called against "part of section".
So, freeing page_cgroup at CANCEL_ONLINE will cause trouble.  (freeing
used page_cgroup) Don't rollback at CANCEL.

One more, current memory hotplug notifier is stopped by slub because it
sets NOTIFY_STOP_MASK to return vaule.  So, page_cgroup's callback never
be called.  (low priority than slub now.)

I think this slub's behavior is not intentional(BUG). and fixes it.

Another way to be considered about page_cgroup allocation:
  - free page_cgroup at OFFLINE even if it's from bootmem
    and remove specieal handler. But it requires more changes.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=12041

Signed-off-by: KAMEZAWA Hiruyoki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Pavel Emelyanov <xemul@openvz.org>
Tested-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomm: vmalloc fix lazy unmapping cache aliasing
Nick Piggin [Mon, 1 Dec 2008 21:13:47 +0000 (13:13 -0800)] 
mm: vmalloc fix lazy unmapping cache aliasing

Jim Radford has reported that the vmap subsystem rewrite was sometimes
causing his VIVT ARM system to behave strangely (seemed like going into
infinite loops trying to fault in pages to userspace).

We determined that the problem was most likely due to a cache aliasing
issue.  flush_cache_vunmap was only being called at the moment the page
tables were to be taken down, however with lazy unmapping, this can happen
after the page has subsequently been freed and allocated for something
else.  The dangling alias may still have dirty data attached to it.

The fix for this problem is to do the cache flushing when the caller has
called vunmap -- it would be a bug for them to write anything else to the
mapping at that point.

That appeared to solve Jim's problems.

Reported-by: Jim Radford <radford@blackbean.org>
Signed-off-by: Nick Piggin <npiggin@suse.de>
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>
15 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
Linus Torvalds [Tue, 2 Dec 2008 02:56:55 +0000 (18:56 -0800)] 
Merge branch 'upstream-linus' of git://git./linux/kernel/git/mfasheh/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
  ocfs2: fix regression in ocfs2_read_blocks_sync()
  ocfs2: fix return value set in init_dlmfs_fs()
  ocfs2: Small documentation update
  ocfs2: fix wake_up in unlock_ast
  ocfs2: initialize stack_user lvbptr
  ocfs2: comments typo fix

15 years ago[ARM] fix missing includes for iop33x and sa1100_ir
Russell King [Mon, 1 Dec 2008 23:01:19 +0000 (23:01 +0000)] 
[ARM] fix missing includes for iop33x and sa1100_ir

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoocfs2: fix regression in ocfs2_read_blocks_sync()
Mark Fasheh [Fri, 21 Nov 2008 22:06:55 +0000 (14:06 -0800)] 
ocfs2: fix regression in ocfs2_read_blocks_sync()

We're panicing in ocfs2_read_blocks_sync() if a jbd-managed buffer is seen.
At first glance, this seems ok but in reality it can happen. My test case
was to just run 'exorcist'. A struct inode is being pushed out of memory but
is then re-read at a later time, before the buffer has been checkpointed by
jbd. This causes a BUG to be hit in ocfs2_read_blocks_sync().

Reviewed-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: fix return value set in init_dlmfs_fs()
Coly Li [Mon, 17 Nov 2008 04:38:22 +0000 (12:38 +0800)] 
ocfs2: fix return value set in init_dlmfs_fs()

In init_dlmfs_fs(), if calling kmem_cache_create() failed, the code will use return value from
calling bdi_init(). The correct behavior should be set status as -ENOMEM before going to "bail:".

Signed-off-by: Coly Li <coyli@suse.de>
Acked-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: Small documentation update
Mark Fasheh [Tue, 18 Nov 2008 23:08:42 +0000 (15:08 -0800)] 
ocfs2: Small documentation update

Remove some features from the "not-supported" list that are actually
supported now.

Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: fix wake_up in unlock_ast
David Teigland [Mon, 17 Nov 2008 18:28:48 +0000 (12:28 -0600)] 
ocfs2: fix wake_up in unlock_ast

In ocfs2_unlock_ast(), call wake_up() on lockres before releasing
the spin lock on it.  As soon as the spin lock is released, the
lockres can be freed.

Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: initialize stack_user lvbptr
David Teigland [Mon, 10 Nov 2008 22:24:57 +0000 (16:24 -0600)] 
ocfs2: initialize stack_user lvbptr

The locking_state dump, ocfs2_dlm_seq_show, reads the lvb on locks where it
has not yet been initialized by a lock call.

Signed-off-by: David Teigland <teigland@redhat.com>
Acked-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: comments typo fix
Coly Li [Wed, 5 Nov 2008 07:16:24 +0000 (15:16 +0800)] 
ocfs2: comments typo fix

This patch fixes two typos in comments of ocfs2.

Signed-off-by: Coly Li <coyli@suse.de>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoem28xx: remove backward compat macro added on a previous fix
Mauro Carvalho Chehab [Mon, 1 Dec 2008 20:04:14 +0000 (18:04 -0200)] 
em28xx: remove backward compat macro added on a previous fix

commit 50f3beb50abe0cc0228363af804e50e710b3e5b0 fixed em28xx-alsa
locking schema. However, a backport macro was kept.

This patch removes the macro, since it is not needed for the module
compilation against upstream.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Mon, 1 Dec 2008 19:23:33 +0000 (11:23 -0800)] 
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata: blacklist Seagate drives which time out FLUSH_CACHE when used with NCQ
  [libata] pata_rb532_cf: fix signature of the xfer function
  [libata] pata_rb532_cf: fix and rename register definitions
  ata_piix: add borked Tecra M4 to broken suspend list

15 years agoV4L/DVB (9748): em28xx: fix compile warning
Hans Verkuil [Mon, 24 Nov 2008 12:53:22 +0000 (09:53 -0300)] 
V4L/DVB (9748): em28xx: fix compile warning

Label fail_unreg is no longer used.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9743): em28xx: fix oops audio
Douglas Schilling Landgraf [Mon, 24 Nov 2008 12:51:20 +0000 (09:51 -0300)] 
V4L/DVB (9743): em28xx: fix oops audio

Replaced usb_kill_usb for usb_unlink_usb
(wait until urb to fully stop require USB core to put the calling process to sleep).

Oops:
http://www.kerneloops.org/raw.php?rawid=71799&msgid=

Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Mon, 1 Dec 2008 19:01:54 +0000 (11:01 -0800)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/mlx4: Fix MTT leakage in resize CQ
  IB/ehca: Fix problem with generated flush work completions
  IB/ehca: Change misleading error message on memory hotplug
  mlx4_core: Save/restore default port IB capability mask

15 years agolibata: blacklist Seagate drives which time out FLUSH_CACHE when used with NCQ
Tejun Heo [Thu, 27 Nov 2008 04:36:48 +0000 (13:36 +0900)] 
libata: blacklist Seagate drives which time out FLUSH_CACHE when used with NCQ

Some recent Seagate harddrives have firmware bug which causes FLUSH
CACHE to timeout under certain circumstances if NCQ is being used.
This can be worked around by disabling NCQ and fixed by updating the
firmware.  Implement ATA_HORKAGE_FIRMWARE_UPDATE and blacklist these
devices.

The wiki page has been updated to contain information on this issue.

  http://ata.wiki.kernel.org/index.php/Known_issues

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years ago[libata] pata_rb532_cf: fix signature of the xfer function
Phil Sutter [Fri, 28 Nov 2008 19:48:35 +0000 (20:48 +0100)] 
[libata] pata_rb532_cf: fix signature of the xfer function

Per definition, this function should return the number of bytes
consumed. As the original parameter "buflen" is being decremented inside
the read/write loop, save it in "retlen" at the beginning.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Acked-by: Sergei Shtyltov <sshtylyov@ru.mvista.com>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years ago[libata] pata_rb532_cf: fix and rename register definitions
Phil Sutter [Fri, 28 Nov 2008 19:48:26 +0000 (20:48 +0100)] 
[libata] pata_rb532_cf: fix and rename register definitions

The original standalone driver uses a custom address for the error
register. Use it in pata_rb532_cf, too.

Rename two register definitions:
- The address offset 0x0800 in fact is the ATA base, not ATA command
  address.
- The offset 0x0C00 is not a regular ATA data address, but a buffered one
  allowing 4-byte IO.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoata_piix: add borked Tecra M4 to broken suspend list
Tejun Heo [Sat, 29 Nov 2008 13:37:21 +0000 (22:37 +0900)] 
ata_piix: add borked Tecra M4 to broken suspend list

Tecra M4 sometimes forget what it is and reports bogus data via DMI
which makes the machine evade broken suspend matching and thus fail
suspend/resume.  This patch updates piix_broken_suspend() such that it
can match such case.  As the borked DMI data is a bit generic,
matching many entries to make the match more specific is necessary.
As the usual DMI matching is limited to four entries, this patch uses
hard coded manual matching.

This is reported by Alexandru Romanescu.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Alexandru Romanescu <a_romanescu@yahoo.co.uk>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoMerge branches 'ehca' and 'mlx4' into for-linus
Roland Dreier [Mon, 1 Dec 2008 18:11:50 +0000 (10:11 -0800)] 
Merge branches 'ehca' and 'mlx4' into for-linus

15 years agoIB/mlx4: Fix MTT leakage in resize CQ
Jack Morgenstein [Mon, 1 Dec 2008 18:09:37 +0000 (10:09 -0800)] 
IB/mlx4: Fix MTT leakage in resize CQ

When resizing a CQ, MTTs associated with the old CQE buffer were not
freed.  As a result, if any app used resize CQ repeatedly, all MTTs
were eventually exhausted, which led to all memory registration
operations failing until the driver is reloaded.

Once the RESIZE_CQ command returns successfully from FW, FW no longer
accesses the old CQ buffer, so it is safe to deallocate the MTT
entries used by the old CQ buffer.

Finally, if the RESIZE_CQ command fails, the MTTs allocated for the
new CQEs buffer also need to be de-allocated.

This fixes <https://bugs.openfabrics.org/show_bug.cgi?id=1416>.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoIB/ehca: Fix problem with generated flush work completions
Stefan Roscher [Mon, 1 Dec 2008 18:05:50 +0000 (10:05 -0800)] 
IB/ehca: Fix problem with generated flush work completions

This fix enables ehca device driver to generate flush work completions
even if the application doesn't request completions for all work
requests. The current implementation of ehca will generate flush work
completions for the wrong work requests if an application uses non
signaled work completions.

Signed-off-by: Stefan Roscher <stefan.roscher@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoIB/ehca: Change misleading error message on memory hotplug
Joachim Fenkes [Mon, 1 Dec 2008 18:05:44 +0000 (10:05 -0800)] 
IB/ehca: Change misleading error message on memory hotplug

The error message printed when the eHCA driver prevents memory hotplug
is misleading -- the user might think that hot-removing the lhca,
hotplugging memory, then hot-adding the lhca again will work, but it
actually doesn't.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years agoMerge branch 'for-rmk-realview' of git://linux-arm.org/linux-2.6 into devel
Russell King [Mon, 1 Dec 2008 17:53:45 +0000 (17:53 +0000)] 
Merge branch 'for-rmk-realview' of git://linux-arm.org/linux-2.6 into devel

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Mon, 1 Dec 2008 17:34:23 +0000 (09:34 -0800)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  ieee1394: sbp2: fix race condition in state change
  ieee1394: fix list corruption (reported at module removal)
  firewire: fw-sbp2: another iPod mini quirk entry
  ieee1394: sbp2: another iPod mini quirk entry

15 years ago[ARM] 5336/1: Formatting/Whitespace cleanups in mach-sa1100
Kristoffer Ericson [Wed, 26 Nov 2008 19:58:43 +0000 (20:58 +0100)] 
[ARM] 5336/1: Formatting/Whitespace cleanups in mach-sa1100

This patch fixes bad formatting found in
mach-sa1100 files.

What it does is to replace/delete things like
excessive spaces (start || endline). The code
looks the same just alot less junk.

Signed-off-by: Kristoffer Ericson <Kristoffer.Ericson@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5324/2: ep93xx: support gpio interrupt debounce
Hartley Sweeten [Tue, 28 Oct 2008 16:55:30 +0000 (17:55 +0100)] 
[ARM] 5324/2: ep93xx: support gpio interrupt debounce

Add debounce support for ep93xx gpio interrupts.

On the EP93xx, GPIO ports A, B, and F can be used to generate
interrupts. For each port, if interrupts are enabled, it is
possible to debouce the input signal. Debouncing is implemented
by passing the input signal through a 2-bit shift register clocked
by a 128Hz clock.

This patch adds a platform specific way to enable the debouce
feature for these input ports.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5311/1: ep93xx: add core support for built in i2c bus
Hartley Sweeten [Thu, 16 Oct 2008 22:57:03 +0000 (23:57 +0100)] 
[ARM] 5311/1: ep93xx: add core support for built in i2c bus

Allow the ep93xx platform init code to register the built-in i2c bus.

The EP93xx processor has two GPIO pins dedicated for an I2C bus. This
patch registers the platform supplied i2c_board_info and the necessary
platform_device information for the i2c-gpio driver to use these pins.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5309/1: ep93xx: add edb9307a platform
Hartley Sweeten [Wed, 15 Oct 2008 19:01:30 +0000 (20:01 +0100)] 
[ARM] 5309/1: ep93xx: add edb9307a platform

Add Cirrus Logic EDB9307A Dev Board to arch/arm/mach-ep93xx

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5319/1: AT91: support AT91CAP9 revC CPUs
Stelian Pop [Wed, 22 Oct 2008 12:52:08 +0000 (13:52 +0100)] 
[ARM] 5319/1: AT91: support AT91CAP9 revC CPUs

The AT91CAP9 revC CPU has a few differences over the previous,
revB CPU which was distributed in small quantities only (revA was
an internal Atmel product only).

This patch adds the detection routines to recognize the different
AT91CAP9 revisions (based on the PMC subsystem version number), and
uses them to:
- activate a workaround for the external interrupts levels
  (on revB CPUs)
- set the UDPHS_BYPASS bit (on revB CPUs)
- set AT91_GPBR register address to the correct offset
  (0xfffffd50 on revB, 0xfffffd60 on revC)

For debugging usage, the CPU revision can be found in /proc/cpuinfo
on the 'Revision' line.

This patch is extracted from Andrew Victor's -at91 patch (2.6.27-at91.patch)
where it has been tested for the last 6 months.

Signed-off-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5290/1: [AT91] Add support for the Adeneo NeoCore 926 board
Andrew Victor [Mon, 6 Oct 2008 19:13:53 +0000 (20:13 +0100)] 
[ARM] 5290/1: [AT91] Add support for the Adeneo NeoCore 926 board

Add support for the Adeneo NeoCore 926 board.

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Signed-off-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5289/1: [AT91] Convert boards to use sam9_smc_configure()
Andrew Victor [Mon, 6 Oct 2008 19:05:35 +0000 (20:05 +0100)] 
[ARM] 5289/1: [AT91] Convert boards to use sam9_smc_configure()

Convert the SAM9 and CAP9 board-specific files to make use of the
sam9_smc_configure() method to configure the memory-controller for
external peripherals.

The following boards have been modified:
 cam60 : NAND
 cap9adk : NAND, NOR
 qil-a9260 : NAND
 sam9-l9260 : NAND
 sam9260ek : NAND
 sam9261ek : DM9000 Ethernet, NAND
 sam9263 : NAND
 sam9g20ek : NAND
 sam9rlek : NAND
 usb-a9260 : NAND
 usb-a9263 .: NAND

Signed-off-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5288/1: [AT91] Remove SMC configuration from devices.c files
Andrew Victor [Mon, 6 Oct 2008 19:01:00 +0000 (20:01 +0100)] 
[ARM] 5288/1: [AT91] Remove SMC configuration from devices.c files

In at91_add_device_nand(), do not configure the Static Memory
controller with specific timing values.
The *_devices.c files are board independent, and the SMC timing values
are specific to the NAND devices that are installed on the board.
The board-specific files are now responsible for configuring the
Static Memory controller (if the don't want to leave it up to a
bootloader).

Signed-off-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5287/2: [AT91] Configuration of Static Memory Controller
Andrew Victor [Mon, 13 Oct 2008 19:28:13 +0000 (20:28 +0100)] 
[ARM] 5287/2: [AT91] Configuration of Static Memory Controller

Add a structure 'sam9_smc_config' and function sam9_smc_configure() to
allow the board-specific files to specify the configuration of the
Static Memory Controller per chip-select.  This allows the board file
to specify timings for NAND flash, NOR flash or other external
peripherals.

This functionality can be used for all the SAM9 and CAP9 processors.
(the AT91RM9200 has a different memory-controller)
This patch is based on similar code in the AVR32 architecture.

Signed-off-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Mon, 1 Dec 2008 16:33:59 +0000 (08:33 -0800)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: Apple ALU wireless keyboards are bluetooth devices
  HID: remove setup mutex, fix possible deadlock
  HID: add USB ID for another dual gameron adapter
  HID: unignore mouse on unibody macbooks
  HID: fix blacklist entries for greenasia/pantherlord

15 years agoAdd kref to fake tty used by USB console
Kevin Hao [Mon, 1 Dec 2008 11:36:16 +0000 (11:36 +0000)] 
Add kref to fake tty used by USB console

We alloc a fake tty in usb serial console setup function. we should
init the tty's kref otherwise we will face WARN_ON after following
invoke of tty_port_tty_set --> tty_kref_get.

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodrivers/char/tty_io.c: Avoid panic when no console is configured.
Will Newton [Mon, 1 Dec 2008 11:36:06 +0000 (11:36 +0000)] 
drivers/char/tty_io.c: Avoid panic when no console is configured.

When no console is configured tty_open tries to call kref_get on a NULL
pointer, return ENODEV instead.

Signed-off-by: Will Newton <will.newton@gmail.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Mon, 1 Dec 2008 15:58:49 +0000 (07:58 -0800)] 
Merge git://git./linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: serial: add more Onda device ids to option driver
  USB: usb-storage: unusual_devs entry for Nikon D2H
  USB: storage: unusual_devs entry for Mio C520-GPS
  USB: fsl_usb2_udc: Report disconnect before unbinding
  USB: fsl_qe_udc: Report disconnect before unbinding
  USB: fix SB600 USB subsystem hang bug
  Revert "USB: improve ehci_watchdog's side effect in CPU power management"

15 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Mon, 1 Dec 2008 15:58:23 +0000 (07:58 -0800)] 
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  powerpc: Fix build for 32-bit SMP configs

15 years agovmscan: protect zone rotation stats by lru lock
Johannes Weiner [Mon, 1 Dec 2008 02:00:35 +0000 (03:00 +0100)] 
vmscan: protect zone rotation stats by lru lock

The zone's rotation statistics must not be accessed without the
corresponding LRU lock held.  Fix an unprotected write in
shrink_active_list().

Acked-by: Rik van Riel <riel@redhat.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoRevert "of_platform_driver noise on sparce"
Linus Torvalds [Mon, 1 Dec 2008 15:55:14 +0000 (07:55 -0800)] 
Revert "of_platform_driver noise on sparce"

This reverts commit e669dae6141ff97d3c7566207f5de3b487dcf837, since it
is incomplete, and clashes with fuller patches and the sparc 32/64
unification effort.

Requested-by: David Miller <davem@davemloft.net>
Acked-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoRealView: Select CPU_V6 for MACH_REALVIEW_PB11MP
Catalin Marinas [Mon, 1 Dec 2008 14:55:00 +0000 (14:55 +0000)] 
RealView: Select CPU_V6 for MACH_REALVIEW_PB11MP

This seems to be missing from the arm:devel branch, though the other
RealView configurations were modified accordingly.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
15 years agoRealView: Update the realview-smp_defconfig file to a newer kernel
Catalin Marinas [Mon, 1 Dec 2008 14:55:00 +0000 (14:55 +0000)] 
RealView: Update the realview-smp_defconfig file to a newer kernel

The original file was based on 2.6.19-rc3. Apart from the new symbols,
the explicitly enabled eatures are AEABI, REALVIEW_HIGH_PHYS_OFFSET and
MACH_REALVIEW_PB11MP.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
15 years agoRealView: Update the realview_defconfig file to a newer kernel
Catalin Marinas [Mon, 1 Dec 2008 14:54:59 +0000 (14:54 +0000)] 
RealView: Update the realview_defconfig file to a newer kernel

The original file was based on 2.6.14-rc2. Apart from the new symbols,
the explicitly enabled features are AACI, MMC, AEABI,
MACH_REALVIEW_PB1176 and MACH_REALVIEW_PB11MP.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
15 years agoRealView: Allow the in-kernel smc911x.c driver on RealView
Catalin Marinas [Mon, 1 Dec 2008 14:54:59 +0000 (14:54 +0000)] 
RealView: Allow the in-kernel smc911x.c driver on RealView

This patch adds smc911x.c device configuration to the RealView
platforms. At some point it may be changed to the new smsc911x.c driver
(once complete testing was done).

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
15 years agoRealView: Refactor the Ethernet device registration
Catalin Marinas [Mon, 1 Dec 2008 14:54:58 +0000 (14:54 +0000)] 
RealView: Refactor the Ethernet device registration

This patch moves the Ethernet device registration from individual
realview_*.c files to core.c.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
15 years agoRealView: Clean up the machine_is_*() calls in platsmp.c
Catalin Marinas [Mon, 1 Dec 2008 14:54:58 +0000 (14:54 +0000)] 
RealView: Clean up the machine_is_*() calls in platsmp.c

Some of the calls weren't necessary and some others were duplicated.
This patch tidies up the platsmp.c file.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
15 years agoRealView: Use only the shadow mapping of ARM11MPCore local timers
Catalin Marinas [Mon, 1 Dec 2008 14:54:57 +0000 (14:54 +0000)] 
RealView: Use only the shadow mapping of ARM11MPCore local timers

All the cases where the local timer for a CPU is accessed happen on the
corresponding current CPU, hence no need to access the per-CPU local
timer mappings.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
15 years agoRealView: Add Cortex-A9 support to the EB board
Jon Callan [Mon, 1 Dec 2008 14:54:56 +0000 (14:54 +0000)] 
RealView: Add Cortex-A9 support to the EB board

This patch adds the necessary definitions and Kconfig entries to enable
Cortex-A9 (ARMv7 SMP) tiles on the RealView/EB board.

Signed-off-by: Jon Callan <Jon.Callan@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
15 years agoRealView: Use flush_cache_all() rather than MCR in cpu_enter_lowpower()
Harry Fearnhamm [Mon, 1 Dec 2008 14:54:56 +0000 (14:54 +0000)] 
RealView: Use flush_cache_all() rather than MCR in cpu_enter_lowpower()

The MCR for flushing the whole D cache is undefined on ARMv7 CPUs.

Signed-off-by: Harry Fearnhamm <Harry.Fearnhamm@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
15 years agoRealView: Add support for the Cortex-A8 Platform Baseboard
Bahadir Balban [Mon, 1 Dec 2008 14:54:55 +0000 (14:54 +0000)] 
RealView: Add support for the Cortex-A8 Platform Baseboard

This patch adds support for RealView/PB-A8, a platform based on
Cortex-A8 with support for PCI-E and compact flash.

Signed-off-by: Bahadir Balban <bahadir.balban@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
15 years agoRealView: Allow PHYS_OFFSET at 0x70000000
Catalin Marinas [Mon, 1 Dec 2008 14:54:55 +0000 (14:54 +0000)] 
RealView: Allow PHYS_OFFSET at 0x70000000

RealView boards like PB11MPCore have 512MB of RAM available contiguously
at 0x70000000. Half of the memory is mirrored at 0x00000000 for
backwards compatibility. This patch adds the
CONFIG_REALVIEW_HIGH_PHYS_OFFSET option option to change the physical
base address so that the full amount of RAM is available to Linux. Note
that the EB board has 256MB of RAM also mirrored at 0x70000000, the only
board without this feature being PB1176.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
15 years ago[ARM] use asm/sections.h
Russell King [Mon, 1 Dec 2008 11:53:07 +0000 (11:53 +0000)] 
[ARM] use asm/sections.h

Update to use the asm/sections.h header rather than declaring these
symbols ourselves.  Change __data_start to _data to conform with the
naming found within asm/sections.h.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoUSB: serial: add more Onda device ids to option driver
Greg Kroah-Hartman [Sat, 29 Nov 2008 19:46:21 +0000 (11:46 -0800)] 
USB: serial: add more Onda device ids to option driver

Thanks to Domenico Riccio for pointing these out.

Cc: Domenico Riccio <domenico.riccio@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: usb-storage: unusual_devs entry for Nikon D2H
Tobias Kunze Briseño [Mon, 24 Nov 2008 16:28:31 +0000 (11:28 -0500)] 
USB: usb-storage: unusual_devs entry for Nikon D2H

This patch adds an unusual_devs entry for the Nikon D2H camera.

From: Tobias Kunze Briseño <t@fictive.com>,
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: storage: unusual_devs entry for Mio C520-GPS
Alan Stern [Fri, 21 Nov 2008 21:15:12 +0000 (16:15 -0500)] 
USB: storage: unusual_devs entry for Mio C520-GPS

This patch (as1176) adds an unusual_devs entry for the Mio C520 GPS
unit.  Other devices also based on the Mitac hardware use the same USB
interface firmware, so the Vendor and Product names are generalized.

This fixes Bugzilla #11583.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Tamas Kerecsen <kerecsen@bigfoot.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: fsl_usb2_udc: Report disconnect before unbinding
Anton Vorontsov [Thu, 13 Nov 2008 12:00:46 +0000 (15:00 +0300)] 
USB: fsl_usb2_udc: Report disconnect before unbinding

Gadgets disable endpoints in their disconnect callbacks, so
we must call disconnect before unbinding.

The patch fixes following badness:

root@b1:~# insmod fsl_usb2_udc.ko
Freescale High-Speed USB SOC Device Controller driver (Apr 20, 2007)
root@b1:~# insmod g_ether.ko
g_ether gadget: using random self ethernet address
g_ether gadget: using random host ethernet address
usb0: MAC 26:07:ba:c0:44:33
usb0: HOST MAC 96:81:0c:05:4d:e3
g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
g_ether gadget: g_ether ready
fsl-usb2-udc: bind to driver g_ether
g_ether gadget: high speed config #1: CDC Ethernet (ECM)
root@b1:~# rmmod g_ether.ko
------------[ cut here ]------------
Badness at drivers/usb/gadget/composite.c:871
[...]
NIP [e10c3454] composite_unbind+0x24/0x15c [g_ether]
LR [e10aa454] usb_gadget_unregister_driver+0x13c/0x164 [fsl_usb2_udc]
Call Trace:
[df145e80] [ffffff94] 0xffffff94 (unreliable)
[df145eb0] [e10aa454] usb_gadget_unregister_driver+0x13c/0x164 [fsl_usb2_udc]
[df145ed0] [e10c4c40] usb_composite_unregister+0x3c/0x4c [g_ether]
[df145ee0] [c006bcc0] sys_delete_module+0x130/0x19c
[df145f40] [c00142d8] ret_from_syscall+0x0/0x38
[...]
unregistered gadget driver 'g_ether'

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>