Len Brown [Thu, 24 Dec 2009 06:19:00 +0000 (01:19 -0500)]
Merge branch 'misc-2.6.33' into release
Len Brown [Thu, 24 Dec 2009 06:17:46 +0000 (01:17 -0500)]
Merge branch 'tc1100-wmi' into release
Len Brown [Thu, 24 Dec 2009 06:17:41 +0000 (01:17 -0500)]
Merge branch 'sony' into release
Len Brown [Thu, 24 Dec 2009 06:17:31 +0000 (01:17 -0500)]
Merge branch 'classmate' into release
Len Brown [Thu, 24 Dec 2009 06:17:21 +0000 (01:17 -0500)]
Merge branch 'pdc' into release
Len Brown [Thu, 24 Dec 2009 06:17:01 +0000 (01:17 -0500)]
Merge branches 'bugzilla-14446', 'bugzilla-14753' and 'bugzilla-14824' into release
Len Brown [Thu, 24 Dec 2009 06:16:35 +0000 (01:16 -0500)]
Merge branch 'osc' into release
Thadeu Lima de Souza Cascardo [Tue, 22 Dec 2009 00:20:01 +0000 (16:20 -0800)]
classmate-laptop: add support for Classmate PC ACPI devices
This add supports for devices like keyboard, backlight, tablet and
accelerometer.
This work is supported by International Syst S/A.
[randy.dunlap@oracle.com: cmpc_acpi: depends on ACPI]
[akpm@linux-foundation.org: readability tweaks]
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Thomas Renninger [Fri, 18 Dec 2009 14:29:23 +0000 (15:29 +0100)]
hp-wmi: Fix two memleaks
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Thomas Renninger [Fri, 18 Dec 2009 14:29:22 +0000 (15:29 +0100)]
acer-wmi, msi-wmi: Remove needless DMI MODULE_ALIAS
Now that we have WMI autoloading
the DMI matching is not needed anymore.
Signed-off-by: Thomas Renninger <trenn@suse.de>
Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Acked-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Len Brown <len.brown@intel.com>
Dmitry Torokhov [Fri, 18 Dec 2009 06:19:42 +0000 (22:19 -0800)]
dell-wmi: do not keep driver loaded on unsupported boxes
There is no point in having the driver loaded in memory if we fail
to locate particular WMI GUID.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Acked-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Anisse Astier [Fri, 4 Dec 2009 09:10:09 +0000 (10:10 +0100)]
wmi: Free the allocated acpi objects through wmi_get_event_data
These function allocate an acpi object by calling wmi_get_event_data, which
then calls acpi_evaluate_object, and it is not freed afterwards.
And kernel doc is fixed for parameters of wmi_get_event_data.
Signed-off-by: Anisse Astier <anisse@astier.eu>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
Peter Feuerer [Tue, 22 Dec 2009 00:20:06 +0000 (16:20 -0800)]
drivers/platform/x86/acerhdf.c: check BIOS information whether it begins with string of table
BIOS information is now checked whether it begins with the strings stored
in the BIOS table. Previous method did a strcmp, what lead to problems if
BIOS information has appended whitespaces.
Signed-off-by: Peter Feuerer <peter@piie.net>
Cc: Borislav Petkov <petkovbb@gmail.com>
Cc: Andreas Mohr <andi@lisas.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Peter Feuerer [Tue, 22 Dec 2009 00:20:05 +0000 (16:20 -0800)]
acerhdf: add new BIOS versions
Add new BIOS versions for following netbooks: Aspire 1810xx, Packard Bell
DOTMU.
Signed-off-by: Peter Feuerer <peter@piie.net>
Cc: Borislav Petkov <petkovbb@gmail.com>
Cc: Andreas Mohr <andi@lisas.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Stefan Bader [Tue, 22 Dec 2009 00:20:04 +0000 (16:20 -0800)]
acerhdf: limit modalias matching to supported
BugLink: https://bugs.launchpad.net/ubuntu/+bug/435958
The module alias currently matches any Acer computer but when loaded the
BIOS checks will only succeed on Aspire One models. This causes a invalid
BIOS warning for all other models (seen on Aspire 4810T). This is not
fatal but worries users that see this message. Limiting the moule alias
to models starting with AOA or DOA for Packard Bell.
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Borislav Petkov <petkovbb@gmail.com>
Acked-by: Peter Feuerer <peter@piie.net>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Alexey Dobriyan [Tue, 22 Dec 2009 00:20:02 +0000 (16:20 -0800)]
toshiba_acpi: convert to seq_file
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Alexey Dobriyan [Tue, 22 Dec 2009 00:20:01 +0000 (16:20 -0800)]
asus_acpi: convert to seq_file
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Karol Kozimor <sziwan@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Carlos R. Mafra [Tue, 22 Dec 2009 21:45:39 +0000 (13:45 -0800)]
ACPI: do not select ACPI_DOCK from ATA_ACPI
In March 2008 commit
0ac4a3c2fbbcadc3e96e4dc47d4ae802d66e6f67 ("ACPI: fix
ATA_ACPI build") made CONFIG_ACPI_DOCK be selected by CONFIG_ATA_ACPI because
of a build error when CONFIG_ATA_ACPI=y and CONFIG_ACPI_DOCK=m.
However, in September 2008 commit
898b054f3eec5921320ae8614b5bdd7b07ea5b43
("dock: make dock driver not a module") removed the possibility of having
CONFIG_ACPI_DOCK=m and therefore there is no need for selecting it when
CONFIG_ATA_ACPI=y.
This makes the kernel ~5 Kb smaller for people who don't have a dock by
allowing them to not have ACPI_DOCK compiled-in because of ATA_ACPI=y.
Signed-off-by: Carlos R. Mafra <crmafra@aei.mpg.de>
Cc: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Mattia Dongili [Wed, 16 Dec 2009 15:08:36 +0000 (00:08 +0900)]
sony-laptop: enumerate rfkill devices using SN06
SN06 makes sure we get back a longer buffer which seems to be necessary
going forward as the SNC devices describes more and more devices (or
features more precisely). Moreover SN06 should be called with only the
descriptor offset to make sure we hit the rfkill controlling function
(F124 or F135) with a 0 argument to get a full list of features.
Signed-off-by: Mattia Dongili <malattia@linux.it>
Tested-by: Miguel Rodríguez Pérez <miguelrp@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Mattia Dongili [Wed, 16 Dec 2009 15:08:35 +0000 (00:08 +0900)]
sony-laptop: rfkill support for newer models
Vaio Type X and possibly other new models use F135 as the radio
frequency controlling function attached to the SNC device. In the
indexed table this corresponds to 0x0135 (surpise!).
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
Linus Torvalds [Wed, 23 Dec 2009 23:04:53 +0000 (15:04 -0800)]
Revert "x86, ucode-amd: Ensure ucode update on suspend/resume after CPU off/online cycle"
This reverts commit
9f15226e75583547aaf542c6be4bdac1060dd425. It's just
wrong, and broke resume for Rafael even on a non-AMD CPU.
As Rafael says:
"... it causes microcode_init_cpu() to be called during resume even for
CPUs for which there's no microcode to apply. That, in turn, results
in executing request_firmware() (on Intel CPUs at least) which doesn't
work at this stage of resume (we have device interrupts disabled, I/O
devices are still suspended and so on).
If I'm not mistaken, the "if (uci->valid)" logic means "if that CPU is
known to us" , so before commit
9f15226e755 microcode_resume_cpu() was
called for all CPUs already in the system during suspend, which was
the right thing to do. The commit changed it so that the CPUs without
microcode to apply are now treated as "unknown", which is not quite
right.
The problem this commit attempted to solve has to be handled
differently."
Bisected-and -requested-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Shaohua Li [Wed, 23 Dec 2009 09:04:11 +0000 (17:04 +0800)]
ACPI: fix OSC regression that caused aer and pciehp not to load
Executing _OSC returns a buffer, which has an acpi object in it.
Don't directly returns the buffer, instead, we return the acpi object's
buffer. This fixes a regression since caller of acpi_run_osc expects
an acpi object's buffer returned.
Tested-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Linus Torvalds [Wed, 23 Dec 2009 21:35:19 +0000 (13:35 -0800)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (30 commits)
USB: Fix a bug on appledisplay.c regarding signedness
USB: option: support hi speed for modem Haier CE100
USB: audio gadget: free alsa devices when unloading
USB: audio gadget: fix wTotalLength calculation
usb: otg: isp1301_omap: fix compile error
USB: musb: workaround Blackfin FIFO anomalies
USB: musb: Fix array index out of bounds issue
USB: musb: Fix null pointer dereference issue
USB: musb: correct DMA address for tx
USB: musb: gadget_ep0: avoid SetupEnd interrupt
USB: musb: fix for crash in DM646x USB when (CPPI)DMA is enabled
USB: musb: do not work if no gadget driver is loaded
USB: musb: gadget: set otg tranceiver to idle when registering gadget
USB: musb: Populate the VBUS GPIO with the correct GPIO number
USB: musb: MAINTAINERS: Fix my tree's address
USB: musb: fix compiling warning with min() macro
USB: musb: move musb_remove to __exit
USB: musb_gadget: fix kernel oops in txstate()
USB: ftdi_sio: sort PID/VID entries in new ftdi_sio_ids.h header
USB: ftdi_sio: isolate all device IDs to new ftdi_sio_ids.h header
...
Linus Torvalds [Wed, 23 Dec 2009 21:35:03 +0000 (13:35 -0800)]
Merge git://git./linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
devtmpfs: unlock mutex in case of string allocation error
Driver core: export platform_device_register_data as a GPL symbol
driver core: Prevent reference to freed memory on error path
Driver-core: Fix bogus 0 error return in device_add()
Driver core: driver_attribute parameters can often be const*
Driver core: bin_attribute parameters can often be const*
Driver core: device_attribute parameters can often be const*
Doc/stable rules: add new cherry-pick logic
vfs: get_sb_single() - do not pass options twice
devtmpfs: Convert dirlock to a mutex
Linus Torvalds [Wed, 23 Dec 2009 21:34:26 +0000 (13:34 -0800)]
Merge git://git./linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
Staging/vt66*: kconfig, depends on WLAN
Staging: batman-adv: introduce missing kfree
Staging: batman-adv: Add Kconfig dependancies on PROC_FS and PACKET.
Staging: panel: Adjust range for PANEL_KEYPAD in Kconfig
Staging: panel: Fix compilation error with custom lcd charset
Staging: ramzswap: remove ARM specific d-cache hack
Staging: rtl8192x: fix printk formats
Staging: wlan-ng: fix Correct size given to memset
staging: rtl8192su: add USB VID/PID for HWNUm-300
staging: fix rtl8192su compilation errors with mac80211
staging: fix rtl8192e compilation errors with mac80211
Staging: fix rtl8187se compilation errors with mac80211
Staging: rtl8192su: fix test for negative error in rtl8192_rx_isr()
Staging: comedi: jr3_pci: Don't ioremap too much space. Check result.
Staging: comedi: removed "depricated" from COMEDI_CB_BLOCK
Staging: comedi: usbdux.c: fix locking up of the driver when the comedi ringbuffer runs empty
Staging: dst: remove from the tree
Staging: sm7xx: add a new framebuffer driver
Staging: batman: fix debug Kconfig option
Linus Torvalds [Wed, 23 Dec 2009 21:33:07 +0000 (13:33 -0800)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jlbec/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2:
ocfs2: Set i_nlink properly during reflink.
ocfs2: Add reflinked file's inode to inode hash eariler.
ocfs2: refcounttree.c cleanup.
ocfs2: Find proper end cpos for a leaf refcount block.
pancho horrillo [Wed, 23 Dec 2009 10:09:13 +0000 (11:09 +0100)]
USB: Fix a bug on appledisplay.c regarding signedness
brightness status is reported by the Apple Cinema Displays as an
'unsigned char' (u8) value, but the code used 'char' instead.
Note that he driver was developed on the PowerPC architecture,
where the two types are synonymous, which is not always the case.
Fixed that. Otherwise the driver will interpret brightness
levels > 127 as negative, and fail to load.
Signed-off-by: pancho horrillo <pancho@pancho.name>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Donny Kurnia [Wed, 23 Dec 2009 12:03:12 +0000 (19:03 +0700)]
USB: option: support hi speed for modem Haier CE100
I made this patch for usbserial driver to add the support for EVDO modem
Haier CE100. The bugs report for this is here:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/490068
This patch based on these post:
http://blankblondtank.wordpress.com/2009/09/04/mengoptimalkan-koneksi-modem-haier-ce-100-cdma-di-linux/
http://tantos.web.id/blogs/how-to-internet-connection-using-cdma-evdo-modem-and-karmic-koala-ubuntu-9-10
I hope this patch can help other that have the Haier C100 modem, mostly in my country, Indonesia.
Signed-off-by: Donny Kurnia <donnykurnia@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Cliff Cai [Thu, 10 Dec 2009 03:28:39 +0000 (22:28 -0500)]
USB: audio gadget: free alsa devices when unloading
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Cliff Cai [Thu, 10 Dec 2009 03:21:12 +0000 (22:21 -0500)]
USB: audio gadget: fix wTotalLength calculation
The wTotalLength should contain the sum of the interface and unit
descriptor sizes per the Audio Device Class specification 1.0.
Reported-by: Sergey Lapin <slapin@ossfans.org>
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Felipe Balbi [Tue, 15 Dec 2009 21:19:52 +0000 (23:19 +0200)]
usb: otg: isp1301_omap: fix compile error
commit
91c8a5a9985d5bf9c55f6f82f183f57b050b2a3a broke
compilation of this driver after it introduced
otg_init() as a static inline in <linux/usb/otg.h>
Reported-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Bryan Wu [Mon, 21 Dec 2009 14:49:52 +0000 (09:49 -0500)]
USB: musb: workaround Blackfin FIFO anomalies
Some of these workarounds are already in place, but labeled as affecting
all BF52x parts. Since we have official anomaly numbers now, use those
defines. And since writing to the FIFO has a similar hang issue as reading
from the FIFO, implement the workaround there too when necessary.
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Maulik Mankad [Tue, 22 Dec 2009 10:49:53 +0000 (16:19 +0530)]
USB: musb: Fix array index out of bounds issue
This patch fixes the below array index out of bounds issue.
Buffer overflow, array index of 'aInfo' may be out of
bounds. Array 'aInfo' of size 78 may use index value(s) 6..84
The data stored in 'aInfo' array exceeds the array size of 78.
This patch increases the size of this array to hold the string
correctly without any memory corruption.
This issue was reported by Klockwork tool.
Signed-off-by: Maulik Mankad <x0082077@ti.com>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Maulik Mankad [Tue, 22 Dec 2009 10:48:19 +0000 (16:18 +0530)]
USB: musb: Fix null pointer dereference issue
This patch fixes the following NULL pointer dereference issue.
Pointer 'request' returned from call to function 'next_request'
at line 748 may be NULL and may be dereferenced at line 792.
============
Code Snippet
============
748: request = next_request(musb_ep);
785: if (dma && (csr & MUSB_RXCSR_DMAENAB)) {
csr &= ~(MUSB_RXCSR_AUTOCLEAR
| MUSB_RXCSR_DMAENAB
| MUSB_RXCSR_DMAMODE);
musb_writew(epio, MUSB_RXCSR,
MUSB_RXCSR_P_WZC_BITS | csr);
792: request->actual += musb_ep->dma->actual_len;
Signed-off-by: Maulik Mankad <x0082077@ti.com>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Cliff Cai [Tue, 22 Dec 2009 02:18:02 +0000 (21:18 -0500)]
USB: musb: correct DMA address for tx
Since a DMA transfer may need to be kicked off several times to complete,
the DMA start must include the length that has already been transferred.
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sergei Shtylyov [Tue, 15 Dec 2009 11:30:01 +0000 (13:30 +0200)]
USB: musb: gadget_ep0: avoid SetupEnd interrupt
Gadget stalling a zero-length SETUP request results in this error message:
SetupEnd came in a wrong ep0stage idle
In order to avoid it, always set the CSR0.DataEnd bit after detecting a zero-
length request. Add the missing '\n' to the error message itself as well...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Anand Gadiyar <gadiyar@ti.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Swaminathan S [Tue, 15 Dec 2009 11:30:00 +0000 (13:30 +0200)]
USB: musb: fix for crash in DM646x USB when (CPPI)DMA is enabled
Race condition exists between the cppi_interrupt handler and
davinci_interrupt handler w.r.t completing a TX IO. Since DM646x
has seperate DMA and USB endpoint interrupts cppi_interrupt handler
needs to hold the lock while operating on the endpoint.
Update over previous patch to avoid taking the lock if already
taken. Tested on DM644x, DM355 and DM646x platforms.
Signed-off-by: Swaminathan S <swami.iyer@ti.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Felipe Balbi [Tue, 15 Dec 2009 11:47:30 +0000 (13:47 +0200)]
USB: musb: do not work if no gadget driver is loaded
On OTG and gadget-only configurations, we need a gadget driver
in order to work properly, so avoid changing operation modes
when there's no gadget driver loaded.
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arnaud Mandy [Tue, 15 Dec 2009 11:29:58 +0000 (13:29 +0200)]
USB: musb: gadget: set otg tranceiver to idle when registering gadget
When registering gadget driver, the state of the transceiver
must be set from undefined (no gadget) to b_idle.
Module unload sets the transceiver state to undefined state.
After the first load/unload pair, the reset irq will be lost.
Signed-off-by: Arnaud Mandy <ext-arnaud.2.mandy@nokia.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Swaminathan S [Tue, 15 Dec 2009 11:29:57 +0000 (13:29 +0200)]
USB: musb: Populate the VBUS GPIO with the correct GPIO number
This fixes a null-pointer dereference bug.
Signed-off-by: Swaminathan S <swami.iyer@ti.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Felipe Balbi [Tue, 15 Dec 2009 09:08:45 +0000 (11:08 +0200)]
USB: musb: MAINTAINERS: Fix my tree's address
The tree is now on a new address.
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Cliff Cai [Tue, 15 Dec 2009 09:08:44 +0000 (11:08 +0200)]
USB: musb: fix compiling warning with min() macro
Current musb gadget dma code produces the warning:
drivers/usb/musb/musb_gadget.c: In function 'txstate':
drivers/usb/musb/musb_gadget.c:312: warning: comparison of distinct
pointer types lacks a cast
So switch to min_t(size_t, ...).
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Felipe Balbi [Tue, 15 Dec 2009 09:08:41 +0000 (11:08 +0200)]
USB: musb: move musb_remove to __exit
probe() already was on __init, so moving remove() to __exit.
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sergei Shtylyov [Wed, 16 Dec 2009 17:38:31 +0000 (20:38 +0300)]
USB: musb_gadget: fix kernel oops in txstate()
Commit
7723de7e19b744144975a09c81777ec0f14ac5b3 (USB: musb_gadget: remove
pointless loop) included uncalled for (and incorrect) optimization that
might cause a kernel oops in txstate() -- undo it.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Andreas Mohr [Thu, 17 Dec 2009 10:56:09 +0000 (11:56 +0100)]
USB: ftdi_sio: sort PID/VID entries in new ftdi_sio_ids.h header
This is a (almost) sort-only patch to sort FTDI device
product ID definitions in new ftdi_sio_ids.h header.
Advantage is that new device ID submissions will now have a specific (sorted)
position - less future merge conflicts.
Compile-tested, based on _current_ mainline git.
Minor checkpatch.pl warnings were eliminated whereever it made sense,
very minor text changes.
Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Andreas Mohr [Wed, 16 Dec 2009 20:45:10 +0000 (21:45 +0100)]
USB: ftdi_sio: isolate all device IDs to new ftdi_sio_ids.h header
This is a strictly move-only patch to relocate all FTDI device
product ID definitions to their own ftdi_sio_ids.h header
(following the usual *_ids.h kernel tree convention, too),
thus correcting the slightly too messy appearance
(crucial driver defines were stuck somewhere in the decaying middle swamp
of the huge existing header).
Compile-tested, based on latest mainline git.
Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Randy Dunlap [Sun, 13 Dec 2009 18:17:16 +0000 (10:17 -0800)]
USB core: fix recent kernel-doc warnings
Fix new kernel-doc warnings in usb core:
Warning(drivers/usb/core/usb.c:79): No description found for parameter 'config'
Warning(drivers/usb/core/usb.c:79): No description found for parameter 'iface_num'
Warning(drivers/usb/core/usb.c:79): No description found for parameter 'alt_num'
Warning(drivers/usb/core/hcd.c:1622): No description found for parameter 'udev'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
pancho horrillo [Wed, 2 Dec 2009 19:19:42 +0000 (20:19 +0100)]
USB: add device ID for Apple Cinema Display 23in 2007
Hi!
$ lsusb -v
Bus 001 Device 008: ID 05ac:921c Apple, Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x05ac Apple, Inc.
idProduct 0x921c
bcdDevice 1.15
iManufacturer 1
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 2mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.11
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 92
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 16
Signed-off-by: pancho horrillo <pancho@pancho.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jan Beulich [Fri, 20 Nov 2009 13:50:53 +0000 (13:50 +0000)]
USB: fix section mismatch in early ehci dbgp
Commit
917778267fbe67703ab7d5c6f0b7a05d4c3df485 removed __init from
ehci_wait_for_port(), but left it in place on ehci_reset_port(), which
is being called from the former function.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Clemens Ladisch [Mon, 21 Dec 2009 23:36:44 +0000 (15:36 -0800)]
USB: emi62: fix crash when trying to load EMI 6|2 firmware
While converting emi62 to use request_firmware(), the driver was also
changed to use the ihex helper functions. However, this broke the loading
of the FPGA firmware because the code tries to access the addr field of
the EOF record which works with a plain array that has an empty last
record but not with the ihex helper functions where the end of the data is
signaled with a NULL record pointer, resulting in:
BUG: unable to handle kernel NULL pointer dereference at (null)
IP: [<
f80d248c>] emi62_load_firmware+0x33c/0x740 [emi62]
This can be fixed by changing the loop condition to test the return value
of ihex_next_binrec() directly (like in emi26.c).
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-and-tested-by: Der Mickster <retroeffective@gmail.com>
Acked-by: David Woodhouse <David.Woodhouse@intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Blaise Gassend [Fri, 18 Dec 2009 23:23:38 +0000 (15:23 -0800)]
USB: serial: Extra device/vendor ID for mos7840 driver
Signed-off-by: Blaise Gassend <blaise.gasend_linux@m4x.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Bill Gatliff [Fri, 18 Dec 2009 15:57:22 +0000 (09:57 -0600)]
USB: Fix double-linking of drivers/usb/otg when ULPI is selected
This patch corrects a problem where drivers/usb/otg is linked twice
if CONFIG_USB_ULPI is selected, resulting in a build error (symbol
conflict). The files in that directory are properly linked already
as part of CONFIG_USB, and need not be indicated specifically for
CONFIG_USB_ULPI.
Signed-off-by: Bill Gatliff <bgat@billgatliff.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julia Lawall [Wed, 9 Dec 2009 13:23:32 +0000 (14:23 +0100)]
USB: gadget: Use ERR_PTR/IS_ERR
Use ERR_PTR and IS_ERR rather than mixing integers and pointers.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression *E;
@@
* E < 0
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Tue, 8 Dec 2009 20:54:44 +0000 (15:54 -0500)]
USB: fix bugs in usb_(de)authorize_device
This patch (as1315) fixes some bugs in the USB core authorization
code:
usb_deauthorize_device() should deallocate the device strings
instead of leaking them, and it should invoke
usb_destroy_configuration() (which does proper reference
counting) instead of freeing the config information directly.
usb_authorize_device() shouldn't change the device strings
until it knows that the authorization will succeed, and it should
autosuspend the device at the end (having autoresumed the
device at the start).
Because the device strings can be changed, the sysfs routines
to display the strings must protect the string pointers by
locking the device.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Acked-by: David Vrabel <david.vrabel@csr.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Tue, 8 Dec 2009 20:50:41 +0000 (15:50 -0500)]
USB: rename usb_configure_device
This patch (as1314) renames usb_configure_device() and
usb_configure_device_otg() in the hub driver. Neither name is
appropriate because these routines enumerate devices, they don't
configure them. That's handled by usb_choose_configuration() and
usb_set_configuration().
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Tue, 8 Dec 2009 20:49:48 +0000 (15:49 -0500)]
USB: power management documentation update
This patch (as1313) updates the documentation concerning USB power
management.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Randy Dunlap [Mon, 14 Dec 2009 16:44:46 +0000 (08:44 -0800)]
Staging/vt66*: kconfig, depends on WLAN
The vt665[56] drivers can be built when CONFIG_NET=n &
CONFIG_NETDEVICES=n or just when CONFIG_WLAN=n.
This leads to build failures.
Prevent this by making them depend on WLAN.
[This patch was lost in a dualing trees merge;
still needs to be re-applied.]
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julia Lawall [Sun, 13 Dec 2009 13:11:39 +0000 (14:11 +0100)]
Staging: batman-adv: introduce missing kfree
Error handling code following a kzalloc should free the allocated data.
Similarly for usb-alloc urb.
The semantic match that finds the first problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,f1,l;
position p1,p2;
expression *ptr != NULL;
@@
x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
when != if (...) { <+...x...+> }
(
x->f1 = E
|
(x->f1 == NULL || ...)
|
f(...,x->f1,...)
)
...>
(
return \(0\|<+...x...+>\|ptr\);
|
return@p2 ...;
)
@script:python@
p1 << r.p1;
p2 << r.p2;
@@
print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Andrew Lunn [Sat, 12 Dec 2009 22:39:47 +0000 (23:39 +0100)]
Staging: batman-adv: Add Kconfig dependancies on PROC_FS and PACKET.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Peter Huewe [Tue, 15 Dec 2009 05:37:36 +0000 (06:37 +0100)]
Staging: panel: Adjust range for PANEL_KEYPAD in Kconfig
In panel.c there are only the values 0-3 defined. So 4 is invalid:
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Peter Huewe [Tue, 15 Dec 2009 05:21:45 +0000 (06:21 +0100)]
Staging: panel: Fix compilation error with custom lcd charset
When compiling panel.c with a DEFAULT_LCD_CHARSET it fails to compile
with the following error message:
drivers/staging/panel/panel.c: In function >>lcd_init<<:
drivers/staging/panel/panel.c:1396: error: expected expression before
>>;<< token
drivers/staging/panel/panel.c:1475: error: expected expression before
>>;<< token
make[3]: *** [drivers/staging/panel/panel.o] error 1
make[2]: *** [drivers/staging/panel] error 2
make[1]: *** [drivers/staging] error 2
The config used was:
CONFIG_PANEL=m
CONFIG_PANEL_PARPORT=0
CONFIG_PANEL_PROFILE=0
CONFIG_PANEL_KEYPAD=0
CONFIG_PANEL_LCD=1
CONFIG_PANEL_LCD_HEIGHT=2
CONFIG_PANEL_LCD_WIDTH=20
CONFIG_PANEL_LCD_BWIDTH=40
CONFIG_PANEL_LCD_HWIDTH=64
CONFIG_PANEL_LCD_CHARSET=0
CONFIG_PANEL_LCD_PROTO=0
CONFIG_PANEL_LCD_PIN_E=14
CONFIG_PANEL_LCD_PIN_RS=17
CONFIG_PANEL_LCD_PIN_RW=16
CONFIG_PANEL_LCD_PIN_BL=0
This patch fixes both errors, as it fixes the define
Patch against current linux-next tree at Tue Dec 15 06:07:01 2009 +0100
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Nitin Gupta [Sat, 12 Dec 2009 06:14:46 +0000 (11:44 +0530)]
Staging: ramzswap: remove ARM specific d-cache hack
Remove d-cache hack in ramzswap driver that was needed
to workaround a bug in ARM version of update_mmu_cache()
which caused stale data in d-cache to be transferred to
userspace. This bug was fixed by git commit:
787b2faadc4356b6c2c71feb42fb944fece9a12f
This also brings down one entry in TODO file.
Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Randy Dunlap [Tue, 24 Nov 2009 20:13:55 +0000 (12:13 -0800)]
Staging: rtl8192x: fix printk formats
Fix printk format warnings in rtl8192[eu]:
drivers/staging/rtl8192e/ieee80211/ieee80211_wx.c:979: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
drivers/staging/rtl8192e/ieee80211/rtl819x_BAProc.c:385: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/staging/rtl8192e/ieee80211/rtl819x_BAProc.c:484: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/staging/rtl8192e/ieee80211/rtl819x_BAProc.c:614: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c:848: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:343: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:442: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c:572: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Julia Lawall [Wed, 9 Dec 2009 19:25:04 +0000 (20:25 +0100)]
Staging: wlan-ng: fix Correct size given to memset
Memset should be given the size of the structure, not the size of the pointer.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
type T;
T *x;
expression E;
@@
memset(x, E, sizeof(
+ *
x))
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Stephane Glondu [Thu, 17 Dec 2009 14:41:23 +0000 (15:41 +0100)]
staging: rtl8192su: add USB VID/PID for HWNUm-300
The Hercules Wireless N USB mini (HWNUm-300) uses the RTL8191S chipset
and seems to work with this driver.
Signed-off-by: Stephane Glondu <steph@glondu.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
George Kadianakis [Wed, 16 Dec 2009 23:19:13 +0000 (01:19 +0200)]
staging: fix rtl8192su compilation errors with mac80211
This patch series fixes compilation problems that were caused by
function naming conflicts between the rtl8192su driver and the
mac80211 stack.
Signed-off-by: George Kadianakis <desnacked at gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
George Kadianakis [Wed, 16 Dec 2009 23:18:08 +0000 (01:18 +0200)]
staging: fix rtl8192e compilation errors with mac80211
This patch series fixes compilation problems that were caused by
function naming conflicts between the rtl8192e driver and the
mac80211 stack.
Signed-off-by: George Kadianakis <desnacked at gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
George Kadianakis [Wed, 16 Dec 2009 23:16:00 +0000 (01:16 +0200)]
Staging: fix rtl8187se compilation errors with mac80211
This patch fixes compilation problems that were caused by function
naming conflicts between the rtl8187se driver and the mac80211 stack.
Signed-off-by: George Kadianakis <desnacked at gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roel Kluin [Fri, 20 Nov 2009 19:12:33 +0000 (20:12 +0100)]
Staging: rtl8192su: fix test for negative error in rtl8192_rx_isr()
The error tested for is negative
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ian Abbott [Mon, 30 Nov 2009 10:59:27 +0000 (10:59 +0000)]
Staging: comedi: jr3_pci: Don't ioremap too much space. Check result.
For the JR3/PCI cards, the size of the PCIBAR0 region depends on the
number of channels. Don't try and ioremap space for 4 channels if the
card has fewer channels. Also check for ioremap failure.
Thanks to Anders Blomdell for input and Sami Hussein for testing.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Bernd Porr [Fri, 27 Nov 2009 12:07:48 +0000 (12:07 +0000)]
Staging: comedi: removed "depricated" from COMEDI_CB_BLOCK
The flag COMEDI_CB_BLOCK was marked as "depricated in the header file".
However, this flag is important to wake up the data-reader (and writer)
after new data has arrived from(for) the DAQ card.
Signed-off-by: Bernd Porr <berndporr@f2s.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Bernd Porr [Fri, 27 Nov 2009 12:00:53 +0000 (12:00 +0000)]
Staging: comedi: usbdux.c: fix locking up of the driver when the comedi ringbuffer runs empty
Jan-Matthias Braun spotted a bug which locks up the driver when the
comedi ring buffer runs empty and provided a patch. The driver would
still send the data to comedi but the reader won't wake up any more.
What's required is setting the flag COMEDI_CB_BLOCK after new data has
arrived which wakes up the reader and therefore the read() command.
Signed-off-by: Bernd Porr <berndporr@f2s.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman [Fri, 18 Dec 2009 17:59:48 +0000 (09:59 -0800)]
Staging: dst: remove from the tree
DST is dead, no one is using it and upstream
has abandoned it, so remove it from the tree because
it is not going anywhere.
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Wu Zhangjin [Mon, 23 Nov 2009 02:28:24 +0000 (10:28 +0800)]
Staging: sm7xx: add a new framebuffer driver
Yeeloong netbook has a sm712 video card, need this driver, but it is not
ready to upstream yet, so, go to drivers/staing at first.
This source code is originally from Silicon Motion Technology Corp, and
maintained at http://dev.lemote.com/code/linux_loongson for YeeLoong
netbook. I have done a lot of cleanups for it and merged it into my git
repository at http://dev.lemote.com/code/rt4ls.
Thanks to Simon for testing it on a little-endian x86 platform.
Thanks to Olivier Croset <olivier.croset@actis-computer.com> for
reporting the problem about __BIG_ENDIAN compiling problem and send a
relative patch.
The suspend/resume and blank support are contributed by Jason from
Silicon Motion Technology.
Tested-by: Simon Braunschmidt <sbraun@emlix.com>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kay Sievers [Tue, 22 Dec 2009 21:25:16 +0000 (22:25 +0100)]
devtmpfs: unlock mutex in case of string allocation error
Reported-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Michael Hennerich [Mon, 21 Dec 2009 16:41:08 +0000 (11:41 -0500)]
Driver core: export platform_device_register_data as a GPL symbol
This allows MFD's to register/bind drivers for their sub devices while
still being compiled as a module.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Phil Carmody [Mon, 14 Dec 2009 18:28:12 +0000 (20:28 +0200)]
driver core: Prevent reference to freed memory on error path
priv is drv->p. So only free drv->p after we've finished using priv.
Found using a static code analysis tool
Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Thomas Gleixner [Thu, 10 Dec 2009 19:32:49 +0000 (19:32 +0000)]
Driver-core: Fix bogus 0 error return in device_add()
If device_add() is called with a device which does not have dev->p set
up, then device_private_init() is called. If that succeeds, then the
error variable is set to 0. Now if the dev_name(dev) check further
down fails, then device_add() correctly terminates, but returns 0.
That of course lets the driver progress. If later another driver uses
this half set up device as parent then device_add() of the child
device explodes and renders sysfs completely unusable.
Set the error to -EINVAL if dev_name() check fails.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: "Hans J. Koch" <hjk@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Phil Carmody [Fri, 18 Dec 2009 13:34:21 +0000 (15:34 +0200)]
Driver core: driver_attribute parameters can often be const*
Many struct driver_attribute descriptors are purely read-only
structures, and there's no need to change them. Therefore make
the promise not to, which will let those descriptors be put in
a ro section.
Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Phil Carmody [Fri, 18 Dec 2009 13:34:20 +0000 (15:34 +0200)]
Driver core: bin_attribute parameters can often be const*
Many struct bin_attribute descriptors are purely read-only
structures, and there's no need to change them. Therefore
make the promise not to, which will let those descriptors
be put in a ro section.
Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Phil Carmody [Fri, 18 Dec 2009 13:34:19 +0000 (15:34 +0200)]
Driver core: device_attribute parameters can often be const*
Most device_attributes are const, and are begging to be
put in a ro section. However, the create and remove
file interfaces were failing to propagate the const promise
which the only functions they call offer.
Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sebastian Andrzej Siewior [Sun, 6 Dec 2009 11:24:31 +0000 (12:24 +0100)]
Doc/stable rules: add new cherry-pick logic
- it is possible to submit patches for the stable queue without sending
them directly stable@kernel.org. If the tag (Cc: stable@kernel.org) is
available in the sign-off area than hpa's script will filter them into
the stable mailbox once it hits Linus' tree.
- Patches which require others to be applied first can be also specified.
This was discussued in http://lkml.org/lkml/2009/11/9/474
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Cc: Brandon Philips <brandon@ifup.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kay Sievers [Fri, 18 Dec 2009 20:18:15 +0000 (21:18 +0100)]
vfs: get_sb_single() - do not pass options twice
Filesystem code usually destroys the option buffer while
parsing it. This leads to errors when the same buffer is
passed twice. In case we fill a new superblock do not call
remount.
This is needed to quite a warning that the debugfs code
causes every boot.
Cc: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Thomas Gleixner [Wed, 16 Dec 2009 21:31:33 +0000 (21:31 +0000)]
devtmpfs: Convert dirlock to a mutex
devtmpfs has a rw_lock dirlock which serializes delete_path and
create_path.
This code was obviously never tested with the usual set of debugging
facilities enabled. In the dirlock held sections the code calls:
- vfs functions which take mutexes
- kmalloc(, GFP_KERNEL)
In both code pathes the might sleep warning triggers and spams dmesg.
Convert the rw_lock to a mutex. There is no reason why this needs to
be a rwlock.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Linus Torvalds [Wed, 23 Dec 2009 18:01:20 +0000 (10:01 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: hda - Add STAC9205 PCI_QUIRK for Dell Vostro 1700
ASoC: Do not write to invalid registers on the wm9712.
ALSA: hda - Set mixer name after codec patch
ASoC: add missing parameter to mx27vis_hifi_hw_free()
ASoC: sh: FSI:: don't check platform_get_irq's return value against zero
ALSA: sound/core/pcm_timer.c: use lib/gcd.c
ALSA: hda - Add MSI blacklist
ALSA: hda - Add support for the new 27 inch IMacs
ALSA: hda - Fix NULL dereference with enable_beep=0 option
Greg Kroah-Hartman [Wed, 23 Dec 2009 18:00:05 +0000 (10:00 -0800)]
Merge branch 'master' of /home/gregkh/linux/git/torvalds-2.6
Takashi Iwai [Wed, 23 Dec 2009 17:50:17 +0000 (18:50 +0100)]
Merge branch 'fix/hda' into for-linus
Takashi Iwai [Wed, 23 Dec 2009 17:50:13 +0000 (18:50 +0100)]
Merge branch 'fix/asoc' into for-linus
Takashi Iwai [Wed, 23 Dec 2009 17:49:55 +0000 (18:49 +0100)]
Merge branch 'fix/misc' into for-linus
Anisse Astier [Wed, 23 Dec 2009 16:28:45 +0000 (17:28 +0100)]
ALSA: hda - Add STAC9205 PCI_QUIRK for Dell Vostro 1700
Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Randy Dunlap [Wed, 23 Dec 2009 17:23:33 +0000 (09:23 -0800)]
kfifo: fix Error/broken kernel-doc notation
Fix kernel-doc errors and warnings in new header file kfifo.h.
Don't use kernel-doc "/**" for internal functions whose comments
are not in kernel-doc format.
kernel-doc section header names (like "Note:") must be unique
per function. Looks like I need to document that.
Error(include/linux/kfifo.h:76): duplicate section name 'Note'
Warning(include/linux/kfifo.h:88): Excess function parameter 'size' description in 'INIT_KFIFO'
Error(include/linux/kfifo.h:101): duplicate section name 'Note'
Warning(include/linux/kfifo.h:257): No description found for parameter 'fifo'
(many of this last type, from internal functions)
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Stefani Seibold <stefani@seibold.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 23 Dec 2009 17:12:57 +0000 (09:12 -0800)]
Merge branch 'sched-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
sched: Revert 738d2be, simplify set_task_cpu()
Linus Torvalds [Wed, 23 Dec 2009 17:12:20 +0000 (09:12 -0800)]
Merge branch 'for_linus' of git://git./linux/kernel/git/jack/linux-fs-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6:
quota: Improve checking of quota file header
jbd: jbd-debug and jbd2-debug should be writable
ext4: fix sleep inside spinlock issue with quota and dealloc (#14739)
ext4: Fix potential quota deadlock
quota: Fix 64-bit limits setting on 32-bit archs
ext3: Replace lock/unlock_super() with an explicit lock for resizing
ext3: Replace lock/unlock_super() with an explicit lock for the orphan list
ext3: ext3_mark_recovery_complete() doesn't need to use lock_super
ext3: Remove outdated comment about lock_super()
quota: Move duplicated code to separate functions
ext4: Convert to generic reserved quota's space management.
quota: decouple fs reserved space from quota reservation
Add unlocked version of inode_add_bytes() function
ext3: quota macros cleanup [V2]
Linus Torvalds [Wed, 23 Dec 2009 16:59:32 +0000 (08:59 -0800)]
Merge branch 'drm-linus' of git://git./linux/kernel/git/airlied/drm-2.6
* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (35 commits)
drm/radeon/kms: add definitions for v4 power tables
drm/radeon/kms: never combine LVDS with another encoder
drm/radeon/kms: Check module arguments to be valid V2
drm/radeon/kms: Avoid crash when trying to cleanup uninitialized structure
drm/radeon/kms: add cvt mode if we only have lvds w/h and no edid (v4)
drm/radeon/kms: add 3DC compression support
drm/radeon/kms: allow rendering while no colorbuffer is set on r300
drm/radeon/kms: enable memory clock reading on legacy (V2)
drm/radeon/kms: prevent parallel AtomBIOS calls
drm/radeon/kms: set proper default tv standard
drm/radeon/kms: fix legacy rmx
drm/radeon/kms/atom: fill in proper defines for digital setup
drm/kms: silencing a false positive warning.
drm/mm: fix logic for selection of best fit block
drm/vmwgfx: Use TTM handles instead of SIDs as user-space surface handles.
drm/vmwgfx: Return -ERESTARTSYS when interrupted by a signal.
drm/vmwgfx: Fix unlocked ioctl and add proper access control
drm/radeon: fix build on 64-bit with some compilers.
drivers/gpu: Use kzalloc for allocating only one thing
DRM: Rename clamp variable
...
Stefani Seibold [Wed, 23 Dec 2009 08:10:48 +0000 (09:10 +0100)]
Fix usb_serial_probe() problem introduced by the recent kfifo changes
The USB serial code was a new user of the kfifo API, and it was missed
when porting things to the new kfifo API.
Please make the write_fifo in place. Here is my patch to fix the
regression and full ported version.
Signed-off-by: Stefani Seibold <stefani@seibold.net>
Reported-and-tested-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Greg KH <greg@kroah.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric Millbrandt [Tue, 22 Dec 2009 15:13:24 +0000 (10:13 -0500)]
ASoC: Do not write to invalid registers on the wm9712.
This patch fixes a bug where "virtual" registers were being written to the ac97
bus. This was causing unrelated registers to become corrupted (headphone 0x04,
touchscreen 0x78, etc).
This patch duplicates protection that was included in the wm9713 driver.
Signed-off-by: Eric Millbrandt <emillbrandt@dekaresearch.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
Jan Kara [Mon, 21 Dec 2009 20:57:04 +0000 (21:57 +0100)]
quota: Improve checking of quota file header
When we are asked for vfsv0 quota format and the file is in vfsv1
format (or vice versa), refuse to use the quota file. Also return
with error when we don't like the header of quota file.
Signed-off-by: Jan Kara <jack@suse.cz>
Yin Kangkai [Tue, 15 Dec 2009 22:48:25 +0000 (14:48 -0800)]
jbd: jbd-debug and jbd2-debug should be writable
jbd-debug and jbd2-debug is currently read-only (S_IRUGO), which is not
correct. Make it writable so that we can start debuging.
Signed-off-by: Yin Kangkai <kangkai.yin@intel.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Dmitry Monakhov [Thu, 10 Dec 2009 16:36:27 +0000 (16:36 +0000)]
ext4: fix sleep inside spinlock issue with quota and dealloc (#14739)
Unlock i_block_reservation_lock before vfs_dq_reserve_block().
This patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=14739
CC: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Dmitry Monakhov [Thu, 10 Dec 2009 03:31:45 +0000 (03:31 +0000)]
ext4: Fix potential quota deadlock
We have to delay vfs_dq_claim_space() until allocation context destruction.
Currently we have following call-trace:
ext4_mb_new_blocks()
/* task is already holding ac->alloc_semp */
->ext4_mb_mark_diskspace_used
->vfs_dq_claim_space() /* acquire dqptr_sem here. Possible deadlock */
->ext4_mb_release_context() /* drop ac->alloc_semp here */
Let's move quota claiming to ext4_da_update_reserve_space()
=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.32-rc7 #18
-------------------------------------------------------
write-truncate-/3465 is trying to acquire lock:
(&s->s_dquot.dqptr_sem){++++..}, at: [<
c025e73b>] dquot_claim_space+0x3b/0x1b0
but task is already holding lock:
(&meta_group_info[i]->alloc_sem){++++..}, at: [<
c02ce962>] ext4_mb_load_buddy+0xb2/0x370
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #3 (&meta_group_info[i]->alloc_sem){++++..}:
[<
c017d04b>] __lock_acquire+0xd7b/0x1260
[<
c017d5ea>] lock_acquire+0xba/0xd0
[<
c0527191>] down_read+0x51/0x90
[<
c02ce962>] ext4_mb_load_buddy+0xb2/0x370
[<
c02d0c1c>] ext4_mb_free_blocks+0x46c/0x870
[<
c029c9d3>] ext4_free_blocks+0x73/0x130
[<
c02c8cfc>] ext4_ext_truncate+0x76c/0x8d0
[<
c02a8087>] ext4_truncate+0x187/0x5e0
[<
c01e0f7b>] vmtruncate+0x6b/0x70
[<
c022ec02>] inode_setattr+0x62/0x190
[<
c02a2d7a>] ext4_setattr+0x25a/0x370
[<
c022ee81>] notify_change+0x151/0x340
[<
c021349d>] do_truncate+0x6d/0xa0
[<
c0221034>] may_open+0x1d4/0x200
[<
c022412b>] do_filp_open+0x1eb/0x910
[<
c021244d>] do_sys_open+0x6d/0x140
[<
c021258e>] sys_open+0x2e/0x40
[<
c0103100>] sysenter_do_call+0x12/0x32
-> #2 (&ei->i_data_sem){++++..}:
[<
c017d04b>] __lock_acquire+0xd7b/0x1260
[<
c017d5ea>] lock_acquire+0xba/0xd0
[<
c0527191>] down_read+0x51/0x90
[<
c02a5787>] ext4_get_blocks+0x47/0x450
[<
c02a74c1>] ext4_getblk+0x61/0x1d0
[<
c02a7a7f>] ext4_bread+0x1f/0xa0
[<
c02bcddc>] ext4_quota_write+0x12c/0x310
[<
c0262d23>] qtree_write_dquot+0x93/0x120
[<
c0261708>] v2_write_dquot+0x28/0x30
[<
c025d3fb>] dquot_commit+0xab/0xf0
[<
c02be977>] ext4_write_dquot+0x77/0x90
[<
c02be9bf>] ext4_mark_dquot_dirty+0x2f/0x50
[<
c025e321>] dquot_alloc_inode+0x101/0x180
[<
c029fec2>] ext4_new_inode+0x602/0xf00
[<
c02ad789>] ext4_create+0x89/0x150
[<
c0221ff2>] vfs_create+0xa2/0xc0
[<
c02246e7>] do_filp_open+0x7a7/0x910
[<
c021244d>] do_sys_open+0x6d/0x140
[<
c021258e>] sys_open+0x2e/0x40
[<
c0103100>] sysenter_do_call+0x12/0x32
-> #1 (&sb->s_type->i_mutex_key#7/4){+.+...}:
[<
c017d04b>] __lock_acquire+0xd7b/0x1260
[<
c017d5ea>] lock_acquire+0xba/0xd0
[<
c0526505>] mutex_lock_nested+0x65/0x2d0
[<
c0260c9d>] vfs_load_quota_inode+0x4bd/0x5a0
[<
c02610af>] vfs_quota_on_path+0x5f/0x70
[<
c02bc812>] ext4_quota_on+0x112/0x190
[<
c026345a>] sys_quotactl+0x44a/0x8a0
[<
c0103100>] sysenter_do_call+0x12/0x32
-> #0 (&s->s_dquot.dqptr_sem){++++..}:
[<
c017d361>] __lock_acquire+0x1091/0x1260
[<
c017d5ea>] lock_acquire+0xba/0xd0
[<
c0527191>] down_read+0x51/0x90
[<
c025e73b>] dquot_claim_space+0x3b/0x1b0
[<
c02cb95f>] ext4_mb_mark_diskspace_used+0x36f/0x380
[<
c02d210a>] ext4_mb_new_blocks+0x34a/0x530
[<
c02c83fb>] ext4_ext_get_blocks+0x122b/0x13c0
[<
c02a5966>] ext4_get_blocks+0x226/0x450
[<
c02a5ff3>] mpage_da_map_blocks+0xc3/0xaa0
[<
c02a6ed6>] ext4_da_writepages+0x506/0x790
[<
c01de272>] do_writepages+0x22/0x50
[<
c01d766d>] __filemap_fdatawrite_range+0x6d/0x80
[<
c01d7b9b>] filemap_flush+0x2b/0x30
[<
c02a40ac>] ext4_alloc_da_blocks+0x5c/0x60
[<
c029e595>] ext4_release_file+0x75/0xb0
[<
c0216b59>] __fput+0xf9/0x210
[<
c0216c97>] fput+0x27/0x30
[<
c02122dc>] filp_close+0x4c/0x80
[<
c014510e>] put_files_struct+0x6e/0xd0
[<
c01451b7>] exit_files+0x47/0x60
[<
c0146a24>] do_exit+0x144/0x710
[<
c0147028>] do_group_exit+0x38/0xa0
[<
c0159abc>] get_signal_to_deliver+0x2ac/0x410
[<
c0102849>] do_notify_resume+0xb9/0x890
[<
c01032d2>] work_notifysig+0x13/0x21
other info that might help us debug this:
3 locks held by write-truncate-/3465:
#0: (jbd2_handle){+.+...}, at: [<
c02e1f8f>] start_this_handle+0x38f/0x5c0
#1: (&ei->i_data_sem){++++..}, at: [<
c02a57f6>] ext4_get_blocks+0xb6/0x450
#2: (&meta_group_info[i]->alloc_sem){++++..}, at: [<
c02ce962>] ext4_mb_load_buddy+0xb2/0x370
stack backtrace:
Pid: 3465, comm: write-truncate- Not tainted 2.6.32-rc7 #18
Call Trace:
[<
c0524cb3>] ? printk+0x1d/0x22
[<
c017ac9a>] print_circular_bug+0xca/0xd0
[<
c017d361>] __lock_acquire+0x1091/0x1260
[<
c016bca2>] ? sched_clock_local+0xd2/0x170
[<
c0178fd0>] ? trace_hardirqs_off_caller+0x20/0xd0
[<
c017d5ea>] lock_acquire+0xba/0xd0
[<
c025e73b>] ? dquot_claim_space+0x3b/0x1b0
[<
c0527191>] down_read+0x51/0x90
[<
c025e73b>] ? dquot_claim_space+0x3b/0x1b0
[<
c025e73b>] dquot_claim_space+0x3b/0x1b0
[<
c02cb95f>] ext4_mb_mark_diskspace_used+0x36f/0x380
[<
c02d210a>] ext4_mb_new_blocks+0x34a/0x530
[<
c02c601d>] ? ext4_ext_find_extent+0x25d/0x280
[<
c02c83fb>] ext4_ext_get_blocks+0x122b/0x13c0
[<
c016bca2>] ? sched_clock_local+0xd2/0x170
[<
c016be60>] ? sched_clock_cpu+0x120/0x160
[<
c016beef>] ? cpu_clock+0x4f/0x60
[<
c0178fd0>] ? trace_hardirqs_off_caller+0x20/0xd0
[<
c052712c>] ? down_write+0x8c/0xa0
[<
c02a5966>] ext4_get_blocks+0x226/0x450
[<
c016be60>] ? sched_clock_cpu+0x120/0x160
[<
c016beef>] ? cpu_clock+0x4f/0x60
[<
c017908b>] ? trace_hardirqs_off+0xb/0x10
[<
c02a5ff3>] mpage_da_map_blocks+0xc3/0xaa0
[<
c01d69cc>] ? find_get_pages_tag+0x16c/0x180
[<
c01d6860>] ? find_get_pages_tag+0x0/0x180
[<
c02a73bd>] ? __mpage_da_writepage+0x16d/0x1a0
[<
c01dfc4e>] ? pagevec_lookup_tag+0x2e/0x40
[<
c01ddf1b>] ? write_cache_pages+0xdb/0x3d0
[<
c02a7250>] ? __mpage_da_writepage+0x0/0x1a0
[<
c02a6ed6>] ext4_da_writepages+0x506/0x790
[<
c016beef>] ? cpu_clock+0x4f/0x60
[<
c016bca2>] ? sched_clock_local+0xd2/0x170
[<
c016be60>] ? sched_clock_cpu+0x120/0x160
[<
c016be60>] ? sched_clock_cpu+0x120/0x160
[<
c02a69d0>] ? ext4_da_writepages+0x0/0x790
[<
c01de272>] do_writepages+0x22/0x50
[<
c01d766d>] __filemap_fdatawrite_range+0x6d/0x80
[<
c01d7b9b>] filemap_flush+0x2b/0x30
[<
c02a40ac>] ext4_alloc_da_blocks+0x5c/0x60
[<
c029e595>] ext4_release_file+0x75/0xb0
[<
c0216b59>] __fput+0xf9/0x210
[<
c0216c97>] fput+0x27/0x30
[<
c02122dc>] filp_close+0x4c/0x80
[<
c014510e>] put_files_struct+0x6e/0xd0
[<
c01451b7>] exit_files+0x47/0x60
[<
c0146a24>] do_exit+0x144/0x710
[<
c017b163>] ? lock_release_holdtime+0x33/0x210
[<
c0528137>] ? _spin_unlock_irq+0x27/0x30
[<
c0147028>] do_group_exit+0x38/0xa0
[<
c017babb>] ? trace_hardirqs_on+0xb/0x10
[<
c0159abc>] get_signal_to_deliver+0x2ac/0x410
[<
c0102849>] do_notify_resume+0xb9/0x890
[<
c0178fd0>] ? trace_hardirqs_off_caller+0x20/0xd0
[<
c017b163>] ? lock_release_holdtime+0x33/0x210
[<
c0165b50>] ? autoremove_wake_function+0x0/0x50
[<
c017ba54>] ? trace_hardirqs_on_caller+0x134/0x190
[<
c017babb>] ? trace_hardirqs_on+0xb/0x10
[<
c0300ba4>] ? security_file_permission+0x14/0x20
[<
c0215761>] ? vfs_write+0x131/0x190
[<
c0214f50>] ? do_sync_write+0x0/0x120
[<
c0103115>] ? sysenter_do_call+0x27/0x32
[<
c01032d2>] work_notifysig+0x13/0x21
CC: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Jan Kara <jack@suse.cz>