aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-09-07bonding: Fix jiffies overflow problems (again)Jiri Bohac1-17/+39
The time_before_eq()/time_after_eq() functions operate on unsigned long and only work if the difference between the two compared values is smaller than half the range of unsigned long (31 bits on i386). Some of the variables (slave->jiffies, dev->trans_start, dev->last_rx) used by bonding store a copy of jiffies and may not be updated for a long time. With HZ=1000, time_before_eq()/time_after_eq() will start giving bad results after ~25 days. jiffies will never be before slave->jiffies, dev->trans_start, dev->last_rx by more than possibly a couple ticks caused by preemption of this code. This allows us to detect/prevent these overflows by replacing time_before_eq()/time_after_eq() with time_in_range(). Signed-off-by: Jiri Bohac <[email protected]> Signed-off-by: Jean Delvare <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-09-07stmmac: fix sleep inside atomicGiuseppe Cavallaro1-5/+4
We cannot use spinlock when kmalloc is invoked with GFP_KERNEL flag because it can sleep. So this patch reviews the usage of spinlock within the stmmac_resume function avoing this bug. Signed-off-by: Giuseppe Cavallaro <[email protected]> Reported-by: Jiri Slaby <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-09-07Revert "drm/i915: Enable RC6 on Ironlake."Chris Wilson1-6/+3
This reverts commit ce17178094f368d9e3f39b2cb4303da5ed633dd4. This commit has been independently bisected a few times as being the cause of a s2ram failure. Reported-and-tested-by: Kyle McMartin <[email protected]> Reported-and-tested-by: Andy Isaacson <[email protected]> Cc: Zou Nan hai <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2010-09-07m68knommu: fix missing linker segmentsGreg Ungerer1-0/+2
Recent changes to linker segments that hold per-cpu data broke linking for m68knommu targets: LD vmlinux /usr/local/bin/m68k-uclinux-ld.real: error: no memory region specified for loadable section `.data..shared_aligned' Add missing segments into the m68knommu linker script. Signed-off-by: Greg Ungerer <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-09-07h8300: Fix missing consts in kernel_execve()David Howells1-2/+2
Fix missing consts in h8300's kernel_execve(): arch/h8300/kernel/sys_h8300.c: In function 'kernel_execve': arch/h8300/kernel/sys_h8300.c:59: warning: initialization from incompatible pointer type arch/h8300/kernel/sys_h8300.c:60: warning: initialization from incompatible pointer type Signed-off-by: David Howells <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-09-07h8300: Fix die()David Howells2-2/+4
Fix h8300's die() to take care of a number of problems: CC arch/h8300/kernel/traps.o In file included from arch/h8300/include/asm/bitops.h:10, from include/linux/bitops.h:22, from include/linux/kernel.h:17, from include/linux/sched.h:54, from arch/h8300/kernel/traps.c:18: arch/h8300/include/asm/system.h:136: warning: 'struct pt_regs' declared inside parameter list arch/h8300/include/asm/system.h:136: warning: its scope is only this definition or declaration, which is probably not what you want arch/h8300/kernel/traps.c:100: error: conflicting types for 'die' arch/h8300/include/asm/system.h:136: error: previous declaration of 'die' was here make[2]: *** [arch/h8300/kernel/traps.o] Error 1 Signed-off-by: David Howells <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-09-07h8300: IRQ flags should be stored in an unsigned longDavid Howells1-5/+10
Fix h8300's asm/atomic.h to store the IRQ flags in an unsigned long to deal with warnings of the following type: arch/h8300/include/asm/atomic.h: In function 'atomic_add_return': arch/h8300/include/asm/atomic.h:22: warning: comparison of distinct pointer types lacks a cast arch/h8300/include/asm/atomic.h:24: warning: comparison of distinct pointer types lacks a cast Signed-off-by: David Howells <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-09-07VFS: Sanity check mount flags passed to change_mnt_propagation()Valerie Aurora1-1/+22
Sanity check the flags passed to change_mnt_propagation(). Exactly one flag should be set. Return EINVAL otherwise. Userspace can pass in arbitrary combinations of MS_* flags to mount(). do_change_type() is called if any of MS_SHARED, MS_PRIVATE, MS_SLAVE, or MS_UNBINDABLE is set. do_change_type() clears MS_REC and then calls change_mnt_propagation() with the rest of the user-supplied flags. change_mnt_propagation() clearly assumes only one flag is set but do_change_type() does not check that this is true. For example, mount() with flags MS_SHARED | MS_RDONLY does not actually make the mount shared or read-only but does clear MNT_UNBINDABLE. Signed-off-by: Valerie Aurora <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-09-07AT91: change dma resource indexNicolas Ferre1-1/+1
Reported-by: Dan Liang <[email protected]> Signed-off-by: Nicolas Ferre <[email protected]>
2010-09-07[SCSI] sd: fix medium-removal bugAlan Stern1-1/+1
Commit 409f3499a2cfcd1e9c2857c53af7fcce069f027f (scsi/sd: remove big kernel lock) introduced a bug in the sd_release routine. Medium removal should be allowed when the number of open file references drops to 0, not when it becomes non-zero. This patch (as1414) adjusts the test to fix the bug. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-09-07fuse: fix lock annotationsMiklos Szeredi2-16/+18
Sparse doesn't understand lock annotations of the form __releases(&foo->lock). Change them to __releases(foo->lock). Same for __acquires(). Signed-off-by: Miklos Szeredi <[email protected]>
2010-09-07fuse: flush background queue on connection closeMiklos Szeredi1-4/+12
David Bartly reported that fuse can hang in fuse_get_req_nofail() when the connection to the filesystem server is no longer active. If bg_queue is not empty then flush_bg_queue() called from request_end() can put more requests on to the pending queue. If this happens while ending requests on the processing queue then those background requests will be queued to the pending list and never ended. Another problem is that fuse_dev_release() didn't wake up processes sleeping on blocked_waitq. Solve this by: a) flushing the background queue before calling end_requests() on the pending and processing queues b) setting blocked = 0 and waking up processes waiting on blocked_waitq() Thanks to David for an excellent bug report. Reported-by: David Bartley <[email protected]> Signed-off-by: Miklos Szeredi <[email protected]> CC: [email protected]
2010-09-07intel_agp,i915: Add more sandybridge graphics device idsZhenyu Wang4-11/+30
New pci ids for GT2 and GT2+ on desktop and mobile sandybridge, and graphics device ids for server sandybridge. Also rename original ids string to reflect GT1 version. Signed-off-by: Zhenyu Wang <[email protected]> Cc: [email protected] Signed-off-by: Chris Wilson <[email protected]>
2010-09-07drm/i915: Enable MI_FLUSH on SandybridgeZhenyu Wang2-2/+7
MI_FLUSH is being deprecated, but still available on Sandybridge. Make sure it's enabled as userspace still uses MI_FLUSH. Signed-off-by: Zhenyu Wang <[email protected]> Cc: [email protected] Signed-off-by: Chris Wilson <[email protected]>
2010-09-07agp/intel: Fix cache control for SandybridgeZhenyu Wang4-10/+62
Sandybridge GTT has new cache control bits in PTE, which controls graphics page cache in LLC or LLC/MLC, so we need to extend the mask function to respect the new bits. And set cache control to always LLC only by default on Gen6. Signed-off-by: Zhenyu Wang <[email protected]> Cc: [email protected] Signed-off-by: Chris Wilson <[email protected]>
2010-09-07agp/intel: use #ifdef idiom for intel-agp.hZhenyu Wang1-0/+4
Signed-off-by: Zhenyu Wang <[email protected]> Cc: [email protected] Signed-off-by: Chris Wilson <[email protected]>
2010-09-07agp/intel: fix physical address mask bits for sandybridgeZhenyu Wang1-2/+2
It should shift bit 39-32 into pte's bit 11-4. Reported-by:Takashi Iwai <[email protected]> Signed-off-by: Zhenyu Wang <[email protected]> Cc: [email protected] Signed-off-by: Chris Wilson <[email protected]>
2010-09-07drm/i915: Prevent double dpms onChris Wilson1-1/+4
Arguably this is a bug in drm-core in that we should not be called twice in succession with DPMS_ON, however this is still occuring and we see FDI link training failures on the second call leading to the occassional blank display. For the time being ignore the repeated call. Original patch by Dave Airlie <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Cc: [email protected]
2010-09-07drm/i915: Avoid use of uninitialised values when disabling panel-fitterChris Wilson1-20/+15
We were passing garbage values into the panel-fitter control register when disabling it on Ironlake - those values (filter modes and reserved MBZ bits) would have then be re-used the next time panel-fitting was enabled. Signed-off-by: Chris Wilson <[email protected]>
2010-09-07drm/i915: Avoid pageflipping freeze when we miss the flip prepare interruptSimon Farnsworth4-12/+113
When we miss the flip prepare interrupt, we never get into the software state needed to restart userspace, resulting in a freeze of a full-screen OpenGL application (such as a compositor). Work around this by checking DSPxSURF/DSPxBASE to see if the page flip has actually happened. If it has, do the work we would have done when the flip prepare interrupt comes in. Also, add debugfs information to tell us what's going on (based on the patch from Chris Wilson attached to bugs.fdo bug #29798). Signed-off-by: Simon Farnsworth <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2010-09-07drm/i915: Tightly scope intel_encoder to prevent invalid useChris Wilson1-13/+12
We reset intel_encoder for every matching encoder whilst iterating over the encoders attached to this crtc when changing mode. As such in a cloned configuration intel_encoder may not correspond to the correct is_edp encoder. By scoping intel_encoder to the loop, not only is the compiler able to spot this mistake, we also improve readiability for ourselves. [It might not be a mistake, within this function it is unclear as to whether it is permissable for eDP to be cloned...] Signed-off-by: Chris Wilson <[email protected]>
2010-09-07drm/i915: Allocate the PCI resource for the MCHBARChris Wilson1-10/+10
We were failing when trying to allocate the resource for MMIO of the MCHBAR because we forgot to specify what type of resource we wanted. Signed-off-by: Chris Wilson <[email protected]> Cc: Jesse Barnes <[email protected]> Cc: [email protected] Reviewed-by: Jesse Barnes <[email protected]>
2010-09-07drm/i915/dp: Really try 5 times before giving up.Chris Wilson1-30/+28
Only stop trying if the aux channel sucessfully reports that the transmission was completed, otherwise try again. On the 5th failure, bail and report that something is amiss. This fixes a sporadic failure in reading the EDID for my external panel over DP. Signed-off-by: Chris Wilson <[email protected]> Cc: [email protected]
2010-09-07drm/i915/sdvo: Restore guess of the DDC bus in absence of VBIOSChris Wilson1-1/+39
If the VBIOS tells us the mapping of the SDVO device onto the DDC bus, use it. However, if there is no VBIOS available that mapping is uninitialised and we should fallback to our earlier guess. Fix regression introduced in b1083333 (which in turn is a fix for the regression caused by the introduction of this guess, 14571b4). References: Bug 29499 - [945GM] Screen disconnected because of missing VBIOS https://bugs.freedesktop.org/show_bug.cgi?id=29499 Bug 15109 - i945GM fails to detect EDID on DVI port https://bugzilla.kernel.org/show_bug.cgi?id=15109 Signed-off-by: Chris Wilson <[email protected]> Reported-and-tested-by: Paul Neumann <[email protected]> Cc: Adam Jackson <[email protected]> Cc: Zhenyu Wang <[email protected]> Cc: [email protected]
2010-09-07drm/i915/dp: Boost timeout for enabling transcoder to 100msChris Wilson1-1/+1
Adam Hill reported that his Arrandale system required a much longer, up to 200x500us, wait for the panel to initialise or else modesetting would fail. References: https://bugs.freedesktop.org/show_bug.cgi?id=29141 Signed-off-by: Chris Wilson <[email protected]> Reported-and-tested-by: Adam Hill <[email protected]>
2010-09-07drm/i915: Re-use set_base_atomic to share setting of the display registersChris Wilson1-71/+9
Lets try to avoid repeating old bugs. Signed-off-by: Chris Wilson <[email protected]> Reviewed-by: Jesse Barnes <[email protected]>
2010-09-07drm/i915: Fix offset page-flips on i965+Chris Wilson1-19/+48
i965 uses the Display Registers to compute the offset from the display base so the new base does not need adjusting when flipping. The older chipsets use a fence to access the display and so do perceive the surface as linear and have a single base register which is reprogrammed using the flip. Signed-off-by: Chris Wilson <[email protected]> Cc: Jesse Barnes <[email protected]> Reported-by: Marty Jack <[email protected]> Reviewed-by: Jesse Barnes <[email protected]>
2010-09-07drm/i915: Include a generation number in the device infoChris Wilson2-54/+34
To simplify the IS_GEN[234] macros and to enable switching. Signed-off-by: Chris Wilson <[email protected]>
2010-09-07ALSA: hda - Add quirk for Lenovo T400sTakashi Iwai1-0/+1
Lenovo T400s requires the quirk to make automatic HP/mic switching working. Reported-by: Frank Becker <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2010-09-06i915: return -EFAULT if copy_to_user failsDan Carpenter1-0/+1
copy_to_user() returns the number of bytes remaining to be copied and I'm pretty sure we want to return a negative error code here. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Cc: [email protected]
2010-09-06i915: return -EFAULT if copy_to_user failsDan Carpenter1-3/+9
copy_to_user returns the number of bytes remaining to be copied, but we want to return a negative error code here. These are returned to userspace. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Cc: [email protected]
2010-09-06agp/intel: Promote warning about failure to setup flush to error.Chris Wilson1-4/+4
Make sure we always detect when we fail to correctly allocate the Isoch Flush Page and print an error to warn the user about the likely memory corruption that will result in invalid rendering or worse. Signed-off-by: Chris Wilson <[email protected]> Cc: [email protected]
2010-09-06drm/i915: overlay on gen2 can't address above 1GDaniel Vetter1-0/+4
So set the coherent dma mask accordingly. This dma mask is only used for physical objects, so it won't really matter allocation-wise. Now this never really surfaced because sane 32bit kernels only have 1G of lowmem. But some eager testers (distros?) still carry around the patch to adjust lowmem via a kconfig option. And the kernel seems to favour high allocations on boot-up, hence the overlay blowing up reliably. Because the patch is tiny and nicely shows how broken gen2 is it's imho worth to merge despite the fact that mucking around with the lowmem/ highmem division is (no longer) supported. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=28318 Cc: [email protected] Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2010-09-06drm/i915: Clear the vblank status bit before polling for the next vblankChris Wilson1-0/+16
The vblank status bit is a sticky bit that must be cleared with a write of '1' prior to polling for the next vblank. Signed-off-by: Chris Wilson <[email protected]> Tested-by: Sitsofe Wheeler <[email protected]> jbarnes: I'd still rather see a lock, but I think you're right that we don't generally wait in code that needs not to miss an interrupt. Reviewed-by: Jesse Barnes <[email protected]>
2010-09-06i915: Fix spurious TV detection after 9d0498a2bf + 9559fcdbffPekka Enberg1-3/+6
Partial revert of 9d0498a2bf. Signed-off-by: Pekka Enberg <[email protected]> Tested-by: Hugh Dickins <[email protected]> Tested-by: Sven Joachim <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2010-09-06i915: revert some checks added by commit 32aad86fPavel Roskin1-16/+13
This fixes blur-like screen corruption on the following card: VGA compatible controller [0300]: Intel Corporation 82G33/G31 Express Integrated Graphics Controller [8086:29c2] (rev 10) intel_sdvo_mode_set() should not return prematurely just because some features are not supported. https://bugzilla.kernel.org/show_bug.cgi?id=17151 Signed-off-by: Pavel Roskin <[email protected]> Reported-by: Jonathan Corbet <[email protected]> Reviewed-by: Chris Wilson <[email protected]> [ickle: Relax a couple more checks for failing LVDS modesetting] Signed-off-by: Chris Wilson <[email protected]>
2010-09-06Revert "drm/i915: Unreference object not handle on creation"Chris Wilson1-3/+6
This reverts commit 86f100b136626e91f4f66f3776303475e2e58998. The kref API requires the handlecount to be initialised to one on object creation (so that kref_get() doesn't complain upon first use) so the dalliance in the drivers is required in order to sink the initial floating reference. Signed-off-by: Chris Wilson <[email protected]> Cc: [email protected]
2010-09-06drivers/gpu/drm/i915/intel_overlay.c needs seq_file.hAndrew Morton1-0/+2
drivers/gpu/drm/i915/intel_overlay.c: In function 'intel_overlay_print_error_state': drivers/gpu/drm/i915/intel_overlay.c:1467: error: implicit declaration of function 'seq_printf' Addresses https://bugzilla.kernel.org/show_bug.cgi?id=16811 Reported-by: Martin Ziegler <[email protected]> Cc: Chris Wilson <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Eric Anholt <[email protected]> Cc: Dave Airlie <[email protected]> Cc: Andre Muller <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2010-09-07drm: Do not force 1024x768 modes on unknown connectorsChris Wilson1-4/+3
Only fallback to a set of default modes on a connector iff that connector is known to be connected. The issue occurs that with limited hardware which cannot probe a connector and so reports the connector status as unknown will then attempt to retrieve the modes for it during drm_helper_probe_single_connector_modes(). Should that fail, the helper then generates a default set which fools the fb_helper and causes havoc with the console and beyond. Signed-off-by: Chris Wilson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-09-07drm/kms: Add a module parameter to disable pollingChris Wilson1-2/+15
Polling for a VGA device on an old system can be quite expensive, causing latencies on the order of 600ms. As we hold the mode mutex for this time and also need the same mutex to move the cursor, we trigger a user-visible stall. The real solution would involve improving the granulatity of the locking and so perhaps performing some of the probing not under the lock or some other updates can be done under different locks. Also reducing the cost of probing for a non-existent monitor would be worthwhile. However, exposing a parameter to disable polling is a simple workaround in the meantime. In order to accommodate users turning polling on and off at runtime, the polling is potentially re-enabled on every probe. This is coupled to the user calling xrandr, which seems to be a vaild time to reset the polling timeout since the information on the connection has just been updated. (The presumption being that all connections are probed in a single xrandr pass, which is currently valid.) References: Bug 29536 - 2.6.35 causes ~600ms latency every 10s https://bugs.freedesktop.org/show_bug.cgi?id=29536 Bug 16265 - Why is kslowd accumulating so much CPU time? https://bugzilla.kernel.org/show_bug.cgi?id=16265 Signed-off-by: Chris Wilson <[email protected]> Reported-and-tested-by: Bruno Prémont <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-09-07drm/radeon/kms: fix tv-out on avivo asicsAlex Deucher1-3/+23
digital underscan support regressed tv-out. fixes: https://bugs.freedesktop.org/show_bug.cgi?id=29985 Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-09-07drm/radeon/kms/evergreen: fix gpu hangs in userspace accel codeAlex Deucher2-5/+39
These VGT regs need to be programmed via the ring rather than MMIO as on previous asics (r6xx/r7xx). Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2010-09-06vhost: error handling fixMichael S. Tsirkin1-0/+1
vhost should set worker to NULL on cgroups attach failure, so that we won't try to destroy the worker again on close. Signed-off-by: Michael S. Tsirkin <[email protected]>
2010-09-06vhost: fix attach to cgroups regressionMichael S. Tsirkin1-22/+57
Since 2.6.36-rc1, non-root users of vhost-net fail to attach if they are in any cgroups. The reason is that when qemu uses vhost, vhost wants to attach its thread to all cgroups that qemu has. But we got the API backwards, so a non-priveledged process (Qemu) tried to control the priveledged one (vhost), which fails. Fix this by switching to the new cgroup_attach_task_all, and running it from the vhost thread. Signed-off-by: Michael S. Tsirkin <[email protected]>
2010-09-05[SCSI] qla2xxx: Update version number to 8.03.04-k0.Madhuranath Iyengar1-2/+2
Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-09-05[SCSI] qla2xxx: Check for empty slot in request queue before posting Command ↵Giridhar Malavali1-0/+13
type 6 request. For ISP82xx, the check for empty slot in request queue before posting command type 6 request was missing. This could lead to request queue entry corruptions causing IO timeouts. Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-09-05[SCSI] qla2xxx: Cover UNDERRUN case where SCSI status is set.Lalit Chandivade1-3/+4
Currently, if target sets the SCSI Status (with Check condition) and there is no FCP residual bit set then driver does not check for dropped frame. This could lead to data corruption. Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-09-05[SCSI] qla2xxx: Correctly set fw hung and complete only waiting mbx.Giridhar Malavali1-8/+12
The fw_hung flag should be set ir-respective of if there is a mbx command pending or not. Also the complete should be called if there is a mbx waiting. Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-09-05[SCSI] qla2xxx: Reset seconds_since_last_heartbeat correctly.Lalit Chandivade1-1/+2
The seconds_since_last_heartbeat should be checked for consecutive heartbeat checks. Currently it could happen that seconds_since_last_heartbeat gets set to max (2 seconds) for non-consecutive heartbeat checks. Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2010-09-05[SCSI] qla2xxx: make rport deletions explicit during vport removalArun Easi1-1/+0
Signed-off-by: Giridhar Malavali <[email protected]> Signed-off-by: James Bottomley <[email protected]>