Jesse Barnes [Thu, 3 Dec 2009 17:52:43 +0000 (09:52 -0800)]
drm/i915: warn if Pineview CxSR can't be enabled
If we don't detect a supported memory configuration, we can't enable
CxSR. Warn the user in this case so they can file a bug.
Jesse Barnes [Wed, 2 Dec 2009 21:42:53 +0000 (13:42 -0800)]
drm/i915: pageflip fixes
This patch brings the tree up to date with some fixes that were in a
more recent version of the page flipping patch you applied. It fixes
pre-965 flip support, removes a leftover hack that forced alignment,
and initializes the pipe & plane CRTC mappings.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Zhao Yakui [Wed, 2 Dec 2009 02:03:34 +0000 (10:03 +0800)]
drm/i915: Declare the new VBT parsing functions as static
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Zhao Yakui [Wed, 2 Dec 2009 02:03:33 +0000 (10:03 +0800)]
drm/i915: Add the missing clonemask for display port on Ironlake
Add the missing clonemask for display port on Ironlake.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
cc: stable@kernel.org
Signed-off-by: Eric Anholt <eric@anholt.net>
Zhao Yakui [Wed, 2 Dec 2009 02:03:32 +0000 (10:03 +0800)]
drm/i915: fix the incorrect condition judgement in dp_is_present_in_vbt
We were always looking for the PORT_IDPB entry.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Eric Anholt [Tue, 1 Dec 2009 19:56:30 +0000 (11:56 -0800)]
drm/i915: Fix DDC on some systems by clearing BIOS GMBUS setup.
This is a sync of a fix I made in the old UMS code. If the BIOS uses
the GMBUS and doesn't clear that setup, then our bit-banging I2C can
fail, leading to monitors not being detected.
Signed-off-by: Eric Anholt <eric@anholt.net>
Zhao Yakui [Fri, 6 Nov 2009 07:39:56 +0000 (15:39 +0800)]
drm/i915: Add 30ms delay to make SDVO TV detection reliable.
Without this, on some boots the TV wouldn't be detected. Testing
showed 15ms to be insufficient.
https://bugs.freedesktop.org/show_bug.cgi?id=24290
https://bugs.freedesktop.org/show_bug.cgi?id=20785
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Tested-by: Yan Seiner <yan@seiner.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Kristian Høgsberg [Fri, 6 Nov 2009 13:39:18 +0000 (08:39 -0500)]
drm/i915: Fix typo in ioctl struct name.
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Eric Anholt <eric@anholt.net>
Li Peng [Mon, 9 Nov 2009 04:51:22 +0000 (12:51 +0800)]
drm/i915: Fix sync to vblank when VGA output is turned off
In current vblank-wait implementation, if we turn off VGA output,
drm_wait_vblank will still wait on the disabled pipe until timeout,
because vblank on the pipe is assumed be enabled. This would cause
slow system response on some system such as moblin.
This patch resolve the issue by adding a drm helper function
drm_vblank_off which explicitly clear vblank_enabled[crtc], wake up
any waiting queue and save last vblank counter before turning off
crtc. It also slightly change drm_vblank_get to ensure that we will
will return immediately if trying to wait on a disabled pipe.
Signed-off-by: Li Peng <peng.li@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
[anholt: hand-applied for conflicts with overlay changes]
Signed-off-by: Eric Anholt <eric@anholt.net>
Adam Jackson [Fri, 20 Nov 2009 05:22:44 +0000 (13:22 +0800)]
drm/i915: disable the interrupt hotplug for integrated TV output
Otherwise, I'd get stuck in a loop where (afaict) output scan would
trigger a TV interrupt, which would trigger a scan, etc. TV load
detection not being the fastest thing in the world, X would process
requests very slowly.
https://bugs.freedesktop.org/show_bug.cgi?id=24404
Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Chris Wilson [Mon, 30 Nov 2009 01:08:56 +0000 (01:08 +0000)]
drm/i915: Don't update the render-clock for every bo.
Only update the render-clock on transition from busy to idle and vice
versa, or else we burn a significant percentage of the cpu just rewriting
the register -- not quite as power-friendly as intended ;-)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Adam Jackson [Tue, 24 Nov 2009 15:07:00 +0000 (10:07 -0500)]
drm/i915: Fix LVDS presence check
Assume that either the presence of an LVDS entry in the VBT or an ACPI
lid device indicates an LVDS device. ACPI lid alone is not sufficient.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Eric Anholt [Tue, 1 Dec 2009 17:25:23 +0000 (09:25 -0800)]
drm/i915: Fix warning introduced with the page flipping ioctl.
Signed-off-by: Eric Anholt <eric@anholt.net>
Jesse Barnes [Thu, 19 Nov 2009 18:49:07 +0000 (10:49 -0800)]
drm/i915: add GETPARAM request for page flipping
Add a GETPARAM request for checking if page flipping is supported.
Useful for the 2D driver to enable the flipping path.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Jesse Barnes [Thu, 19 Nov 2009 18:50:22 +0000 (10:50 -0800)]
drm: use page flip event to signal flip completion
We don't actually know which frame number the flip will complete on, so
userspace needs a specific flip notification to tell it when the last flip
completed.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Kristian Høgsberg <krh@bitplanet.net>
Kristian Høgsberg [Wed, 18 Nov 2009 16:25:18 +0000 (11:25 -0500)]
drm/i915: Add intel implementation of the pageflip ioctl
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
Acked-by: Thomas Hellström <thomas@shipmail.org>
Review-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Jesse "Orange Smoothie" Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Eric Anholt <eric@anholt.net>
Eric Anholt [Tue, 1 Dec 2009 17:01:54 +0000 (09:01 -0800)]
Merge remote branch 'airlied/drm-next' into drm-intel-next
Zhenyu Wang [Fri, 27 Nov 2009 03:44:36 +0000 (11:44 +0800)]
drm/i915: PineView only has LVDS and CRT ports
PineView only has 2 ports for LVDS and CRT. Don't enable other
ports for it.
Cc: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Zhao Yakui [Tue, 24 Nov 2009 01:48:48 +0000 (09:48 +0800)]
drm/i915: Don't set up the TV port if it isn't in the BIOS table.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Zhao Yakui [Tue, 24 Nov 2009 01:48:47 +0000 (09:48 +0800)]
drm/i915: Don't set up the LVDS if it isn't in the BIOS device table.
We not only check the device type, but also check the addin_offset. If the
addin_offset is zero, it won't be initialized.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
[anholt: hand-applied due to conflicts]
Zhao Yakui [Tue, 24 Nov 2009 01:48:46 +0000 (09:48 +0800)]
drm/i915: Don't set up DP ports that aren't in the BIOS device table.
Use the child device array to decide whether the given DP output should be
initialized. If the given DP port can't be found in child device array,
it is not present and won't be initialized.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Zhao Yakui [Tue, 24 Nov 2009 01:48:45 +0000 (09:48 +0800)]
drm/i915: Don't set up HDMI ports that aren't in the BIOS device table.
Use the child device array to decide whether the given HDMI output should be
initialized. If the given HDMI port can't be found in child device array,
it is not present and won't be initialized.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Zhao Yakui [Tue, 24 Nov 2009 01:48:44 +0000 (09:48 +0800)]
drm/i915: parse child device from VBT
On some laptops there is no HDMI/DP. But the xrandr still reports
several disconnected HDMI/display ports. In such case the user will be
confused.
>DVI1 disconnected (normal left inverted right x axis y axis)
>DP1 disconnected (normal left inverted right x axis y axis)
>DVI2 disconnected (normal left inverted right x axis y axis)
>DP2 disconnected (normal left inverted right x axis y axis)
>DP3 disconnected (normal left inverted right x axis y axis)
This patch set is to use the child device parsed in VBT to decide whether
the HDMI/DP/LVDS/TV should be initialized.
Parse the child device from VBT.
The device class type is also added for LFP, TV, HDMI, DP output.
https://bugs.freedesktop.org/show_bug.cgi?id=22785
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Kristian Høgsberg [Wed, 11 Nov 2009 17:19:18 +0000 (12:19 -0500)]
drm/i915: Disable pwrctx before unpin and free
Otherwise the chip may scribble over free memory.
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Kristian Høgsberg [Wed, 11 Nov 2009 17:19:17 +0000 (12:19 -0500)]
drm/i915: Hold struct_mutex while unreffing pwrctx object
This also extends the mutex to cover fbc disabling, which is safe.
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Kristian Høgsberg [Wed, 11 Nov 2009 17:19:16 +0000 (12:19 -0500)]
drm/i915: Unregister i915_wedged debugfs entry using the right key
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Shaohua Li [Wed, 18 Nov 2009 07:15:02 +0000 (15:15 +0800)]
drm/i915: fix gpio register detection logic for BIOS without VBT
if no VBT is present, crt_ddc_bus will be left at 0, and cause us
to use that for the GPIO register offset. That's never a valid register
offset, so let the "undefined" value be 0 instead of -1.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
[anholt: clarified the commit message a bit]
Chris Wilson [Fri, 27 Nov 2009 13:06:56 +0000 (13:06 +0000)]
drm/i915: Avoid NULL dereference with component_only tv_modes
In commit
d2d9f2324, the guard for a valid video mode was removed. This
caused the regression:
kernel crash during kms graphic boot on Intel GM4500 platform
https://bugzilla.redhat.com/show_bug.cgi?id=540218
This patches changes the logic slightly not to rely on a coupled
variable, but to just check whether the video_modes is valid before
dereferencing.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Zhenyu Wang <zhenyu.z.wang@intel.com>
[ickle: Actually reference the correct bug report]
Acked-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Daniel Vetter [Mon, 30 Nov 2009 14:55:49 +0000 (15:55 +0100)]
drm/i915: fixup interrupted overlay switch off calls
When switching to interruptible sleeps in the overlay code, I've
forgotten to recover from interruptions at one site. This
resulted in the overlay still running when it should have been
switched off. This in turn caused a hang on resume because it
tried to disable the (not-running) overlay in preparation for the
resume modeset.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=24980
Tested-by: maximlevitsky@gmail.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
Daniel Vetter [Sat, 25 Apr 2037 08:08:26 +0000 (10:08 +0200)]
drm/i915: overlay: extract some duplicated code
I've suspected some bug there wrt to suspend, but that was not
the case. Clean up the code anyway.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
Shaohua Li [Wed, 14 Oct 2009 09:19:28 +0000 (17:19 +0800)]
drm/i915: remove Pineview EOS protection support
HW guys have an evaluation about the impact about EOS, and say the impact
is quite small, so they have removed EOS detection support. This patch
removes EOS feature.
revert commit
043029655816ed4cfc2ed247020ef97e5d637392
directly reverting it gives a hunk error, so please use this one.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
[anholt: fixed up commit message for update that the feature's really gone]
Shaohua Li [Thu, 26 Nov 2009 06:22:41 +0000 (14:22 +0800)]
drm/i915: use msleep for intel_wait_for_vblank
20ms delay is quite big and the routine isn't called in atomic context.
better use msleep to let other tasks run. This can reduce cpu time used
by Xorg, so potentially boost boot.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Shaohua Li [Tue, 17 Nov 2009 09:19:23 +0000 (17:19 +0800)]
drm/i915: handle failure path correctly for lvds
In failure path, make sure encoder is cleaned up, otherwise there
is a kernel oops.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Zhenyu Wang [Wed, 25 Nov 2009 05:09:38 +0000 (13:09 +0800)]
drm/i915: Fix LVDS stability issue on Ironlake
In disable sequence, all output ports on PCH have to be disabled
before PCH transcoder, but LVDS port was left always enabled. This
one fixes that by disable LVDS port properly during pipe disable
process, and resolved stability issue seen on Ironlake. Also move
panel fitting disable time just after pipe disable to align with
the spec.
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Zhao Yakui [Fri, 20 Nov 2009 03:24:18 +0000 (11:24 +0800)]
drm/i915: Restore the DPLL calculation logic for 9xx platform
The DPLL calculation logic for 9xx platform is changed in:
commit
652c393a3368af84359da37c45afc35a91144960
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date: Mon Aug 17 13:31:43 2009 -0700
drm/i915: add dynamic clock frequency control
Maybe we will get the different M/N/P combination with that by using the
previous dpll calculation logic.
So restore the DPLL calculation logic for 9xx platform.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Zhao Yakui [Fri, 20 Nov 2009 03:24:17 +0000 (11:24 +0800)]
drm/i915: Check whether the LVDS downclock is found in VBT
Enumerate the LVDS panel timing info entry list in VBT to check whether
the LVDS downclock is found. If found, the downclock is also used to switch
dynamically between low and high frequency for LVDS.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Zhao Yakui [Fri, 20 Nov 2009 03:24:16 +0000 (03:24 +0000)]
drm/i915: Enable LVDS downclock feature through EDID.
If more than one mode with the same resolution defined in EDID has different
refresh rate, it is thought that the downclock is found for LVDS.
We will program the different FPx0/1 register so that we can select dynamically
between the low and high frequency.
On the g4x platform we will use the CxSR feature to switch the different
refresh rate if the LVDS downclock feature is supported.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Eric Anholt [Sun, 22 Nov 2009 02:49:37 +0000 (03:49 +0100)]
drm/i915: Replace a calloc followed by copying data over it with malloc.
Execbufs involve quite a bit of payload, to the extent that cache misses
show up in the profiles here, and a suspicion that some of those cachelines
may get evicted and then reloaded in the subsequent copy.
This is still abstracted like drm_calloc_large since we want to check for
size overflow, and because we want to choose between kmalloc and vmalloc
on the fly. cairo's interface for malloc-with-calloc's-args was used as
the model.
Signed-off-by: Eric Anholt <eric@anholt.net>
Dave Airlie [Wed, 18 Nov 2009 00:09:55 +0000 (10:09 +1000)]
Merge branch 'drm-core-next' of ../linux-2.6 into drm-next
Kristian Høgsberg [Tue, 17 Nov 2009 17:43:55 +0000 (12:43 -0500)]
drm/kms: add page flipping ioctl
This adds a page flipping ioctl to the KMS API. The ioctl takes an fb ID
and a ctrc ID and flips the crtc to the given fb at the next vblank.
The ioctl returns immediately but the flip doesn't happen until after
any rendering that's currently queued up against the new framebuffer
is done. After submitting a page flip, any execbuffer involving the
old front buffer will block until the flip is completed.
Optionally, a vblank event can be generated when the swap eventually
happens.
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Andres Salomon [Tue, 17 Nov 2009 22:41:25 +0000 (14:41 -0800)]
drm: check return values in drm_version
In drm_version, actually check the results from function calls so that
we're not potentially passing garbage back to userspace.
Signed-off-by: Andres Salomon <dilinger@collabora.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Andres Salomon [Tue, 17 Nov 2009 22:41:24 +0000 (14:41 -0800)]
drm: replace DRM_COPY macro w/ a function
Don't inline it; the compiler can figure it out. Comments added that are
based upon my interpretation of the code. Hopefully they're correct. :)
Signed-off-by: Andres Salomon <dilinger@collabora.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Andres Salomon [Tue, 17 Nov 2009 22:41:23 +0000 (14:41 -0800)]
drm: kill more unused DRM macros
There are a few more macros in drmP.h that are unused; DRM_GET_PRIV_SAREA,
DRM_ARRAY_SIZE, and DRM_WAITCOUNT can go away completely.
Unfortunately, DRM_COPY is still used in one place, but we can at least
move it to where it's used. It's an awful looking macro..
[akpm: fix overeagerness]
Signed-off-by: Andres Salomon <dilinger@collabora.co.uk>
Cc: Dave Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Andres Salomon [Tue, 17 Nov 2009 22:41:23 +0000 (14:41 -0800)]
drm: kill some unused DRM_PROC macros from drmP.h
i915_gem_proc.c appears to have been the last user of the DRM_PROC_*
macros, and it has gone away. The macros should die as well.
Signed-off-by: Andres Salomon <dilinger@collabora.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Jesse Barnes [Tue, 10 Nov 2009 08:21:25 +0000 (08:21 +0000)]
drm: when queuing an event with NEXTONMISS, return queued sequence to userspace
If we queue a vblank event but miss it, we should return the actual
sequence number we queued to userspace, so its event handling function
will know which event to look for.
Acked-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kristian Høgsberg [Fri, 11 Sep 2009 18:33:34 +0000 (04:33 +1000)]
drm: Add async event synchronization for drmWaitVblank
This patch adds a new flag to the drmWaitVblank ioctl, which asks the drm
to return immediately and notify userspace when the specified vblank sequence
happens by sending an event back on the drm fd.
The event mechanism works with the other flags supported by the ioctls,
specifically, the vblank sequence can be specified relatively or absolutely,
and works for primary and seconday crtc.
The signal field of the vblank request is used to provide user data,
which will be sent back to user space in the vblank event.
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Jesse Barnes [Tue, 10 Nov 2009 08:21:25 +0000 (08:21 +0000)]
drm: when queuing an event with NEXTONMISS, return queued sequence to userspace
If we queue a vblank event but miss it, we should return the actual
sequence number we queued to userspace, so its event handling function
will know which event to look for.
Acked-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Linus Torvalds [Mon, 9 Nov 2009 17:58:31 +0000 (09:58 -0800)]
Merge branch 'i2c-for-linus' of git://git./linux/kernel/git/jdelvare/staging
* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
i2c: Add an interface to lock/unlock an I2C bus segment
i2c-piix4: Modify code name SB900 to Hudson-2
Linus Torvalds [Mon, 9 Nov 2009 17:57:02 +0000 (09:57 -0800)]
Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md:
md/raid5: make sure curr_sync_completes is uptodate when reshape starts
md: don't clear endpoint for resync when resync is interrupted.
Hugh Dickins [Mon, 9 Nov 2009 15:58:23 +0000 (15:58 +0000)]
ksm: cond_resched in unstable tree
KSM needs a cond_resched() for CONFIG_PREEMPT_NONE, in its unbounded
search of the unstable tree. The stable tree cases already have one,
and originally there was one down inside get_user_pages();
but I missed it when I converted to follow_page() instead.
Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Acked-by: Izik Eidus <ieidus@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Mon, 9 Nov 2009 17:52:55 +0000 (09:52 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ryusuke/nilfs2
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
nilfs2: fix missing cleanup of gc cache on error cases
nilfs2: fix kernel oops in error case of nilfs_ioctl_move_blocks
Linus Torvalds [Mon, 9 Nov 2009 17:51:42 +0000 (09:51 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (34 commits)
net/fsl_pq_mdio: add module license GPL
can: fix WARN_ON dump in net/core/rtnetlink.c:rtmsg_ifinfo()
can: should not use __dev_get_by_index() without locks
hisax: remove bad udelay call to fix build error on ARM
ipip: Fix handling of DF packets when pmtudisc is OFF
qlge: Set PCIe reset type for EEH to fundamental.
qlge: Fix early exit from mbox cmd complete wait.
ixgbe: fix traffic hangs on Tx with ioatdma loaded
ixgbe: Fix checking TFCS register for TXOFF status when DCB is enabled
ixgbe: Fix gso_max_size for 82599 when DCB is enabled
macsonic: fix crash on PowerBook 520
NET: cassini, fix lock imbalance
ems_usb: Fix byte order issues on big endian machines
be2net: Bug fix to send config commands to hardware after netdev_register
be2net: fix to set proper flow control on resume
netfilter: xt_connlimit: fix regression caused by zero family value
rt2x00: Don't queue ieee80211 work after USB removal
Revert "ipw2200: fix oops on missing firmware"
decnet: netdevice refcount leak
netfilter: nf_nat: fix NAT issue in 2.6.30.4+
...
Linus Torvalds [Mon, 9 Nov 2009 17:51:15 +0000 (09:51 -0800)]
Merge git://git./linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
sparc: Move of_set_property_mutex acquisition outside of devtree_lock grab.
sparc64: replace parentheses in pmul()
sparc64: Add a comment about why we only use certain memory barriers these days.
Linus Torvalds [Mon, 9 Nov 2009 17:50:55 +0000 (09:50 -0800)]
Merge git://git./linux/kernel/git/davem/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
Revert "ide: try to use PIO Mode 0 during probe if possible"
Linus Torvalds [Mon, 9 Nov 2009 17:50:15 +0000 (09:50 -0800)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
cifs: don't use CIFSGetSrvInodeNumber in is_path_accessible
cifs: clean up handling when server doesn't consistently support inode numbers
Linus Torvalds [Mon, 9 Nov 2009 17:49:58 +0000 (09:49 -0800)]
Merge branch 'sh/for-2.6.32' of git://git./linux/kernel/git/lethal/sh-2.6
* 'sh/for-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
sh: Replace old style lock initializer
sh: Account for cache aliases in flush_icache_range()
sh: unwinder: Fix up invalid PC refetch in dwarf unwinder.
serial: sh-sci: disable callback typo fix
Linus Torvalds [Mon, 9 Nov 2009 17:47:21 +0000 (09:47 -0800)]
Merge branch 'for-linus' of git://linux-m32r.org/git/takata/linux-2.6_dev
* 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev:
m32r: fix arch/m32r/boot/compressed/Makefile
Linus Torvalds [Mon, 9 Nov 2009 17:30:14 +0000 (09:30 -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: snd-aica: declare MODULE_FIRMWARE
ALSA: hda - Don't initialize CORB/RIRB for single_cmd mode
ALSA: usb-audio: fix combine_word problem
sound: Replace old style lock initializer
ASoC: S3C64XX I2S: Enable audio-bus clock
ASoC: OMAP: Don't try to set unsupported OMAP_DMA_DATA_BURST_16 on OMAP1
ALSA: hda, move hp_bseries_system
sound: Use KERN_WARNING instead of KERN_WARN, which does not exist
ALSA: intel8x0: Mute External Amplifier by default for another Sony model
ALSA: hda - Add OLPC XO-1.5 PCI ID
ALSA: hda - Enable GPIO control for mute LED on HP systems
Linus Torvalds [Mon, 9 Nov 2009 17:28:42 +0000 (09:28 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
ACPI: sleep: another HP/Compaq DMI entries for init_set_sci_en_on_resume
ACPI: add DMI entry for SCI_EN resume quirk on HP dv4
thermal: sysfs-api.txt - document passive attribute for thermal zones
thermal: sysfs-api.txt - reformat for improved readability
acpi: thermal: Add EOL to the trip_point_N_type strings
ACPI: Move dereference after NULL test
ACPICA: avoid "Info: mapping multiple BARs. Your kernel is fine."
ACPI: add __cpuinit to acpi_processor_add()
acpi-power-meter: Don't leak ACPI error codes to userspace
eeepc-laptop: don't enable camera at startup if it's already on.
Revert "eeepc-laptop: Prevent a panic when disabling RT2860 wireless when associated"
ACPI: clean up video.c boundary checks and types
Thomas Gleixner [Fri, 6 Nov 2009 22:42:05 +0000 (22:42 +0000)]
sh: Replace old style lock initializer
SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-sh@vger.kernel.org
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Matt Fleming [Thu, 5 Nov 2009 23:14:39 +0000 (23:14 +0000)]
sh: Account for cache aliases in flush_icache_range()
The icache may also contain aliases so we must account for them just
like we do when manipulating the dcache. We usually get away with
aliases in the icache because the instructions that are read from memory
are read-only, i.e. they never change. However, the place where this
bites us is when the code has been modified.
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
David S. Miller [Mon, 9 Nov 2009 01:41:20 +0000 (17:41 -0800)]
sparc: Move of_set_property_mutex acquisition outside of devtree_lock grab.
Otherwise we try to sleep with preemption disabled, etc.
Noticed by Thomas Gleixner.
Signed-off-by: David S. Miller <davem@davemloft.net>
Hirokazu Takata [Sun, 8 Nov 2009 23:51:35 +0000 (08:51 +0900)]
m32r: fix arch/m32r/boot/compressed/Makefile
- Fix a comment string
- Fix a typo of $(suffix-y)
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Ryusuke Konishi [Sun, 8 Nov 2009 03:09:24 +0000 (12:09 +0900)]
nilfs2: fix missing cleanup of gc cache on error cases
This fixes an -rc1 regression brought by the commit:
1cf58fa840472ec7df6bf2312885949ebb308853 ("nilfs2: shorten freeze
period due to GC in write operation v3").
Although the patch moved out a function call of
nilfs_ioctl_move_blocks() to nilfs_ioctl_clean_segments() from
nilfs_ioctl_prepare_clean_segments(), it didn't move corresponding
cleanup job needed for the error case.
This will move the missing cleanup job to the destination function.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Acked-by: Jiro SEKIBA <jir@unicus.jp>
Ryusuke Konishi [Sat, 7 Nov 2009 09:45:16 +0000 (18:45 +0900)]
nilfs2: fix kernel oops in error case of nilfs_ioctl_move_blocks
This fixes a kernel oops reported by Markus Trippelsdorf in the email
titled "[NILFS users] kernel Oops while running nilfs_cleanerd".
The oops was caused by a bug of error path in
nilfs_ioctl_move_blocks() function, which was inlined in
nilfs_ioctl_clean_segments().
nilfs_ioctl_move_blocks checks duplication of blocks which will be
moved in garbage collection. But, the check should have be done
within nilfs_ioctl_move_inode_block() to prevent list corruption among
buffers storing the target blocks.
To fix the kernel oops, this moves forward the duplication check
before the list insertion.
I also tested this for stable trees [2.6.30, 2.6.31].
Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Cc: stable <stable@kernel.org>
Sebastian Siewior [Fri, 6 Nov 2009 08:50:28 +0000 (08:50 +0000)]
net/fsl_pq_mdio: add module license GPL
or it will taint the kernel and fail to load becuase
of_address_to_resource() is GPL only.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wolfgang Grandegger [Fri, 6 Nov 2009 23:53:13 +0000 (23:53 +0000)]
can: fix WARN_ON dump in net/core/rtnetlink.c:rtmsg_ifinfo()
On older kernels, e.g. 2.6.27, a WARN_ON dump in rtmsg_ifinfo()
is thrown when the CAN device is registered due to insufficient
skb space, as reported by various users. This patch adds the
rtnl_link_ops "get_size" to fix the problem. I think this patch
is required for more recent kernels as well, even if no WARN_ON
dumps are triggered. Maybe we also need "get_xstats_size" for
the CAN xstats.
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Fri, 6 Nov 2009 00:23:01 +0000 (00:23 +0000)]
can: should not use __dev_get_by_index() without locks
bcm_proc_getifname() is called with RTNL and dev_base_lock
not held. It calls __dev_get_by_index() without locks, and
this is illegal (might crash)
Close the race by holding dev_base_lock and copying dev->name
in the protected section.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Roel Kluin [Sun, 8 Nov 2009 08:26:56 +0000 (00:26 -0800)]
sparc64: replace parentheses in pmul()
`>>' has a higher precedence than `?' so src2 evaluated to
either 16 or 0 dependent on the bits set in rs2.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Takashi Iwai [Sun, 8 Nov 2009 08:16:15 +0000 (09:16 +0100)]
Merge branch 'fix/hda' into for-linus
Takashi Iwai [Sun, 8 Nov 2009 08:16:06 +0000 (09:16 +0100)]
Merge branch 'fix/misc' into for-linus
Ben Hutchings [Sat, 7 Nov 2009 22:13:39 +0000 (22:13 +0000)]
ALSA: snd-aica: declare MODULE_FIRMWARE
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jean Delvare [Sat, 7 Nov 2009 12:10:46 +0000 (13:10 +0100)]
i2c: Add an interface to lock/unlock an I2C bus segment
Some drivers need to be able to prevent access to an I2C bus segment
for a specific period of time. Add an interface for them to do so
without twiddling with i2c-core internals.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Crane Cai [Sat, 7 Nov 2009 12:10:46 +0000 (13:10 +0100)]
i2c-piix4: Modify code name SB900 to Hudson-2
Change SB900 to its formal code name Hudson-2.
Signed-off-by: Crane Cai <crane.cai@amd.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Takashi Iwai [Sat, 7 Nov 2009 08:49:04 +0000 (09:49 +0100)]
ALSA: hda - Don't initialize CORB/RIRB for single_cmd mode
So far, CORB/RIRB still remains even if the driver is switched to the
single_cmd mode. The specification says that this should be disabled,
but I hoped this isn't the case; indeed most devices worked together with
CORB/RIRB.
However, Poulsbo (US15W) seems problematic with this setup, and it
requires to disable CORB/RIRB when single_cmd is used.
Now this patch disables CORB/RIRB initialization when the single_cmd
mode is used. Also the unsolicited event is disabled because it can't
work without RIRB.
Reported-and-tested-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Julian Anastasov [Fri, 6 Nov 2009 21:44:53 +0000 (23:44 +0200)]
ALSA: usb-audio: fix combine_word problem
Fix combine_word problem where first octet is not
read properly. The only affected place seems to be the
INPUT_TERMINAL type. Before now, sound controls can be created
with the output terminal's name which is a fallback mechanism
used only for unknown input terminal types. For example,
Line can wrongly appear as Speaker. After the change it
should appear as Line.
The side effect of this change can be that users
can expect the wrong control name in their scripts or
programs while now we return the correct one.
Probably, these defines should use get_unaligned_le16 and
friends.
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Thomas Gleixner [Fri, 6 Nov 2009 22:41:29 +0000 (22:41 +0000)]
sound: Replace old style lock initializer
SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Martin Michlmayr [Fri, 6 Nov 2009 14:52:34 +0000 (14:52 +0000)]
hisax: remove bad udelay call to fix build error on ARM
The hisax ISDN driver fails to build on ARM with CONFIG_HISAX_ELSA:
| drivers/built-in.o: In function `modem_set_dial':
| drivers/isdn/hisax/elsa_ser.c:535: undefined reference to `__bad_udelay'
| drivers/isdn/hisax/elsa_ser.c:544: undefined reference to `__bad_udelay'
| drivers/built-in.o: In function `modem_set_init':
| drivers/isdn/hisax/elsa_ser.c:486: undefined reference to `__bad_udelay'
| [...]
According to the comment in arch/arm/include/asm/delay.h, __bad_udelay
is specifically designed on ARM to produce a build failure when udelay
is called with a value > 2000.
Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Fri, 6 Nov 2009 10:37:41 +0000 (10:37 +0000)]
ipip: Fix handling of DF packets when pmtudisc is OFF
RFC 2003 requires the outer header to have DF set if DF is set
on the inner header, even when PMTU discovery is off for the
tunnel. Our implementation does exactly that.
For this to work properly the IPIP gateway also needs to engate
in PMTU when the inner DF bit is set. As otherwise the original
host would not be able to carry out its PMTU successfully since
part of the path is only visible to the gateway.
Unfortunately when the tunnel PMTU discovery setting is off, we
do not collect the necessary soft state, resulting in blackholes
when the original host tries to perform PMTU discovery.
This problem is not reproducible on the IPIP gateway itself as
the inner packet usually has skb->local_df set. This is not
correctly cleared (an unrelated bug) when the packet passes
through the tunnel, which allows fragmentation to occur. For
hosts behind the IPIP gateway it is readily visible with a simple
ping.
This patch fixes the problem by performing PMTU discovery for
all packets with the inner DF bit set, regardless of the PMTU
discovery setting on the tunnel itself.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Fri, 6 Nov 2009 07:44:58 +0000 (07:44 +0000)]
qlge: Set PCIe reset type for EEH to fundamental.
This device requires a fundamental reset when recovering from EEH.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Fri, 6 Nov 2009 07:44:57 +0000 (07:44 +0000)]
qlge: Fix early exit from mbox cmd complete wait.
This line was accidentally left out of the previous commit #
da03945140a035a2962f7f93e359085596f20499 ("qlge: Fix firmware mailbox
command timeout.").
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Don Skidmore [Fri, 6 Nov 2009 12:56:20 +0000 (12:56 +0000)]
ixgbe: fix traffic hangs on Tx with ioatdma loaded
When ioatdma was loaded we we were unable to transmit traffic. We weren't
using the correct registers in ixgbe_update_tx_dca for 82599 systems.
Likewise in ixgbe_configure_tx() we weren't disabling the arbiter before
modifying MTQC.
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yi Zou [Fri, 6 Nov 2009 12:56:00 +0000 (12:56 +0000)]
ixgbe: Fix checking TFCS register for TXOFF status when DCB is enabled
When DCB is enabled, the ixgbe_check_tx_hang() should check the corresponding
TC's TXOFF in TFCS based on the TC that the tx ring belongs to. Adds a
function to map from the tx_ring hw reg_idx to the correspodning TC and read
TFCS accordingly.
Signed-off-by: Yi Zou <yi.zou@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yi Zou [Fri, 6 Nov 2009 12:55:38 +0000 (12:55 +0000)]
ixgbe: Fix gso_max_size for 82599 when DCB is enabled
The 32k gso_max_size when DCB is enabled is for 82598 only, not for 82599.
Signed-off-by: Yi Zou <yi.zou@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Finn Thain [Tue, 3 Nov 2009 03:42:40 +0000 (03:42 +0000)]
macsonic: fix crash on PowerBook 520
No-one seems to know where the PowerBook 500 series store their ethernet
MAC addresses. So, rather than crash, use a MAC address from the SONIC
CAM. Failing that, generate a random one.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jiri Slaby [Thu, 5 Nov 2009 23:14:29 +0000 (23:14 +0000)]
NET: cassini, fix lock imbalance
Stanse found that one error path in cas_open omits to unlock pm_mutex.
Fix that.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sebastian Haas [Wed, 4 Nov 2009 05:48:33 +0000 (05:48 +0000)]
ems_usb: Fix byte order issues on big endian machines
CPC-USB is using a ARM7 core with little endian byte order. The "id" field
in can_msg needs byte order conversion from/to CPU byte order.
Signed-off-by: Sebastian Haas <haas@ems-wuensche.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ajit Khaparde [Fri, 6 Nov 2009 02:07:32 +0000 (02:07 +0000)]
be2net: Bug fix to send config commands to hardware after netdev_register
Sending config commands to be2 hardware before netdev_register is
completed, is sometimes causing the async link notification to arrive
even before the driver is ready to handle it. The commands for vlan
config and flow control settings can infact wait till be_open.
This patch takes care of that.
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ajit Khaparde [Fri, 6 Nov 2009 02:06:59 +0000 (02:06 +0000)]
be2net: fix to set proper flow control on resume
If be2 goes into suspend after a user changes the flow control settings,
we are not programming them back after resume. This patch takes care of it.
We now get the flow control settings before going to suspend mode and
then apply them during resume.
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 7 Nov 2009 02:21:44 +0000 (18:21 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6
Jan Engelhardt [Sat, 7 Nov 2009 02:08:32 +0000 (18:08 -0800)]
netfilter: xt_connlimit: fix regression caused by zero family value
Commit v2.6.28-rc1~717^2~109^2~2 was slightly incomplete; not all
instances of par->match->family were changed to par->family.
References: http://bugzilla.netfilter.org/show_bug.cgi?id=610
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jeff Layton [Fri, 6 Nov 2009 19:18:49 +0000 (14:18 -0500)]
cifs: don't use CIFSGetSrvInodeNumber in is_path_accessible
Because it's lighter weight, CIFS tries to use CIFSGetSrvInodeNumber to
verify the accessibility of the root inode and then falls back to doing a
full QPathInfo if that fails with -EOPNOTSUPP. I have at least a report
of a server that returns NT_STATUS_INTERNAL_ERROR rather than something
that translates to EOPNOTSUPP.
Rather than trying to be clever with that call, just have
is_path_accessible do a normal QPathInfo. That call is widely
supported and it shouldn't increase the overhead significantly.
Cc: Stable <stable@kernel.org>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Jeff Layton [Fri, 6 Nov 2009 19:18:29 +0000 (14:18 -0500)]
cifs: clean up handling when server doesn't consistently support inode numbers
It's possible that a server will return a valid FileID when we query the
FILE_INTERNAL_INFO for the root inode, but then zeroed out inode numbers
when we do a FindFile with an infolevel of
SMB_FIND_FILE_ID_FULL_DIR_INFO.
In this situation turn off querying for server inode numbers, generate a
warning for the user and just generate an inode number using iunique.
Once we generate any inode number with iunique we can no longer use any
server inode numbers or we risk collisions, so ensure that we don't do
that in cifs_get_inode_info either.
Cc: Stable <stable@kernel.org>
Reported-by: Timothy Normand Miller <theosib@gmail.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Sean Cross [Thu, 5 Nov 2009 19:22:03 +0000 (20:22 +0100)]
rt2x00: Don't queue ieee80211 work after USB removal
This prevents the rt2x00 driver from queueing ieee80211 work after the
USB card has been removed, preventing a kernel panic.
Signed-off-by: Sean Cross <sean@chumby.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Fri, 6 Nov 2009 17:58:20 +0000 (12:58 -0500)]
Revert "ipw2200: fix oops on missing firmware"
This reverts commit
e6c5fc53d0f44a772398402ee8a1879818e42b4e.
Based on this regression report:
Date: Thu, 05 Nov 2009 15:59:16 +0100
From: Holger Schurig <holgerschurig@gmail.com>
To: linux-wireless@vger.kernel.org
Subject: BUG: oops when "rmmod ipw2200"
This happened on wireless-testing v2.6.32-rc6-41575-g5e68bfb. I
modprobed ipw2200, put it into monitor mode, used tshark a while to
monitor, then I stopped tshark, "ifconfig eth2 down" and finally
"rmmod ipw2200", and voila:
[ 917.189620] ------------[ cut here ]------------
[ 917.189717] kernel BUG at net/wireless/core.c:543!
[ 917.189805] invalid opcode: 0000 [#1] PREEMPT SMP
[ 917.190002] last sysfs file: /sys/devices/pci0000:00/0000:00:1e.0/0000:02:0d.0/firmware/0000:02:0d.0/loading
[ 917.190136] Modules linked in: lib80211_crypt_wep ipw2200(-) libipw lib80211 ath5k mac80211 ath cfg80211 psmouse uhci_hcd
[ 917.190680]
[ 917.190759] Pid: 1763, comm: rmmod Not tainted (2.6.32-rc6-wl #26) Amilo M1425
[ 917.190886] EIP: 0060:[<
f8accf34>] EFLAGS:
00010202 CPU: 0
[ 917.190992] EIP is at wiphy_unregister+0xd3/0x175 [cfg80211]
[ 917.191083] EAX:
f601d4c4 EBX:
00000000 ECX:
00000000 EDX:
f79e8600
[ 917.191176] ESI:
f601d400 EDI:
f95b4350 EBP:
f6009eb4 ESP:
f6009e8c
[ 917.191269] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[ 917.191360] Process rmmod (pid: 1763, ti=
f6008000 task=
f79e8130 task.ti=
f6008000)
[ 917.191486] Stack:
[ 917.191562]
f601d5a0 f601d484 f6460e98 f6009ea0 c01407ee f6009eb8 00000246 f64604c0
[ 917.191916] <0>
f6460e5c f95b4350 f6009ec0 f94fd030 f6460e98 f6009edc f95a9d4f f787bc00
[ 917.192100] <0>
f787bc58 f787bc00 f95b4350 f95b4350 f6009ee8 c0207fca f787bc58 f6009ef8
[ 917.192100] Call Trace:
[ 917.192100] [<
c01407ee>] ? trace_hardirqs_on+0xb/0xd
[ 917.192100] [<
f94fd030>] ? unregister_ieee80211+0xe/0x27 [libipw]
[ 917.192100] [<
f95a9d4f>] ? ipw_pci_remove+0x59/0x227 [ipw2200]
[ 917.192100] [<
c0207fca>] ? pci_device_remove+0x19/0x39
[ 917.192100] [<
c02b93a4>] ? __device_release_driver+0x59/0x9d
[ 917.192100] [<
c02b944f>] ? driver_detach+0x67/0x85
[ 917.192100] [<
c02b88d6>] ? bus_remove_driver+0x69/0x85
[ 917.192100] [<
c02b9878>] ? driver_unregister+0x4d/0x54
[ 917.192100] [<
c02081c3>] ? pci_unregister_driver+0x28/0x71
[ 917.192100] [<
f95a9cf4>] ? ipw_exit+0x1c/0x1e [ipw2200]
[ 917.192100] [<
c0148e2b>] ? sys_delete_module+0x192/0x1ef
[ 917.192100] [<
c0162cdb>] ? remove_vma+0x52/0x58
[ 917.192100] [<
c01028bb>] ? sysenter_exit+0xf/0x18
[ 917.192100] [<
c0102888>] ? sysenter_do_call+0x12/0x36
[ 917.192100] Code: 74 07 e8 81 bc 8c c7 eb c8 8d 55 e0 89 f8 e8 d6 6d 66 c7 8b 45 dc 31 d2 e8 81 cc 8c c7 8d 86 c4 00 00 00 39 86 c4 00 00 00 74 04 <0f> 0b eb fe 8b 45 dc 8d 5e 0c e8 5a cc 8c c7 8b 86 94 03 00 00
[ 917.192100] EIP: [<
f8accf34>] wiphy_unregister+0xd3/0x175 [cfg80211] SS:ESP 0068:
f6009e8c
[ 917.203718] ---[ end trace
bcaaf449945a5100 ]---
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jassi Brar [Fri, 6 Nov 2009 09:00:24 +0000 (18:00 +0900)]
ASoC: S3C64XX I2S: Enable audio-bus clock
Added the missing clk_enable after acquiring the 'audio-bus' clock.
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Janusz Krzysztofik [Wed, 21 Oct 2009 21:10:03 +0000 (23:10 +0200)]
ASoC: OMAP: Don't try to set unsupported OMAP_DMA_DATA_BURST_16 on OMAP1
After DMA burst mode has been introduced in sound/soc/omap/omap-pcm.c,
omap_pcm_prepare() unconditionally calls:
omap_set_dma_src_burst_mode(prtd->dma_ch, OMAP_DMA_DATA_BURST_16);
omap_set_dma_dest_burst_mode(prtd->dma_ch, OMAP_DMA_DATA_BURST_16);
Current implementation of those two functions found in
arch/arm/plat-ompa/dma.c doesn't support OMAP_DMA_DATA_BURST_16 on OMAP1 at
all, so they both end with BUG() on that machine. That results in
ASoC being completely unusable, at least on my OMAP5910 based Amstrad Delta.
The patch corrects the problem by not calling those two functions when run on
OMAP1 class based machines.
Created against linux-2.6.32-rc5.
Tested on Amstrad Delta.
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
David S. Miller [Fri, 6 Nov 2009 12:52:50 +0000 (04:52 -0800)]
Revert "ide: try to use PIO Mode 0 during probe if possible"
This reverts commit
6029336426a2b43e4bc6f4a84be8789a047d139e.
Ok, we really do need to revert this, even with Bart's sis5513.c
fix in there.
The problem is that several driver's ->set_pio_mode() method
depends upon the drive->media type being set properly. Most
of them use this to enable prefetching, which can only be done
for disk media.
But the commit being reverted here calls ->set_pio_mode() before
it's setup. Actually it considers everything disk because that
is the default media type set by ide_port_init_devices_data().
The set of drivers that depend upon the media type in their
->set_pio_method() are:
drivers/ide/alim15x3.c
drivers/ide/it8172.c
drivers/ide/it8213.c
drivers/ide/pdc202xx_old.c
drivers/ide/piix.c
drivers/ide/qd65xx.c
drivers/ide/sis5513.c
drivers/ide/slc90e66.c
And it is possible that we could fix this by guarding the prefetching
and other media dependent setting changes with a test on
IDE_PFLAG_PROBING in hwif->port_flags, that's simply too risky for
2.6.32-rcX and -stable.
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Fri, 6 Nov 2009 08:50:39 +0000 (00:50 -0800)]
decnet: netdevice refcount leak
While working on device refcount stuff, I found a device refcount leak
through DECNET.
This nasty bug can be used to hold refcounts on any !DECNET netdevice.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jozsef Kadlecsik [Fri, 6 Nov 2009 08:43:42 +0000 (00:43 -0800)]
netfilter: nf_nat: fix NAT issue in 2.6.30.4+
Vitezslav Samel discovered that since 2.6.30.4+ active FTP can not work
over NAT. The "cause" of the problem was a fix of unacknowledged data
detection with NAT (commit
a3a9f79e361e864f0e9d75ebe2a0cb43d17c4272).
However, actually, that fix uncovered a long standing bug in TCP conntrack:
when NAT was enabled, we simply updated the max of the right edge of
the segments we have seen (td_end), by the offset NAT produced with
changing IP/port in the data. However, we did not update the other parameter
(td_maxend) which is affected by the NAT offset. Thus that could drift
away from the correct value and thus resulted breaking active FTP.
The patch below fixes the issue by *not* updating the conntrack parameters
from NAT, but instead taking into account the NAT offsets in conntrack in a
consistent way. (Updating from NAT would be more harder and expensive because
it'd need to re-calculate parameters we already calculated in conntrack.)
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>