aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc
AgeCommit message (Collapse)AuthorFilesLines
2014-04-01x86/UV: Fix conditional in gru_exit()Dimitri Sivanich1-3/+8
Fix supported system conditional in gru_exit(), in preparation for UV3. Signed-off-by: Dimitri Sivanich <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2014-03-23Merge tag 'asoc-v3.15' into asoc-nextMark Brown1-0/+6
ASoC: Updates for v3.15 Quite a busy release for ASoC this time, more on janitorial work than exciting new features but welcome nontheless: - Lots of cleanups from Takashi for enumerations; the original API for these was error prone so he's refactored lots of code to use more modern APIs which avoid issues. - Elimination of the ASoC level wrappers for I2C and SPI moving us closer to converting to regmap completely and avoiding some randconfig hassle. - Provide both manually and transparently locked DAPM APIs rather than a mix of the two fixing some concurrency issues. - Start converting CODEC drivers to use separate bus interface drivers rather than having them all in one file helping avoid dependency issues. - DPCM support for Intel Haswell and Bay Trail platforms. - Lots of work on improvements for simple-card, DaVinci and the Renesas rcar drivers. - New drivers for Analog Devices ADAU1977, TI PCM512x and parts of the CSR SiRF SoC. # gpg: Signature made Wed 12 Mar 2014 23:05:45 GMT using RSA key ID 7EA229BD # gpg: Good signature from "Mark Brown <[email protected]>" # gpg: aka "Mark Brown <[email protected]>" # gpg: aka "Mark Brown <[email protected]>" # gpg: aka "Mark Brown <[email protected]>" # gpg: aka "Mark Brown <[email protected]>" # gpg: aka "Mark Brown <[email protected]>"
2014-03-17mei: don't use deprecated DEFINE_PCI_DEVICE_TABLE macroTomas Winkler2-2/+2
Using struct pci_device_id is preferred over deprecated DEFINE_PCI_DEVICE_TABLE macro Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-03-17mei: amthif: fix checkpatch errorTomas Winkler1-2/+1
ERROR: else should follow close brace '}' + } + else { Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-03-17mei: client.h fix checkpatch errorsTomas Winkler1-4/+4
Fix checkpatch error return is not a function, parentheses are not required Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-03-17mei: use cl_dbg where appropriateTomas Winkler2-10/+3
use cl_dbg for debug log messages in cl context this also removes checkpatch warning: quoted string split across lines Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-03-17mei: fix Unnecessary space after function pointer nameTomas Winkler1-12/+12
Fix checkpatch warining: Unnecessary space after function pointer name Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-03-17mei: report consistently copy_from/to_user failuresAlexander Usyskin2-3/+6
Consistently display error on possible copy_from/to_user failures use dev_dbg so it cannot be abused to flood the kernel log Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-03-17mei: drop pr_fmt macrosTomas Winkler2-6/+0
we are using dev_ logging facility so we don't need pr_fmt macros Signed-off-by: Tomas Winkler <[email protected]> Reviewed-by: Alexander Usyskin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-03-17mei: make me hw headers private to me hw.Tomas Winkler9-10/+4
Remove includes of me-hw.h and me-hw-regs.h headers from the mei generic code. The mei layer should not depend on hw specific headers Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-03-17mei: fix memory leak of pending write cb objectsTomas Winkler2-39/+55
Write callbacks are released on the write completed path but when file handler is closed before the writes are completed those are left dangling on write and write_waiting queues. We add mei_io_list_free function to perform this task Also move static functions to client.c form client.h Cc: stable <[email protected]> # 3.11+ Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-03-17mei: me: do not reset when less than expected data is receivedTomas Winkler2-1/+10
There is a race in ME hardware between data copy for host and interrupt delivery. An interrupt can be delivered prior to whole data copied for the host to read but rather then going trough the reset we just merely need to wait for the next interrupt. The bug is visible in read/write stress with multiple connections per client This is a regression caused as a side effect of the commit: commit 544f94601409653f07ae6e22d4a39e3a90dceead mei: do not run reset flow from the interrupt thread Signed-off-by: Tomas Winkler <[email protected]> Cc: stable <[email protected]> # 3.14 Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-03-17Merge 3.14-rc7 into staging-nextGreg Kroah-Hartman1-1/+1
This resolves a merge issue with drivers/staging/cxt1e1/linux.c that was fixed in a report from Stephen Rothwell Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-03-12Merge remote-tracking branches 'asoc/topic/arizona', 'asoc/topic/atmel', ↵Mark Brown1-0/+6
'asoc/topic/cirrus', 'asoc/topic/cs4271', 'asoc/topic/cs42l51', 'asoc/topic/cs42l52', 'asoc/topic/cs42l73' and 'asoc/topic/da7210' into asoc-next
2014-03-10mm: fix GFP_THISNODE callers and clarifyJohannes Weiner1-1/+1
GFP_THISNODE is for callers that implement their own clever fallback to remote nodes. It restricts the allocation to the specified node and does not invoke reclaim, assuming that the caller will take care of it when the fallback fails, e.g. through a subsequent allocation request without GFP_THISNODE set. However, many current GFP_THISNODE users only want the node exclusive aspect of the flag, without actually implementing their own fallback or triggering reclaim if necessary. This results in things like page migration failing prematurely even when there is easily reclaimable memory available, unless kswapd happens to be running already or a concurrent allocation attempt triggers the necessary reclaim. Convert all callsites that don't implement their own fallback strategy to __GFP_THISNODE. This restricts the allocation a single node too, but at the same time allows the allocator to enter the slowpath, wake kswapd, and invoke direct reclaim if necessary, to make the allocation happen when memory is full. Signed-off-by: Johannes Weiner <[email protected]> Acked-by: Rik van Riel <[email protected]> Cc: Jan Stancek <[email protected]> Cc: Mel Gorman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2014-03-08cs5535-mfgpt: Simplify dependenciesJean Delvare1-1/+1
The bus and architecture dependencies are already on MFD_CS5535, so there is no need to repeat them here. Signed-off-by: Jean Delvare <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-03-08pch_phub: Report error writing MAC back to userAlexander Stein1-1/+4
Signed-off-by: Alexander Stein <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-03-08mei: fix regressions caused by removing ext_msgAlexander Usyskin1-0/+2
1. Delete cb from list before freeing it 2. Fix missed break that leads to switch case fall-through and BUG invocation. Regression from: commit 6bb948c9e500d24321c36c67c81daf8d1a7e561e mei: get rid of ext_msg Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-28misc: sram: implement reserved sram areasHeiko Stübner1-7/+118
This implements support for defining reserved areas as subnodes, to keep the genpool from using these. Suggested-by: Rob Herring <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Tested-by: Ulrich Prinz <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-28vmw_vmci: Use pci_enable_msix_exact() instead of pci_enable_msix()Alexander Gordeev1-3/+4
As result of deprecation of MSI-X/MSI enablement functions pci_enable_msix() and pci_enable_msi_block() all drivers using these two interfaces need to be updated to use the new pci_enable_msi_range() or pci_enable_msi_exact() and pci_enable_msix_range() or pci_enable_msix_exact() interfaces. Signed-off-by: Alexander Gordeev <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Andy King <[email protected]> Cc: Dmitry Torokhov <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-28mic: Use pci_enable_msix_exact() instead of pci_enable_msix()Alexander Gordeev1-1/+1
As result of deprecation of MSI-X/MSI enablement functions pci_enable_msix() and pci_enable_msi_block() all drivers using these two interfaces need to be updated to use the new pci_enable_msi_range() or pci_enable_msi_exact() and pci_enable_msix_range() or pci_enable_msix_exact() interfaces. Signed-off-by: Alexander Gordeev <[email protected]> Cc: Harshavardhan R Kharche <[email protected]> Cc: Ashutosh Dixit <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-28mei: wd: fix stop completion failureTomas Winkler2-16/+18
While running Documentation/watchdog/src/watchdog-simple.c and quiting by Ctrl-C, fallowing error is displayed: mei_me 0000:00:16.0: wd: stop failed to complete ret=-512. The whatchdog core framework is not able to propagate -ESYSRESTART or -EINTR. Also There is no much sense in restarting the close system call so instead of using wait_event_interruptible_timeout we can use wait_event_timeout with reasonable 10 msecs timeout. Reported-by: Prarit Bhargava <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-28mei: wd: simplify wd_send commandTomas Winkler2-29/+30
Add reduce credits to wd_send to remove code repetition and simplify error handling Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-28mei: make return values consistent across the driverAlexander Usyskin8-33/+33
1. Propagate ENOTTY to user space if the client is not present in the system 2. Use ETIME consistently on timeouts 3. Return EIO on write failures 4. Return ENODEV on recoverable device failures such as resets Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-28mei: revamp writing slot countingTomas Winkler8-80/+68
Since txe use doorbell and not circular buffer we have to cheat in write slot counting, txe always consume all the slots upon write. In order for it to work we need to track slots using mei_hbuf_empty_slots() instead of tracking it in mei layer Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-28mei: add mei_hbuf_acquire wrapperTomas Winkler7-47/+57
A client has to acquire host buffer before writing, we add lock like wrapper to replace the code snippet if (dev->hbuf_is_ready) dev->hbuf_is_ready = false; Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-28mei: txe: include irqreturn.h for irqreturn_t etcStephen Rothwell2-0/+3
Signed-off-by: Stephen Rothwell <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-28staging: echo: move to drivers/misc/Greg Kroah-Hartman8-0/+1183
The code is clean, there are users of it, so it doesn't belong in staging anymore, move it to drivers/misc/. Cc: Steve Underwood <[email protected]> Cc: David Rowe <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-20Merge branch 'master' into for-nextJiri Kosina44-351/+7175
2014-02-20Kconfig: Remove useless "default N" linesPaul Bolle1-2/+0
A number of Kconfig entries default to (uppercase) "N". It was clearly intended to use "default n". But since (lowercase) "n" is the default anyway, these lines might as well be removed. Signed-off-by: Paul Bolle <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2014-02-19mei: Add include of <linux/irqreturn.h>Bjorn Helgaas1-0/+1
We currently include <linux/irqreturn.h> in <linux/pci.h>, but I'm about to remove that from linux/pci.h, so add explicit includes where needed. Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Tomas Winkler <[email protected]>
2014-02-19Merge branch 'char-misc-linus' into char-misc-nextGreg Kroah-Hartman1-1/+3
We want the mei change here to allow future mei patches to apply properly. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-18misc: mic: Add include of <linux/irqreturn.h>Bjorn Helgaas2-0/+2
We currently include <linux/irqreturn.h> in <linux/pci.h>, but I'm about to remove that from linux/pci.h, so add explicit includes where needed. Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Sudeep Dutt <[email protected]>
2014-02-18mei: set client's read_cb to NULL when flow control failsChao Bi1-1/+3
In mei_cl_read_start(), if it fails to send flow control request, it will release "cl->read_cb" but forget to set pointer to NULL, leaving "cl->read_cb" still pointing to random memory, next time this client is operated like mei_release(), it has chance to refer to this wrong pointer. Fixes: PANIC at kfree in mei_release() [228781.826904] Call Trace: [228781.829737] [<c16249b8>] ? mei_cl_unlink+0x48/0xa0 [228781.835283] [<c1624487>] mei_io_cb_free+0x17/0x30 [228781.840733] [<c16265d8>] mei_release+0xa8/0x180 [228781.845989] [<c135c610>] ? __fsnotify_parent+0xa0/0xf0 [228781.851925] [<c1325a69>] __fput+0xd9/0x200 [228781.856696] [<c1325b9d>] ____fput+0xd/0x10 [228781.861467] [<c125cae1>] task_work_run+0x81/0xb0 [228781.866821] [<c1242e53>] do_exit+0x283/0xa00 [228781.871786] [<c1a82b36>] ? kprobe_flush_task+0x66/0xc0 [228781.877722] [<c124eeb8>] ? __dequeue_signal+0x18/0x1a0 [228781.883657] [<c124f072>] ? dequeue_signal+0x32/0x190 [228781.889397] [<c1243744>] do_group_exit+0x34/0xa0 [228781.894750] [<c12517b6>] get_signal_to_deliver+0x206/0x610 [228781.901075] [<c12018d8>] do_signal+0x38/0x100 [228781.906136] [<c1626d1c>] ? mei_read+0x42c/0x4e0 [228781.911393] [<c12600a0>] ? wake_up_bit+0x30/0x30 [228781.916745] [<c16268f0>] ? mei_poll+0x120/0x120 [228781.922001] [<c1324be9>] ? vfs_read+0x89/0x160 [228781.927158] [<c16268f0>] ? mei_poll+0x120/0x120 [228781.932414] [<c133ca34>] ? fget_light+0x44/0xe0 [228781.937670] [<c1324e58>] ? SyS_read+0x68/0x80 [228781.942730] [<c12019f5>] do_notify_resume+0x55/0x70 [228781.948376] [<c1a7de5d>] work_notifysig+0x29/0x30 [228781.953827] [<c1a70000>] ? bad_area+0x5/0x3e Cc: stable <[email protected]> # 3.9+ Signed-off-by: Chao Bi <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-18mei: txe: put pm callbacks under PM_SLEEP ifdefTomas Winkler1-2/+2
PCI suspend resume callbacks should be defined under CONFIG_PM_SLEEP Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-18mei: me: put pm callbacks under PM_SLEEP ifdefAlexander Usyskin1-2/+3
This will eliminate compilation warning: drivers/misc/mei/pci-me.c:303:12: warning: mei_me_pci_suspend defined but not used [-Wunused-function] static int mei_me_pci_suspend(struct device *device) drivers/misc/mei/pci-me.c:323:12: warning: mei_me_pci_resume defined but not used [-Wunused-function] static int mei_me_pci_resume(struct device *device) Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-18mei: don't of list_for_each_entry_safe when not deletingTomas Winkler5-33/+28
We can use simply list_for_each_entry if there is no entry removal Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-18mei: use helper function to find me client by idAlexander Usyskin2-48/+56
We already have a helper to find me client by id, let's use it in all relevant places. Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-18mei: fix potential read outside of array boundsAlexander Usyskin1-13/+10
Drop not-very-useful check and with this fix read on index that can be after array end. Cleanup search function as byproduct. Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-18mei: wd and amthif use mei_cl_ api for dis/connectionTomas Winkler5-80/+66
Connect wd and amthif through regular mei_cl_connect API as there is no reason to connect in asynchronous mode. Also use mei_cl_is_connected in order to protect flows instead of depending on wd_pending and amthif_timer Now we can remove all the special handling in hbm layer Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-18mei: hbm: revamp client connect and disconnection statusAlexander Usyskin4-39/+59
1. Return -ENOTTY on client connect if the requested client was not found on the enumeration list or the client was internally disabled, in the later case FW will return NOT_FOUND. 2. Return -EBUSY if the client cannot be connected because of resource contention 3. Change response status enum to have MEI_CL_ prefix 4. Add function to translate response status to a string for more readable logging Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-18mei: Remove all bus devices from the mei_dev list when stopping the MEITomas Winkler4-7/+20
When stopping the MEI, we should remove and potentially unregister all bus devices queued on the mei_dev linked list. Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-18Merge 3.14-rc3 into char-misc-nextGreg Kroah-Hartman4-9/+17
We need the fixes here for future mei and other patches. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-14lkdtm: include cacheflush.hKees Cook1-0/+1
Some architectures need cacheflush.h explicitly included (mips) for use of flush_icache_range(): config: make ARCH=mips allmodconfig All error/warnings: >> ERROR: "flush_icache_range" undefined! Reported-by: Fengguang Wu <[email protected]> Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-14Merge tag 'char-misc-3.14-rc3' of ↵Linus Torvalds3-3/+12
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc fixes from Greg KH: "Here are some small char/misc driver fixes, along with some documentation updates, for 3.14-rc3. Nothing major, just a number of fixes for reported issues" * tag 'char-misc-3.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: Revert "misc: eeprom: sunxi: Add new compatibles" Revert "ARM: sunxi: dt: Convert to the new SID compatibles" misc: mic: fix possible signed underflow (undefined behavior) in userspace API ARM: sunxi: dt: Convert to the new SID compatibles misc: eeprom: sunxi: Add new compatibles misc: genwqe: Fix potential memory leak when pinning memory Documentation:Update Documentation/zh_CN/arm64/memory.txt Documentation:Update Documentation/zh_CN/arm64/booting.txt Documentation:Chinese translation of Documentation/arm64/tagged-pointers.txt raw: set range for MAX_RAW_DEVS raw: test against runtime value of max_raw_minors Drivers: hv: vmbus: Don't timeout during the initial connection with host Drivers: hv: vmbus: Specify the target CPU that should receive notification VME: Correct read/write alignment algorithm mei: don't unset read cb ptr on reset mei: clear write cb from waiting list on reset
2014-02-14misc: eeprom: sunxi: Change compatiblesMaxime Ripard1-1/+1
The Allwinner A10 compatibles were following a slightly different compatible patterns than the rest of the SoCs for historical reasons. Change the compatibles to match the other pattern in the SID driver for consistency. Signed-off-by: Maxime Ripard <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-14lkdtm: add "WRITE_KERN" testKees Cook1-0/+25
Add "WRITE_KERN" crash target to validate that kernel executable memory is not writable. Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-14lkdtm: flush icache and report actionsKees Cook1-0/+16
Some CPUs explicitly need to have their icache flushed after making executable code copies for the memory region execution tests. Additionally, report the specific address targets being used so that debugging non-crash failures is easier. Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-14lkdtm: convert to using pr_* for reportsKees Cook1-17/+15
Move to using pr_* calls instead of printk calls for reporting. Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-14Revert "misc: eeprom: sunxi: Add new compatibles"Greg Kroah-Hartman1-4/+1
This reverts commit f0de8e04a7201a2000f3c6d09732c11e7f35d42d, it is incorrect, a future patch will fix this up properly. Cc: Maxime Ripard <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>