Commit Graph

89747 Commits (e8b6f970107cfc9c00cdcdb12ec6c7e135cf379f)

Author SHA1 Message Date
Jerome Glisse 7c2a9acf85 drm/ttm: non pooled page allocation should have GFP_USER set
Non pooled page allocation should have GFP_USER set so allocation
can wait and reclaim page from other process (ie non atomic).

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-07-01 11:59:25 +10:00
Roland Scheidegger 37cf6b03f9 drm/radeon/r100/r200: fix calculation of compressed cube maps
This needs similar handling to other compressed textures.
Fixes:
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>
2010-07-01 11:59:24 +10:00
Roland Scheidegger 688acaa289 drm/radeon/r200: handle more hw tex coord types
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>
2010-07-01 11:59:22 +10:00
Roland Scheidegger f9da52d54e drm/radeon/kms: CS checker texture fixes for r1xx/r2xx/r3xx
fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=28459

agd5f: apply to r1xx/r2xx as well.

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>
2010-07-01 11:59:21 +10:00
Dave Airlie 76a7142a08 drm/radeon: add fake RN50 table for powerpc
This works well enough on a js21, but it would be nice if IBM could supply
more tables for the later Power6/7 machines.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-07-01 11:59:19 +10:00
Adam Jackson b829e011f6 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>
2010-07-01 11:59:16 +10:00
Alex Deucher a5f798ce2b 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>
2010-07-01 11:59:14 +10:00
Cedric Godin 09bdf591f4 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>
2010-07-01 11:59:11 +10:00
Alex Deucher 0888e883ea drm/radeon/kms: fix bandwidth calculation when sideport is present
Fixes fdo bug 27529:
https://bugs.freedesktop.org/show_bug.cgi?id=27529

Reported-by: steckdenis@yahoo.fr
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-07-01 11:58:59 +10:00
Linus Torvalds 980019d74e Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
  Staging: rtl8192u_usb: Add LG device ID 043e:7a01
  Staging: rtl8192s_usb: Remove duplicate device ID
  Staging: rt2870: add device id for Zyxel NWD-270N
  Staging: comedi: fix read past end of array in cb_pcidda_attach()
  Staging: rtl8192su: add device ids
  Staging: rtl8192su: remove device ids
  Staging: rtl8187se: Fix compile warnings in 2.6.35-rc2
  Staging: wlags49_h2: Fix build error when CONFIG_SYSFS is not set
  Staging: wlags49_h2: add missing <linux/string.h> for strlen
  Staging: hv: fix hv_utils module to properly autoload
  staging: hv: Fix race condition on vmbus channel initialization
  Staging: comedi: drivers: adl_pci9111: Fix AI commands in TRIG_FOLLOW case
  Staging: mrst-touchscreen: fix dereferencing free memory
  Staging: batman-adv: fix function prototype
  Staging: batman-adv: return -EFAULT on copy_to_user errors
  staging: usbip: usbip_common: kill rx thread on tx thread creation error.
2010-06-30 15:45:59 -07:00
Linus Torvalds 9f2952dbcb Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* 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
  ...
2010-06-30 15:45:28 -07:00
Linus Torvalds 59e7648644 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
  serial: cpm_uart: implement the cpm_uart_early_write() function for console poll
2010-06-30 15:45:06 -07:00
Ben Hutchings e10ac15582 Staging: rtl8192u_usb: Add LG device ID 043e:7a01
Add another device ID as listed in the vendor driver version
0003.0825.2009.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:18:15 -07:00
Ben Hutchings 081a529246 Staging: rtl8192s_usb: Remove duplicate device ID
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:18:15 -07:00
Ozan Çağlayan 9674e57a4f Staging: rt2870: add device id for Zyxel NWD-270N
Add device id for Zyxel NWD-270N USB dongle.

Signed-off-by: Ozan Çağlayan <ozan@pardus.org.tr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:18:15 -07:00
Dan Carpenter 821e67a135 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>
2010-06-30 08:18:15 -07:00
Florian Schilhabel 15d93ed070 Staging: rtl8192su: add device ids
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.

Signed-off-by: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:18:15 -07:00
Florian Schilhabel 60b42de30a Staging: rtl8192su: remove device ids
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.

Signed-off-by: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:18:15 -07:00
Larry Finger f84f927e08 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>
2010-06-30 08:18:15 -07:00
Javier Martinez Canillas d268e0d281 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>
2010-06-30 08:18:15 -07:00
Jeff Mahoney 8174fc04e8 Staging: wlags49_h2: add missing <linux/string.h> for strlen
On ia64, the build fails with incompatible implicit definition of strlen.
This patch adds the <linux/string.h> include to get the real prototype.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:18:15 -07:00
Haiyang Zhang d750785f30 Staging: hv: fix hv_utils module to properly autoload
Added autoloading based on pci id and dmi strings.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:18:15 -07:00
Haiyang Zhang 8b5d6d3bd3 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.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:18:14 -07:00
Ian Abbott 6c2fd30804 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>
2010-06-30 08:18:14 -07:00
Dan Carpenter 44176d9f82 Staging: mrst-touchscreen: fix dereferencing free memory
I moved the kfree() down a couple lines after the dereference.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:18:14 -07:00
Javier Martinez Canillas eb169d1cc7 Staging: batman-adv: fix function prototype
In today linux-next I got a compile warning in staging/batman-adv.

This is due a struct bin_attribute read function prototype change and the driver was not updated.

This patch solves the issue

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:18:14 -07:00
Dan Carpenter 25477f2398 Staging: batman-adv: return -EFAULT on copy_to_user errors
copy_to_user() returns the number of bites remaining but we want to
return a negative error code here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:18:14 -07:00
Himanshu Chauhan f2102d31de staging: usbip: usbip_common: kill rx thread on tx thread creation error.
Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:18:14 -07:00
Michal Nazarewicz b894f60a23 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>
2010-06-30 08:16:07 -07:00
Michal Nazarewicz e5fd39d9b8 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>
2010-06-30 08:16:07 -07:00
Hema HK c0f1f8e38f 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>
2010-06-30 08:16:07 -07:00
Mike Frysinger f2263db74a 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>
2010-06-30 08:16:07 -07:00
Sergei Shtylyov 9297688a92 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 9957dd97ec
(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>
2010-06-30 08:16:07 -07:00
Sergei Shtylyov 7d9645fdca USB: musb_core: make disconnect and suspend interrupts work again
Commit 1c25fda4a0 (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>
2010-06-30 08:16:06 -07:00
Alan Stern 4882662626 USB: obey the sysfs power/wakeup setting
This patch (as1403) is a partial reversion of an earlier change
(commit 5f677f1d45 "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.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org> [.34]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:16:06 -07:00
Jiri Pinkava 03ab7461df USB: gadget eth: Fix calculate CRC32 in EEM
CRC should be calculated for Ethernet frame, not for whole recievede EEM data.
This bug shows rarely, because in many times len == skb->len.

Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:16:06 -07:00
Axel Lin 0d152de569 USB: qcserial: fix a memory leak in qcprobe error path
This patch adds missing kfree(data) before return -ENODEV.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:16:06 -07:00
Jiri Slaby 10ca442571 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>
2010-06-30 08:16:06 -07:00
Jiri Slaby 1c81557782 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.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Lothar Wassmann <LW@KARO-electronics.de>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Cc: Bryan Wu <cooloney@kernel.org>
Cc: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:16:06 -07:00
Daniel Sangorrin 9a49a14da4 USB: serial: ftdi: correct merge conflict with CONTEC id
This patch corrects a problem with the merge of a previous
patch to add the CONTEC identifier.

I believe the merge problem occurred with the commit:
dee5658b48

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>
2010-06-30 08:16:06 -07:00
Alan Stern 64d65872f9 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.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:16:06 -07:00
Vladimir Zapolskiy 3b49d2315c USB: s3c2410: deactivate endpoints before gadget unbinding
Gadget disconnect must be called before unbinding to avoid races.
The change fixes an oops on g_ether module unregistering.

Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:16:06 -07:00
Wolfram Sang 4c9715de52 USB: ehci-mxc: bail out on transceiver problems
The old code registered the hcd even if there were no transceivers
detected, leading to oopses like this if we try to probe a non-existant
ULPI:

[    2.730000] mxc-ehci mxc-ehci.0: unable to init transceiver
[    2.740000] timeout polling for ULPI device
[    2.740000] timeout polling for ULPI device
[    2.750000] mxc-ehci mxc-ehci.0: unable to enable vbus on transceiver
[    2.750000] mxc-ehci mxc-ehci.0: Freescale On-Chip EHCI Host Controller
[    2.760000] mxc-ehci mxc-ehci.0: new USB bus registered, assigned bus number 2
[    2.770000] Unhandled fault: external abort on non-linefetch (0x808) at 0xc4876184
[    2.770000] Internal error: : 808 [#1] PREEMPT
[    2.770000] last sysfs file:
[    2.770000] Modules linked in:
[    2.770000] CPU: 0    Not tainted  (2.6.33.5 #5)
[    2.770000] PC is at ehci_hub_control+0x4d4/0x8f8
[    2.770000] LR is at ehci_mxc_setup+0xbc/0xdc
[    2.770000] pc : [<c0196dfc>]    lr : [<c019bc8c>]    psr: 00000093
[    2.770000] sp : c3815e40  ip : 00000001  fp : 60000013
[    2.770000] r10: c4876184  r9 : 00000000  r8 : c3814000
[    2.770000] r7 : c391d2cc  r6 : 00000001  r5 : 00000001  r4 : 00000000
[    2.770000] r3 : 80000000  r2 : 00000007  r1 : 80000000  r0 : c4876184
[    2.770000] Flags: nzcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM Segment kernel
[    2.770000] Control: 0005317f  Table: a0004000  DAC: 00000017
[    2.770000] Process swapper (pid: 1, stack limit = 0xc3814270)
...

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: stable <stable@kernel.org>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:16:06 -07:00
Wolfram Sang 7b4a036722 USB: otg/ulpi: bail out on read errors
otg_read may return errnos, so bail out correctly to prevent bogus
ID-numbers.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Daniel Mack <daniel@caiaq.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:16:06 -07:00
Maulik Mankad 2bb14cbf04 usb: musb: Fix a bug by making suspend interrupt available in device mode
As a part of aligning the ISR code for MUSB with the specs, the
ISR code was re-written. 

See Commit 1c25fda4a0 (usb: musb: handle 
irqs in the order dictated by programming guide)

With this the suspend interrupt came accidently under CONFIG_USB_MUSB_HDRC_HCD.

The fix brings suspend interrupt handling outside 
CONFIG_USB_MUSB_HDRC_HCD.

Signed-off-by: Maulik Mankad <x0082077@ti.com>
Cc: David Brownell <david-b@pacbell.net>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Cc: stable <stable@kernel.org> [.34]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:16:05 -07:00
Nobuhiro Iwamatsu a5797a686f USB: r8a66597: Fix failure in change of status
In the change by 749da5f82f,
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>
2010-06-30 08:16:05 -07:00
Sarah Sharp 6cc30d85a5 USB: xHCI: Fix bug in link TRB activation change.
Commit 6c12db90f1 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.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:16:05 -07:00
Michal Nazarewicz f588c0db39 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>
2010-06-30 08:16:05 -07:00
Jon Povey b23097b793 USB: g_serial: fix tty cleanup on unload
Call put_tty_driver() in cleanup function, to fix Oops when trying to open
gadget serial char device after module unload.

Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:16:05 -07:00
Jon Povey 44a0c0190b USB: g_serial: don't set low_latency flag
No longer set low_latency flag as it causes this warning backtrace:

  WARNING: at kernel/mutex.c:207 __mutex_lock_slowpath+0x6c/0x288()

Fix associated locking and wakeups.

Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
Cc: Maulik Mankad <x0082077@ti.com>
Cc: stable <stable@kernel.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:16:05 -07:00
Dongdong Deng 8cd774ad30 serial: cpm_uart: implement the cpm_uart_early_write() function for console poll
The cpm_uart_early_write() function which was used for console poll
isn't implemented in the cpm uart driver.

Implementing this function both fixes the build when CONFIG_CONSOLE_POLL
is set and allows kgdboc to work via the cpm uart.

Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
Reviewed-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:15:17 -07:00
Wan ZongShun 032093bd44 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>
2010-06-29 15:29:32 -07:00
David Brownell 926b1e2ca3 drivers/gpio is platform-neutral
Update Kconfig and Makefile in drivers/gpio to discourage inappropriate
addition of platform-specific code.

[akpm@linux-foundation.org: fix tpyo]
Signed-by: David Brownell <dbrownell@users.sourceforge.net>

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-06-29 15:29:32 -07:00
Joakim Tjernlund 96fc3a45ea 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>
2010-06-29 15:29:31 -07:00
Martin Wilck 8d1f66dc9b ipmi: set schedule_timeout_wait() value back to one
Fix a regression introduced by ae74e823cb ("ipmi: add parameter to limit
CPU usage in kipmid").

Some systems were seeing CPU usage go up dramatically with the recent
changes to try to reduce timer usage in the IPMI driver.  This was traced
down to schedule_timeout_interruptible(1) being changed to
schedule_timeout_interruptbile(0).  Revert that part of the change.

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=16147

Reported-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Tested-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
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>
2010-06-29 15:29:31 -07:00
Matthew Garrett 56480287f9 ipmi: make sure drivers were registered before unregistering them
The ipmi code will never register a PCI or Open Firmware driver if a
hardcoded device is provided by the user by providing device addresses via
the module parameters.  This can cause us to attempt to unregister a
driver that was never registered, resulting in an oops.  Keep track of
registration in order to avoid this.

Fixes a post-2.6.34 regression.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-06-29 15:29:31 -07:00
Andres Salomon 12c46b3365 lxfb: fix incorrect __init annotation
WARNING: vmlinux.o(.data+0x196e8): Section mismatch in reference from the
variable lxfb_driver to the function .init.text:lxfb_probe() The variable
lxfb_driver references the function __init lxfb_probe()

This changes lxfb_probe and friends to use __devinit, and also adds
__devexit to lxfb_remove.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Cc: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-06-29 15:29:31 -07:00
Andres Salomon 500ebb82b5 gxfb: fix incorrect __init annotation
WARNING: vmlinux.o(.data+0x195d8): Section mismatch in reference from the
variable gxfb_driver to the function .init.text:gxfb_probe() The variable
gxfb_driver references the function __init gxfb_probe()

This changes gxfb_probe and friends to use __devinit, and also adds
__devexit to gxfb_remove.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Cc: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-06-29 15:29:31 -07:00
Linus Torvalds 984bc9601f Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  block: Don't count_vm_events for discard bio in submit_bio.
  cfq: fix recursive call in cfq_blkiocg_update_completion_stats()
  cfq-iosched: Fixed boot warning with BLK_CGROUP=y and CFQ_GROUP_IOSCHED=n
  cfq: Don't allow queue merges for queues that have no process references
  block: fix DISCARD_BARRIER requests
  cciss: set SCSI max cmd len to 16, as default is wrong
  cpqarray: fix two more wrong section type
  cpqarray: fix wrong __init type on pci probe function
  drbd: Fixed a race between disk-attach and unexpected state changes
  writeback: fix pin_sb_for_writeback
  writeback: add missing requeue_io in writeback_inodes_wb
  writeback: simplify and split bdi_start_writeback
  writeback: simplify wakeup_flusher_threads
  writeback: fix writeback_inodes_wb from writeback_inodes_sb
  writeback: enforce s_umount locking in writeback_inodes_sb
  writeback: queue work on stack in writeback_inodes_sb
  writeback: fix writeback completion notifications
2010-06-29 10:42:52 -07:00
Linus Torvalds 8b7231a9c7 Merge branch 'fixes' of ssh://master.kernel.org/~sfr/next-fixes
* 'fixes' of ssh://master.kernel.org/~sfr/next-fixes:
  acpi: update gfp/slab.h includes
  ocfs2: update gfp/slab.h includes
  davinci: update gfp/slab.h includes
  arm: update gfp/slab.h includes
  v4l-dvb: update gfp/slab.h includes
2010-06-28 12:06:00 -07:00
Linus Torvalds 9341625307 Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md:
  md/raid5: don't include 'spare' drives when reshaping to fewer devices.
  md/raid5: add a missing 'continue' in a loop.
  md/raid5: Allow recovered part of partially recovered devices to be in-sync
  md/raid5: More careful check for "has array failed".
  md: Don't update ->recovery_offset when reshaping an array to fewer devices.
  md/raid5: avoid oops when number of devices is reduced then increased.
  md: enable raid4->raid0 takeover
  md: clear layout after ->raid0 takeover
  md: fix raid10 takeover: use new_layout for setup_conf
  md: fix handling of array level takeover that re-arranges devices.
  md: raid10: Fix null pointer dereference in fix_read_error()
  Restore partition detection of newly created md arrays.
2010-06-27 22:56:32 -07:00
Tejun Heo e0fb8c4185 acpi: update gfp/slab.h includes
Implicit slab.h inclusion via percpu.h is about to go away.  Make sure
gfp.h or slab.h is included as necessary.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2010-06-28 10:19:19 +10:00
Tejun Heo f244f31a0d davinci: update gfp/slab.h includes
Implicit slab.h inclusion via percpu.h is about to go away.  Make sure
gfp.h or slab.h is included as necessary.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2010-06-28 10:19:19 +10:00
Tejun Heo 4ef09889d7 v4l-dvb: update gfp/slab.h includes
Implicit slab.h inclusion via percpu.h is about to go away.  Make sure
gfp.h or slab.h is included as necessary.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2010-06-28 10:19:18 +10:00
Linus Torvalds 31cafd9589 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (52 commits)
  phylib: Add autoload support for the LXT973 phy.
  ISDN: hysdn, fix potential NULL dereference
  vxge: fix memory leak in vxge_alloc_msix() error path
  isdn/gigaset: correct CAPI connection state storage
  isdn/gigaset: encode HLC and BC together
  isdn/gigaset: correct CAPI DATA_B3 Delivery Confirmation
  isdn/gigaset: correct CAPI voice connection encoding
  isdn/gigaset: honor CAPI application's buffer size request
  cpmac: do not leak struct net_device on phy_connect errors
  smc91c92_cs: fix the problem that lan & modem does not work simultaneously
  ipv6: fix NULL reference in proxy neighbor discovery
  Bluetooth: Bring back var 'i' increment
  xfrm: check bundle policy existance before dereferencing it
  sky2: enable rx/tx in sky2_phy_reinit()
  cnic: Disable statistics initialization for eth clients that do not support statistics
  net: add dependency on fw class module to qlcnic and netxen_nic
  snmp: fix SNMP_ADD_STATS()
  hso: remove setting of low_latency flag
  udp: Fix bogus UFO packet generation
  lasi82596: fix netdev_mc_count conversion
  ...
2010-06-27 11:28:02 -07:00
Linus Torvalds bf2937695f Merge branch 'sh/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'sh/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  clocksource: sh_cmt: Fix up bogus shift value.
  arch/sh/mm: Eliminate a double lock
  sh: Fix up IORESOURCE_PCI_FIXED usage in pcibios_fixup_device_resources().
  sh: remove duplicated #include
2010-06-27 08:18:20 -07:00
Linus Torvalds 1a5f20fe19 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  MAINTAINERS - Add an entry for the input MT protocol
  Input: wacom - fix serial number handling on Cintiq 21UX2
  Input: fixup X86_MRST selects
  Input: sysrq - fix "stuck" SysRq mode
  Input: ad7877 - fix spi word size to 16 bit
  Input: pcf8574_keypad - fix off by one in pcf8574_kp_irq_handler()
2010-06-27 08:03:00 -07:00
Linus Torvalds a7b917256d Merge branch 'virtio' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6
* 'virtio' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6:
  virtio-pci: disable msi at startup
  virtio: return ENOMEM on out of memory
2010-06-27 07:49:45 -07:00
Linus Torvalds dee70a32fa Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI/PM: Do not use native PCIe PME by default
2010-06-27 07:41:04 -07:00
Linus Torvalds d94b20497b Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (k8temp) Bypass core swapping on single-core processors
  hwmon: (i5k_amb) Fix sysfs attribute for lockdep
  hwmon: (k10temp) Do not blacklist known working CPU models
2010-06-27 07:39:38 -07:00
Linus Torvalds 064c946a0c Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  watchdog: at32ap700x_wdt: register misc device last in probe() function
  watchdog: [PATCH 3/3] imx2_wdt: fix section mismatch
2010-06-27 07:38:20 -07:00
Linus Torvalds e6d1336188 Merge git://git.infradead.org/iommu-2.6
* git://git.infradead.org/iommu-2.6:
  intel-iommu: Force-disable IOMMU for iGFX on broken Cantiga revisions.
  intel-iommu: Fix double lock in get_domain_for_dev()
  intel-iommu: Fix reference by physical address in intel_iommu_attach_device()
2010-06-27 07:37:51 -07:00
Linus Torvalds 7f607455c3 Merge branch 'for-linus' of git://gitorious.org/linux-omap-dss2/linux
* 'for-linus' of git://gitorious.org/linux-omap-dss2/linux:
  OMAP: OMAPFB: fix rfbi.c compile error
  OMAPFB: LCDC: change update_mode to DISABLED when going suspend
2010-06-27 07:36:16 -07:00
Linus Torvalds ddc39f90a9 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha-2.6:
  alpha: Fix de2104x driver failing to readout MAC address correctly
  alpha: Detect Super IO chip, no IDE on Avanti, enable EPP19
  alpha: fix pci_mmap_resource API breakage
  alpha: fix __arch_hweight32 typo
2010-06-27 07:29:19 -07:00
Linus Torvalds b5edfefc65 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  TPM: ReadPubEK output struct fix
2010-06-27 07:13:13 -07:00
David Woodhouse e2f5b04563 phylib: Add autoload support for the LXT973 phy.
Commit e13647c1 (phylib: Add support for the LXT973 phy.) added a new ID
but neglected to also add it to the MODULE_DEVICE_TABLE.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-26 22:12:03 -07:00
Jiri Slaby d41de3c100 ISDN: hysdn, fix potential NULL dereference
Stanse found that lp is dereferenced earlier than checked for being
NULL in hysdn_rx_netpkt. Move the initialization below the test.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Patrick McHardy <kaber@trash.net>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-26 22:12:02 -07:00
Michal Schmidt cc413d9097 vxge: fix memory leak in vxge_alloc_msix() error path
When pci_enable_msix() returned ret<0, entries and vxge_entries were leaked.
While at it, use the centralized exit idiom in the function.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Ram Vepa <ram.vepa@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-26 22:10:04 -07:00
Tilman Schmidt 1b4843c5e8 isdn/gigaset: correct CAPI connection state storage
CAPI applications can handle several connections in parallel,
so one connection state per application isn't sufficient.
Store the connection state in the channel structure instead.

Impact: bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-25 21:17:01 -07:00
Tilman Schmidt 1ce368ff28 isdn/gigaset: encode HLC and BC together
Adapt to buggy device firmware which accepts setting HLC only in the
same command line as BC, by encoding HLC and BC in a single command
if both are specified, and rejecting HLC without BC.

Impact: bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-25 21:17:00 -07:00
Tilman Schmidt 23b36778b4 isdn/gigaset: correct CAPI DATA_B3 Delivery Confirmation
The Gigaset CAPI driver handled all DATA_B3_REQ messages as if the
Delivery Confirmation flag bit was set, delaying the emission of the
DATA_B3_CONF reply until the data was actually transmitted. Some
CAPI applications (notably Asterisk) aren't happy with that
behaviour. Change it to actually evaluate the Delivery Confirmation
flag as described the CAPI specification.

Impact: bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-25 21:17:00 -07:00
Tilman Schmidt 278a582989 isdn/gigaset: correct CAPI voice connection encoding
Make the Gigaset CAPI driver select L2_VOICE (AT^SBPR=2) as the
layer 2 encoding for transparent connections, like the ISDN4Linux
variant.  L2_BITSYNC (AT^SBPR=0) mutes internal connections and
distorts external ones.

Impact: bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-25 21:16:59 -07:00
Tilman Schmidt e7752ee280 isdn/gigaset: honor CAPI application's buffer size request
Fix the Gigaset CAPI driver to limit the length of a connection's
payload data receive buffers to the corresponding CAPI application's
data buffer size, as some real-life CAPI applications tend to be
rather unhappy if they receive bigger data blocks than requested.

Impact: bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-25 21:16:59 -07:00
Florian Fainelli ed770f0136 cpmac: do not leak struct net_device on phy_connect errors
If the call to phy_connect fails, we will return directly instead of freeing
the previously allocated struct net_device.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
CC: stable@kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-25 21:16:58 -07:00
Ken Kawasaki 9735b7ef00 smc91c92_cs: fix the problem that lan & modem does not work simultaneously
smc91c92_cs:
  Fix the problem that lan & modem does not work simultaneously
  in the Megahertz multi-function card.
  We need to write MEGAHERTZ_ISR to retrigger interrupt.

Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-25 21:16:58 -07:00
NeilBrown 3424bf6a77 md/raid5: don't include 'spare' drives when reshaping to fewer devices.
There are few situations where it would make any sense to add a spare
when reducing the number of devices in an array, but it is
conceivable:  A 6 drive RAID6 with two missing devices could be
reshaped to a 5 drive RAID6, and a spare could become available
just in time for the reshape, but not early enough to have been
recovered first.  'freezing' recovery can make this easy to
do without any races.

However doing such a thing is a bad idea.  md will not record the
partially-recovered state of the 'spare' and when the reshape
finished it will think that the spare is still spare.
Easiest way to avoid this confusion is to simply disallow it.

Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24 13:36:04 +10:00
NeilBrown 2f11588249 md/raid5: add a missing 'continue' in a loop.
As the comment says, the tail of this loop only applies to devices
that are not fully in sync, so if In_sync was set, we should avoid
the rest of the loop.

This bug will hardly ever cause an actual problem.  The worst it
can do is allow an array to be assembled that is dirty and degraded,
which is not generally a good idea (without warning the sysadmin
first).

This will only happen if the array is RAID4 or a RAID5/6 in an
intermediate state during a reshape and so has one drive that is
all 'parity' - no data - while some other device has failed.

This is certainly possible, but not at all common.

Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24 13:35:49 +10:00
NeilBrown 415e72d034 md/raid5: Allow recovered part of partially recovered devices to be in-sync
During a recovery of reshape the early part of some devices might be
in-sync while the later parts are not.
We we know we are looking at an early part it is good to treat that
part as in-sync for stripe calculations.

This is particularly important for a reshape which suffers device
failure.  Treating the data as in-sync can mean the difference between
data-safety and data-loss.

Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24 13:35:39 +10:00
NeilBrown 674806d62f md/raid5: More careful check for "has array failed".
When we are reshaping an array, the device failure combinations
that cause us to decide that the array as failed are more subtle.

In particular, any 'spare' will be fully in-sync in the section
of the array that has already been reshaped, thus failures that
affect only that section are less critical.

So encode this subtlety in a new function and call it as appropriate.

The case that showed this problem was a 4 drive RAID5 to 8 drive RAID6
conversion where the last two devices failed.
This resulted in:

  good good good good incomplete good good failed failed

while converting a 5-drive RAID6 to 8 drive RAID5
The incomplete device causes the whole array to look bad,
bad as it was actually good for the section that had been
converted to 8-drives, all the data was actually safe.

Reported-by: Terry Morris <tbmorris@tbmorris.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24 13:35:27 +10:00
NeilBrown 70fffd0bfa md: Don't update ->recovery_offset when reshaping an array to fewer devices.
When an array is reshaped to have fewer devices, the reshape proceeds
from the end of the devices to the beginning.

If a device happens to be non-In_sync (which is possible but rare)
we would normally update the ->recovery_offset as the reshape
progresses. However that would be wrong as the recover_offset records
that the early part of the device is in_sync, while in fact it would
only be the later part that is in_sync, and in any case the offset
number would be measured from the wrong end of the device.

Relatedly, if after a reshape a spare is discovered to not be
recoverred all the way to the end, not allow spare_active
to incorporate it in the array.

This becomes relevant in the following sample scenario:

A 4 drive RAID5 is converted to a 6 drive RAID6 in a combined
operation.
The RAID5->RAID6 conversion will cause a 5 drive to be included as a
spare, then the 5drive -> 6drive reshape will effectively rebuild that
spare as it progresses.  The 6th drive is treated as in_sync the whole
time as there is never any case that we might consider reading from
it, but must not because there is no valid data.

If we interrupt this reshape part-way through and reverse it to return
to a 5-drive RAID6 (or event a 4-drive RAID5), we don't want to update
the recovery_offset - as that would be wrong - and we don't want to
include that spare as active in the 5-drive RAID6 when the reversed
reshape completed and it will be mostly out-of-sync still.

Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24 13:35:18 +10:00
NeilBrown e4e11e385d md/raid5: avoid oops when number of devices is reduced then increased.
The entries in the stripe_cache maintained by raid5 are enlarged
when we increased the number of devices in the array, but not
shrunk when we reduce the number of devices.
So if entries are added after reducing the number of devices, we
much ensure to initialise the whole entry, not just the part that
is currently relevant.  Otherwise if we enlarge the array again,
we will reference uninitialised values.

As grow_buffers/shrink_buffer now want to use a count that is stored
explicity in the raid_conf, they should get it from there rather than
being passed it as a parameter.

Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24 13:35:02 +10:00
Maciej Trela 049d6c1ef9 md: enable raid4->raid0 takeover
Only level 5 with layout=PARITY_N can be taken over to raid0 now.
Lets allow level 4 either.

Signed-off-by: Maciej Trela <maciej.trela@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24 13:34:57 +10:00
Maciej Trela 001048a318 md: clear layout after ->raid0 takeover
After takeover from raid5/10 -> raid0 mddev->layout is not cleared.

Signed-off-by: Maciej Trela <maciej.trela@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24 13:34:45 +10:00
Maciej Trela f73ea87375 md: fix raid10 takeover: use new_layout for setup_conf
Use mddev->new_layout in setup_conf.
Also use new_chunk, and don't set ->degraded in takeover().  That
gets set in run()

Signed-off-by: Maciej Trela <maciej.trela@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24 13:33:51 +10:00
NeilBrown e93f68a1fc md: fix handling of array level takeover that re-arranges devices.
Most array level changes leave the list of devices largely unchanged,
possibly causing one at the end to become redundant.
However conversions between RAID0 and RAID10 need to renumber
all devices (except 0).

This renumbering is currently being done in the ->run method when the
new personality takes over.  However this is too late as the common
code in md.c might already have invalidated some of the devices if
they had a ->raid_disk number that appeared to high.

Moving it into the ->takeover method is too early as the array is
still active at that time and wrong ->raid_disk numbers could cause
confusion.

So add a ->new_raid_disk field to mdk_rdev_s and use it to communicate
the new raid_disk number.
Now the common code knows exactly which devices need to be renumbered,
and which can be invalidated, and can do it all at a convenient time
when the array is suspend.
It can also update some symlinks in sysfs which previously were not be
updated correctly.

Reported-by: Maciej Trela <maciej.trela@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24 13:33:24 +10:00
Prasanna S. Panchamukhi 0544a21db0 md: raid10: Fix null pointer dereference in fix_read_error()
Such NULL pointer dereference can occur when the driver was fixing the
read errors/bad blocks and the disk was physically removed
causing a system crash. This patch check if the
rcu_dereference() returns valid rdev before accessing it in fix_read_error().

Cc: stable@kernel.org
Signed-off-by: Prasanna S. Panchamukhi <prasanna.panchamukhi@riverbed.com>
Signed-off-by: Rob Becker <rbecker@riverbed.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24 13:31:03 +10:00
NeilBrown f3b99be19d Restore partition detection of newly created md arrays.
Commit  b821eaa572 broke partition
detection for md arrays.

The logic was almost right.  However if revalidate_disk is called
when the device is not yet open, bdev->bd_disk won't be set, so the
flush_disk() Call will not set bd_invalidated.

So when md_open is called we still need to ensure that
->bd_invalidated gets set.  This is easily done with a call to
check_disk_size_change in the place where the offending commit removed
check_disk_change.  At the important times, the size will have changed
from 0 to non-zero, so check_disk_size_change will set bd_invalidated.

Tested-by: Duncan <1i5t5.duncan@cox.net>
Reported-by: Duncan <1i5t5.duncan@cox.net>
Signed-off-by: NeilBrown <neilb@suse.de>
2010-06-24 13:31:03 +10:00
Brandon Philips 38000a94a9 sky2: enable rx/tx in sky2_phy_reinit()
sky2_phy_reinit is called by the ethtool helpers sky2_set_settings,
sky2_nway_reset and sky2_set_pauseparam when netif_running.

However, at the end of sky2_phy_init GM_GP_CTRL has GM_GPCR_RX_ENA and
GM_GPCR_TX_ENA cleared. So, doing these commands causes the device to
stop working:

$ ethtool -r eth0
$ ethtool -A eth0 autoneg off

Fix this issue by enabling Rx/Tx after running sky2_phy_init in
sky2_phy_reinit.

Signed-off-by: Brandon Philips <bphilips@suse.de>
Tested-by: Brandon Philips <bphilips@suse.de>
Cc: stable@kernel.org
Tested-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-23 14:37:04 -07:00
Dmitry Kravkov 6b2a541db5 cnic: Disable statistics initialization for eth clients that do not support statistics
Disable statistics initialization for eth clients that do not support
 statistics. This prevents memory corruption on bnx2x hw.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
2010-06-23 11:57:09 -07:00
Anirban Chakraborty 06aeb78b85 net: add dependency on fw class module to qlcnic and netxen_nic
netxen_nic and qlcnic driver depends on firmware_class module.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-23 11:49:42 -07:00