]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
14 years agodrm/radeon/kms/evergreen: get DP working
Alex Deucher [Wed, 31 Mar 2010 18:42:11 +0000 (14:42 -0400)]
drm/radeon/kms/evergreen: get DP working

Need to enable the VID stream after link training

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agosparc: Fix regset register window handling.
David S. Miller [Thu, 1 Apr 2010 01:05:05 +0000 (18:05 -0700)]
sparc: Fix regset register window handling.

We have to adjust 'reg_window' down by 16 becuase the 'pos' iterator
we'll use to index into the stack slots will be between 16 and 32.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoeeepc-wmi: new driver for WMI based hotkeys on Eee PC laptops
Yong Wang [Sun, 21 Mar 2010 02:26:34 +0000 (10:26 +0800)]
eeepc-wmi: new driver for WMI based hotkeys on Eee PC laptops

Add a WMI driver for Eee PC laptops. Currently it only supports hotkeys.

Signed-off-by: Yong Wang <yong.y.wang@intel.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
14 years agoasus-laptop: fix warning in asus_handle_init
Corentin Chary [Tue, 2 Mar 2010 21:24:12 +0000 (22:24 +0100)]
asus-laptop: fix warning in asus_handle_init

In function 'asus_laptop_get_info':
warning: passing argument 3 of 'asus_handle_init' from incompatible pointer type
note: expected 'char **' but argument is of type 'const char **'

Introduced by commit c21085108a02e1b838c34f3650c8cc9fbd178615
("asus-laptop: fix style problems reported by checkpath.pl").

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
14 years agofat: fix buffer overflow in vfat_create_shortname()
Nikolaus Schulz [Wed, 31 Mar 2010 17:21:10 +0000 (02:21 +0900)]
fat: fix buffer overflow in vfat_create_shortname()

When using the string representation of a random counter as part of the base
name, ensure that it is no longer than 4 bytes.

Since we are repeatedly decrementing the counter in a loop until we have found a
unique base name, the counter may wrap around zero; therefore, it is not enough
to mask its higher bits before entering the loop, this must be done inside the
loop.

[hirofumi@mail.parknet.co.jp: use snprintf()]
Signed-off-by: Nikolaus Schulz <microschulz@web.de>
Cc: stable@kernel.org
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodrm/radeon/kms: add hw_i2c module option
Alex Deucher [Wed, 17 Mar 2010 06:07:37 +0000 (02:07 -0400)]
drm/radeon/kms: add hw_i2c module option

Turn off hw i2c by default except for mm i2c which
is hw only until we sort out the remaining prescale
issues on older chips.  hw i2c can be enabled with
hw_i2c=1.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: use new pre/post_xfer i2c bit algo hooks
Alex Deucher [Sun, 14 Mar 2010 16:22:44 +0000 (12:22 -0400)]
drm/radeon/kms: use new pre/post_xfer i2c bit algo hooks

This allows us to remove the internal bit algo bus used by
the radeon i2c algo.  We now register a radeon algo adapter
if the gpio line is hw capable and the hw inplementation is
available, otherwise we register a bit algo adapter.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoMerge branch 'v2.6.34-rc2' into drm-linus
Dave Airlie [Wed, 31 Mar 2010 04:55:14 +0000 (14:55 +1000)]
Merge branch 'v2.6.34-rc2' into drm-linus

14 years agodrm/radeon/kms: disable MSI on IGP chips
Alex Deucher [Tue, 30 Mar 2010 21:22:32 +0000 (17:22 -0400)]
drm/radeon/kms: disable MSI on IGP chips

Doesn't seem to work reliably and the pci quirks don't
always work.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: display watermark updates (v2)
Alex Deucher [Wed, 31 Mar 2010 04:33:27 +0000 (00:33 -0400)]
drm/radeon/kms: display watermark updates (v2)

- Add module option to force the display priority
  0 = auto, 1 = normal, 2 = high
- Default to high on r3xx/r4xx/rv515 chips
  Fixes flickering problems during heavy acceleration
  due to underflow to the display controllers
- Fill in minimal support for RS600

v2 - update display priority when bandwidth is updated
so the user can change the parameter at runtime and it
will take affect on the next modeset.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms/dp: disable training pattern on the sink at the end of link training
Alex Deucher [Tue, 30 Mar 2010 06:03:48 +0000 (02:03 -0400)]
drm/radeon/kms/dp: disable training pattern on the sink at the end of link training

Seems to have gotten lost in the evergreen merge.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: minor fixes for eDP with LCD* device tags (v2)
Alex Deucher [Tue, 30 Mar 2010 01:37:08 +0000 (21:37 -0400)]
drm/radeon/kms: minor fixes for eDP with LCD* device tags (v2)

Some systems have LCD* rather than DFP* device tags in the bios
for eDP connectors; notably the new apple iMac. This fixes
things up so eDP connectors with either tag will work.

v2: fix typo

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms/dp: remove extraneous training complete call
Alex Deucher [Mon, 29 Mar 2010 18:06:10 +0000 (14:06 -0400)]
drm/radeon/kms/dp: remove extraneous training complete call

Looks like a copy/paste typo from when evergreen support
was added.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms/atom: minor fixes to transmitter setup
Alex Deucher [Mon, 29 Mar 2010 21:39:44 +0000 (17:39 -0400)]
drm/radeon/kms/atom: minor fixes to transmitter setup

- 8 lane links are not valid for DP
- remove unused num var

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: Only restrict BO to visible VRAM size when pinning to VRAM.
Michel Dänzer [Fri, 26 Mar 2010 19:18:55 +0000 (19:18 +0000)]
drm/radeon/kms: Only restrict BO to visible VRAM size when pinning to VRAM.

This prevented radeon.test=1 from testing transfers from/to GTT beyond the
visible VRAM size.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm: fix build error when SYSRQ is disabled
Randy Dunlap [Thu, 25 Mar 2010 18:29:05 +0000 (18:29 +0000)]
drm: fix build error when SYSRQ is disabled

Fix build error when CONFIG_MAGIC_SYSRQ is not enabled:

drivers/gpu/drm/drm_fb_helper.c:915: error: 'sysrq_drm_fb_helper_restore_op' undeclared (first use in this function)
drivers/gpu/drm/drm_fb_helper.c:929: error: 'sysrq_drm_fb_helper_restore_op' undeclared (first use in this function)

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: fix macbookpro connector quirk
Alex Deucher [Fri, 26 Mar 2010 21:14:37 +0000 (17:14 -0400)]
drm/radeon/kms: fix macbookpro connector quirk

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/r6xx/r7xx: further safe reg clean up
Alex Deucher [Fri, 26 Mar 2010 23:36:33 +0000 (19:36 -0400)]
drm/radeon/r6xx/r7xx: further safe reg clean up

- remove a few more drm only regs
- remove sampler, alu, bool, loop constant regs.
  They are set via separate packet3's already

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon: bump the UMS driver version for r6xx/r7xx const buffer support
Alex Deucher [Fri, 26 Mar 2010 19:26:51 +0000 (15:26 -0400)]
drm/radeon: bump the UMS driver version for r6xx/r7xx const buffer support

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: bump the version for r6xx/r7xx const buffer support
Alex Deucher [Fri, 26 Mar 2010 19:24:14 +0000 (15:24 -0400)]
drm/radeon/kms: bump the version for r6xx/r7xx const buffer support

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/r6xx/r7xx: CS parser fixes
Alex Deucher [Fri, 26 Mar 2010 18:52:32 +0000 (14:52 -0400)]
drm/radeon/r6xx/r7xx: CS parser fixes

- Drop some more safe regs taht userspace shouldn't hit
- Constant base regs need relocs.  This allows us to use
constant buffers rather than the constant register file.
Also we don't want userspace to be able to set arbitrary
mc base values for the const caches.
- Track SQ_CONFIG so we know whether userspace is using
the cfile or constant buffers.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: fix some typos in r6xx/r7xx hpd setup
Alex Deucher [Wed, 24 Mar 2010 17:57:29 +0000 (13:57 -0400)]
drm/radeon/kms: fix some typos in r6xx/r7xx hpd setup

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/r600: remove some regs are not safe regs for command buffers
Alex Deucher [Wed, 24 Mar 2010 22:45:32 +0000 (18:45 -0400)]
drm/radeon/r600: remove some regs are not safe regs for command buffers

Only the drm should be touching them.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm: Return ENODEV if the inode mapping changes
Chris Wilson [Thu, 18 Mar 2010 11:56:54 +0000 (11:56 +0000)]
drm: Return ENODEV if the inode mapping changes

Replace a BUG_ON with an error code in the event that the inode mapping
changes between calls to drm_open. This may happen for instance if udev
is loaded subsequent to the original opening of the device:

[  644.291870] kernel BUG at drivers/gpu/drm/drm_fops.c:146!
[  644.291876] invalid opcode: 0000 [#1] SMP
[  644.291882] last sysfs file: /sys/kernel/uevent_seqnum
[  644.291888]
[  644.291895] Pid: 7276, comm: lt-cairo-test-s Not tainted 2.6.34-rc1 #2 N150/N210/N220             /N150/N210/N220
[  644.291903] EIP: 0060:[<c11c70e3>] EFLAGS: 00210283 CPU: 0
[  644.291912] EIP is at drm_open+0x4b1/0x4e2
[  644.291918] EAX: f72d8d18 EBX: f790a400 ECX: f73176b8 EDX: 00000000
[  644.291923] ESI: f790a414 EDI: f790a414 EBP: f647ae20 ESP: f647adfc
[  644.291929]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[  644.291937] Process lt-cairo-test-s (pid: 7276, ti=f647a000 task=f73f5c80 task.ti=f647a000)
[  644.291941] Stack:
[  644.291945]  00000000 f7bb7400 00000080 f6451100 f73176b8 f6479214 f6451100 f73176b8
[  644.291957] <0> c1297ce0 f647ae34 c11c6c04 f73176b8 f7949800 00000000 f647ae54 c1080ac5
[  644.291969] <0> f7949800 f6451100 00000000 f6451100 f73176b8 f6452780 f647ae70 c107d1e6
[  644.291982] Call Trace:
[  644.291991]  [<c11c6c04>] ? drm_stub_open+0x8a/0xb8
[  644.292000]  [<c1080ac5>] ? chrdev_open+0xef/0x106
[  644.292008]  [<c107d1e6>] ? __dentry_open+0xd4/0x1a6
[  644.292015]  [<c107d35b>] ? nameidata_to_filp+0x31/0x45
[  644.292022]  [<c10809d6>] ? chrdev_open+0x0/0x106
[  644.292030]  [<c10864e2>] ? do_last+0x346/0x423
[  644.292037]  [<c108789f>] ? do_filp_open+0x190/0x415
[  644.292046]  [<c1071eb5>] ? handle_mm_fault+0x214/0x710
[  644.292053]  [<c107d008>] ? do_sys_open+0x4d/0xe9
[  644.292061]  [<c1016462>] ? do_page_fault+0x211/0x23f
[  644.292068]  [<c107d0f0>] ? sys_open+0x23/0x2b
[  644.292075]  [<c1002650>] ? sysenter_do_call+0x12/0x26
[  644.292079] Code: 89 f0 89 55 dc e8 8d 96 0a 00 8b 45 e0 8b 55 dc 83 78 04 01 75 28 8b 83 18 02 00 00 85 c0 74 0f 8b 4d ec 3b 81 ac 00 00 00 74 13 <0f> 0b eb fe 8b 4d ec 8b 81 ac 00 00 00 89 83 18 02 00 00 89 f0
[  644.292143] EIP: [<c11c70e3>] drm_open+0x4b1/0x4e2 SS:ESP 0068:f647adfc
[  644.292175] ---[ end trace 2ddd476af89a60fa ]---

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: Fix NULL pointer dereference if memory allocation failed.
Pauli Nieminen [Fri, 19 Mar 2010 07:44:33 +0000 (07:44 +0000)]
drm/radeon/kms: Fix NULL pointer dereference if memory allocation failed.

When there is allocation failure in radeon_cs_parser_relocs parser->nrelocs
is not cleaned. This causes NULL pointer defeference in radeon_cs_parser_fini
when clean up code is trying to loop over the relocation array and free the
objects.

Fix adds a check for a possible NULL pointer in clean up code.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: avoid possible oops (call gart_fini before gart_disable)
Jerome Glisse [Wed, 17 Mar 2010 14:44:29 +0000 (14:44 +0000)]
drm/radeon/kms: avoid possible oops (call gart_fini before gart_disable)

radeon_gart_fini might call GART unbind callback function which
might try to access GART table but if gart_disable is call first
the GART table will be unmapped so any access to it will oops.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: don't print error on -ERESTARTSYS.
Dave Airlie [Fri, 19 Mar 2010 00:33:44 +0000 (10:33 +1000)]
drm/radeon/kms: don't print error on -ERESTARTSYS.

We can get this if the user moves the mouse when we are waiting to move
some stuff around in the validate. Don't fail.

Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms/atom: make sure tables are valid (v2)
Alex Deucher [Thu, 18 Mar 2010 05:04:01 +0000 (01:04 -0400)]
drm/radeon/kms/atom: make sure tables are valid (v2)

Check that atom cmd and data tables are valid
before using them.

(v2)
- fix some whitespace errors noticed by Rafał Miłecki
- check a few more cases

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: remove lvds quirks
Alex Deucher [Wed, 17 Mar 2010 23:50:59 +0000 (19:50 -0400)]
drm/radeon/kms: remove lvds quirks

- no longer needed with the latest new pll algo fixes.
- also don't use lcd pll limits.  They don't seem
to work well for all systems.  If we have a case where
they are useful, we can set the flag for that case.

fixes fdo bug 27083

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: fix display bandwidth setup on rs4xx
Alex Deucher [Sun, 21 Mar 2010 15:09:24 +0000 (11:09 -0400)]
drm/radeon/kms: fix display bandwidth setup on rs4xx

I missed rs4xx in 7f1e613daf0fdd0884316ab25a749db3c671329e

Fixes fdo bug 27219.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: never treat rs4xx as AGP
Alex Deucher [Sun, 21 Mar 2010 18:02:25 +0000 (14:02 -0400)]
drm/radeon/kms: never treat rs4xx as AGP

RS4xx+ IGP chips use an internal gart, however,
some of them have the agp cap bits set in their pci
configs.  Make sure to clear the AGP flag as AGP will
not work with them.

Should fix fdo bug 27225

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: display watermark fixes
Alex Deucher [Wed, 17 Mar 2010 00:54:38 +0000 (20:54 -0400)]
drm/radeon/kms: display watermark fixes

- rs780/880 were using the wrong bandwidth functions
- convert r1xx-r4xx to use the same pm sclk/mclk structs as
r5xx+
- move bandwidth setup to a common function

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: init rdev->num_crtc at asic init
Alex Deucher [Tue, 16 Mar 2010 21:08:06 +0000 (17:08 -0400)]
drm/radeon/kms: init rdev->num_crtc at asic init

Replace hardcoded numbers with rdev->num_crtc.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms/pm: fix typo in power table parsing
Alex Deucher [Mon, 15 Mar 2010 05:36:32 +0000 (01:36 -0400)]
drm/radeon/kms/pm: fix typo in power table parsing

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: gfx init fixes for r6xx/r7xx
Alex Deucher [Fri, 5 Mar 2010 19:50:37 +0000 (14:50 -0500)]
drm/radeon/kms: gfx init fixes for r6xx/r7xx

This fixes some issues with the last gfx init patch.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms/pm: fix segfault in clock code
Alex Deucher [Sun, 14 Mar 2010 20:31:36 +0000 (16:31 -0400)]
drm/radeon/kms/pm: fix segfault in clock code

Make sure we have a crtc assigned to the encoder
before dereferencing it.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
14 years agodrm/radeon/kms: expose thermal/fan i2c buses
Alex Deucher [Thu, 11 Mar 2010 15:01:17 +0000 (10:01 -0500)]
drm/radeon/kms: expose thermal/fan i2c buses

Look up i2c bus in the power table and expose it.
You'll need to load a hwmon driver for any chips
on the bus, this patch just exposes the bus.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
14 years agoreiserfs: Fix locking BUG during mount failure
Jeff Mahoney [Mon, 29 Mar 2010 19:12:39 +0000 (15:12 -0400)]
reiserfs: Fix locking BUG during mount failure

Commit 8ebc423238341b52912c7295b045a32477b33f09 (reiserfs: kill-the-BKL)
introduced a bug in the mount failure case.

The error label releases the lock before calling journal_release_error,
but it requires that the lock be held. do_journal_release unlocks and
retakes it. When it releases it without it held, we trigger a BUG().

The error_alloc label skips the unlock since the lock isn't held yet
but none of the other conditions that are clean up exist yet either.

This patch returns immediately after the kzalloc failure and moves
the reiserfs_write_unlock after the journal_release_error call.

This was reported in https://bugzilla.novell.com/show_bug.cgi?id=591807

Reported-by: Thomas Siedentopf <thomas.siedentopf@novell.com>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Cc: Thomas Siedentopf <thomas.siedentopf@novell.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: 2.6.33.x <stable@kernel.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
14 years agoLinux 2.6.34-rc3 v2.6.34-rc3
Linus Torvalds [Tue, 30 Mar 2010 16:24:39 +0000 (09:24 -0700)]
Linux 2.6.34-rc3

14 years agoKEYS: Add MAINTAINERS record
David Howells [Mon, 29 Mar 2010 22:42:09 +0000 (23:42 +0100)]
KEYS: Add MAINTAINERS record

Add a MAINTAINERS record for the key management facility.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Tue, 30 Mar 2010 14:26:30 +0000 (07:26 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  CRED: Fix memory leak in error handling

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/joern/logfs
Linus Torvalds [Tue, 30 Mar 2010 14:24:55 +0000 (07:24 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/joern/logfs

* git://git.kernel.org/pub/scm/linux/kernel/git/joern/logfs:
  [LogFS] Erase new journal segments
  [LogFS] Move reserved segments with journal
  [LogFS] Clear PagePrivate when moving journal
  Simplify and fix pad_wbuf
  Prevent data corruption in logfs_rewrite_block()
  Use deactivate_locked_super
  Fix logfs_get_sb_final error path
  Write out both superblocks on mismatch
  Prevent schedule while atomic in __logfs_readdir
  Plug memory leak in writeseg_end_io
  Limit max_pages for insane devices
  Open segment file before using it

14 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 30 Mar 2010 14:22:38 +0000 (07:22 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: Do not free zero sized per cpu areas
  x86: Make sure free_init_pages() frees pages on page boundary
  x86: Make smp_locks end with page alignment

14 years agoCRED: Fix memory leak in error handling
Mathieu Desnoyers [Mon, 29 Mar 2010 23:04:00 +0000 (00:04 +0100)]
CRED: Fix memory leak in error handling

Fix a memory leak on an OOM condition in prepare_usermodehelper_creds().

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
14 years agodrivers/serial/sunsu.c: Correct use after free
Julia Lawall [Tue, 30 Mar 2010 05:33:28 +0000 (22:33 -0700)]
drivers/serial/sunsu.c: Correct use after free

The of_iounmap is at the out_unmap label, but at that point up has already
been freed.  The free cannot be moved to the out_unmap label, because that
label is reachable from cases where up should not be freed.  So the call to
of_iounmap is just duplicated, and the goto converted to a return.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x,e;
identifier f;
iterator I;
statement S;
@@

*kfree(x);
... when != &x
    when != x = e
    when != I(x,...) S
*x->f
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branches 'sh/intc-extension', 'sh/dmaengine', 'sh/serial-dma' and 'sh/clkfwk'
Paul Mundt [Tue, 30 Mar 2010 02:26:43 +0000 (11:26 +0900)]
Merge branches 'sh/intc-extension', 'sh/dmaengine', 'sh/serial-dma' and 'sh/clkfwk'

Conflicts:
arch/sh/kernel/cpu/clock.c

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: sh7724 clkdev lookups.
Paul Mundt [Tue, 30 Mar 2010 02:20:35 +0000 (11:20 +0900)]
sh: sh7724 clkdev lookups.

Conver to TMU clock lookups for SH7724.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec...
Linus Torvalds [Mon, 29 Mar 2010 21:42:39 +0000 (14:42 -0700)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2:
  ocfs2: Fix a race in o2dlm lockres mastery
  Ocfs2: Handle deletion of reflinked oprhan inodes correctly.
  Ocfs2: Journaling i_flags and i_orphaned_slot when adding inode to orphan dir.
  ocfs2: Clear undo bits when local alloc is freed
  ocfs2: Init meta_ac properly in ocfs2_create_empty_xattr_block.
  ocfs2: Fix the update of name_offset when removing xattrs
  ocfs2: Always try for maximum bits with new local alloc windows
  ocfs2: set i_mode on disk during acl operations
  ocfs2: Update i_blocks in reflink operations.
  ocfs2: Change bg_chain check for ocfs2_validate_gd_parent.
  [PATCH] Skip check for mandatory locks when unlocking

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
Linus Torvalds [Mon, 29 Mar 2010 21:42:25 +0000 (14:42 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (28 commits)
  ceph: update discussion list address in MAINTAINERS
  ceph: some documentations fixes
  ceph: fix use after free on mds __unregister_request
  ceph: avoid loaded term 'OSD' in documention
  ceph: fix possible double-free of mds request reference
  ceph: fix session check on mds reply
  ceph: handle kmalloc() failure
  ceph: propagate mds session allocation failures to caller
  ceph: make write_begin wait propagate ERESTARTSYS
  ceph: fix snap rebuild condition
  ceph: avoid reopening osd connections when address hasn't changed
  ceph: rename r_sent_stamp r_stamp
  ceph: fix connection fault con_work reentrancy problem
  ceph: prevent dup stale messages to console for restarting mds
  ceph: fix pg pool decoding from incremental osdmap update
  ceph: fix mds sync() race with completing requests
  ceph: only release unused caps with mds requests
  ceph: clean up handle_cap_grant, handle_caps wrt session mutex
  ceph: fix session locking in handle_caps, ceph_check_caps
  ceph: drop unnecessary WARN_ON in caps migration
  ...

14 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelv...
Linus Torvalds [Mon, 29 Mar 2010 21:42:08 +0000 (14:42 -0700)]
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (asc7621) Add X58 entry in Kconfig
  hwmon: (w83793) Saving negative errors in unsigned
  hwmon: (coretemp) Add missing newline to dev_warn() message
  hwmon: (coretemp) Fix cpu model output

14 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Mon, 29 Mar 2010 21:41:48 +0000 (14:41 -0700)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  pata_via: fix VT6410/6415/6330 detection issue

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 29 Mar 2010 21:41:18 +0000 (14:41 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (33 commits)
  r8169: offical fix for CVE-2009-4537 (overlength frame DMAs)
  ipv6: Don't drop cache route entry unless timer actually expired.
  tulip: Add missing parens.
  r8169: fix broken register writes
  pcnet_cs: add new id
  bonding: fix broken multicast with round-robin mode
  drivers/net: Fix continuation lines
  e1000: do not modify tx_queue_len on link speed change
  net: ipmr/ip6mr: prevent out-of-bounds vif_table access
  ixgbe: Do not run all Diagnostic offline tests when VFs are active
  igb: use correct bits to identify if managability is enabled
  benet: Fix compile warnnings in drivers/net/benet/be_ethtool.c
  net: Add MSG_WAITFORONE flag to recvmmsg
  e1000e: do not modify tx_queue_len on link speed change
  igbvf: do not modify tx_queue_len on link speed change
  ipv4: Restart rt_intern_hash after emergency rebuild (v2)
  ipv4: Cleanup struct net dereference in rt_intern_hash
  net: fix netlink address dumping in IPv4/IPv6
  tulip: Fix null dereference in uli526x_rx_packet()
  gianfar: fix undo of reserve()
  ...

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Mon, 29 Mar 2010 21:41:00 +0000 (14:41 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc64: Properly truncate pt_regs framepointer in perf callback.
  arch/sparc/kernel: Use set_cpus_allowed_ptr
  sparc: Fix use of uid16_t and gid16_t in asm/stat.h

14 years agoext3: fix broken handling of EXT3_STATE_NEW
Linus Torvalds [Mon, 29 Mar 2010 21:30:19 +0000 (14:30 -0700)]
ext3: fix broken handling of EXT3_STATE_NEW

In commit 9df93939b735 ("ext3: Use bitops to read/modify
EXT3_I(inode)->i_state") ext3 changed its internal 'i_state' variable to
use bitops for its state handling.  However, unline the same ext4
change, it didn't actually change the name of the field when it changed
the semantics of it.

As a result, an old use of 'i_state' remained in fs/ext3/ialloc.c that
initialized the field to EXT3_STATE_NEW.  And that does not work
_at_all_ when we're now working with individually named bits rather than
values that get masked.  So the code tried to mark the state to be new,
but in actual fact set the field to EXT3_STATE_JDATA.  Which makes no
sense at all, and screws up all the code that checks whether the inode
was newly allocated.

In particular, it made the xattr code unhappy, and caused various random
behavior, like apparently

https://bugzilla.redhat.com/show_bug.cgi?id=577911

So fix the initialization, and rename the field to match ext4 so that we
don't have this happen again.

Cc: James Morris <jmorris@namei.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Daniel J Walsh <dwalsh@redhat.com>
Cc: Eric Paris <eparis@redhat.com>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agor8169: offical fix for CVE-2009-4537 (overlength frame DMAs)
Neil Horman [Mon, 29 Mar 2010 20:16:02 +0000 (13:16 -0700)]
r8169: offical fix for CVE-2009-4537 (overlength frame DMAs)

Official patch to fix the r8169 frame length check error.

Based on this initial thread:
http://marc.info/?l=linux-netdev&m=126202972828626&w=1
This is the official patch to fix the frame length problems in the r8169
driver.  As noted in the previous thread, while this patch incurs a performance
hit on the driver, its possible to improve performance dynamically by updating
the mtu and rx_copybreak values at runtime to return performance to what it was
for those NICS which are unaffected by the ideosyncracy (if there are any).

Summary:

    A while back Eric submitted a patch for r8169 in which the proper
allocated frame size was written to RXMaxSize to prevent the NIC from dmaing too
much data.  This was done in commit fdd7b4c3302c93f6833e338903ea77245eb510b4.  A
long time prior to that however, Francois posted
126fa4b9ca5d9d7cb7d46f779ad3bd3631ca387c, which expiclitly disabled the MaxSize
setting due to the fact that the hardware behaved in odd ways when overlong
frames were received on NIC's supported by this driver.  This was mentioned in a
security conference recently:
http://events.ccc.de/congress/2009/Fahrplan//events/3596.en.html

It seems that if we can't enable frame size filtering, then, as Eric correctly
noticed, we can find ourselves DMA-ing too much data to a buffer, causing
corruption.  As a result is seems that we are forced to allocate a frame which
is ready to handle a maximally sized receive.

This obviously has performance issues with it, so to mitigate that issue, this
patch does two things:

1) Raises the copybreak value to the frame allocation size, which should force
appropriately sized packets to get allocated on rx, rather than a full new 16k
buffer.

2) This patch only disables frame filtering initially (i.e., during the NIC
open), changing the MTU results in ring buffer allocation of a size in relation
to the new mtu (along with a warning indicating that this is dangerous).

Because of item (2), individuals who can't cope with the performance hit (or can
otherwise filter frames to prevent the bug), or who have hardware they are sure
is unaffected by this issue, can manually lower the copybreak and reset the mtu
such that performance is restored easily.

Signed-off-by: Neil Horman <nhorman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosparc64: Properly truncate pt_regs framepointer in perf callback.
David S. Miller [Mon, 29 Mar 2010 20:08:52 +0000 (13:08 -0700)]
sparc64: Properly truncate pt_regs framepointer in perf callback.

For 32-bit processes, we save the full 64-bits of the regs in pt_regs.

But unlike when the userspace actually does load and store
instructions, the top 32-bits don't get automatically truncated by the
cpu in kernel mode (because the kernel doesn't execute with PSTATE_AM
address masking enabled).

So we have to do it by hand.

Reported-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agohwmon: (asc7621) Add X58 entry in Kconfig
Jaswinder Singh Rajput [Mon, 29 Mar 2010 20:03:06 +0000 (22:03 +0200)]
hwmon: (asc7621) Add X58 entry in Kconfig

Intel X58 have asc7621a chip. So added X58 entry in Kconfig for asc7621.
Also arranged existing models in ascending order.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (w83793) Saving negative errors in unsigned
Dan Carpenter [Mon, 29 Mar 2010 20:03:03 +0000 (22:03 +0200)]
hwmon: (w83793) Saving negative errors in unsigned

"ret" is used to store the return value for watchdog_trigger() and it
should be signed for the error handling to work.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (coretemp) Add missing newline to dev_warn() message
Dean Nelson [Mon, 29 Mar 2010 20:03:00 +0000 (22:03 +0200)]
hwmon: (coretemp) Add missing newline to dev_warn() message

Add missing newline to dev_warn() message string. This is more of an issue
with older kernels that don't automatically add a newline if it was missing
from the end of the previous line.

Signed-off-by: Dean Nelson <dnelson@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (coretemp) Fix cpu model output
Prarit Bhargava [Mon, 29 Mar 2010 20:02:59 +0000 (22:02 +0200)]
hwmon: (coretemp) Fix cpu model output

Avoid hex and decimal confusion when printing out the cpu model.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoring-buffer: Add missing unlock
Julia Lawall [Mon, 29 Mar 2010 15:37:02 +0000 (17:37 +0200)]
ring-buffer: Add missing unlock

In some error handling cases the lock is not unlocked.  The return is
converted to a goto, to share the unlock at the end of the function.

A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
expression E1;
identifier f;
@@

f (...) { <+...
* spin_lock_irq (E1,...);
... when != E1
* return ...;
...+> }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
LKML-Reference: <Pine.LNX.4.64.1003291736440.21896@ask.diku.dk>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
14 years agotracing: Fix lockdep warning in global_clock()
Li Zefan [Wed, 24 Mar 2010 02:57:37 +0000 (10:57 +0800)]
tracing: Fix lockdep warning in global_clock()

# echo 1 > events/enable
 # echo global > trace_clock

------------[ cut here ]------------
WARNING: at kernel/lockdep.c:3162 check_flags+0xb2/0x190()
...
---[ end trace 3f86734a89416623 ]---
possible reason: unannotated irqs-on.
...

There's no reason to use the raw_local_irq_save() in trace_clock_global.
The local_irq_save() version is fine, and does not cause the bug in lockdep.

Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4BA97FA1.7030606@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
14 years ago[LogFS] Erase new journal segments
Joern Engel [Mon, 29 Mar 2010 19:14:52 +0000 (21:14 +0200)]
[LogFS] Erase new journal segments

If the device contains on old logfs image and the journal is moved to
segment that have never been used by the current logfs and not all
journal segments are erased before the next mount, the old content can
confuse mount code.  To prevent this, always erase the new journal
segments.

Signed-off-by: Joern Engel <joern@logfs.org>
14 years ago[LogFS] Move reserved segments with journal
Joern Engel [Mon, 29 Mar 2010 19:13:28 +0000 (21:13 +0200)]
[LogFS] Move reserved segments with journal

Fixes a GC livelock.

Signed-off-by: Joern Engel <joern@logfs.org>
14 years agox86: Do not free zero sized per cpu areas
Ian Campbell [Mon, 29 Mar 2010 02:42:56 +0000 (19:42 -0700)]
x86: Do not free zero sized per cpu areas

This avoids an infinite loop in free_early_partial().

Add a warning to free_early_partial() to catch future problems.

-v5: put back start > end back into WARN_ONCE()
-v6: use one line for warning, suggested by Linus
-v7: more tests
-v8: remove the function name as suggested by Johannes
     WARN_ONCE() will print out that function name.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tested-by: Joel Becker <joel.becker@oracle.com>
Tested-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: David Miller <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <1269830604-26214-4-git-send-email-yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agox86: Make sure free_init_pages() frees pages on page boundary
Yinghai Lu [Mon, 29 Mar 2010 02:42:55 +0000 (19:42 -0700)]
x86: Make sure free_init_pages() frees pages on page boundary

When CONFIG_NO_BOOTMEM=y, it could use memory more effiently, or
in a more compact fashion.

Example:

 Allocated new RAMDISK: 00ec2000 - 0248ce57
 Move RAMDISK from 000000002ea04000 - 000000002ffcee56 to 00ec2000 - 0248ce56

The new RAMDISK's end is not page aligned.
Last page could be shared with other users.

When free_init_pages are called for initrd or .init, the page
could be freed and we could corrupt other data.

code segment in free_init_pages():

 |        for (; addr < end; addr += PAGE_SIZE) {
 |                ClearPageReserved(virt_to_page(addr));
 |                init_page_count(virt_to_page(addr));
 |                memset((void *)(addr & ~(PAGE_SIZE-1)),
 |                        POISON_FREE_INITMEM, PAGE_SIZE);
 |                free_page(addr);
 |                totalram_pages++;
 |        }

last half page could be used as one whole free page.

So page align the boundaries.

-v2: make the original initramdisk to be aligned, according to
     Johannes, otherwise we have the chance to lose one page.
     we still need to keep initrd_end not aligned, otherwise it could
     confuse decompressor.
-v3: change to WARN_ON instead, suggested by Johannes.
-v4: use PAGE_ALIGN, suggested by Johannes.
     We may fix that macro name later to PAGE_ALIGN_UP, and PAGE_ALIGN_DOWN
     Add comments about assuming ramdisk start is aligned
     in relocate_initrd(), change to re get ramdisk_image instead of save it
     to make diff smaller. Add warning for wrong range, suggested by Johannes.
-v6: remove one WARN()
     We need to align beginning in free_init_pages()
     do not copy more than ramdisk_size, noticed by Johannes

Reported-by: Stanislaw Gruszka <sgruszka@redhat.com>
Tested-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: David Miller <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <1269830604-26214-3-git-send-email-yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoceph: update discussion list address in MAINTAINERS
Sage Weil [Mon, 29 Mar 2010 16:53:23 +0000 (09:53 -0700)]
ceph: update discussion list address in MAINTAINERS

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph: some documentations fixes
Cheng Renquan [Mon, 29 Mar 2010 11:05:57 +0000 (19:05 +0800)]
ceph: some documentations fixes

New documentation should have an entry in the 00-INDEX.  Correct git
urls.

Signed-off-by: Cheng Renquan <crquan@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agox86: Make smp_locks end with page alignment
Yinghai Lu [Mon, 29 Mar 2010 02:42:54 +0000 (19:42 -0700)]
x86: Make smp_locks end with page alignment

Fix:

 ------------[ cut here ]------------
 WARNING: at arch/x86/mm/init.c:342 free_init_pages+0x4c/0xfa()
 free_init_pages: range [0x40daf000, 0x40db5c24] is not aligned
 Modules linked in:
 Pid: 0, comm: swapper Not tainted
 2.6.34-rc2-tip-03946-g4f16b23-dirty #50 Call Trace:
  [<40232e9f>] warn_slowpath_common+0x65/0x7c
  [<4021c9f0>] ? free_init_pages+0x4c/0xfa
  [<40881434>] ? _etext+0x0/0x24
  [<40232eea>] warn_slowpath_fmt+0x24/0x27
  [<4021c9f0>] free_init_pages+0x4c/0xfa
  [<40881434>] ? _etext+0x0/0x24
  [<40d3f4bd>] alternative_instructions+0xf6/0x100
  [<40d3fe4f>] check_bugs+0xbd/0xbf
  [<40d398a7>] start_kernel+0x2d5/0x2e4
  [<40d390ce>] i386_start_kernel+0xce/0xd5
 ---[ end trace 4eaa2a86a8e2da22 ]---

Comments in vmlinux.lds.S already said:

 |        /*
 |         * smp_locks might be freed after init
 |         * start/end must be page aligned
 |         */

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: David Miller <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <1269830604-26214-2-git-send-email-yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
Linus Torvalds [Mon, 29 Mar 2010 16:37:57 +0000 (09:37 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
  Revert "ide: skip probe if there are no devices on the port (v2)"
  Revert "via82cxxx: workaround h/w bugs"

14 years agofrv/chris: fix lines with a missing semicolons
David Howells [Wed, 24 Mar 2010 16:59:36 +0000 (16:59 +0000)]
frv/chris: fix lines with a missing semicolons

Commit b26b2d494b659f9 ("resource/PCI: align functions now return start
of resource") added lines with missing semicolons.

Add the missing semicolons to the FRV and CRIS arch code.

Signed-off-by: David Howells <dhowells@redhat.com>
Cc: linux@dominikbrodowski.net
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoARM: 5965/1: Fix soft lockup in at91 udc driver
Harro Haan [Mon, 1 Mar 2010 16:38:37 +0000 (17:38 +0100)]
ARM: 5965/1: Fix soft lockup in at91 udc driver

Fix a potential soft lockup in the AT91 UDC driver by ensuring that
the UDC clock is enabled inside the interrupt handler. If the UDC clock is not enabled then the UDC registers cannot be written to
and the interrupt cannot be cleared or masked.

Note that this patch (and other parts of the existing AT91 UDC
driver) is potentially racy for preempt-rt kernels,
but is okay for mainline.

For more info see:

http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100203/09cdb3b4/attachment.el

http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100203/8443a1e4/attachment.el

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: Harro Haan <hrhaan@gmail.com>
Tested-by: Remy Bohmer <linux@bohmer.net>
Acked-by: Andrew Victor <avictor.za@gmail.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 6006/1: ARM: Use the correct NOP size in memmove for Thumb-2 kernel builds
Catalin Marinas [Mon, 29 Mar 2010 09:29:46 +0000 (10:29 +0100)]
ARM: 6006/1: ARM: Use the correct NOP size in memmove for Thumb-2 kernel builds

When compiling the kernel to Thumb-2, using a 16-bit NOP in the
memmove() implementation causes the preceding ADD PC instruction to
branch incorrectly in the middle of a 32-bit LDR or STR instruction. The
memmove() code is now similar to the memcpy() template.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 6005/1: arm: kprobes: fix register corruption with jprobes
Mika Westerberg [Mon, 29 Mar 2010 05:59:16 +0000 (06:59 +0100)]
ARM: 6005/1: arm: kprobes: fix register corruption with jprobes

Current implementation of jprobes allocates empty pt_regs from the
stack which is then passed to kprobe_handler() and eventually to
singlestep().  Now when instruction being simulated is STMFD (like
in normal function prologues without CONFIG_FRAME_POINTER), stores
using SP actually write over top of the fabricated pt_regs
structure.

This can be reproduced for example by using LKDTM module:
    # modprobe lkdtm
    # mount -t debugfs none /sys/kernel/debug
    # echo PANIC > /sys/kernel/debug/provoke-crash/INT_HW_IRQ_EN

after this, it fails with corrupted registers (before the requested crash would occur):

lkdtm: Crash point INT_HW_IRQ_EN of type PANIC hit, trigger in 9 rounds
lkdtm: Crash point INT_HW_IRQ_EN of type PANIC hit, trigger in 8 rounds
Internal error: Oops - undefined instruction: 0 [#1]
last sysfs file: /sys/devices/platform/serial8250.0/sleep_timeout
Modules linked in: lkdtm
CPU: 0    Not tainted  (2.6.34-rc2 #69)
PC is at irq_desc+0x1638/0xeeb0
LR is at 0x25
pc : [<c050b428>]    lr : [<00000025>]    psr: c80a0013
sp : ce94bd60  ip : c050b3e8  fp : a0000013
r10: c0aa453c  r9 : cf5d4000  r8 : ce9a1822
r7 : c050b424  r6 : 00000025  r5 : c039d8f8  r4 : c050b3e8
r3 : 00000001  r2 : cf4d0440  r1 : c039d8f8  r0 : 00000020
Flags: NZcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 10c5387d  Table: 8e804019  DAC: 00000015
Process sh (pid: 496, stack limit = 0xce94a2e8)
Stack: (0xce94bd60 to 0xce94c000)
[...]
Code: 000002cd 00000000 00000000 00000001 (dead4ead)
---[ end trace 2b46d5f2b682f370 ]---
Kernel panic - not syncing: Fatal exception in interrupt

This patch allocates enough space (2 * sizeof(struct pt_regs)) from
the stack to prevent such corruption.

Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.com>
Acked-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 6003/1: removing compilation warning from pl061.h
viresh kumar [Mon, 29 Mar 2010 04:29:56 +0000 (05:29 +0100)]
ARM: 6003/1: removing compilation warning from pl061.h

pl061.h is using u8 type. including <linux/types.h> in pl061.h to avoid
warning.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 6001/1: removing compilation warning comming from clkdev.h
viresh kumar [Mon, 29 Mar 2010 04:58:51 +0000 (05:58 +0100)]
ARM: 6001/1: removing compilation warning comming from clkdev.h

clkdev.h is using struct device *. Due to this compilation
warning is comming. Removing this warning.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 6000/1: removing compilation warning comming from <asm/irq.h>
viresh kumar [Mon, 29 Mar 2010 04:29:57 +0000 (05:29 +0100)]
ARM: 6000/1: removing compilation warning comming from <asm/irq.h>

irq.h is using struct pt_regs *. Due to this compilation
warning is comming. Removing this warning by adding declaration
of struct pt_regs.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5999/1: Including device.h and resource.h header files in linux/amba/bus.h
viresh kumar [Mon, 29 Mar 2010 04:28:32 +0000 (05:28 +0100)]
ARM: 5999/1: Including device.h and resource.h header files in linux/amba/bus.h

linux/amba/bus.h have dependencies on linux/device.h and linux/resource.h, but
it doesn't include them. We get compilation errors in our files which include
bus.h but doesn't include device.h and resource.h. This patch includes device.h
and resource.h in linux/amba/bus.h file.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Linux Walleij <linux.ml.walleij@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoSLOW_WORK: CONFIG_SLOW_WORK_PROC should be CONFIG_SLOW_WORK_DEBUG
David Howells [Mon, 29 Mar 2010 12:08:52 +0000 (13:08 +0100)]
SLOW_WORK: CONFIG_SLOW_WORK_PROC should be CONFIG_SLOW_WORK_DEBUG

CONFIG_SLOW_WORK_PROC was changed to CONFIG_SLOW_WORK_DEBUG, but not in all
instances.  Change the remaining instances.  This makes the debugfs file
display the time mark and the owner's description again.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoslow-work: use get_ref wrapper instead of directly calling get_ref
Dave Airlie [Mon, 29 Mar 2010 11:01:50 +0000 (12:01 +0100)]
slow-work: use get_ref wrapper instead of directly calling get_ref

Otherwise we can get an oops if the user has no get_ref/put_ref
requirement.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Mon, 29 Mar 2010 16:12:14 +0000 (09:12 -0700)]
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:
  ALSA: hda: Use LPIB for ga-ma770-ud3 board
  ALSA: ac97: Add Toshiba P500 to ac97 jack sense blacklist
  ALSA: pcm_lib - fix xrun functionality
  ALSA: ac97: Add IBM ThinkPad R40e to Headphone/Line Jack Sense blacklist
  ALSA: hda - Don't set invalid connection index in Realtek initialiaiton

14 years agoStaging: et131x: Properly disable FC in txmac.
Nick Bowler [Wed, 10 Mar 2010 05:10:46 +0000 (00:10 -0500)]
Staging: et131x: Properly disable FC in txmac.

FC disable is bit 3 of the txmac ctl register, but commit 6720949d5562
("Staging: et131x: Kil the txmac type") accidentally changed the code to
set bit 2 instead.

Signed-off-by: Nick Bowler <nbowler@draconx.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoHID: Add NOGET quirk for Quanta Pixart touchscreen
Anisse Astier [Mon, 29 Mar 2010 14:20:06 +0000 (16:20 +0200)]
HID: Add NOGET quirk for Quanta Pixart touchscreen

Add the NOGET quirk for the Quanta optical touchscreen present on MSI AE2220,
Otherwise, the hid-quanta driver timeouts at load time:

drivers/hid/usbhid/hid-core.c: usb_submit_urb(ctrl) failed
quanta-touch 0003:0408:3001.0003: timeout initializing reports
input: PixArt Imaging Inc. Optical Touch Screen as /class/input/input7
quanta-touch 0003:0408:3001.0003: input: USB HID v1.10 Device [PixArt Imaging Inc. Optical Touch Screen] on usb-0000:00:06.0-2/input0

Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
14 years agosh: sh7723 clkdev lookups.
Paul Mundt [Mon, 29 Mar 2010 08:45:12 +0000 (17:45 +0900)]
sh: sh7723 clkdev lookups.

Convert to TMU clock lookups for SH7723.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: sh7722 clock string death.
Paul Mundt [Mon, 29 Mar 2010 08:37:39 +0000 (17:37 +0900)]
sh: sh7722 clock string death.

Kills off clock string usage, using the new function clock definition
instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: sh7366 clock string death.
Paul Mundt [Mon, 29 Mar 2010 08:36:41 +0000 (17:36 +0900)]
sh: sh7366 clock string death.

Kills off clock string usage, using the new function clock definition
instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: sh7343 clock string death.
Paul Mundt [Mon, 29 Mar 2010 08:35:04 +0000 (17:35 +0900)]
sh: sh7343 clock string death.

Kills off clock string usage, using the new function clock definition
instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Kill off timer clock strings for legacy CPG parts.
Paul Mundt [Mon, 29 Mar 2010 08:25:03 +0000 (17:25 +0900)]
sh: Kill off timer clock strings for legacy CPG parts.

Now with the lookup aliases in place there is no longer any need to
provide the clock string, kill it off for all legacy CPG CPUs.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: provide some clock lookup aliases for legacy CPG parts.
Paul Mundt [Mon, 29 Mar 2010 08:22:50 +0000 (17:22 +0900)]
sh: provide some clock lookup aliases for legacy CPG parts.

For the CPUs that have not yet been converted off of legacy CPG we
provide some pclk aliases in order to make driver migration easier.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: sh7785 clkdev lookups.
Paul Mundt [Mon, 29 Mar 2010 08:10:06 +0000 (17:10 +0900)]
sh: sh7785 clkdev lookups.

Convert to TMU clock lookups for SH7785.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: sh7786 clkdev lookups.
Paul Mundt [Mon, 29 Mar 2010 08:03:15 +0000 (17:03 +0900)]
sh: sh7786 clkdev lookups.

This plugs in clkdev lookups for the SH7786 clocks and migrates off of
clock string usage for the TMU clocks.

Previously the TMU clocks were aliased to the peripheral clock, so this
gets the driver actually toggling the proper clocks now as well.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoclocksource: Deprecate clock string across the SH drivers.
Paul Mundt [Mon, 29 Mar 2010 07:55:43 +0000 (16:55 +0900)]
clocksource: Deprecate clock string across the SH drivers.

We want to get rid of the clock string from platform data entirely,
depending on the clkdev-based clock lookup to do the right thing for us
instead.

This converts all of the SH drivers to request their associated function
clocks directly, and if there is no match for that then we fall back on
the legacy lookup while warning about it. After all of the outstanding
CPUs have been converted to clkdev lookups the clock string will be
killed off completely.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoMerge branch 'sh/driver-core' into sh/clkfwk
Paul Mundt [Mon, 29 Mar 2010 07:00:06 +0000 (16:00 +0900)]
Merge branch 'sh/driver-core' into sh/clkfwk

14 years agodriver core: Convert to kasprintf() for early dev_name().
Paul Mundt [Mon, 29 Mar 2010 06:51:35 +0000 (15:51 +0900)]
driver core: Convert to kasprintf() for early dev_name().

This is just a simple refactoring patch on top of the early dev_name()
support, converting from kstrdup() to kasprintf() as suggested by Kay.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Mon, 29 Mar 2010 06:40:57 +0000 (08:40 +0200)]
Merge branch 'fix/hda' into for-linus

14 years agoMerge branch 'fix/misc' into for-linus
Takashi Iwai [Mon, 29 Mar 2010 06:40:50 +0000 (08:40 +0200)]
Merge branch 'fix/misc' into for-linus

14 years agoALSA: hda: Use LPIB for ga-ma770-ud3 board
Daniel T Chen [Sun, 28 Mar 2010 06:34:40 +0000 (02:34 -0400)]
ALSA: hda: Use LPIB for ga-ma770-ud3 board

BugLink: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=575669
The OR states that position_fix=1 is necessary to work around glitching
during volume adjustments using PulseAudio.

Reported-by: Carlos Laviola <claviola@debian.org>
Tested-by: Carlos Laviola <claviola@debian.org>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: ac97: Add Toshiba P500 to ac97 jack sense blacklist
Daniel Chen [Sun, 28 Mar 2010 20:32:34 +0000 (13:32 -0700)]
ALSA: ac97: Add Toshiba P500 to ac97 jack sense blacklist

BugLink: https://launchpad.net/bugs/481058
The OR has verified that both 'Headphone Jack Sense' and 'Line Jack Sense'
need to be muted for sound to be audible, so just add the machine's SSID
to the ac97 jack sense blacklist.

Reported-by: Richard Gagne
Tested-by: Richard Gagne
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agosh: tlb debugfs support.
Matt Fleming [Mon, 29 Mar 2010 06:24:54 +0000 (15:24 +0900)]
sh: tlb debugfs support.

Export the status of the utlb and itlb entries through debugfs.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoceph: fix use after free on mds __unregister_request
Sage Weil [Mon, 29 Mar 2010 04:22:50 +0000 (21:22 -0700)]
ceph: fix use after free on mds __unregister_request

There was a use after free in __unregister_request that would trigger
whenever the request map held the last reference.  This appears to have
triggered an oops during 'umount -f' when requests are being torn down.

Signed-off-by: Sage Weil <sage@newdream.net>