]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
15 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
Linus Torvalds [Mon, 26 Jan 2009 18:13:08 +0000 (10:13 -0800)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx:
  i.MX31: framebuffer driver
  i.MX31: Image Processing Unit DMA and IRQ drivers
  dmaengine: add async_tx_clear_ack() macro
  dmaengine: dma_issue_pending_all == nop when CONFIG_DMA_ENGINE=n
  dmaengine: kill some dubious WARN_ONCEs
  fsldma: print correct IRQ on mpc83xx
  fsldma: check for NO_IRQ in fsl_dma_chan_remove()
  dmatest: Use custom map/unmap for destination buffer
  fsldma: use a valid 'device' for dma_pool_create
  dmaengine: fix dependency chaining

15 years agoMerge branch 'sh/for-2.6.29' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal...
Linus Torvalds [Mon, 26 Jan 2009 18:12:08 +0000 (10:12 -0800)]
Merge branch 'sh/for-2.6.29' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6

* 'sh/for-2.6.29' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (22 commits)
  dma-coherent: Restore dma_alloc_from_coherent() large alloc fall back policy.
  dma-coherent: per-device coherent area is in pages, not bytes.
  sh: fix unaligned and nonexistent address handling
  nommu: Stub in vm_map_ram()/vm_unmap_ram()/vm_unmap_aliases().
  sh: fix sh-sci / early printk build on sh7723
  sh: export the sh7343 JPU to user space
  sh: update defconfigs.
  serial: sh-sci: Fix up SH7720/SH7721 SCI build.
  sh: Kill off obsolete busses from arch/sh/Kconfig.
  sh: sh7785lcr/highlander/hp6xx need linux/irq.h.
  sh: Migo-R MMC support using spi_gpio and mmc_spi.
  sh: ap325rxa MMC support using spi_gpio and mmc_spi
  sh: mach-x3proto: needs linux/irq.h.
  sh: Drop the BKL from sys_execve() on SH-5.
  sh: convert rsk7203 to use smsc911x.
  sh: convert magicpanelr2 platform to use smsc911x.
  sh: convert ap325rxa platform to use smsc911x.
  sh: mach-migor: Add tw9910 support.
  sh: mach-migor: Delete soc_camera_platform setup.
  sh: mach-migor: Add ov772x support.
  ...

15 years agoMerge branch 'Kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/adobriyan...
Linus Torvalds [Mon, 26 Jan 2009 18:08:50 +0000 (10:08 -0800)]
Merge branch 'Kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/adobriyan/misc

* 'Kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/adobriyan/misc: (36 commits)
  fs/Kconfig: move 9p out
  fs/Kconfig: move afs out
  fs/Kconfig: move coda out
  fs/Kconfig: move the rest of ncpfs out
  fs/Kconfig: move smbfs out
  fs/Kconfig: move sunrpc out
  fs/Kconfig: move nfsd out
  fs/Kconfig: move nfs out
  fs/Kconfig: move ufs out
  fs/Kconfig: move sysv out
  fs/Kconfig: move romfs out
  fs/Kconfig: move qnx4 out
  fs/Kconfig: move hpfs out
  fs/Kconfig: move omfs out
  fs/Kconfig: move minix out
  fs/Kconfig: move vxfs out
  fs/Kconfig: move squashfs out
  fs/Kconfig: move cramfs out
  fs/Kconfig: move efs out
  fs/Kconfig: move bfs out
  ...

15 years agoinotify: clean up inotify_read and fix locking problems
Vegard Nossum [Thu, 22 Jan 2009 14:29:45 +0000 (15:29 +0100)]
inotify: clean up inotify_read and fix locking problems

If userspace supplies an invalid pointer to a read() of an inotify
instance, the inotify device's event list mutex is unlocked twice.
This causes an unbalance which effectively leaves the data structure
unprotected, and we can trigger oopses by accessing the inotify
instance from different tasks concurrently.

The best fix (contributed largely by Linus) is a total rewrite
of the function in question:

On Thu, Jan 22, 2009 at 7:05 AM, Linus Torvalds wrote:
> The thing to notice is that:
>
>  - locking is done in just one place, and there is no question about it
>   not having an unlock.
>
>  - that whole double-while(1)-loop thing is gone.
>
>  - use multiple functions to make nesting and error handling sane
>
>  - do error testing after doing the things you always need to do, ie do
>   this:
>
>        mutex_lock(..)
>        ret = function_call();
>        mutex_unlock(..)
>
>        .. test ret here ..
>
>   instead of doing conditional exits with unlocking or freeing.
>
> So if the code is written in this way, it may still be buggy, but at least
> it's not buggy because of subtle "forgot to unlock" or "forgot to free"
> issues.
>
> This _always_ unlocks if it locked, and it always frees if it got a
> non-error kevent.

Cc: John McCutchan <ttb@tentacle.dhs.org>
Cc: Robert Love <rlove@google.com>
Cc: <stable@kernel.org>
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFix annoying DRM_ERROR() string warning
Linus Torvalds [Mon, 26 Jan 2009 18:01:53 +0000 (10:01 -0800)]
Fix annoying DRM_ERROR() string warning

Use '%zu' to print out a size_t variable, not '%d'.  Another case of the
"let's keep at least Linus' defconfig compile warningless" rule.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi...
Linus Torvalds [Mon, 26 Jan 2009 17:49:22 +0000 (09:49 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
  fuse: fix poll notify
  fuse: destroy bdi on umount
  fuse: fuse_fill_super error handling cleanup
  fuse: fix missing fput on error
  fuse: fix NULL deref in fuse_file_alloc()

15 years agoMerge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 26 Jan 2009 17:47:56 +0000 (09:47 -0800)]
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  debugobjects: add and use INIT_WORK_ON_STACK
  rcu: remove duplicate CONFIG_RCU_CPU_STALL_DETECTOR
  relay: fix lock imbalance in relay_late_setup_files
  oprofile: fix uninitialized use of struct op_entry
  rcu: move Kconfig menu
  softlock: fix false panic which can occur if softlockup_thresh is reduced
  rcu: add __cpuinit to rcu_init_percpu_data()

15 years agoMerge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 26 Jan 2009 17:47:43 +0000 (09:47 -0800)]
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:
  hrtimers: fix inconsistent lock state on resume in hres_timers_resume
  time-sched.c: tick_nohz_update_jiffies should be static
  locking, hpet: annotate false positive warning
  kernel/fork.c: unused variable 'ret'
  itimers: remove the per-cpu-ish-ness

15 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 26 Jan 2009 17:47:28 +0000 (09:47 -0800)]
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: (29 commits)
  xen: unitialised return value in xenbus_write_transaction
  x86: fix section mismatch warning
  x86: unmask CPUID levels on Intel CPUs, fix
  x86: work around PAGE_KERNEL_WC not getting WC in iomap_atomic_prot_pfn.
  x86: use standard PIT frequency
  xen: handle highmem pages correctly when shrinking a domain
  x86, mm: fix pte_free()
  xen: actually release memory when shrinking domain
  x86: unmask CPUID levels on Intel CPUs
  x86: add MSR_IA32_MISC_ENABLE bits to <asm/msr-index.h>
  x86: fix PTE corruption issue while mapping RAM using /dev/mem
  x86: mtrr fix debug boot parameter
  x86: fix page attribute corruption with cpa()
  Revert "x86: signal: change type of paramter for sys_rt_sigreturn()"
  x86: use early clobbers in usercopy*.c
  x86: remove kernel_physical_mapping_init() from init section
  fix: crash: IP: __bitmap_intersects+0x48/0x73
  cpufreq: use work_on_cpu in acpi-cpufreq.c for drv_read and drv_write
  work_on_cpu: Use our own workqueue.
  work_on_cpu: don't try to get_online_cpus() in work_on_cpu.
  ...

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Mon, 26 Jan 2009 17:46:29 +0000 (09:46 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  drivers/ide/palm_bk3710.c buildfix
  ide: fix Falcon IDE breakage
  ide: fix IDE PMAC breakage

15 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Mon, 26 Jan 2009 17:44:17 +0000 (09:44 -0800)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  Long btree pointers are still 64 bit on disk
  [XFS] Remove the rest of the macro-to-function indirections.
  xfs: sanity check attr fork size
  xfs: fix bad_features2 fixups for the root filesystem
  xfs: add a lock class for group/project dquots
  xfs: lockdep annotations for xfs_dqlock2
  xfs: add a separate lock class for the per-mount list of dquots
  xfs: use mnt_want_write in compat_attrmulti ioctl
  xfs: fix dentry aliasing issues in open_by_handle

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Mon, 26 Jan 2009 17:42:00 +0000 (09:42 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ASoC: Add missing comma to SND_SOC_DAPM_SWITCH_E in soc-dapm.h
  ALSA: hda: Add STAC92HD83XXX_PWR_REF quirk
  ALSA: hda: revert change to 92hd83xxx power mapping
  ALSA: hda - Add model entry for HP dv4
  ALSA: hda: 83xxx port 0xe DAC selection
  ASoC: fix registration of the SoC card in the Freescale MPC8610 drivers
  sound: virtuoso: document HDAV1.3 driver status
  sound: virtuoso: add newline
  sound: virtuoso: enable UART on Xonar HDAV1.3
  sound: Remove removed OSS kernel parameters from doc
  ALSA: hda: fix invalid power mapping masks
  ASoC: atmel_pcm: Remove non-existant header
  ALSA: hda - add quirks for some 82801H variants to use ALC883_MITAC
  ALSA: hda - Fix (yet more) STAC925x issues

15 years agofuse: fix poll notify
Miklos Szeredi [Mon, 26 Jan 2009 14:00:59 +0000 (15:00 +0100)]
fuse: fix poll notify

Move fuse_copy_finish() to before calling fuse_notify_poll_wakeup().
This is not a big issue because fuse_notify_poll_wakeup() should be
atomic, but it's cleaner this way, and later uses of notification will
need to be able to finish the copying before performing some actions.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
15 years agofuse: destroy bdi on umount
Miklos Szeredi [Mon, 26 Jan 2009 14:00:59 +0000 (15:00 +0100)]
fuse: destroy bdi on umount

If a fuse filesystem is unmounted but the device file descriptor
remains open and a new mount reuses the old device number, then the
mount fails with EEXIST and the following warning is printed in the
kernel log:

  WARNING: at fs/sysfs/dir.c:462 sysfs_add_one+0x35/0x3d()
  sysfs: duplicate filename '0:15' can not be created

The cause is that the bdi belonging to the fuse filesystem was
destoryed only after the device file was released.  Fix this by
calling bdi_destroy() from fuse_put_super() instead.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: stable@kernel.org
15 years agofuse: fuse_fill_super error handling cleanup
Miklos Szeredi [Mon, 26 Jan 2009 14:00:58 +0000 (15:00 +0100)]
fuse: fuse_fill_super error handling cleanup

Clean up error handling for the whole of fuse_fill_super() function.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
15 years agofuse: fix missing fput on error
Miklos Szeredi [Mon, 26 Jan 2009 14:00:58 +0000 (15:00 +0100)]
fuse: fix missing fput on error

Fix the leaking file reference if allocation or initialization of
fuse_conn failed.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: stable@kernel.org
15 years agofuse: fix NULL deref in fuse_file_alloc()
Dan Carpenter [Mon, 26 Jan 2009 14:00:58 +0000 (15:00 +0100)]
fuse: fix NULL deref in fuse_file_alloc()

ff is set to NULL and then dereferenced on line 65.  Compile tested only.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: stable@kernel.org
15 years agoxen: unitialised return value in xenbus_write_transaction
Ian Campbell [Sat, 24 Jan 2009 08:22:47 +0000 (08:22 +0000)]
xen: unitialised return value in xenbus_write_transaction

The return value of xenbus_write_transaction can be uninitialised in
the success case leading to the userspace xenstore utilities failing.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: fix section mismatch warning
Rakib Mullick [Fri, 23 Jan 2009 19:46:03 +0000 (01:46 +0600)]
x86: fix section mismatch warning

Here function vmi_activate calls a init function activate_vmi , which
causes the following section mismatch warnings:

  LD      arch/x86/kernel/built-in.o
WARNING: arch/x86/kernel/built-in.o(.text+0x13ba9): Section mismatch
in reference from the function vmi_activate() to the function
.init.text:vmi_time_init()
The function vmi_activate() references
the function __init vmi_time_init().
This is often because vmi_activate lacks a __init
annotation or the annotation of vmi_time_init is wrong.

WARNING: arch/x86/kernel/built-in.o(.text+0x13bd1): Section mismatch
in reference from the function vmi_activate() to the function
.devinit.text:vmi_time_bsp_init()
The function vmi_activate() references
the function __devinit vmi_time_bsp_init().
This is often because vmi_activate lacks a __devinit
annotation or the annotation of vmi_time_bsp_init is wrong.

WARNING: arch/x86/kernel/built-in.o(.text+0x13bdb): Section mismatch
in reference from the function vmi_activate() to the function
.devinit.text:vmi_time_ap_init()
The function vmi_activate() references
the function __devinit vmi_time_ap_init().
This is often because vmi_activate lacks a __devinit
annotation or the annotation of vmi_time_ap_init is wrong.

Fix it by marking vmi_activate() as __init too.

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years ago[libata] pata_via: support VX855, future chips whose IDE controller use 0x0571
JosephChan@via.com.tw [Fri, 23 Jan 2009 07:37:39 +0000 (15:37 +0800)]
[libata] pata_via: support VX855, future chips whose IDE controller use 0x0571

It supports VX855 and future chips whose IDE controller uses PCI ID 0x0571.

Signed-off-by: Joseph Chan <josephchan@via.com.tw>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosata_mv: no longer experimental (v2)
Mark Lord [Wed, 21 Jan 2009 15:34:17 +0000 (10:34 -0500)]
sata_mv: no longer experimental (v2)

Update Kconfig for sata_mv with full list of chips supported,
and (finally!) remove the "EXPERIMENTAL" designations.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosata_mv: msi masking fix (v2)
Mark Lord [Wed, 21 Jan 2009 15:31:29 +0000 (10:31 -0500)]
sata_mv: msi masking fix (v2)

Enable reliable use of Message-Signaled Interrupts (MSI) in sata_mv
by masking further chip interrupts within the main interrupt handler.

Based upon a suggestion by Grant Grundler.
MSI is working reliably in all of my test systems here now.

Signed-off-by: Mark Lord <mlord@pobox.com>
Reviewed-by: Grant Grundler <grundler@google.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosata_mv: Properly initialize main irq mask
Thomas Reitmayr [Sat, 24 Jan 2009 19:24:58 +0000 (20:24 +0100)]
sata_mv: Properly initialize main irq mask

I noticed that during initialization sata_mv.c assumes that the main
interrupt mask has its default value of 0. The function
mv_platform_probe(..) initializes a shadow irq mask with 0 assuming
that's the value of the controller's register. Now
mv_set_main_irq_mask(..) only writes the controller's register if the
new value differs from the "shadowed" value. This is fatal when trying
to disable all interrupts in mv_init_host(..), i.e. the following
function call does not write anything to the main irq mask register:

  mv_set_main_irq_mask(host, ~0, 0);

The effect I see on my machine (QNAP TS-109 II) with booting via kexec
(with Linux as a 2nd-stage boot loader) is that if the sata_mv module
was still loaded when performing kexec, then the new kernel's sata_mv
module starts up with interrupts enabled. This results in an unhandled
IRQ and breaks the boot process.

The unhandled interrupt itself might also be fixed by Lennert's patch
proposed at http://markmail.org/message/kwvzxstnlsa3s26w which I did not
try yet.

However I still propose to additionally initialize the shadow variable
with the current contents of the main irq mask register to get both in
sync and allow proper disabling the main irq mask. This fixes the
unhandled irq on my machine.

Signed-off-by: Thomas Reitmayr <treitmayr@devbase.at>
Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosata_mv: remove bogus nsect restriction
Mark Lord [Mon, 19 Jan 2009 23:06:28 +0000 (18:06 -0500)]
sata_mv: remove bogus nsect restriction

Remove unneeded nsect restriction from GenII NCQ path,
and improve comments to explain why this is not a problem.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosata_mv: don't read hc_irq_cause
Mark Lord [Mon, 19 Jan 2009 23:05:42 +0000 (18:05 -0500)]
sata_mv: don't read hc_irq_cause

Remove silly read-modify-write sequences when clearing interrupts
in hc_irq_cause.  This gets rid of unneeded MMIO reads, resulting in
a slight performance boost when switching between EDMA and non-EDMA
modes (eg. for cache flushes).

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosata_mv: fix 8-port timeouts on 508x/6081 chips
Mark Lord [Mon, 19 Jan 2009 23:04:37 +0000 (18:04 -0500)]
sata_mv: fix 8-port timeouts on 508x/6081 chips

Fix a longstanding bug for the 8-port Marvell Sata controllers (508x/6081),
where accesses to the upper 4 ports would cause lost-interrupts / timeouts
for the lower 4-ports.  With this patch, the 6081 boards should finally be
reliable enough for mainstream use with Linux.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosata_nv: fix MCP5x reset
Tejun Heo [Sun, 25 Jan 2009 02:29:38 +0000 (11:29 +0900)]
sata_nv: fix MCP5x reset

MCP5x family of controllers seem to share much more with nf2's as far
as reset protocol is concerned.  It requires heardreset to get the PHY
going and classfication code report after hardreset is unreliable.
Create a new board type MCP5x and use noclassify hardreset.  SWNCQ is
modified to inherit from this new type.

This fixes hotplug regression reported in kernel bz#12351.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosata_nv: rename nv_nf2_hardreset()
Tejun Heo [Sun, 25 Jan 2009 02:25:22 +0000 (11:25 +0900)]
sata_nv: rename nv_nf2_hardreset()

nv_nf2_hardreset() will be used by other flavors too.  Rename it to
nv_noclassify_hardreset().

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: set NODEV_HINT for 0x7f status
Tejun Heo [Sun, 25 Jan 2009 01:26:00 +0000 (10:26 +0900)]
libata: set NODEV_HINT for 0x7f status

Asus Pundit-R with atiixp controller has the second port missing and,
very unusually, its status is stuck at 0x7f and all others at 0.  This
meanst that it fails TF access test but gets detected as a disk due to
classification code check and then evades polling IDENTIFY presence
detection thanks to the missing BSY in the status value causing
excessive delays during boot.

This patch makes libata-sff HSM set NODEV_HINT if the status is 0x7f
to make polling IDENTIFY presence detection work for these machines.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agox86: unmask CPUID levels on Intel CPUs, fix
Ingo Molnar [Mon, 26 Jan 2009 03:30:41 +0000 (04:30 +0100)]
x86: unmask CPUID levels on Intel CPUs, fix

Impact: fix boot hang on pre-model-15 Intel CPUs

rdmsrl_safe() does not work in very early bootup code yet, because we
dont have the pagefault handler installed yet so exception section
does not get parsed. rdmsr_safe() will just crash and hang the bootup.

So limit the MSR_IA32_MISC_ENABLE MSR read to those CPU types that
support it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agolibata-sff: fix incorrect EH message
Tejun Heo [Fri, 23 Jan 2009 05:12:59 +0000 (14:12 +0900)]
libata-sff: fix incorrect EH message

The EH message for NODEV_HINT path was describing the opposite
condition.  Fix it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agox86: work around PAGE_KERNEL_WC not getting WC in iomap_atomic_prot_pfn.
Eric Anholt [Fri, 23 Jan 2009 22:14:21 +0000 (14:14 -0800)]
x86: work around PAGE_KERNEL_WC not getting WC in iomap_atomic_prot_pfn.

In the absence of PAT, PAGE_KERNEL_WC ends up mapping to a memory type that
gets UC behavior even in the presence of a WC MTRR covering the area in
question.  By swapping to PAGE_KERNEL_UC_MINUS, we can get the actual
behavior the caller wanted (WC if you can manage it, UC otherwise).

This recovers the 40% performance improvement of using WC in the DRM
to upload vertex data.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Mon, 26 Jan 2009 05:36:34 +0000 (21:36 -0800)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

15 years agoaf_key: initialize xfrm encap_oa
Timo Teras [Mon, 26 Jan 2009 04:49:14 +0000 (20:49 -0800)]
af_key: initialize xfrm encap_oa

Currently encap_oa is left uninitialized, so it contains garbage data which
is visible to userland via Netlink. Initialize it by zeroing it out.

Signed-off-by: Timo Teras <timo.teras@iki.fi>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agovirtio_net: Fix MAX_PACKET_LEN to support 802.1Q VLANs
Alex Williamson [Mon, 26 Jan 2009 02:06:26 +0000 (18:06 -0800)]
virtio_net: Fix MAX_PACKET_LEN to support 802.1Q VLANs

802.1Q expanded the maximum ethernet frame size by 4 bytes for the
VLAN tag.  We're not taking this into account in virtio_net, which
means the buffers we provide to the backend in the virtqueue RX ring
aren't big enough to hold a full MTU VLAN packet.  For QEMU/KVM,
this results in the backend exiting with a packet truncation error.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Acked-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agolcs: fix compilation for !CONFIG_IP_MULTICAST
Heiko Carstens [Tue, 20 Jan 2009 06:14:32 +0000 (06:14 +0000)]
lcs: fix compilation for !CONFIG_IP_MULTICAST

drivers/s390/net/lcs.c: In function 'lcs_new_device':
drivers/s390/net/lcs.c:2179: error: implicit declaration of function 'lcs_set_multicast_list'

Reported-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopower_supply: pda_power: Don't request shared IRQs w/ IRQF_DISABLED
Philipp Zabel [Sun, 18 Jan 2009 13:46:21 +0000 (14:46 +0100)]
power_supply: pda_power: Don't request shared IRQs w/ IRQF_DISABLED

IRQF_DISABLED is not guaranteed for shared IRQs. I think power_changed_isr
doesn't need it anyway, as it only fires a timer.
This patch enables IRQF_SAMPLE_RANDOM instead.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
15 years ago[ARM] fix section-based ioremap
Russell King [Sun, 25 Jan 2009 17:36:34 +0000 (17:36 +0000)]
[ARM] fix section-based ioremap

Tomi Valkeinen reports:
  Running with latest linux-omap kernel on OMAP3 SDP board, I have
  problem with iounmap(). It looks like iounmap() does not properly
  free large areas. Below is a test which fails for me in 6-7 loops.

for (i = 0; i < 200; ++i) {
vaddr = ioremap(paddr, size);
if (!vaddr) {
printk("couldn't ioremap\n");
break;
}
iounmap(vaddr);
}

The changes to vmalloc.c weren't reflected in the ARM ioremap
implementation.  Turns out the fix is rather simple.

Tested-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Tested-by: Matt Gerassimoff <mgeras@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agox86: use standard PIT frequency
Ingo Molnar [Sun, 25 Jan 2009 15:57:00 +0000 (16:57 +0100)]
x86: use standard PIT frequency

the RDC and ELAN platforms use slighly different PIT clocks, resulting in
a timex.h hack that changes PIT_TICK_RATE during build time. But if a
tester enables any of these platform support .config options, the PIT
will be miscalibrated on standard PC platforms.

So use one frequency - in a subsequent patch we'll add a quirk to allow
x86 platforms to define different PIT frequencies.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years ago[SCSI] ibmvfc: Fix DMA mapping leak on memory allocation failure
Brian King [Thu, 22 Jan 2009 21:45:38 +0000 (15:45 -0600)]
[SCSI] ibmvfc: Fix DMA mapping leak on memory allocation failure

There is currently a DMA mapping leak that can occur in the ibmvfc
driver if we fail to allocate a scatterlist. Fix this by unmapping
the scatterlist in the failure path. Additionally, only log an error
for a scatterlist allocation failure if the log level is greater
than the default, since this can occur when running Active Memory
Sharing and this is not considered an error.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Update version number to 8.03.00-k2.
Andrew Vasquez [Thu, 22 Jan 2009 17:45:39 +0000 (09:45 -0800)]
[SCSI] qla2xxx: Update version number to 8.03.00-k2.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Add checks for a valid fcport in dev-loss-tmo/terminate_rport_io...
Seokmann Ju [Thu, 22 Jan 2009 17:45:38 +0000 (09:45 -0800)]
[SCSI] qla2xxx: Add checks for a valid fcport in dev-loss-tmo/terminate_rport_io callbacks.

Commit f78badb1ae07e7f8b835ab2ea0b456ed3fc4caf4 ([SCSI] fc
transport: pre-emptively terminate i/o upon dev_loss_tmo timeout)
changed the callback semantics of dev_loss_tmo and
terminate_rport_io such that repeated calls could be made.  This
could result in the the driver using stale (NULLed-out, in
dev_loss_tmo) data from the rport.  Correct this by addint a
simple check to ensure a valid fcport is attached.

Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Correct regression in DMA-mask setting prior to allocations.
Andrew Vasquez [Thu, 22 Jan 2009 17:45:37 +0000 (09:45 -0800)]
[SCSI] qla2xxx: Correct regression in DMA-mask setting prior to allocations.

Jeremy Higdon noted
(http://marc.info/?l=linux-scsi&m=123262143131788&w=2) that the
rework done in commit e315cd28b9ef0d7b71e462ac16e18dbaa2f5adfe
was not setting the proper consistent and streaming DMA masks
prior to memory allocations.  Correct this and remove the
unnecessary prototype.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Correct descriptions in flash manipulation routines.
Joe Carnuccio [Thu, 22 Jan 2009 17:45:36 +0000 (09:45 -0800)]
[SCSI] qla2xxx: Correct descriptions in flash manipulation routines.

When clearing the flash device's SR, the comment is incorrect...
clearing the SR is 2 steps:

1. the SR protect bit is 1, so the first write zero clears only
   that bit,

2. the SR protect bit is now 0, so the next write zero clears the
   remaining bits.

The sector erase debug print more correctly identifies that the erase failed.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Correct regression in EH abort handling.
Andrew Vasquez [Thu, 22 Jan 2009 17:45:35 +0000 (09:45 -0800)]
[SCSI] qla2xxx: Correct regression in EH abort handling.

Commit 73208dfd7ab19f379d73e8a0fbf30f92c203e5e8 (qla2xxx: add
support for multi-queue adapter) inadvertently backed-out the fix
in 5bff55db3dc4d659f46b4d2fce2f61c1964c2762 (qla2xxx: Return a
FAILED status when abort mailbox-command fails.).

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Correct endianness issue during flash manipulation.
Andrew Vasquez [Thu, 22 Jan 2009 17:45:34 +0000 (09:45 -0800)]
[SCSI] qla2xxx: Correct endianness issue during flash manipulation.

The flash data was incorrectly being converted (cpu_to_le32())
when using the bulk-flash-write mailbox command (ISP25xx and
above).

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Correct MSI-X vector allocation for single queue mode.
Lalit Chandivade [Thu, 22 Jan 2009 17:45:33 +0000 (09:45 -0800)]
[SCSI] qla2xxx: Correct MSI-X vector allocation for single queue mode.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Modify firmware-load order precedence for ISP81XX parts.
Andrew Vasquez [Thu, 22 Jan 2009 17:45:32 +0000 (09:45 -0800)]
[SCSI] qla2xxx: Modify firmware-load order precedence for ISP81XX parts.

Pre-ISP81XX parts (including ISP24xx and ISP25xx) could contain a
firmware image within a segment of flash, driver would fallback
to loading this firmware if the request-firmware interface failed
(userspace .bin file).  Moving forward, all ISP81XX parts will
ship with a suggested-to-be-used firmware image within flash
which all driver should first attempt to load.  If the flash
firmware load fails, the driver will then fallback to loading
firmware via the request-firmware interface (ql8100_fw.bin).

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Always serialize mailbox command execution.
Andrew Vasquez [Thu, 22 Jan 2009 17:45:31 +0000 (09:45 -0800)]
[SCSI] qla2xxx: Always serialize mailbox command execution.

Original code would incorrectly bypass serialization if the DPC
thread were performing a big-hammer operation (ISP abort).  This
short circuit, though rare, would subsequently stomp on a
secondary thread's mailbox command execution.  Found during
ISP81XX testing.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Ensure RISC-interrupt-enabled consistency for IS_NOPOLLING_TYPE(...
Andrew Vasquez [Thu, 22 Jan 2009 17:45:30 +0000 (09:45 -0800)]
[SCSI] qla2xxx: Ensure RISC-interrupt-enabled consistency for IS_NOPOLLING_TYPE() ISPs.

Original code should work as well given qla24xx_reset_adapter()
is only called in extreme cases where the HBA is taken offline.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Simplify sector-mask calculation in preparation for larger flash...
Andrew Vasquez [Thu, 22 Jan 2009 17:45:29 +0000 (09:45 -0800)]
[SCSI] qla2xxx: Simplify sector-mask calculation in preparation for larger flash parts.

Also removes unneeded 'findex' local variable within routine.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla2xxx: Fix memory leak in error path
Anirban Chakraborty [Thu, 22 Jan 2009 17:45:28 +0000 (09:45 -0800)]
[SCSI] qla2xxx: Fix memory leak in error path

Reviewed-by: Hisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] qla4xxx: do not reuse session when connecting to different target port
Mike Christie [Fri, 16 Jan 2009 18:36:52 +0000 (12:36 -0600)]
[SCSI] qla4xxx: do not reuse session when connecting to different target port

qla4xxx does not check the I_T nexus values correctly
so it ends up creating one session to the target. If
a portal should disappear or they should be reported
in different order the driver will think it is already
logged in when it could now be speaking to a different
target portal or accessing it through a different
initiator port (iscsi initiator port is not tied to
hardware and is just the initiator name plus isid
so you could end up with multiple ports through one
host).

This patch has the driver check the iscsi scsi port
values when matching sessions (we do not check
the initiator name because that is static). It results
in a portal from each target portal group getting
logged into instead of just one per target. In the future
the firmware should hopefully send us notification of other
sessions that are created to other portals within the
same tpgt and the sessions should have different isids.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[SCSI] libiscsi: fix iscsi pool leak
Mike Christie [Fri, 16 Jan 2009 18:36:51 +0000 (12:36 -0600)]
[SCSI] libiscsi: fix iscsi pool leak

I am not sure what happened. It looks like we have always leaked
the q->queue that is allocated from the kfifo_init call. nab finally
noticed that we were leaking and this patch fixes it by adding a
kfree call to iscsi_pool_free. kfifo_free is not used per kfifo_init's
instructions to use kfree.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years ago[NET] am79c961a: fix spin_lock usage
Uwe Kleine-König [Thu, 22 Jan 2009 22:29:42 +0000 (23:29 +0100)]
[NET] am79c961a: fix spin_lock usage

spin_lock functions take a pointer to the lock, not the lock itself.
This error was noticed by compiling ebsa110_defconfig for linux-rt where
the locking functions obviously are more picky about their arguments.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Roel Kluin <12o3l@tiscali.nl>
Cc: Steven Rostedt <srostedt@redhat.com>
Cc: netdev@vger.kernel.org
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] omap: usb: thou shalt not provide empty release functions
Russell King [Sat, 24 Jan 2009 17:00:45 +0000 (17:00 +0000)]
[ARM] omap: usb: thou shalt not provide empty release functions

... for devices.  Doing so is a bug, plain and simple, and drives
GregKH round the bend.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] omap: watchdog: allow OMAP watchdog driver on OMAP34xx platforms
Russell King [Sat, 24 Jan 2009 16:48:42 +0000 (16:48 +0000)]
[ARM] omap: watchdog: allow OMAP watchdog driver on OMAP34xx platforms

The driver was updated for OMAP34xx, but the Kconfig file was missed.
So this adds the missing parts from d99241c in Tony Lindgren's tree:

    Add watchdog timer support for TI OMAP3430.

Signed-off-by: Madhusudhan Chikkature <madhu.cr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5369/1: omap mmc: Add new omap hsmmc controller for 2430 and 34xx, v3
Madhusudhan Chikkature [Fri, 23 Jan 2009 00:05:23 +0000 (01:05 +0100)]
[ARM] 5369/1: omap mmc: Add new omap hsmmc controller for 2430 and 34xx, v3

Add omap hsmmc controller for 2430 and 34xx.

Note that this controller has different registers compared to
the earlier omap MMC controller, so sharing code currently is
not possible.

Various updates and fixes from linux-omap list have been
merged into this patch.

Signed-off-by: Madhusudhan Chikkature<madhu.cr@ti.com>
Acked-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] clkdev: fix clock matching
Russell King [Sat, 24 Jan 2009 10:14:37 +0000 (10:14 +0000)]
[ARM] clkdev: fix clock matching

The old matching algorithm was too fuzzy, causing false positives.
For example, when asked for device D connection C1 and we only find
device D connection C2, we return that as a valid match despite the
connection names being different.

Change the algorithm such that:
  An entry with a NULL ID is assumed to be a wildcard.
  If an entry has a device ID, it must match
  If an entry has a connection ID, it must match

However, we maintain the order of precidence while still only doing
a single pass over all entries: dev+con > dev only > con only.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5370/1: at91: fix rm9200 watchdog
Jean-Christop PLAGNIOL-VILLARD [Fri, 23 Jan 2009 09:06:07 +0000 (10:06 +0100)]
[ARM] 5370/1: at91: fix rm9200 watchdog

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5368/1: arch/arm/mach-davinci/usb.c buildfix
David Brownell [Sun, 18 Jan 2009 16:29:10 +0000 (17:29 +0100)]
[ARM] 5368/1: arch/arm/mach-davinci/usb.c buildfix

From: David Brownell <dbrownell@users.sourceforge.net>
Subject: ARM/mach-davinci/usb.c buildfix

  CC      arch/arm/mach-davinci/usb.o
arch/arm/mach-davinci/usb.c:60: error: 'IRQ_USBINT' undeclared here (not in a function)
make[1]: *** [arch/arm/mach-davinci/usb.o] Error 1

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5365/1: s3cmci: Use new include path of dma.h
Ramax Lo [Wed, 14 Jan 2009 01:13:47 +0000 (02:13 +0100)]
[ARM] 5365/1: s3cmci: Use new include path of dma.h

Since dma.h has been moved to arch/arm/mach-s3c2410/include/mach,
use the new include path.

Signed-off-by: Ramax Lo <ramaxlo@gmail.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] fix StrongARM-11x0 page copy implementation
Russell King [Sun, 18 Jan 2009 16:24:19 +0000 (16:24 +0000)]
[ARM] fix StrongARM-11x0 page copy implementation

Which had the 'from' and 'to' pages reversed.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] omap: ensure OMAP drivers pass a struct device to clk_get()
Russell King [Sun, 18 Jan 2009 12:52:38 +0000 (12:52 +0000)]
[ARM] omap: ensure OMAP drivers pass a struct device to clk_get()

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agortl8187: Add termination packet to prevent stall
Larry Finger [Fri, 23 Jan 2009 17:46:32 +0000 (11:46 -0600)]
rtl8187: Add termination packet to prevent stall

The RTL8187 and RTL8187B devices can stall unless an explicit termination
packet is sent.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: fix rs_get_rate WARN_ON()
Abbas, Mohamed [Wed, 21 Jan 2009 18:58:02 +0000 (10:58 -0800)]
iwlwifi: fix rs_get_rate WARN_ON()

In ieee80211_sta structure there is u64 supp_rates[IEEE80211_NUM_BANDS]
this is filled with all support rate from assoc_resp.  If we associate
with G-band AP only supp_rates of G-band will be set the other band
supp_rates will be set to 0. If the user type this command
this will cause mac80211 to set to new channel, mac80211
does not disassociate in setting new channel, so the active
band is now A-band. then in handling the new essid mac80211 will
kick in the assoc steps which involve sending disassociation frame.
in this mac80211 will WARN_ON sta->supp_rates[A_BAND] == 0.

This fixes:
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1822
http://www.kerneloops.org/searchweek.php?search=rs_get_rate

Signed-off-by: mohamed abbas <mohamed.abbas@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54usb: fix packet loss with first generation devices
Christian Lamparter [Tue, 20 Jan 2009 22:11:21 +0000 (23:11 +0100)]
p54usb: fix packet loss with first generation devices

Artur Skawina confirmed that the first generation devices needs the same
URB_ZERO_PACKET flag, in oder to finish the pending transfer properly.
The second generation has been successfully fixed by
"p54usb: fix random traffic stalls (LM87)" (43af18f06d5)

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoxen: handle highmem pages correctly when shrinking a domain
Ian Campbell [Fri, 23 Jan 2009 16:26:21 +0000 (16:26 +0000)]
xen: handle highmem pages correctly when shrinking a domain

Commit 1058a75f07b9bb8323fb5197be5526220f8b75cf ("xen: actually release
memory when shrinking domain") causes a crash if the page being released
is a highmem page.

If a page is highmem then there is no need to unmap it.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, mm: fix pte_free()
Peter Zijlstra [Fri, 23 Jan 2009 16:37:49 +0000 (17:37 +0100)]
x86, mm: fix pte_free()

On -rt we were seeing spurious bad page states like:

Bad page state in process 'firefox'
page:c1bc2380 flags:0x40000000 mapping:c1bc2390 mapcount:0 count:0
Trying to fix it up, but a reboot is needed
Backtrace:
Pid: 503, comm: firefox Not tainted 2.6.26.8-rt13 #3
[<c043d0f3>] ? printk+0x14/0x19
[<c0272d4e>] bad_page+0x4e/0x79
[<c0273831>] free_hot_cold_page+0x5b/0x1d3
[<c02739f6>] free_hot_page+0xf/0x11
[<c0273a18>] __free_pages+0x20/0x2b
[<c027d170>] __pte_alloc+0x87/0x91
[<c027d25e>] handle_mm_fault+0xe4/0x733
[<c043f680>] ? rt_mutex_down_read_trylock+0x57/0x63
[<c043f680>] ? rt_mutex_down_read_trylock+0x57/0x63
[<c0218875>] do_page_fault+0x36f/0x88a

This is the case where a concurrent fault already installed the PTE and
we get to free the newly allocated one.

This is due to pgtable_page_ctor() doing the spin_lock_init(&page->ptl)
which is overlaid with the {private, mapping} struct.

union {
    struct {
        unsigned long private;
        struct address_space *mapping;
    };
    spinlock_t ptl;
    struct kmem_cache *slab;
    struct page *first_page;
};

Normally the spinlock is small enough to not stomp on page->mapping, but
PREEMPT_RT=y has huge 'spin'locks.

But lockdep kernels should also be able to trigger this splat, as the
lock tracking code grows the spinlock to cover page->mapping.

The obvious fix is calling pgtable_page_dtor() like the regular pte free
path __pte_free_tlb() does.

It seems all architectures except x86 and nm10300 already do this, and
nm10300 doesn't seem to use pgtable_page_ctor(), which suggests it
doesn't do SMP or simply doesnt do MMU at all or something.

Signed-off-by: Peter Zijlstra <a.p.zijlsta@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: <stable@kernel.org>
15 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Fri, 23 Jan 2009 17:14:25 +0000 (18:14 +0100)]
Merge branch 'fix/asoc' into for-linus

15 years ago[S390] Add missing compat system call wrappers.
Michael Holzheu [Fri, 23 Jan 2009 15:40:27 +0000 (16:40 +0100)]
[S390] Add missing compat system call wrappers.

Add wrapper functions for the following compat system calls:
* readahead
* sendfile64
* tkill
* tgkill
* keyctl
This ensures that the high order bits of the parameter registers are correctly
sign extended.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
15 years ago[S390] etr/stp: fix possible deadlock
Heiko Carstens [Fri, 23 Jan 2009 15:40:26 +0000 (16:40 +0100)]
[S390] etr/stp: fix possible deadlock

Precreate stop_machine threads in case the machine supports ETR/STP.
Otherwise we might deadlock if a time sync operation gets scheduled
and the creation of stop_machine threads would cause disk I/O.
This is just the minimal fix.
The real fix would be to only precreate stop_machine threads if
ETR/STP is actually used. But that would be a rather large and
complicated patch.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
15 years ago[S390] cputime: fix lowcore initialization on cpu hotplug
Heiko Carstens [Fri, 23 Jan 2009 15:40:25 +0000 (16:40 +0100)]
[S390] cputime: fix lowcore initialization on cpu hotplug

On (initial) cpu hotplug the lowcore values for user_timer and
system_timer don't get initialized like they would get on each
process schedule.
On initial start of secondary cpus this leads to the situation
where per thread user/system_timer values are larger than the
corresponding contents of the lowcore. When later calculating
time spent in user/system context the result can be negative.

So for cpu hotplug we should manually initialize lowcore values.

Fixes this bug:

Kernel BUG at 000ec080 [verbose debug info unavailable]
fixpoint divide exception: 0009 [#1] PREEMPT SMP
Modules linked in:
CPU: 10 Not tainted 2.6.28 #4
Process sysctl (pid: 975, task: 3fa752e0, ksp: 3fbebca0)
Krnl PSW : 070c1000 800ec080 (show_stat+0x390/0x5fc)
           R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:1 PM:0
Krnl GPRS: 7fffffff fefc7ce5 3faec080 003879ae
           00000001 01388000 7fffffff 01388000
           00000000 00000000 0049ad50 3fbebcf8
           01388000 002f51a8 800ec1fe 3fbebcf8
Krnl Code: 800ec0769001b188           stm     %r0,%r1,392(%r11)
           800ec07a9801b0c0           lm      %r0,%r1,192(%r11)
           800ec07e: 1d05               dr      %r0,%r5
          >800ec0809001b0c0           stm     %r0,%r1,192(%r11)
           800ec0845860b0c4           l       %r6,196(%r11)
           800ec088: 1806               lr      %r0,%r6
           800ec08a8c800001           srdl    %r8,1
           800ec08e: 1d87               dr      %r8,%r7
Call Trace:
([<00000000000ec1ee>] show_stat+0x4fe/0x5fc)
 [<00000000000c13e8>] seq_read+0xc4/0x3ac
 [<00000000000e4796>] proc_reg_read+0x6e/0x9c
 [<00000000000a6a44>] vfs_read+0x78/0x100
 [<00000000000a6ba8>] sys_read+0x40/0x80
 [<00000000000234a8>] sysc_do_restart+0x1a/0x1e

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
15 years ago[S390] fix compat sigaltstack syscall table entry
Michael Holzheu [Fri, 23 Jan 2009 15:40:24 +0000 (16:40 +0100)]
[S390] fix compat sigaltstack syscall table entry

When 31 bit user space programs call sigaltstack on a 64 bit Linux
OS, the system call returns -1 with errno=EFAULT. The 31 bit pointer passed
to the system call is extended to 64 bit, but the high order bits are not
set to zero. The kernel detects the invalid user space pointer and
returns -EFAULT. To solve the problem, sys32_sigaltstack_wrapper()
instead of sys32_sigaltstack() has to be called. The wrapper function sets
the high order bits to zero.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
15 years ago[S390] personality: fix personality loss on execve
Heiko Carstens [Fri, 23 Jan 2009 15:40:23 +0000 (16:40 +0100)]
[S390] personality: fix personality loss on execve

Use the personality() macro to mask out all bits that are not
relevant for the personality type.
The personality field contains bits for other things as well,
so without masking out the not relevalent bits the comparison
won't do what is expected.

Reported-by: Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
15 years agoASoC: Add missing comma to SND_SOC_DAPM_SWITCH_E in soc-dapm.h
Peter Ujfalusi [Fri, 23 Jan 2009 08:08:35 +0000 (10:08 +0200)]
ASoC: Add missing comma to SND_SOC_DAPM_SWITCH_E in soc-dapm.h

Typo fix.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Fri, 23 Jan 2009 07:13:52 +0000 (08:13 +0100)]
Merge branch 'fix/hda' into for-linus

15 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Fri, 23 Jan 2009 07:13:49 +0000 (08:13 +0100)]
Merge branch 'fix/asoc' into for-linus

15 years agoALSA: hda: Add STAC92HD83XXX_PWR_REF quirk
Matthew Ranostay [Fri, 23 Jan 2009 01:53:29 +0000 (20:53 -0500)]
ALSA: hda: Add STAC92HD83XXX_PWR_REF quirk

Some revisions of the 92hd8xxx codec's not supporting port power
downs in which the using of it causes capture and also randomly
playback streams to not function at all. Thus by disabling it by
default and adding a option to enable it manually will fix all issue
on current and future revisions.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda: revert change to 92hd83xxx power mapping
Matthew Ranostay [Fri, 23 Jan 2009 01:38:42 +0000 (20:38 -0500)]
ALSA: hda: revert change to 92hd83xxx power mapping

Port 0xe power mapping was incorrect set to 0x80 changed to the correct
value 0x40.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agosctp: Fix another socket race during accept/peeloff
Vlad Yasevich [Thu, 22 Jan 2009 22:53:23 +0000 (14:53 -0800)]
sctp: Fix another socket race during accept/peeloff

There is a race between sctp_rcv() and sctp_accept() where we
have moved the association from the listening socket to the
accepted socket, but sctp_rcv() processing cached the old
socket and continues to use it.

The easy solution is to check for the socket mismatch once we've
grabed the socket lock.  If we hit a mis-match, that means
that were are currently holding the lock on the listening socket,
but the association is refrencing a newly accepted socket.  We need
to drop the lock on the old socket and grab the lock on the new one.

A more proper solution might be to create accepted sockets when
the new association is established, similar to TCP.  That would
eliminate the race for 1-to-1 style sockets, but it would still
existing for 1-to-many sockets where a user wished to peeloff an
association.  For now, we'll live with this easy solution as
it addresses the problem.

Reported-by: Michal Hocko <mhocko@suse.cz>
Reported-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosctp: Properly timestamp outgoing data chunks for rtx purposes
Vlad Yasevich [Thu, 22 Jan 2009 22:53:01 +0000 (14:53 -0800)]
sctp: Properly timestamp outgoing data chunks for rtx purposes

Recent changes to the retransmit code exposed a long standing
bug where it was possible for a chunk to be time stamped
after the retransmit timer was reset.  This caused a rare
situation where the retrnamist timer has expired, but
nothing was marked for retrnasmission because all of
timesamps on data were less then 1 rto ago.  As result,
the timer was never restarted since nothing was retransmitted,
and this resulted in a hung association that did couldn't
complete the data transfer.  The solution is to timestamp
the chunk when it's added to the packet for transmission
purposes.  After the packet is trsnmitted the rtx timer
is restarted.  This guarantees that when the timer expires,
there will be data to retransmit.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosctp: Correctly start rtx timer on new packet transmissions.
Vlad Yasevich [Thu, 22 Jan 2009 22:52:43 +0000 (14:52 -0800)]
sctp: Correctly start rtx timer on new packet transmissions.

Commit 62aeaff5ccd96462b7077046357a6d7886175a57
(sctp: Start T3-RTX timer when fast retransmitting lowest TSN)
introduced a regression where it was possible to forcibly
restart the sctp retransmit timer at the transmission of any
new chunk.  This resulted in much longer timeout times and
sometimes hung sctp connections.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosctp: Fix crc32c calculations on big-endian arhes.
Vlad Yasevich [Thu, 22 Jan 2009 22:52:23 +0000 (14:52 -0800)]
sctp: Fix crc32c calculations on big-endian arhes.

crc32c algorithm provides a byteswaped result.  On little-endian
arches, the result ends up in big-endian/network byte order.
On big-endinan arches, the result ends up in little-endian
order and needs to be byte swapped again.  Thus calling cpu_to_le32
gives the right output.

Tested-by: Jukka Taimisto <jukka.taimisto@mail.suomi.net>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoxen: actually release memory when shrinking domain
Dan Magenheimer [Thu, 22 Jan 2009 22:36:08 +0000 (14:36 -0800)]
xen: actually release memory when shrinking domain

Fix this:

> It appears that in the upstream balloon driver,
> the call to HYPERVISOR_update_va_mapping is missing
> from decrease_reservation.  I think as a result,
> the balloon driver is eating memory but not
> releasing it to Xen, thus rendering the balloon
> driver essentially useless.  (Can be observed via xentop.)

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agophy: Add suspend/resume support to SMSC PHYs
Steve Glendinning [Thu, 22 Jan 2009 22:07:43 +0000 (14:07 -0800)]
phy: Add suspend/resume support to SMSC PHYs

All supported SMSC PHYs implement the standard "power down" bit 11 of
BMCR, so this patch adds support using the generic genphy_{suspend,resume}
functions.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agophylib: Fix oops in suspend/resume paths
Anton Vorontsov [Thu, 22 Jan 2009 21:51:24 +0000 (13:51 -0800)]
phylib: Fix oops in suspend/resume paths

Suspend/resume routines check for phydrv != NULL, but that is
wrong because "phydrv" comes from container_of(drv). If drv is NULL,
then container_of(drv) will return non-NULL result, and the checks
won't work.

The Freescale TBI PHYs are driver-less, so "drv" is NULL, and that
leads to the following oops:

Unable to handle kernel paging request for data at address 0xffffffe4
Faulting instruction address: 0xc0215554
Oops: Kernel access of bad area, sig: 11 [#1]
[...]
NIP [c0215554] mdio_bus_suspend+0x34/0x70
LR [c01cc508] suspend_device+0x258/0x2bc
Call Trace:
[cfad3da0] [cfad3db8] 0xcfad3db8 (unreliable)
[cfad3db0] [c01cc508] suspend_device+0x258/0x2bc
[cfad3dd0] [c01cc62c] dpm_suspend+0xc0/0x140
[cfad3e20] [c01cc6f4] device_suspend+0x48/0x5c
[cfad3e40] [c0068dd8] suspend_devices_and_enter+0x8c/0x148
[cfad3e60] [c00690f8] enter_state+0x100/0x118
[cfad3e80] [c00691c0] state_store+0xb0/0xe4
[cfad3ea0] [c018c938] kobj_attr_store+0x24/0x3c
[cfad3eb0] [c00ea9a8] flush_write_buffer+0x58/0x7c
[cfad3ed0] [c00eadf0] sysfs_write_file+0x58/0xa0
[cfad3ef0] [c009e810] vfs_write+0xb4/0x16c
[cfad3f10] [c009ed40] sys_write+0x4c/0x90
[cfad3f40] [c0014954] ret_from_syscall+0x0/0x38
[...]

This patch fixes the issue, plus removes unneeded parentheses
and fixes indentation level in mdio_bus_suspend().

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Version
Eilon Greenstein [Thu, 22 Jan 2009 06:01:37 +0000 (06:01 +0000)]
bnx2x: Version

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: loopback test failure
Eilon Greenstein [Thu, 22 Jan 2009 06:01:32 +0000 (06:01 +0000)]
bnx2x: loopback test failure

A link change interrupt might be queued and activated after the loopback was set
and it will cause the loopback to fail. The PHY lock should be kept until the
loopback test is over.

That implies that the bnx2x_test_link should used within the loopback function
and not bnx2x_wait_for_link since that function also takes the PHY link

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Missing rmb when waiting for FW response
Eilon Greenstein [Thu, 22 Jan 2009 06:01:29 +0000 (06:01 +0000)]
bnx2x: Missing rmb when waiting for FW response

Waiting for the FW to response requires a memory barrier

Signed-off-by: Michal Kalderon <michals@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Calling napi_del
Eilon Greenstein [Thu, 22 Jan 2009 06:01:25 +0000 (06:01 +0000)]
bnx2x: Calling napi_del

rmmod might hang without this patch since the reference counter is not going
down

Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Carrier off first call
Eilon Greenstein [Thu, 22 Jan 2009 03:37:48 +0000 (03:37 +0000)]
bnx2x: Carrier off first call

Call carrier off should not be called after register_netdev since after
register netdev open can be called at any time followed by an interrupt that
will set it to carrier_on and the probe will resume control and set it to off

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Handling load failures
Eilon Greenstein [Thu, 22 Jan 2009 03:37:44 +0000 (03:37 +0000)]
bnx2x: Handling load failures

Failures on load were not handled correctly - separate the flow to handle

different failures

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Disable napi
Eilon Greenstein [Thu, 22 Jan 2009 03:37:36 +0000 (03:37 +0000)]
bnx2x: Disable napi

Calling napi disabled unconditionally at netif stop

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobnx2x: Reset HW before use
Eilon Greenstein [Thu, 22 Jan 2009 03:37:31 +0000 (03:37 +0000)]
bnx2x: Reset HW before use

To avoid complications, make sure that the HW is in reset (as it should be)
before trying to take it out of reset. In normal flows, the HW is indeed in rest
so this should have no effect

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoiwlwifi: return NETDEV_TX_OK from _tx ops
Reinette Chatre [Mon, 19 Jan 2009 23:30:32 +0000 (15:30 -0800)]
iwlwifi: return NETDEV_TX_OK from _tx ops

be consistent with mac80211 drivers and return correct return code.
NETDEV_TX_OK is 0, but we need to be consistent wrt formatting amongst
implementations

re: http://marc.info/?l=linux-wireless&m=123119327419865&w=2

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agozd1211rw: adding Sitecom WL-603 (0df6:0036) to the USB id list
Hin-Tak Leung [Mon, 19 Jan 2009 23:39:09 +0000 (23:39 +0000)]
zd1211rw: adding Sitecom WL-603 (0df6:0036) to the USB id list

Giuseppe Cala <jiveaxe@gmail.com> (The second "a" in "Cala" should be
a grave, U+00E0) reported success on zd1211-devs@lists.sourceforge.net.
The chip info is:
zd1211b chip 0df6:0036 v4810 high 00-0c-f6 AL2230_RF pa0 g--N-

The Sitecom WL-603 is detected as a zd1211b with a AL2230 RF transceiver chip.

Signed-off-by: Giuseppe Cala <jiveaxe@gmail.com>
Signed-off-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54usb: fix nasty use after free
Christian Lamparter [Mon, 19 Jan 2009 23:27:57 +0000 (00:27 +0100)]
p54usb: fix nasty use after free

In theory, the firmware acks the received a data frame, before signaling the driver to free it again.
However Artur Skawina <art.08.09@gmail.com> has shown that it can happen in reverse order as well.
This is very bad and could lead to memory corruptions, oopses and panics.

Thanks to Artur Skawina <art.08.09@gmail.com> for reporting and debugging this issue.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Tested-by: Artur Skawina <art.08.09@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: more cryptographic accelerator fixes
Christian Lamparter [Mon, 19 Jan 2009 15:08:48 +0000 (16:08 +0100)]
p54: more cryptographic accelerator fixes

If we let the firmware do the data encryption, we have to remove the ICV and
(M)MIC at the end of the frame before we can give it back to mac80211.
Or, these data frames have a few trailing bytes on cooked monitor interfaces.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agop54: add missing break in eeprom parser
Chr [Mon, 19 Jan 2009 13:30:26 +0000 (14:30 +0100)]
p54: add missing break in eeprom parser

This patch fixes a obvious memory leak in the eeprom parser.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>