firefly-linux-kernel-4.4.55.git
15 years agoV4L/DVB (9355): de-BKL cafe_ccic.c
Jonathan Corbet [Fri, 17 Oct 2008 23:19:29 +0000 (20:19 -0300)]
V4L/DVB (9355): de-BKL cafe_ccic.c

Remove lock_kernel() call from cafe_ccic.c

Commit d56dc61265d2527a63ab5b0f03199a43cd89ca36 added lock_kernel()
calls to cafe_ccic.c.  But that driver was written with proper locking
and does not need the BKL, so take it back out.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9352): Add some missing compat32 ioctls
Gregor Jasny [Thu, 23 Oct 2008 12:55:22 +0000 (09:55 -0300)]
V4L/DVB (9352): Add some missing compat32 ioctls

This patch adds the missing compat ioctls that are needed to
operate Skype in combination with libv4l and a MJPEG only camera.

If you think it's trivial enough please submit it to -stable, too.

Signed-off-by: Gregor Jasny <gjasny@web.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9351): ibmcam: Fix a regression caused by a482f327ff56bc3cf53176a7eb736cea47...
Mauro Carvalho Chehab [Thu, 23 Oct 2008 12:53:56 +0000 (09:53 -0300)]
V4L/DVB (9351): ibmcam: Fix a regression caused by a482f327ff56bc3cf53176a7eb736cea47291a1d

As reported by David Ellingsworth:
> I'm not sure if it matters or not, but the ibmcam driver in the
> Mauro's linux-2.6 git tree in the for_linus branch is currently
> broken.

uvd is equal to NULL during most of ibmcam_probe. Due to that, an OOPS is
generated at dev_info. This patch replaces uvd->dev->dev to dev->dev
inside this routine.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Reviewed-by: David Ellingsworth <david@identd.dyndns.org>
15 years agoV4L/DVB (9350): radio-si470x: add support for kworld usb radio
Alexey Klimov [Thu, 23 Oct 2008 12:20:27 +0000 (09:20 -0300)]
V4L/DVB (9350): radio-si470x: add support for kworld usb radio

This patch add support for new device named KWorld USB FM Radio
SnapMusic Mobile 700 (FM700).
And changes few lines in comments.

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Acked-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9348): dtv5100: add dependency on zl10353
Antoine Jacquet [Tue, 21 Oct 2008 20:54:51 +0000 (17:54 -0300)]
V4L/DVB (9348): dtv5100: add dependency on zl10353

Update Kconfig to add missing dependency on zl10353 for dtv5100 driver.

Signed-off-by: Antoine Jacquet <royale@zerezo.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9346): Optimization: Enable gate in a symmetric/disciplined way,
Manu Abraham [Mon, 20 Oct 2008 21:14:14 +0000 (18:14 -0300)]
V4L/DVB (9346): Optimization: Enable gate in a symmetric/disciplined way,

rather than implementing different ways leading to confusion.

This allows multiple gate_enable/disable's in the tuner_read/write
functions, thereby lesser number of I/O operations throughout,
eventually leading to better results. As a side effect demods that
detect the STOP bit for auto closing of the gate can be avoided, thereby
a very minimal gain in disabling the auto detect feature as well.
Improves readability on the device control.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9337b): remove tuner-3036 and dpc7146 drivers from feature-removal-schedule.txt
Jean Delvare [Sat, 18 Oct 2008 14:05:58 +0000 (11:05 -0300)]
V4L/DVB (9337b): remove tuner-3036 and dpc7146 drivers from feature-removal-schedule.txt

The tuner-3036 and dpc7146 drivers have been deleted now so we can
remove the corresponding entries from feature-removal-schedule.txt.
(Thanks for doing this, BTW.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9337a): HID: Don't allow KWorld radio fm700 be handled by usb hid drivers
Alexey Klimov [Sun, 19 Oct 2008 23:10:13 +0000 (20:10 -0300)]
V4L/DVB (9337a): HID: Don't allow KWorld radio fm700 be handled by usb hid drivers

This device is already handled by radio-si470x driver, and we
therefore want usbhid to ignore it.

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Acked-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agotimers: handle HRTIMER_CB_IRQSAFE_UNLOCKED correctly from softirq context
Gautham R Shenoy [Sat, 25 Oct 2008 04:52:38 +0000 (10:22 +0530)]
timers: handle HRTIMER_CB_IRQSAFE_UNLOCKED correctly from softirq context

Impact: fix incorrect locking triggered during hotplug-intense stress-tests

While migrating the the CB_IRQSAFE_UNLOCKED timers during a cpu-offline,
we queue them on the cb_pending list, so that they won't go
stale.

Thus, when the callbacks of the timers run from the softirq context,
they could run into potential deadlocks, since these callbacks
assume that they're running with irq's disabled, thereby annoying
lockdep!

Fix this by emulating hardirq context while running these callbacks from
the hrtimer softirq.

=================================
[ INFO: inconsistent lock state ]
2.6.27 #2
--------------------------------
inconsistent {in-hardirq-W} -> {hardirq-on-W} usage.
ksoftirqd/0/4 [HC0[0]:SC1[1]:HE1:SE0] takes:
 (&rq->lock){++..}, at: [<c011db84>] sched_rt_period_timer+0x9e/0x1fc
{in-hardirq-W} state was registered at:
  [<c014103c>] __lock_acquire+0x549/0x121e
  [<c0107890>] native_sched_clock+0x88/0x99
  [<c013aa12>] clocksource_get_next+0x39/0x3f
  [<c0139abc>] update_wall_time+0x616/0x7df
  [<c0141d6b>] lock_acquire+0x5a/0x74
  [<c0121724>] scheduler_tick+0x3a/0x18d
  [<c047ed45>] _spin_lock+0x1c/0x45
  [<c0121724>] scheduler_tick+0x3a/0x18d
  [<c0121724>] scheduler_tick+0x3a/0x18d
  [<c012c436>] update_process_times+0x3a/0x44
  [<c013c044>] tick_periodic+0x63/0x6d
  [<c013c062>] tick_handle_periodic+0x14/0x5e
  [<c010568c>] timer_interrupt+0x44/0x4a
  [<c0150c9f>] handle_IRQ_event+0x13/0x3d
  [<c0151c14>] handle_level_irq+0x79/0xbd
  [<c0105634>] do_IRQ+0x69/0x7d
  [<c01041e4>] common_interrupt+0x28/0x30
  [<c047007b>] aac_probe_one+0x1a3/0x3f3
  [<c047ec2d>] _spin_unlock_irqrestore+0x36/0x39
  [<c01512b4>] setup_irq+0x1be/0x1f9
  [<c065d70b>] start_kernel+0x259/0x2c5
  [<ffffffff>] 0xffffffff
irq event stamp: 50102
hardirqs last  enabled at (50102): [<c047ebf4>] _spin_unlock_irq+0x20/0x23
hardirqs last disabled at (50101): [<c047edc2>] _spin_lock_irq+0xa/0x4b
softirqs last  enabled at (50088): [<c0128ba6>] do_softirq+0x37/0x4d
softirqs last disabled at (50099): [<c0128ba6>] do_softirq+0x37/0x4d

other info that might help us debug this:
no locks held by ksoftirqd/0/4.

stack backtrace:
Pid: 4, comm: ksoftirqd/0 Not tainted 2.6.27 #2
 [<c013f6cb>] print_usage_bug+0x13e/0x147
 [<c013fef5>] mark_lock+0x493/0x797
 [<c01410b1>] __lock_acquire+0x5be/0x121e
 [<c0141d6b>] lock_acquire+0x5a/0x74
 [<c011db84>] sched_rt_period_timer+0x9e/0x1fc
 [<c047ed45>] _spin_lock+0x1c/0x45
 [<c011db84>] sched_rt_period_timer+0x9e/0x1fc
 [<c011db84>] sched_rt_period_timer+0x9e/0x1fc
 [<c01210fd>] finish_task_switch+0x41/0xbd
 [<c0107890>] native_sched_clock+0x88/0x99
 [<c011dae6>] sched_rt_period_timer+0x0/0x1fc
 [<c0136dda>] run_hrtimer_pending+0x54/0xe5
 [<c011dae6>] sched_rt_period_timer+0x0/0x1fc
 [<c0128afb>] __do_softirq+0x7b/0xef
 [<c0128ba6>] do_softirq+0x37/0x4d
 [<c0128c12>] ksoftirqd+0x56/0xc5
 [<c0128bbc>] ksoftirqd+0x0/0xc5
 [<c0134649>] kthread+0x38/0x5d
 [<c0134611>] kthread+0x0/0x5d
 [<c0104477>] kernel_thread_helper+0x7/0x10
 =======================

Signed-off-by: Gautham R Shenoy <ego@in.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agopowerpc: Update desktop/server defconfigs
Paul Mackerras [Tue, 11 Nov 2008 08:39:26 +0000 (19:39 +1100)]
powerpc: Update desktop/server defconfigs

Turned off CONFIG_PCI_LEGACY and turned on EXT4, and otherwise mostly
took the defaults.  This also updates ppc6xx_defconfig, which covers
the 6xx/7xx/7xxx-based embedded boards.

Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agopowerpc: Fix msr check in compat_sys_swapcontext
Andreas Schwab [Thu, 6 Nov 2008 00:49:00 +0000 (00:49 +0000)]
powerpc: Fix msr check in compat_sys_swapcontext

The new context may not be 16-byte aligned, so the real address of the
mcontext structure should be read from the uc_regs pointer instead of
directly using the (unaligned) uc_mcontext field.

Signed-off-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agoMerge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux...
Ingo Molnar [Tue, 11 Nov 2008 08:16:20 +0000 (09:16 +0100)]
Merge branch 'devel' of git://git./linux/kernel/git/rostedt/linux-2.6-trace into tracing/urgent

15 years agodrm/i915: Move legacy breadcrumb out of the reserved status page area
Keith Packard [Sat, 8 Nov 2008 01:44:14 +0000 (11:44 +1000)]
drm/i915: Move legacy breadcrumb out of the reserved status page area

Addresses in the hardware status page below index 0x20 are reserved for use
by the hardware. The legacy breadcrumb was sitting at index 5. Move it to
index 0x21, and make sure everyone uses the defined value instead of
hard-coded constants.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agodrm/i915: Filter pci devices based on PCI_CLASS_DISPLAY_VGA
Dave Airlie [Tue, 11 Nov 2008 08:02:12 +0000 (18:02 +1000)]
drm/i915: Filter pci devices based on PCI_CLASS_DISPLAY_VGA

This fixes hangs on 855-class hardware by avoiding double attachment of the
driver due to the stub second head device having the same pci id as the real
device.

Other DRM drivers probably want this treatment as well, but I'm applying it
just to this one for safety. But we should clean up the drm_pciids.h mess
now so that each driver has its own pci id list header in its own directory.
Lets do that in the next release.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agolibata: fix last_reset timestamp handling
Tejun Heo [Tue, 4 Nov 2008 08:08:40 +0000 (17:08 +0900)]
libata: fix last_reset timestamp handling

ehc->last_reset is used to ensure that resets are not issued too
close to each other.  It's initialized to jiffies minus one minute
on EH entry.  However, when new links are initialized after PMP is
probed, new links have zero for this timestamp resulting in long wait
depending on the current jiffies.

This patch makes last_set considered iff ATA_EHI_DID_RESET is set, in
which case last_reset is always initialized.  As an added precaution,
WARN_ON() is added so that warning is printed if last_reset is
in future.

This problem is spotted and debugged by Shane Huang.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Shane Huang <Shane.Huang@amd.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: Avoid overflow in ata_tf_read_block() when tf->hba_lbal > 127
Roland Dreier [Tue, 4 Nov 2008 18:34:48 +0000 (10:34 -0800)]
libata: Avoid overflow in ata_tf_read_block() when tf->hba_lbal > 127

Phillip O'Donnell <phillip.odonnell@gmail.com> pointed out that the same
sign extension bug that was fixed in commit ba14a9c2 ("libata: Avoid
overflow in ata_tf_to_lba48() when tf->hba_lbal > 127") also appears to
exist in ata_tf_read_block().  Fix this by adding a cast to u64.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years ago[libata] pata_pcmcia: another memory card support
Marc Pignat [Thu, 6 Nov 2008 10:44:34 +0000 (11:44 +0100)]
[libata] pata_pcmcia: another memory card support

Support for Apacer photo steno pro card.

Signed-off-by: Marc Pignat <marc.pignat@hevs.ch>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years ago[libata] pata_sch: notice attached slave devices
Mark Salter [Thu, 6 Nov 2008 13:03:23 +0000 (08:03 -0500)]
[libata] pata_sch: notice attached slave devices

I posted this last month, but was prompted to do so again in bz#467457

Add capability flag to support slave devices with pata_sch driver.

Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years ago[libata] pata_cs553*.c: cleanup kernel-doc
Qinghuang Feng [Sat, 8 Nov 2008 08:32:02 +0000 (16:32 +0800)]
[libata] pata_cs553*.c: cleanup kernel-doc

No arguments named @deadline in cs5535_cable_detect() and
cs5536_cable_detect().  Remove them.

Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agodrm/radeon: map registers at load time
Dave Airlie [Tue, 11 Nov 2008 07:56:16 +0000 (17:56 +1000)]
drm/radeon: map registers at load time

Now that the radeon driver has suspend/resume functions, it needs to map its
registers at load time or it will likely crash if a suspend operation occurs
before the driver has been initialized.

This patch moves the register mapping code from firstopen to load and makes
the mapping into a _DRM_DRIVER one so that the core won't remove it at
lastclose time.

Fixes (at least partially) kernel bz #11891.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agodrm: Remove infrastructure for supporting i915's vblank swapping.
Eric Anholt [Wed, 5 Nov 2008 02:36:29 +0000 (18:36 -0800)]
drm: Remove infrastructure for supporting i915's vblank swapping.

It's not used in any other drivers, and doesn't look like it will be from
drm.git master.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agoi915: Remove racy delayed vblank swap ioctl.
Eric Anholt [Tue, 4 Nov 2008 20:01:24 +0000 (12:01 -0800)]
i915: Remove racy delayed vblank swap ioctl.

When userland detected that this ioctl was supported (by version number check),
it used it in a racy way -- dispatch delayed swap, wait for vblank, continue
rendering. As there was no mechanism for it to wait for the swap to finish,
sometimes it would render before the swap and garbage would be displayed on
the screen.

By removing the ioctl and returning -EINVAL, userland returns to its previous,
correct rendering path of waiting for a vblank then dispatching a swap.  The
only path that could have used this ioctl correctly was page flipping, which
relied on only one client running and emitting wait-for-vblank-before-rendering
in the command stream.  That path also falls back correctly, at the performance
cost of not being able to queue up rendering before the flip occurs.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agoi915: Don't whine when pci_enable_msi() fails.
Eric Anholt [Mon, 3 Nov 2008 22:46:17 +0000 (14:46 -0800)]
i915: Don't whine when pci_enable_msi() fails.

This probably just means the chipset doesn't support MSI, which is fine.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agoi915: Don't attempt to short-circuit object_wait_rendering by checking domains.
Owen Taylor [Mon, 3 Nov 2008 22:38:17 +0000 (14:38 -0800)]
i915: Don't attempt to short-circuit object_wait_rendering by checking domains.

This could return early when reading after writing a buffer, if somebody
had already put it on the flushing list (write domains are 0, but still
active), leading to glReadPixels failure.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agoi915: Clean up sarea pointers on leavevt
Keith Packard [Mon, 3 Nov 2008 07:38:20 +0000 (23:38 -0800)]
i915: Clean up sarea pointers on leavevt

This corresponds to the setup of the sarea pointers in DMA initialization,
though neither is exactly the point at which the sarea is set up or torn down.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agoi915: Save/restore MCHBAR_RENDER_STANDBY on GM965/GM45
Keith Packard [Mon, 3 Nov 2008 07:08:44 +0000 (23:08 -0800)]
i915: Save/restore MCHBAR_RENDER_STANDBY on GM965/GM45

This register is set by the 2D driver to prevent lockups, and so it needs to
be preserved across suspend/resume too. This makes my X200s work.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agofix for account_group_exec_runtime(), make sure ->signal can't be freed under rq...
Oleg Nesterov [Mon, 10 Nov 2008 14:39:30 +0000 (15:39 +0100)]
fix for account_group_exec_runtime(), make sure ->signal can't be freed under rq->lock

Impact: fix hang/crash on ia64 under high load

This is ugly, but the simplest patch by far.

Unlike other similar routines, account_group_exec_runtime() could be
called "implicitly" from within scheduler after exit_notify(). This
means we can race with the parent doing release_task(), we can't just
check ->signal != NULL.

Change __exit_signal() to do spin_unlock_wait(&task_rq(tsk)->lock)
before __cleanup_signal() to make sure ->signal can't be freed under
task_rq(tsk)->lock. Note that task_rq_unlock_wait() doesn't care
about the case when tsk changes cpu/rq under us, this should be OK.

Thanks to Ingo who nacked my previous buggy patch.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Reported-by: Doug Chapman <doug.chapman@hp.com>
15 years agodsa: fix master interface allmulti/promisc handling
Lennert Buytenhek [Tue, 11 Nov 2008 05:53:12 +0000 (21:53 -0800)]
dsa: fix master interface allmulti/promisc handling

Before commit b6c40d68ff6498b7f63ddf97cf0aa818d748dee7 ("net: only
invoke dev->change_rx_flags when device is UP"), the dsa driver could
sort-of get away with only fiddling with the master interface's
allmulti/promisc counts in ->change_rx_flags() and not touching them
in ->open() or ->stop().  After this commit (note that it was merged
almost simultaneously with the dsa patches, which is why this wasn't
caught initially), the breakage that was already there became more
apparent.

Since it makes no sense to keep the master interface's allmulti or
promisc count pinned for a slave interface that is down, copy the vlan
driver's sync logic (which does exactly what we want) over to dsa to
fix this.

Bug report from Dirk Teurlings <dirk@upexia.nl> and Peter van Valderen
<linux@ddcrew.com>.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Tested-by: Dirk Teurlings <dirk@upexia.nl>
Tested-by: Peter van Valderen <linux@ddcrew.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodsa: fix skb->pkt_type when mac address of slave interface differs
Lennert Buytenhek [Tue, 11 Nov 2008 05:52:42 +0000 (21:52 -0800)]
dsa: fix skb->pkt_type when mac address of slave interface differs

When a dsa slave interface has a mac address that differs from that
of the master interface, eth_type_trans() won't explicitly set
skb->pkt_type back to PACKET_HOST -- we need to do this ourselves
before calling eth_type_trans().

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: fix setting of skb->tail in skb_recycle_check()
Lennert Buytenhek [Tue, 11 Nov 2008 05:45:05 +0000 (21:45 -0800)]
net: fix setting of skb->tail in skb_recycle_check()

Since skb_reset_tail_pointer() reads skb->data, we need to set
skb->data before calling skb_reset_tail_pointer().  This was causing
spurious skb_over_panic()s from skb_put() being called on a recycled
skb that had its skb->tail set to beyond where it should have been.

Bug report from Peter van Valderen <linux@ddcrew.com>.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: fix /proc/net/snmp as memory corruptor
Eric Dumazet [Tue, 11 Nov 2008 05:43:08 +0000 (21:43 -0800)]
net: fix /proc/net/snmp as memory corruptor

icmpmsg_put() can happily corrupt kernel memory, using a static
table and forgetting to reset an array index in a loop.

Remove the static array since its not safe without proper locking.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomac80211: fix a buffer overrun in station debug code
Jianjun Kong [Tue, 11 Nov 2008 05:37:39 +0000 (21:37 -0800)]
mac80211: fix a buffer overrun in station debug code

net/mac80211/debugfs_sta.c
The trailing zero was written to state[4], it's out of bounds.

Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoring-buffer: prevent infinite looping on time stamping
Steven Rostedt [Tue, 11 Nov 2008 02:46:01 +0000 (21:46 -0500)]
ring-buffer: prevent infinite looping on time stamping

Impact: removal of unnecessary looping

The lockless part of the ring buffer allows for reentry into the code
from interrupts. A timestamp is taken, a test is preformed and if it
detects that an interrupt occurred that did tracing, it tries again.

The problem arises if the timestamp code itself causes a trace.
The detection will detect this and loop again. The difference between
this and an interrupt doing tracing, is that this will fail every time,
and cause an infinite loop.

Currently, we test if the loop happens 1000 times, and if so, it will
produce a warning and disable the ring buffer.

The problem with this approach is that it makes it difficult to perform
some types of tracing (tracing the timestamp code itself).

Each trace entry has a delta timestamp from the previous entry.
If a trace entry is reserved but and interrupt occurs and traces before
the previous entry is commited, the delta timestamp for that entry will
be zero. This actually makes sense in terms of tracing, because the
interrupt entry happened before the preempted entry was commited, so
one may consider the two happening at the same time. The order is
still preserved in the buffer.

With this idea, instead of trying to get a new timestamp if an interrupt
made it in between the timestamp and the test, the entry could simply
make the delta zero and continue. This will prevent interrupts or
tracers in the timer code from causing the above loop.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
15 years agoftrace: disable tracing on resize
Steven Rostedt [Tue, 11 Nov 2008 02:46:00 +0000 (21:46 -0500)]
ftrace: disable tracing on resize

Impact: fix for bug on resize

This patch addresses the bug found here:

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

When ftrace converted to the new unified trace buffer, the resizing of
the buffer was not protected as much as it was originally. If tracing
is performed while the resize occurs, then the buffer can be corrupted.

This patch disables all ftrace buffer modifications before a resize
takes place.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
15 years agonetfilter: payload_len is be16, add size of struct rather than size of pointer
Harvey Harrison [Tue, 11 Nov 2008 00:46:06 +0000 (16:46 -0800)]
netfilter: payload_len is be16, add size of struct rather than size of pointer

payload_len is a be16 value, not cpu_endian, also the size of a ponter
to a struct ipv6hdr was being added, not the size of the struct itself.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv6: fix ip6_mr_init error path
Benjamin Thery [Tue, 11 Nov 2008 00:34:11 +0000 (16:34 -0800)]
ipv6: fix ip6_mr_init error path

The order of cleanup operations in the error/exit section of ip6_mr_init()
is completely inversed. It should be the other way around.
Also a del_timer() is missing in the error path.

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years ago[4/4] dca: fixup initialization dependency
Dan Williams [Fri, 7 Nov 2008 01:47:17 +0000 (01:47 +0000)]
[4/4] dca: fixup initialization dependency

Mark dca_init as a subsys_initcall since it needs to be ready to go
before dependent drivers start registering themselves.

Cc: <stable@kernel.org>
Reported-and-tested-by: Mark Rustad <mark_rustad@Xiotech.com>
Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years ago[3/4] I/OAT: fix async_tx.callback checking
Maciej Sosnowski [Fri, 7 Nov 2008 01:46:55 +0000 (01:46 +0000)]
[3/4] I/OAT: fix async_tx.callback checking

async_tx.callback should be checked for the first
not the last descriptor in the chain.

Cc: <stable@kernel.org>
Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years ago[2/4] I/OAT: fix dma_pin_iovec_pages() error handling
Maciej Sosnowski [Fri, 7 Nov 2008 01:46:33 +0000 (01:46 +0000)]
[2/4] I/OAT: fix dma_pin_iovec_pages() error handling

Error handling needs to be modified in dma_pin_iovec_pages().
It should return NULL instead of ERR_PTR
(pinned_list is checked for NULL in tcp_recvmsg() to determine
if iovec pages have been successfully pinned down).
In case of error for the first iovec,
local_list->nr_iovecs needs to be initialized.

Cc: <stable@kernel.org>
Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years ago[1/4] I/OAT: fix channel resources free for not allocated channels
Maciej Sosnowski [Fri, 7 Nov 2008 01:45:52 +0000 (01:45 +0000)]
[1/4] I/OAT: fix channel resources free for not allocated channels

If the ioatdma driver is loaded but not used it does not allocate descriptors.
Before it frees channel resources it should first be sure
that they have been previously allocated.

Cc: <stable@kernel.org>
Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Tested-by: Tom Picard <tom.s.picard@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agossb: Fix DMA-API compilation for non-PCI systems
Michael Buesch [Thu, 6 Nov 2008 10:49:21 +0000 (10:49 +0000)]
ssb: Fix DMA-API compilation for non-PCI systems

This fixes compilation of the SSB DMA-API code on non-PCI platforms.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoSSB: hide empty sub menu
Mike Frysinger [Thu, 6 Nov 2008 01:37:00 +0000 (01:37 +0000)]
SSB: hide empty sub menu

If the target system cannot support SSB, then don't show the menu option as
it'll simply be an empty submenu.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonohz: disable tick_nohz_kick_tick() for now
Thomas Gleixner [Mon, 10 Nov 2008 12:20:23 +0000 (13:20 +0100)]
nohz: disable tick_nohz_kick_tick() for now

Impact: nohz powersavings and wakeup regression

commit fb02fbc14d17837b4b7b02dbb36142c16a7bf208 (NOHZ: restart tick
device from irq_enter()) causes a serious wakeup regression.

While the patch is correct it does not take into account that spurious
wakeups happen on x86. A fix for this issue is available, but we just
revert to the .27 behaviour and let long running softirqs screw
themself.

Disable it for now.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
15 years agovlan: Fix typos in proc output string
Ferenc Wagner [Mon, 10 Nov 2008 21:37:40 +0000 (13:37 -0800)]
vlan: Fix typos in proc output string

Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoirq: call __irq_enter() before calling the tick_idle_check
Thomas Gleixner [Fri, 7 Nov 2008 10:06:00 +0000 (11:06 +0100)]
irq: call __irq_enter() before calling the tick_idle_check

Impact: avoid spurious ksoftirqd wakeups

The tick idle check which is called from irq_enter() was run before
the call to __irq_enter() which did not set the in_interrupt() bits in
preempt_count. That way the raise of a softirq woke up softirqd for
nothing as the softirq was handled on return from interrupt.

Call __irq_enter() before calling into the tick idle check code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: Make NUMA on 32-bit depend on BROKEN
Rafael J. Wysocki [Mon, 10 Nov 2008 20:52:47 +0000 (21:52 +0100)]
x86: Make NUMA on 32-bit depend on BROKEN

While investigating the failure of hibernation on 32-bit x86 with
CONFIG_NUMA set, as described in this message
http://marc.info/?l=linux-kernel&m=122634118116226&w=4
I asked some people for help and I was told that it wasn't really
worth the effort, because CONFIG_NUMA was generally broken on 32-bit
x86 systems and it shouldn't be used in such configs.  For this
reason, make CONFIG_NUMA depend on BROKEN instead of EXPERIMENTAL on
x86-32.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Pavel Machek <pavel@suse.cz>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoKEYS: Make request key instantiate the per-user keyrings
David Howells [Mon, 10 Nov 2008 19:00:05 +0000 (19:00 +0000)]
KEYS: Make request key instantiate the per-user keyrings

Make request_key() instantiate the per-user keyrings so that it doesn't oops
if it needs to get hold of the user session keyring because there isn't a
session keyring in place.

Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Steve French <smfrench@gmail.com>
Tested-by: Rutger Nijlunsing <rutger.nijlunsing@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agopowerpc: Repair device bindings documentation
Trent Piepho [Mon, 10 Nov 2008 21:09:21 +0000 (13:09 -0800)]
powerpc: Repair device bindings documentation

Commit d0fc2eaaf4c56a95f5ed29b6bfb609e19714fc16 "powerpc/fsl: Refactor
device bindings" split out a number of device bindings from
booting-without-of.txt into separate files.  Having them all in one file
was a frequent source of merge conflicts.

However, in the next merge, 49997d75152b3d23c53b0fa730599f2f74c92c65, there
was another conflict.  Some of the bindings removed from
booting-without-of.txt were mistakenly added back in and the copies in
dts-bindings were kept as well.

This patch re-removes "Freescale Display Interface" and "Freescale on board
FPGA" and fixes the table of contents.

Signed-off-by: Trent Piepho <tpiepho@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
15 years agosparc64: Update defconfig.
David S. Miller [Mon, 10 Nov 2008 20:35:29 +0000 (12:35 -0800)]
sparc64: Update defconfig.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoRevert "sparc: correct section of current_pc()"
David S. Miller [Sat, 8 Nov 2008 06:57:16 +0000 (22:57 -0800)]
Revert "sparc: correct section of current_pc()"

This reverts commit 8dd9453737822469837d48d5da3785ce70fb2118.

This fixes a boot failure reported by Robert Reif.

The code above the section change expects to fallthrough, so
we can't make such a section change here.

15 years agoocfs2: Check search result in ocfs2_xattr_block_get()
Tiger Yang [Sun, 2 Nov 2008 11:04:21 +0000 (19:04 +0800)]
ocfs2: Check search result in ocfs2_xattr_block_get()

ocfs2_xattr_block_get() calls ocfs2_xattr_search() to find an external
xattr, but doesn't check the search result that is passed back via struct
ocfs2_xattr_search. Add a check for search result, and pass back -ENODATA if
the xattr search failed. This avoids a later NULL pointer error.

Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: fix printk related build warnings in xattr.c
Mark Fasheh [Wed, 29 Oct 2008 21:45:30 +0000 (14:45 -0700)]
ocfs2: fix printk related build warnings in xattr.c

Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: truncate outstanding block after direct io failure
Dmitri Monakhov [Mon, 27 Oct 2008 20:01:49 +0000 (13:01 -0700)]
ocfs2: truncate outstanding block after direct io failure

Signed-off-by: Dmitri Monakhov <dmonakhov@openvz.org>
Cc: Jeff Moyer <jmoyer@redhat.com>
Cc: Mark Fasheh <mark.fasheh@oracle.com>
Cc: Joel Becker <Joel.Becker@oracle.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2/xattr: Proper hash collision handle in bucket division
Tao Ma [Sun, 26 Oct 2008 22:06:24 +0000 (06:06 +0800)]
ocfs2/xattr: Proper hash collision handle in bucket division

In ocfs2/xattr, we must make sure the xattrs which have the same hash value
exist in the same bucket so that the search schema can work. But in the old
implementation, when we want to extend a bucket, we just move half number of
xattrs to the new bucket. This works in most cases, but if we are lucky
enough we will move 2 xattrs into 2 different buckets. This means that an
xattr from the previous bucket cannot be found anymore. This patch fix this
problem by finding the right position during extending the bucket and extend
an empty bucket if needed.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Cc: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: return 0 in page_mkwrite to let VFS retry.
Tao Ma [Mon, 6 Oct 2008 08:59:55 +0000 (16:59 +0800)]
ocfs2: return 0 in page_mkwrite to let VFS retry.

In ocfs2_page_mkwrite, we return -EINVAL when we found the page mapping
isn't updated, and it will cause the user space program get SIGBUS and
exit. The reason is that during race writeable mmap, we will do
unmap_mapping_range in ocfs2_data_downconvert_worker. The good thing is
that if we reuturn 0 in page_mkwrite, VFS will retry fault and then
call page_mkwrite again, so it is safe to return 0 here.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: Set journal descriptor to NULL after journal shutdown
Sunil Mushran [Wed, 22 Oct 2008 20:24:29 +0000 (13:24 -0700)]
ocfs2: Set journal descriptor to NULL after journal shutdown

Patch sets journal descriptor to NULL after the journal is shutdown.
This ensures that jbd2_journal_release_jbd_inode(), which removes the
jbd2 inode from txn lists, can be called safely from ocfs2_clear_inode()
even after the journal has been shutdown.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: Fix check of return value of ocfs2_start_trans() in xattr.c.
Tao Ma [Thu, 23 Oct 2008 23:57:28 +0000 (07:57 +0800)]
ocfs2: Fix check of return value of ocfs2_start_trans() in xattr.c.

On failure, ocfs2_start_trans() returns values like ERR_PTR(-ENOMEM),
so we should check whether handle is NULL. Fix them to use IS_ERR().
Jan has made the patch for other part in ocfs2(thank Jan for it), so
this is just the fix for fs/ocfs2/xattr.c.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: Let inode be really deleted when ocfs2_mknod_locked() fails
Jan Kara [Mon, 20 Oct 2008 17:23:54 +0000 (19:23 +0200)]
ocfs2: Let inode be really deleted when ocfs2_mknod_locked() fails

We forgot to set i_nlink to 0 when returning due to error from ocfs2_mknod_locked()
and thus inode was not properly released via ocfs2_delete_inode() (e.g. claimed
space was not released). Fix it.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: Fix checking of return value of new_inode()
Jan Kara [Mon, 20 Oct 2008 17:23:53 +0000 (19:23 +0200)]
ocfs2: Fix checking of return value of new_inode()

new_inode() does not return ERR_PTR() but NULL in case of failure. Correct
checking of the return value.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: Fix check of return value of ocfs2_start_trans()
Jan Kara [Mon, 20 Oct 2008 17:23:51 +0000 (19:23 +0200)]
ocfs2: Fix check of return value of ocfs2_start_trans()

On failure, ocfs2_start_trans() returns values like ERR_PTR(-ENOMEM).
Thus checks for !handle are wrong. Fix them to use IS_ERR().

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: Fix some typos in xattr annotations.
Tao Ma [Fri, 24 Oct 2008 14:24:17 +0000 (22:24 +0800)]
ocfs2: Fix some typos in xattr annotations.

Fix some typos in the xattr annotations.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Reported-by: Coly Li <coyli@suse.de>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: Remove unused ocfs2_restore_xattr_block().
Tao Ma [Fri, 17 Oct 2008 04:44:36 +0000 (12:44 +0800)]
ocfs2: Remove unused ocfs2_restore_xattr_block().

Since now ocfs2 supports empty xattr buckets, we will never remove
the xattr index tree even if all the xattrs are removed, so this
function will never be called. So remove it.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: Don't repeat ocfs2_xattr_block_find()
Joel Becker [Tue, 21 Oct 2008 01:43:07 +0000 (18:43 -0700)]
ocfs2: Don't repeat ocfs2_xattr_block_find()

ocfs2_xattr_block_get() looks up the xattr in a startlingly familiar
way; it's identical to the function ocfs2_xattr_block_find().  Let's just
use the later in the former.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: Specify appropriate journal access for new xattr buckets.
Joel Becker [Tue, 21 Oct 2008 01:32:48 +0000 (18:32 -0700)]
ocfs2: Specify appropriate journal access for new xattr buckets.

There are a couple places that get an xattr bucket that may be reading
an existing one or may be allocating a new one.  They should specify the
correct journal access mode depending.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: Check errors from ocfs2_xattr_update_xattr_search()
Joel Becker [Tue, 21 Oct 2008 01:25:56 +0000 (18:25 -0700)]
ocfs2: Check errors from ocfs2_xattr_update_xattr_search()

The ocfs2_xattr_update_xattr_search() function can return an error when
trying to read blocks off of disk.  The caller needs to check this error
before using those (possibly invalid) blocks.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: Don't return -EFAULT from a corrupt xattr entry.
Joel Becker [Tue, 21 Oct 2008 01:24:03 +0000 (18:24 -0700)]
ocfs2: Don't return -EFAULT from a corrupt xattr entry.

If the xattr disk structures are corrupt, return -EIO, not -EFAULT.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: Check xattr block signatures properly.
Joel Becker [Tue, 21 Oct 2008 01:20:43 +0000 (18:20 -0700)]
ocfs2: Check xattr block signatures properly.

The xattr.c code is currently memcmp()ing naking buffer pointers.
Create the OCFS2_IS_VALID_XATTR_BLOCK() macro to match its peers and use
that.

In addition, failed signature checks were returning -EFAULT, which is
completely wrong.  Return -EIO.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: add handler_map array bounds checking
Tiger Yang [Thu, 23 Oct 2008 08:34:44 +0000 (16:34 +0800)]
ocfs2: add handler_map array bounds checking

Make the handler_map array as large as the possible value range to avoid
a fencepost error.

[ Utilize alternate method -- Joel ]

Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: remove duplicate definition in xattr
Tiger Yang [Thu, 23 Oct 2008 08:34:13 +0000 (16:34 +0800)]
ocfs2: remove duplicate definition in xattr

Include/linux/xattr.h already has the definition about xattr prefix,
so remove the duplicate definitions in xattr.c.

Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: fix function declaration and definition in xattr
Tiger Yang [Thu, 23 Oct 2008 08:33:33 +0000 (16:33 +0800)]
ocfs2: fix function declaration and definition in xattr

Because we merged the xattr sources into one file, some functions
no longer belong in the header file.

Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoocfs2: fix license in xattr
Tiger Yang [Thu, 23 Oct 2008 08:33:03 +0000 (16:33 +0800)]
ocfs2: fix license in xattr

This patch fixes the license in xattr.c and xattr.h.

Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Mon, 10 Nov 2008 17:13:37 +0000 (09:13 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Make the HP EliteBook 8530p use AD1884A model laptop
  ALSA: gusextreme: Fix build errors
  ALSA: hdsp: check for iobox and upload firmware during ioctl
  ALSA: HDSP: check for io box before uploading firmware
  ALSA: hda - Add another HP model (6730s) for AD1884A
  alsa: fix snd_BUG_on() and friends
  ALSA: hda - Add a quirk for MEDION MD96630
  ALSA: hda - Limit the number of GPIOs show in proc

15 years agoMerge branches 'topic/fix/misc' and 'topic/fix/hda' into for-linus
Takashi Iwai [Mon, 10 Nov 2008 16:58:46 +0000 (17:58 +0100)]
Merge branches 'topic/fix/misc' and 'topic/fix/hda' into for-linus

15 years agoALSA: hda - Make the HP EliteBook 8530p use AD1884A model laptop
Travis Place [Mon, 10 Nov 2008 16:56:23 +0000 (17:56 +0100)]
ALSA: hda - Make the HP EliteBook 8530p use AD1884A model laptop

Added a QUIRK to patch_analog.c for the HP Elitebook 8530p
(IDs 0x103c:0x30e7) to use AD1884A model 'laptop' by default.
Playback and Capture confirmed working.

Signed-off-by: Travis Place <wishie@wishie.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agox86: HPET: enter hpet_interrupt_handler with interrupts disabled
Matt Fleming [Sun, 2 Nov 2008 22:23:13 +0000 (22:23 +0000)]
x86: HPET: enter hpet_interrupt_handler with interrupts disabled

Some functions that may be called from this handler require that
interrupts are disabled. Also, combining IRQF_DISABLED and
IRQF_SHARED does not reliably disable interrupts in a handler, so
remove IRQF_SHARED from the irq flags (this irq is not shared anyway).

Signed-off-by: Matt Fleming <mjf@gentoo.org>
Cc: mingo@elte.hu
Cc: venkatesh.pallipadi@intel.com
Cc: "Will Newton" <will.newton@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
15 years agox86: HPET: read from HPET_Tn_CMP() not HPET_T0_CMP
Matt Fleming [Sun, 2 Nov 2008 16:04:20 +0000 (16:04 +0000)]
x86: HPET: read from HPET_Tn_CMP() not HPET_T0_CMP

In hpet_next_event() we check that the value we just wrote to
HPET_Tn_CMP(timer) has reached the chip. Currently, we're checking that
the value we wrote to HPET_Tn_CMP(timer) is in HPET_T0_CMP, which, if
timer is anything other than timer 0, is likely to fail.

Signed-off-by: Matt Fleming <mjf@gentoo.org>
Cc: mingo@elte.hu
Cc: venkatesh.pallipadi@intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
15 years agox86: HPET: convert WARN_ON to WARN_ON_ONCE
Matt Fleming [Sun, 2 Nov 2008 16:04:18 +0000 (16:04 +0000)]
x86: HPET: convert WARN_ON to WARN_ON_ONCE

It is possible to flood the console with call traces if the WARN_ON
condition is true because of the frequency with which this function is
called.

Signed-off-by: Matt Fleming <mjf@gentoo.org>
Cc: mingo@elte.hu
Cc: venkatesh.pallipadi@intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
15 years agolibata: revert convert-to-block-tagging patches
Tejun Heo [Mon, 10 Nov 2008 05:48:21 +0000 (14:48 +0900)]
libata: revert convert-to-block-tagging patches

This patch reverts the following three commits which convert libata to
use block layer tagging.

 43a49cbdf31e812c0d8f553d433b09b421f5d52c
 e013e13bf605b9e6b702adffbe2853cfc60e7806
 2fca5ccf97d2c28bcfce44f5b07d85e74e3cd18e

Although using block layer tagging is the right direction, due to the
tight coupling among tag number, data structure allocation and
hardware command slot allocation, libata doesn't work correctly with
the current conversion.

The biggest problem is guaranteeing that tag 0 is always used for
non-NCQ commands.  Due to the way blk-tag is implemented and how SCSI
starts and finishes requests, such guarantee can't be made.  I'm not
sure whether this would actually break any low level driver but it
doesn't look like a good idea to break such assumption given the
frailty of ATA controllers.

So, for the time being, keep using the old dumb in-libata qc
allocation.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Jens Axobe <jens.axboe@oracle.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosched: clean up debug info
Peter Zijlstra [Mon, 10 Nov 2008 09:46:32 +0000 (10:46 +0100)]
sched: clean up debug info

Impact: clean up and fix debug info printout

While looking over the sched_debug code I noticed that we printed the rq
schedstats for every cfs_rq, ammend this.

Also change nr_spead_over into an int, and fix a little buglet in
min_vruntime printing.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years ago[XFS] XFS: Check for valid transaction headers in recovery
David Chinner [Thu, 30 Oct 2008 06:40:09 +0000 (17:40 +1100)]
[XFS] XFS: Check for valid transaction headers in recovery

When we are about to add a new item to a transaction in recovery, we need
to check that it is valid first. Currently we just assert that header
magic number matches, but in production systems that is not present and we
add a corrupted transaction to the list to be processed. This results in a
kernel oops later when processing the corrupted transaction.

Instead, if we detect a corrupted transaction, abort recovery and leave
the user to clean up the mess that has occurred.

SGI-PV: 988145

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

Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
15 years ago[XFS] handle memory allocation failures during log initialisation
Dave Chinner [Mon, 10 Nov 2008 05:50:24 +0000 (16:50 +1100)]
[XFS] handle memory allocation failures during log initialisation

When there is no memory left in the system, xfs_buf_get_noaddr()
can fail. If this happens at mount time during xlog_alloc_log()
we fail to catch the error and oops.

Catch the error from xfs_buf_get_noaddr(), and allow other memory
allocations to fail and catch those errors too. Report the error
to the console and fail the mount with ENOMEM.

Tested by manually injecting errors into xfs_buf_get_noaddr() and
xlog_alloc_log().

Version 2:
o remove unnecessary casts of the returned pointer from kmem_zalloc()

SGI-PV: 987246

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
15 years agoALSA: gusextreme: Fix build errors
Ville Syrjala [Sun, 9 Nov 2008 18:32:40 +0000 (20:32 +0200)]
ALSA: gusextreme: Fix build errors

gusextreme depends on opl3 support. Add the approriate select to Kconfig.
Also remove the unnecessary hwdep select.

Relevant build errors:
ERROR: "snd_opl3_hwdep_new" [sound/isa/gus/snd-gusextreme.ko] undefined!
ERROR: "snd_opl3_create" [sound/isa/gus/snd-gusextreme.ko] undefined!

Signed-off-by: Ville Syrjala <syrjala@sci.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years ago[XFS] Account for allocated blocks when expanding directories
David Chinner [Thu, 30 Oct 2008 06:38:12 +0000 (17:38 +1100)]
[XFS] Account for allocated blocks when expanding directories

When we create a directory, we reserve a number of blocks for the maximum
possible expansion of of the directory due to various btree splits,
freespace allocation, etc. Unfortunately, each allocation is not reflected
in the total number of blocks still available to the transaction, so the
maximal reservation is used over and over again.

This leads to problems where an allocation group has only enough blocks
for *some* of the allocations required for the directory modification.
After the first N allocations, the remaining blocks in the allocation
group drops below the total reservation, and subsequent allocations fail
because the allocator will not allow the allocation to proceed if the AG
does not have the enough blocks available for the entire allocation total.

This results in an ENOSPC occurring after an allocation has already
occurred. This results in aborting the directory operation (leaving the
directory in an inconsistent state) and cancelling a dirty transaction,
which results in a filesystem shutdown.

Avoid the problem by reflecting the number of blocks allocated in any
directory expansion in the total number of blocks available to the
modification in progress. This prevents a directory modification from
being aborted part way through with an ENOSPC.

SGI-PV: 988144

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

Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
15 years ago[XFS] Wait for all I/O on truncate to zero file size
Lachlan McIlroy [Thu, 30 Oct 2008 05:59:06 +0000 (16:59 +1100)]
[XFS] Wait for all I/O on truncate to zero file size

It's possible to have outstanding xfs_ioend_t's queued when the file size
is zero. This can happen in the direct I/O path when a direct I/O write
fails due to ENOSPC. In this case the xfs_ioend_t will still be queued (ie
xfs_end_io_direct() does not know that the I/O failed so can't force the
xfs_ioend_t to be flushed synchronously).

When we truncate a file on unlink we don't know to wait for these
xfs_ioend_ts and we can have a use-after-free situation if the inode is
reclaimed before the xfs_ioend_t is finally processed.

As was suggested by Dave Chinner lets wait for all I/Os to complete when
truncating the file size to zero.

SGI-PV: 981668

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

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
15 years ago[XFS] Fix use-after-free with log and quotas
Lachlan McIlroy [Thu, 30 Oct 2008 05:53:25 +0000 (16:53 +1100)]
[XFS] Fix use-after-free with log and quotas

Destroying the quota stuff on unmount can access the log - ie
XFS_QM_DONE() ends up in xfs_dqunlock() which calls
xfs_trans_unlocked_item() and then xfs_log_move_tail(). By this time the
log has already been destroyed. Just move the cleanup of the quota code
earlier in xfs_unmountfs() before the call to xfs_log_unmount(). Moving
XFS_QM_DONE() up near XFS_QM_DQPURGEALL() seems like a good spot.

SGI-PV: 987086

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

Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Peter Leckie <pleckie@sgi.com>
15 years agoLinux 2.6.28-rc4
Linus Torvalds [Mon, 10 Nov 2008 00:36:15 +0000 (16:36 -0800)]
Linux 2.6.28-rc4

15 years agoregression: disable timer peek-ahead for 2.6.28
Arjan van de Ven [Sun, 9 Nov 2008 20:45:10 +0000 (12:45 -0800)]
regression: disable timer peek-ahead for 2.6.28

It's showing up as regressions; disabling it very likely just papers
over an underlying issue, but time is running out for 2.6.28, lets get
back to this for 2.6.29

Fixes: #11826 and #11893
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild...
Linus Torvalds [Mon, 10 Nov 2008 00:20:49 +0000 (16:20 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/sam/kbuild-fixes

* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  kbuild: Fixup deb-pkg target to generate separate firmware deb

15 years agokbuild: Fixup deb-pkg target to generate separate firmware deb
Jonathan McDowell [Sat, 13 Sep 2008 16:08:31 +0000 (17:08 +0100)]
kbuild: Fixup deb-pkg target to generate separate firmware deb

The below is a simplistic fix for "make deb-pkg"; it splits the
firmware out to a linux-firmware-image package and adds an
(unversioned) Suggests to the linux package for this firmware.

Signed-Off-By: Jonathan McDowell <noodles@earth.li>
Acked-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agoDon't ask twice about not including staging drivers
Linus Torvalds [Sun, 9 Nov 2008 20:47:04 +0000 (12:47 -0800)]
Don't ask twice about not including staging drivers

The "Exclude staging drivers" question is there so that we don't build
staging drivers for allyesconfig or allnoconfig settings, but it's very
irritating when you've already said "no" to staging drivers earlier.

There is absolutely no point in declining twice - once you've declined
the staging drivers, you're done.

So make the second question depend on the first question having been
answered in the affirmative.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'for-2.6.28' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Sun, 9 Nov 2008 20:25:44 +0000 (12:25 -0800)]
Merge branch 'for-2.6.28' of git://linux-nfs.org/~bfields/linux

* 'for-2.6.28' of git://linux-nfs.org/~bfields/linux:
  Fix nfsd truncation of readdir results

15 years agoMerge branch 'cpus4096' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux...
Linus Torvalds [Sun, 9 Nov 2008 20:20:56 +0000 (12:20 -0800)]
Merge branch 'cpus4096' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'cpus4096' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  cpumask: introduce new API, without changing anything, v3
  cpumask: new API, v2
  cpumask: introduce new API, without changing anything

15 years agoFix nfsd truncation of readdir results
Doug Nazar [Wed, 5 Nov 2008 11:16:28 +0000 (06:16 -0500)]
Fix nfsd truncation of readdir results

Commit 8d7c4203 "nfsd: fix failure to set eof in readdir in some
situations" introduced a bug: on a directory in an exported ext3
filesystem with dir_index unset, a READDIR will only return about 250
entries, even if the directory was larger.

Bisected it back to this commit; reverting it fixes the problem.

It turns out that in this case ext3 reads a block at a time, then
returns from readdir, which means we can end up with buf.full==0 but
with more entries in the directory still to be read.  Before 8d7c4203
(but after c002a6c797 "Optimise NFS readdir hack slightly"), this would
cause us to return the READDIR result immediately, but with the eof bit
unset.  That could cause a performance regression (because the client
would need more roundtrips to the server to read the whole directory),
but no loss in correctness, since the cleared eof bit caused the client
to send another readdir.  After 8d7c4203, the setting of the eof bit
made this a correctness problem.

So, move nfserr_eof into the loop and remove the buf.full check so that
we loop until buf.used==0.  The following seems to do the right thing
and reduces the network traffic since we don't return a READDIR result
until the buffer is full.

Tested on an empty directory & large directory; eof is properly sent and
there are no more short buffers.

Signed-off-by: Doug Nazar <nazard@dragoninc.ca>
Cc: David Woodhouse <David.Woodhouse@intel.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agocpumask: introduce new API, without changing anything, v3
Rusty Russell [Sat, 8 Nov 2008 09:24:19 +0000 (20:24 +1100)]
cpumask: introduce new API, without changing anything, v3

Impact: cleanup

Clean up based on feedback from Andrew Morton and others:

 - change to inline functions instead of macros
 - add __init to bootmem method
 - add a missing debug check

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agonet: unix: fix inflight counting bug in garbage collector
Miklos Szeredi [Sun, 9 Nov 2008 14:23:57 +0000 (15:23 +0100)]
net: unix: fix inflight counting bug in garbage collector

Previously I assumed that the receive queues of candidates don't
change during the GC.  This is only half true, nothing can be received
from the queues (see comment in unix_gc()), but buffers could be added
through the other half of the socket pair, which may still have file
descriptors referring to it.

This can result in inc_inflight_move_tail() erronously increasing the
"inflight" counter for a unix socket for which dec_inflight() wasn't
previously called.  This in turn can trigger the "BUG_ON(total_refs <
inflight_refs)" in a later garbage collection run.

Fix this by only manipulating the "inflight" counter for sockets which
are candidates themselves.  Duplicating the file references in
unix_attach_fds() is also needed to prevent a socket becoming a
candidate for GC while the skb that contains it is not yet queued.

Reported-by: Andrea Bittau <a.bittau@cs.ucl.ac.uk>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoclarify usage expectations for cnt32_to_63()
Nicolas Pitre [Sun, 9 Nov 2008 05:27:53 +0000 (00:27 -0500)]
clarify usage expectations for cnt32_to_63()

Currently, all existing users of cnt32_to_63() are fine since the CPU
architectures where it is used don't do read access reordering, and user
mode preemption is disabled already.  It is nevertheless a good idea to
better elaborate usage requirements wrt preemption, and use an explicit
memory barrier on SMP to avoid different CPUs accessing the counter
value in the wrong order.  On UP a simple compiler barrier is
sufficient.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
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/drzeus/mmc
Linus Torvalds [Sun, 9 Nov 2008 19:14:16 +0000 (11:14 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/drzeus/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  mmc: struct device - replace bus_id with dev_name(), dev_set_name()
  mmc: increase SD write timeout for crappy cards

15 years agoregulator: Use menuconfig in Kconfig
Takashi Iwai [Thu, 30 Oct 2008 14:57:05 +0000 (15:57 +0100)]
regulator: Use menuconfig in Kconfig

Use menuconfig instead of flat configs so that you can disable/enable
regulator items with one selection.  Also, use depends instead of
reverse selections to make life easier, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
15 years agoALSA: hdsp: check for iobox and upload firmware during ioctl
Tim Blechmann [Sat, 8 Nov 2008 13:42:18 +0000 (14:42 +0100)]
ALSA: hdsp: check for iobox and upload firmware during ioctl

currently, the error message when trying to run hdspmixer or hdspconf
if the breakout box is not connected is somehow misleading, since it
asks the user to upload the firmware.

this patch adds a test, whether the breakout box is connected and
tries to upload the firmware in the case, that it is not present, e.g.
because of power failures of the breakout box.

[Minor coding-style fixes by tiwai]

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: HDSP: check for io box before uploading firmware
Tim Blechmann [Sun, 9 Nov 2008 11:50:52 +0000 (12:50 +0100)]
ALSA: HDSP: check for io box before uploading firmware

currently the hdsp driver tries to upload the firmware, even if the
io box is not connected. this patch adds a check for the io box
before trying to upload the firmware.
thus instead of messages complaining about the fifo status and firmware
loading failure, the driver gives a message that no multiface or
digiface is connected.

[A minor coding-style fix by tiwai]

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>