Paul Mundt [Fri, 20 Aug 2010 11:26:41 +0000 (20:26 +0900)]
sh: Relax devfn constraints for SH7786 PCIe.
SH7786 PCIe has 1 slot per port, but no specific restriction on function.
Relax the devfn restriction and look to the slot number instead when
configured as a root complex.
Paul Mundt [Fri, 20 Aug 2010 06:59:40 +0000 (15:59 +0900)]
sh: Support type 1 accesses for SH7786 PCI.
This enables support for type 1 config space accesses on the SH7786
PCI controller. At the same time, add in some extra sanity checks for
controller asserted errors.
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel:
drm/i915: fix page flip finish vs. prepare on plane B
drm/i915: change default panel fitting mode to preserve aspect ratio
drm/i915: fix uninitialized variable warning in i915_setup_compression()
drm/i915: take struct_mutex in i915_dma_cleanup()
drm/i915: Fix CRT hotplug regression in 2.6.35-rc1
i915: fix ironlake edp panel setup (v4)
drm/i915: don't access FW_BLC_SELF on 965G
drm/i915: Account for space on the ring buffer consumed whilst wrapping.
drm/i915: gen3 page flipping fixes
drm/i915: don't queue flips during a flip pending event
drm/i915: Fix incorrect intel_ring_begin size in BSD ringbuffer.
drm/i915: Turn on 945 self-refresh only if single CRTC is active
drm/i915/gen4: Fix interrupt setup ordering
drm/i915: Use RSEN instead of HTPLG for tfp410 monitor detection.
drm/i915: Move non-phys cursors into the GTT
Revert "drm/i915: Don't enable pipe/plane/VCO early (wait for DPMS on)."
(Included the "fix page flip finish vs. prepare on plane B" patch from
Jesse on top of the pull request from Eric. -- Linus)
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:
ata_generic: implement ATA_GEN_* flags and force enable DMA on MBP 7,1
ahci,ata_generic: let ata_generic handle new MBP w/ MCP89
libahci: Fix bug in storing EM messages
drm/i915: fix hibernation since i915 self-reclaim fixes
Since commit 4bdadb9785696439c6e2b3efe34aa76df1149c83 ("drm/i915:
Selectively enable self-reclaim"), we've been passing GFP_MOVABLE to the
i915 page allocator where we weren't before due to some over-eager
removal of the page mapping gfp_flags games the code used to play.
This caused hibernate on Intel hardware to result in a lot of memory
corruptions on resume. See for example
http://bugzilla.kernel.org/show_bug.cgi?id=13811
Reported-by: Evengi Golov (in bugzilla) Signed-off-by: Dave Airlie <airlied@redhat.com> Tested-by: M. Vefa Bicakci <bicave@superonline.com> Cc: stable@kernel.org Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Prarit Bhargava [Thu, 27 May 2010 17:37:56 +0000 (13:37 -0400)]
drm/i915: fix uninitialized variable warning in i915_setup_compression()
Fixes:
drivers/gpu/drm/i915/i915_dma.c: In function ‘i915_setup_compression’:
drivers/gpu/drm/i915/i915_dma.c:1311: error: ‘compressed_llb’ may be used uninitialized in this function
Signed-off-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
Dan Carpenter [Wed, 23 Jun 2010 11:19:55 +0000 (13:19 +0200)]
drm/i915: take struct_mutex in i915_dma_cleanup()
intel_cleanup_ring_buffer() calls drm_gem_object_unreference() (as
opposed to drm_gem_object_unreference_unlocked()) so it needs to be
called with "struct_mutex" held. If we don't hold the lock, it triggers
a BUG_ON(!mutex_is_locked(&dev->struct_mutex));
I also audited the other places that call intel_cleanup_ring_buffer()
and they all hold the lock so they're OK.
This was introduced in: 8187a2b70e3 "drm/i915: introduce
intel_ring_buffer structure (V2)" and it's a regression from v2.6.34.
First, it did not, in fact, disable the CRT plug interrupt -- it
disabled all the other hotplug interrupts. It seems rather doubtful
that that bit of the patch fixed anything, so let's just remove it.
(If you want to add it back, you probably meant ~CRT_HOTPLUG_INT_EN.)
Second, on at least my GM45, setting CRT_HOTPLUG_ACTIVATION_PERIOD_64
and CRT_HOTPLUG_VOLTAGE_COMPARE_50 (when they were previously unset)
causes a hotplug interrupt about three seconds later. The old code
never restored PORT_HOTPLUG_EN so this could only happen once, but
they new code restores those registers. So just set those bits when
we set up the interrupt in the first place.
Signed-off-by: Andy Lutomirski <luto@mit.edu> Signed-off-by: Eric Anholt <eric@anholt.net>
Dave Airlie [Wed, 30 Jun 2010 01:46:17 +0000 (11:46 +1000)]
i915: fix ironlake edp panel setup (v4)
The eDP spec claims a 20% overhead for the 8:10 encoding scheme used
on the wire. Take this into account when picking the lane/clock speed
for the panel.
v3: some panels are out of spec, try our best to deal with them, don't
refuse modes on eDP panels, and try the largest allowed settings if
all else fails on eDP.
v4: fix stupid typo, forgot to git add before amending.
Jesse Barnes [Wed, 30 Jun 2010 20:49:37 +0000 (13:49 -0700)]
drm/i915: don't access FW_BLC_SELF on 965G
The register offset for FW_BLC_SELF is a totally different set of bits
on Broadwater (it's actually MI_RDRET_STATE), so don't treat it like
FW_BLC_SELF on 965G chips.
Tejun Heo [Thu, 17 Jun 2010 09:42:22 +0000 (11:42 +0200)]
ahci,ata_generic: let ata_generic handle new MBP w/ MCP89
For yet unknown reason, MCP89 on MBP 7,1 doesn't work w/ ahci under
linux but the controller doesn't require explicit mode setting and
works fine with ata_generic. Make ahci ignore the controller on MBP
7,1 and let ata_generic take it for now.
Reported in bko#15923.
https://bugzilla.kernel.org/show_bug.cgi?id=15923
NVIDIA is investigating why ahci mode doesn't work.
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (27 commits)
drm/radeon/kms: remove rv100 bios connector quirk
drm/radeon/kms/pm: fix power state indexing on igp chips in dynpm mode
DRM / radeon / KMS: Fix hibernation regression related to radeon PM (was: Re: [Regression, post-2.6.34] Hibernation broken on machines with radeon/KMS and r300)
drm/radeon/kms/igp: fix possible divide by 0 in bandwidth code (v2)
drm/radeon: add quirk to make HP nx6125 laptop resume.
drm/radeon/kms: add some missing regs to evergreen gpu init
drm/radeon/kms: fix typos in evergreen command checker
drm/radeon/kms: avoid oops on mac r4xx cards
fb: fix colliding defines for fb flags.
drm/radeon/kms: Force HDP_NONSURF to maximum size
drm/radeon/kms: disable frac fb dividers for rs6xx
drm/radeon/kms: don't read attempt to read bios from VRAM on unposted GPU.
drm/radeon/kms: fix typo in evergreen_gpu_init
drm/radeon/kms: return ret in cursor_set failure path
drm/ttm: non pooled page allocation should have GFP_USER set
drm/radeon/r100/r200: fix calculation of compressed cube maps
drm/radeon/r200: handle more hw tex coord types
drm/radeon/kms: CS checker texture fixes for r1xx/r2xx/r3xx
drm/radeon: add fake RN50 table for powerpc
drm/fb: Fix video= mode computation
...
Alex Deucher [Wed, 30 Jun 2010 17:04:08 +0000 (13:04 -0400)]
drm/radeon/kms: remove rv100 bios connector quirk
Some RV100 cards with 2 VGA ports show up with DVI+VGA, however
some boards with DVI+VGA have the same subsystem ids. Better
to have a VGA port show up as DVI than having a non-useable
DVI port.
reported by DHR in irc.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
DRM / radeon / KMS: Fix hibernation regression related to radeon PM (was: Re: [Regression, post-2.6.34] Hibernation broken on machines with radeon/KMS and r300)
There is a regression from 2.6.34 related to the recent radeon power
management changes, caused by attempting to cancel a delayed work
item that's never been scheduled. However, the code as is has some
other issues potentially leading to visible problems.
First, the mutex around cancel_delayed_work() in radeon_pm_suspend()
doesn't really serve any purpose, because cancel_delayed_work() only
tries to delete the work's timer. Moreover, it doesn't prevent the
work handler from running, so the handler can do some wrong things if
it wins the race and in that case it will rearm itself to do some
more wrong things going forward. So, I think it's better to wait for
the handler to return in case it's already been queued up for
execution. Also, it should be prevented from rearming itself in that
case.
Second, in radeon_set_pm_method() the cancel_delayed_work() is not
sufficient to prevent the work handler from running and queing up
itself for the next run (the failure scenario is that
cancel_delayed_work() returns 0, so the handler is run, it waits on
the mutex and then rearms itself after the mutex has been released),
so again the work handler should be prevented from rearming itself in
that case..
Finally, there's a potential deadlock in radeon_pm_fini(), because
cancel_delayed_work_sync() is called under rdev->pm.mutex, but the
work handler tries to acquire the same mutex (if it wins the race).
Fix the issues described above.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Wed, 30 Jun 2010 16:02:03 +0000 (12:02 -0400)]
drm/radeon/kms/igp: fix possible divide by 0 in bandwidth code (v2)
Some IGP systems specify the system memory clock in the Firmware
table rather than the IGP info table. Check both and make sure
we have a value system memory clock value.
v2: make sure rs690_pm_info is called on rs780/rs880 as well.
Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Tested-by: Markus Trippelsdorf <markus@trippelsdorf.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Wed, 30 Jun 2010 03:26:11 +0000 (13:26 +1000)]
drm/radeon: add quirk to make HP nx6125 laptop resume.
For some reason on resume, executing the BIOS scripts locks up the whole chipset, by avoiding the dynclk table the machine resumes properly and seems to function okay.
Jerome Glisse [Thu, 3 Jun 2010 17:34:48 +0000 (19:34 +0200)]
drm/radeon/kms: Force HDP_NONSURF to maximum size
HDP non surface should cover the whole VRAM but we were misscomputing
the size and we endup in some case not covering the VRAM at all (if
VRAM size were > 1G). Covering more than the VRAM size shouldn't be
an issue.
Code did not handle projected 2d and depth coordinates, meaning potentially
set 3d or cube special handling might stick.
(Not sure what depth coord actually does, but I guess handling it
like a normal coordinate is the right thing to do.)
Might be related to https://bugs.freedesktop.org/show_bug.cgi?id=26428
Signed-off-by: sroland@vmware.com Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Roland Scheidegger <sroland@vmware.com> Cc: stable@kernel.org Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Adam Jackson [Thu, 10 Jun 2010 17:33:26 +0000 (13:33 -0400)]
drm/fb: Fix video= mode computation
Reduced blanking is valid only when doing CVT modes. Also, generate GTF
modes unless CVT was requested; CVT devices are required to support GTF,
but the reverse is not true.
[airlied: fix typo]
Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Thu, 10 Jun 2010 21:06:01 +0000 (17:06 -0400)]
drm/radeon/kms: fix DP after DPMS cycle
The transmitter needs to be enabled before the link is trained.
Reported-By: Lars Doelle <lars.doelle@on-line.de> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
Cedric Godin [Fri, 11 Jun 2010 18:40:56 +0000 (14:40 -0400)]
drm/radeon/kms: fix dpms state on resume
When suspending, we turn the display hw off, at resume the screen will stay black.
This patch turn it on. Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=16180
Signed-off-by: Cedric Godin <cedric.godin@skynet.be> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (22 commits)
USB: gadget: f_mass_storage: stale common->fsg value bug fix
USB: gadget: f_mass_storage: fixed fs descriptors not being updated
USB: musb: Enable the maximum supported burst mode for DMA
USB: musb: fix Blackfin ulpi stubs
USB: MUSB: make non-OMAP platforms build with CONFIG_PM=y
USB: musb_core: make disconnect and suspend interrupts work again
USB: obey the sysfs power/wakeup setting
USB: gadget eth: Fix calculate CRC32 in EEM
USB: qcserial: fix a memory leak in qcprobe error path
USB: gadget/printer, fix sleep inside atomic
USB: isp1362-hcd, fix double lock
USB: serial: ftdi: correct merge conflict with CONTEC id
USB: fix oops in usb_sg_init()
USB: s3c2410: deactivate endpoints before gadget unbinding
USB: ehci-mxc: bail out on transceiver problems
USB: otg/ulpi: bail out on read errors
usb: musb: Fix a bug by making suspend interrupt available in device mode
USB: r8a66597: Fix failure in change of status
USB: xHCI: Fix bug in link TRB activation change.
USB: gadget: g_fs: possible invalid pointer reference bug fixed
...
futex_find_get_task is currently used (through lookup_pi_state) from two
contexts, futex_requeue and futex_lock_pi_atomic. None of the paths
looks it needs the credentials check, though. Different (e)uids
shouldn't matter at all because the only thing that is important for
shared futex is the accessibility of the shared memory.
The credentail check results in glibc assert failure or process hang (if
glibc is compiled without assert support) for shared robust pthread
mutex with priority inheritance if a process tries to lock already held
lock owned by a process with a different euid:
The problem is that futex_lock_pi_atomic which is called when we try to
lock already held lock checks the current holder (tid is stored in the
futex value) to get the PI state. It uses lookup_pi_state which in turn
gets task struct from futex_find_get_task. ESRCH is returned either
when the task is not found or if credentials check fails.
futex_lock_pi_atomic simply returns if it gets ESRCH. glibc code,
however, doesn't expect that robust lock returns with ESRCH because it
should get either success or owner died.
Signed-off-by: Michal Hocko <mhocko@suse.cz> Acked-by: Darren Hart <dvhltc@us.ibm.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Nick Piggin <npiggin@suse.de> Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tony Luck [Wed, 30 Jun 2010 17:46:16 +0000 (10:46 -0700)]
[IA64] Fix spinaphore down_spin()
Typo in down_spin() meant it only read the low 32 bits of the
"serve" value, instead of the full 64 bits. This results in the
system hanging when the values in ticket/serve get larger than
32-bits. A big enough system running the right test can hit this
in a just a few hours.
Dan Carpenter [Mon, 21 Jun 2010 06:49:25 +0000 (08:49 +0200)]
Staging: comedi: fix read past end of array in cb_pcidda_attach()
There are only 6 elements in the cb_pcidda_boards[] array so the
original code read past the end. After this change nothing uses N_BOARDS
so I removed the definition.
Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds some device ids.
The list of supported devices was extracted from realteks driver package.
(0x050d, 0x815F) and (0x0df6, 0x004b) are not in the official list of
supported devices and may not work correctly.
In case of problems with these, they should probably be removed from the list.
This patch removes some device-ids.
The list of unsupported devices was extracted from realteks driver package.
removed IDs are:
(0x0bda, 0x8192)
(0x0bda, 0x8709)
(0x07aa, 0x0043)
(0x050d, 0x805E)
(0x0df6, 0x0031)
(0x1740, 0x9201)
(0x2001, 0x3301)
(0x5a57, 0x0290)
These devices are _not_ rtl819su based.
Larry Finger [Mon, 7 Jun 2010 17:00:44 +0000 (12:00 -0500)]
Staging: rtl8187se: Fix compile warnings in 2.6.35-rc2
In commit bbfb5652, the spacing in the definitions of eqMacAddr and cpMacAddr
in drivers/staging/rtl8187se/r8180_core.c were changed to conform to kernel
standards. These definitions were duplicates of lines found in
drivers/staging/rtl8187se/ieee80211/dot11d.h. Once the change was made, the
following warnings were emitted:
CC [M] drivers/staging/rtl8187se/r8180_core.o
drivers/staging/rtl8187se/r8180_core.c:69:0: warning: "eqMacAddr" redefined
drivers/staging/rtl8187se/ieee80211/dot11d.h:39:0: note: this is the location of the previous definition
drivers/staging/rtl8187se/r8180_core.c:70:0: warning: "cpMacAddr" redefined
drivers/staging/rtl8187se/ieee80211/dot11d.h:40:0: note: this is the location of the previous definition
The fix is to keep only the difinition in the header file.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Staging: wlags49_h2: Fix build error when CONFIG_SYSFS is not set
I got a wlags49_h2 driver build error in linux-next when CONFIG_SYSFS is not set.
CC [M] drivers/staging/wlags49_h2/wl_cs.o
In file included from drivers/staging/wlags49_h2/wl_cs.c:104:
drivers/staging/wlags49_h2/wl_sysfs.h: In function ‘register_wlags_sysfs’:
drivers/staging/wlags49_h2/wl_sysfs.h:5: error: parameter name omitted
drivers/staging/wlags49_h2/wl_sysfs.h: In function ‘unregister_wlags_sysfs’:
drivers/staging/wlags49_h2/wl_sysfs.h:6: error: parameter name omitted
make[1]: *** [drivers/staging/wlags49_h2/wl_cs.o] Error 1
make: *** [_module_drivers/staging/wlags49_h2] Error 2
This is due a wrong function definition (it does not include parameters names).
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Haiyang Zhang [Fri, 28 May 2010 23:22:44 +0000 (23:22 +0000)]
staging: hv: Fix race condition on vmbus channel initialization
There is a possible race condition when hv_utils starts to load immediately
after hv_vmbus is loading - null pointer error could happen.
This patch added wait/completion to ensure all channels are ready before
vmbus loading completes. So another module won't have any uninitialized channel.
Ian Abbott [Fri, 18 Jun 2010 11:11:28 +0000 (12:11 +0100)]
Staging: comedi: drivers: adl_pci9111: Fix AI commands in TRIG_FOLLOW case
I received a report that AI streaming acquisitions do not work properly
for the adl_pci9111 driver when convert_src is TRIG_TIMER and
scan_begin_src is TRIG_FOLLOW (and scan_begin_arg is therefore 0). This
seems to be down to the incorrect setting of dev_private->scan_delay in
pci9111_ai_do_cmd(). Under the previously stated conditions,
dev_private->scan_delay ends up set to (unsigned int)-1, but it ought to
be set to 0. The function sets it to 0 initially, and it only makes
sense to change it if both convert_src and scan_begin_src are set to
TRIG_TIMER.
Note: 'scan_delay' is the number of unwanted scans to discard after each
valid scan. The hardware does not support 'scan' timing as such, just a
regularly paced conversion timer (with automatic channel switching
between conversions). The driver simulates a scan period that is some
(>1) multiple of the conversion period times the scan length
(chanlist_len samples) by reading chanlist_len samples and discarding
the next scan_delay times chanlist_len samples.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
USB: gadget: f_mass_storage: stale common->fsg value bug fix
On fsg_unbind the common->fsg pointer was not NULLed if the
unbound fsg_dev instance was the current one. As an effect,
the incorrect pointer was preserved in all further operations
which caused do_set_interface to reference an invalid region.
This commit fixes this by raising an exception in fsg_bind
which will change the common->fsg pointer. This also requires
an wait queue so that the thread in fsg_bind can wait till the
worker thread handles the exception.
This commit removes also a config and new_config fields of
fsg_common as they are no longer needed since fsg can be
used to determine whether function is active or not.
Moreover, this commit removes possible race condition where
the fsg field was modified in both the worker thread and
form various other contexts. This is fixed by replacing
prev_fsg with new_fsg. At this point, fsg is assigned only
in worker thread.
Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
USB: gadget: f_mass_storage: fixed fs descriptors not being updated
The full speed descriptors were copied to the usb_function structure
in the fsg_bind_config function before call to the usb_ep_autoconfig.
The usb_ep_autoconfig was called in fsg_bind using the original
descriptors. In effect copied descriptors were not updated.
This patch changes the copy full speed descriptors after the call to
usb_op_autoconfig is performed. This way, copied full speed
descriptors have updated values.
Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Reported-by: Dries Van Puymbroeck <Dries.VanPuymbroeck@dekimo.com> Tested-by: Dries Van Puymbroeck <Dries.VanPuymbroeck@dekimo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Hema HK [Thu, 24 Jun 2010 17:37:09 +0000 (23:07 +0530)]
USB: musb: Enable the maximum supported burst mode for DMA
Setting MUSB Burst Mode 3 automatically enables support for
lower burst modes (BURST4, BURST8, BURST16 or bursts of unspecified
length). There is no need to set these burst modes based on the
packet size. Also enable the burst mode for both mode1 and mode0.
This is a fix for buggy hardware - having the lower burst modes
enabled can potentially cause lockups of the DMA engine used in
OMAP2/3/4 chips.
Signed-off-by: Hema HK <hemahk@ti.com> Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Acked-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mike Frysinger [Thu, 24 Jun 2010 17:37:08 +0000 (23:07 +0530)]
USB: musb: fix Blackfin ulpi stubs
The new ulpi code defines fallback stubs for the Blackfin arch, but does
so incorrectly leading to a build failure:
drivers/usb/musb/musb_core.c:227: error: 'musb_ulpi_read' undeclared here (not in a function)
drivers/usb/musb/musb_core.c:228: error: 'musb_ulpi_write' undeclared here (not in a function)
Tweak the fallback stubs so that they do work as intended.
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Acked-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sergei Shtylyov [Thu, 24 Jun 2010 17:37:07 +0000 (23:07 +0530)]
USB: MUSB: make non-OMAP platforms build with CONFIG_PM=y
Attempt to build MUSB driver with CONFIG_PM=y (e.g. in the OTG mode) on DaVinci
results in these link errors:
drivers/built-in.o: In function `musb_restore_context':
led-triggers.c:(.text+0x714d8): undefined reference to
`musb_platform_restore_context'
drivers/built-in.o: In function `musb_save_context':
led-triggers.c:(.text+0x71788): undefined reference to
`musb_platform_save_context'
This turned out to be caused by commit 9957dd97ec5e98dd334f87ade1d9a0b24d1f86eb
(usb: musb: Fix compile error for omaps for musb_hdrc). Revert it, taking into
account the rename of CONFIG_ARCH_OMAP34XX into CONFIG_ARCH_OMAP3 (which that
commit fixed in a completely inappropriate way) and the recent addition of
OMAP4 support.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Acked-by: Felipe Balbi <felipe.balbi@nokia.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sergei Shtylyov [Thu, 24 Jun 2010 17:37:06 +0000 (23:07 +0530)]
USB: musb_core: make disconnect and suspend interrupts work again
Commit 1c25fda4a09e8229800979986ef399401053b46e (usb: musb: handle irqs in the
order dictated by programming guide) forgot to get rid of the old 'STAGE0_MASK'
filter for calling musb_stage0_irq(), so now disconnect and suspend interrupts
are effectively ignored...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: stable <stable@kernel.org> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Acked-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Tue, 22 Jun 2010 20:14:48 +0000 (16:14 -0400)]
USB: obey the sysfs power/wakeup setting
This patch (as1403) is a partial reversion of an earlier change
(commit 5f677f1d45b2bf08085bbba7394392dfa586fa8e "USB: fix remote
wakeup settings during system sleep"). After hearing from a user, I
realized that remote wakeup should be enabled during system sleep
whenever userspace allows it, and not only if a driver requests it
too.
Indeed, there could be a device with no driver, that does nothing but
generate a wakeup request when the user presses a button. Such a
device should be allowed to do its job.
The problem fixed by the earlier patch -- device generating a wakeup
request for no reason, causing system suspend to abort -- was also
addressed by a later patch ("USB: don't enable remote wakeup by
default", accepted but not yet merged into mainline). The device
won't be able to generate the bogus wakeup requests because it will be
disabled for remote wakeup by default. Hence this reversion will not
re-introduce any old problems.
Jiri Slaby [Mon, 21 Jun 2010 15:02:40 +0000 (17:02 +0200)]
USB: gadget/printer, fix sleep inside atomic
Stanse found that sleep is called inside atomic context created by
lock_printer_io spinlock in several functions. It's used in process
context only and some functions sleep inside its critical section. As
this is not allowed for spinlocks, switch it to mutex.
Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Craig W. Nadler <craig@nadler.us> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jiri Slaby [Mon, 21 Jun 2010 15:02:51 +0000 (17:02 +0200)]
USB: isp1362-hcd, fix double lock
Stanse found that isp1362_sw_reset tries to take a isp1362_hcd->lock,
but it is already held in isp1362_hc_stop. Avoid that by introducing
__isp1362_sw_reset which doesn't take the lock and call it from
isp1362_hc_stop. isp1362_sw_reset is then as simple as lock --
__isp1362_sw_reset -- unlock.
Originally I submitted a patch and then they asked me to order the IDs
and resubmit, so did I. But unfortunately in the end somehow both
patches were merged.
Signed-off-by: Daniel Sangorrin <daniel.sangorrin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Fri, 18 Jun 2010 14:16:33 +0000 (10:16 -0400)]
USB: fix oops in usb_sg_init()
This patch (as1401) fixes a bug in usb_sg_init() that can cause an
invalid pointer dereference. An inner loop reuses some local variables
in an unsafe manner, so new variables are introduced.
In the change by 749da5f82fe33ff68dd4aa1a5e35cd9aa6246dab,
The change in the status when the USB device is connected is wrong.
Therefore, the device is not recognized.
Acked-by: Alan Stern <stern@rowland.harvard.edu> CC: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> CC: Paul Mundt" <lethal@linux-sh.org> Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sarah Sharp [Thu, 10 Jun 2010 19:25:28 +0000 (12:25 -0700)]
USB: xHCI: Fix bug in link TRB activation change.
Commit 6c12db90f19727c76990e7f4801c67a148b30111 introduced a bug for
control transfers. The patch was supposed to change when the link TRBs at
the end of each ring segment were given to the hardware. If a transfer
descriptor (TD) ended just before the link TRB, the code wouldn't give
back the link TRB to the hardware; instead it would be given back in
prepare_ring() just before the next TD was enqueued at the top of the
ring.
Unfortunately, the code relied on checking the chain bit of the TRB to
determine whether the TD ended just before the link TRB. It assumed that
the ring enqueuing code would call prepare_ring() before enqueuing the
next TD. However, control transfers are made of multiple TDs, and
prepare_ring() is only called once before enqueuing two or three TDs.
If the first or second TD of the control transfer ended just before the
link TRB, then the code in inc_enq() would not move the enqueue pointer
past the link TRB, and the link TRB would get overwritten. This would
cause the xHCI driver to start writing to memory past the ring segment,
and eventually the system would crash or hang.
The fix is to add a flag to inc_enq() that says whether the caller will
enqueue more TDs before calling prepare_ring(). If the chain bit is
cleared (meaning this is the last TRB in a TD), and the caller will not
enqueue more TDs, then we defer giving back the link TRB.
USB: gadget: g_fs: possible invalid pointer reference bug fixed
During __gfs_do_config() some invalid pointers may be left
in usb_configuration::interfaces array from previous calls
to the __gfs_do_config() for the same configuration. This
will always happen if an user space function which has
a fewer then the last user space function registers itself.
Composite's set_config() function that a pointer after the
last interface in usb_configuration::interface is NULL
unless the array is full.
This patch makes the __gfs_do_config() make sure that if the
usb_configuration::interface is not full then a pointer
after the last interface is NULL.
Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Wan ZongShun [Tue, 29 Jun 2010 22:05:39 +0000 (15:05 -0700)]
drivers/video/nuc900fb.c: fix lcd build error
Fix a nuc900 lcd build error.
Since the 'nuc900_driver_clksrc_div()' API cannot be merged into mainline
successfully, I removed this clock source selection hook in this driver.
This means nuc900 lcd driver has to select default clock source from the
external crystal now.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com> Cc: Qiang Wang <rurality.wq@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Lubomir Rintel [Tue, 29 Jun 2010 22:05:38 +0000 (15:05 -0700)]
sysvfs: fix NULL deref. when allocating new inode
A call to sysv_write_inode() in sysv_new_inode() to its new interface that
replaced wait flag with writeback structure. This was broken by a9185b41a4f84971b930c519f0c63bd450c4810d ("pass writeback_control to
->write_inode").
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Cc: Christoph Hellwig <hch@infradead.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: <stable@kernel.org> [2.6.34.x] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Joakim Tjernlund [Tue, 29 Jun 2010 22:05:34 +0000 (15:05 -0700)]
rtc: fix ds1388 time corruption
The ds1307 driver misreads the ds1388 registers when checking for 12 or 24
hour mode. Instead of checking the hour register it reads the minute
register. Therefore the driver thinks minutes >= 40 has the 12HR bit set
and resets the minute register by zeroing the high bits. This results in
minutes are reset to 0-9, jumping back in time 40 or 50 minutes. The time
jump is also written back to the RTC.
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Paul Gortmaker <p_gortmaker@yahoo.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Nicolas Ferre [Tue, 29 Jun 2010 22:05:33 +0000 (15:05 -0700)]
MAINTAINERS: some Atmel drivers change maintainer
I take over the maintenance of SPI, USART, Ethernet and USB gadget
drivers. Those drivers are found in Atmel microcontrollers, both
AT32/AVR32 and AT91/ARM.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Cc: Andrew Victor <avictor.za@gmail.com> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>