aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-06-06Merge tag 'for-linus-4.18' of git://github.com/cminyard/linux-ipmiLinus Torvalds10-1765/+1547
Pull IPMI updates from Corey Minyard: "It's been a busy release for the IPMI driver. Some notable changes: - A user was running into timeout issues doing maintenance commands over the IPMB network behind an IPMI controller. Extend the maintenance mode concept to messages over IPMB and allow the timeouts to be tuned. - Lots of cleanup, style fixing, some bugfixes, and such. - At least one user was having trouble with the way the IPMI driver would lock the i2c driver module it used. The IPMI driver was not designed for hotplug. However, hotplug is a reality now, so the IPMI driver was modified to support hotplug. - The proc interface code is now completely removed. Long live sysfs!" * tag 'for-linus-4.18' of git://github.com/cminyard/linux-ipmi: (35 commits) ipmi: Properly release srcu locks on error conditions ipmi: NPCM7xx KCS BMC: enable interrupt to the host ipmi:bt: Set the timeout before doing a capabilities check ipmi: Remove the proc interface ipmi_ssif: Fix uninitialized variable issue ipmi: add an NPCM7xx KCS BMC driver ipmi_si: Clean up shutdown a bit ipmi_si: Rename intf_num to si_num ipmi: Remove smi->intf checks ipmi_ssif: Get rid of unused intf_num ipmi: Get rid of ipmi_user_t and ipmi_smi_t in include files ipmi: ipmi_unregister_smi() cannot fail, have it return void ipmi_devintf: Add an error return on invalid ioctls ipmi: Remove usecount function from interfaces ipmi_ssif: Remove usecount handling ipmi: Remove condition on interface shutdown ipmi_ssif: Convert over to a shutdown handler ipmi_si: Convert over to a shutdown handler ipmi: Rework locking and shutdown for hot remove ipmi: Fix some counter issues ...
2018-06-05Merge tag 'char-misc-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-miscLinus Torvalds1-9/+2
Pull char/misc driver updates from Greg KH: "Here is the "big" char and misc driver patches for 4.18-rc1. It's not a lot of stuff here, but there are some highlights: - coreboot driver updates - soundwire driver updates - android binder updates - fpga big sync, mostly documentation - lots of minor driver updates All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (81 commits) vmw_balloon: fixing double free when batching mode is off MAINTAINERS: Add driver-api/fpga path fpga: clarify that unregister functions also free documentation: fpga: move fpga-region.txt to driver-api documentation: fpga: add bridge document to driver-api documentation: fpga: move fpga-mgr.txt to driver-api Documentation: fpga: move fpga overview to driver-api fpga: region: kernel-doc fixes fpga: bridge: kernel-doc fixes fpga: mgr: kernel-doc fixes fpga: use SPDX fpga: region: change api, add fpga_region_create/free fpga: bridge: change api, don't use drvdata fpga: manager: change api, don't use drvdata fpga: region: don't use drvdata in common fpga code Drivers: hv: vmbus: Removed an unnecessary cast from void * ver_linux: Drop redundant calls to system() to test if file is readable ver_linux: Move stderr redirection from function parameter to function body misc: IBM Virtual Management Channel Driver (VMC) rpmsg: Correct support for MODULE_DEVICE_TABLE() ...
2018-06-05Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6Linus Torvalds4-4/+10
Pull crypto updates from Herbert Xu: "API: - Decryption test vectors are now automatically generated from encryption test vectors. Algorithms: - Fix unaligned access issues in crc32/crc32c. - Add zstd compression algorithm. - Add AEGIS. - Add MORUS. Drivers: - Add accelerated AEGIS/MORUS on x86. - Add accelerated SM4 on arm64. - Removed x86 assembly salsa implementation as it is slower than C. - Add authenc(hmac(sha*), cbc(aes)) support in inside-secure. - Add ctr(aes) support in crypto4xx. - Add hardware key support in ccree. - Add support for new Centaur CPU in via-rng" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (112 commits) crypto: chtls - free beyond end rspq_skb_cache crypto: chtls - kbuild warnings crypto: chtls - dereference null variable crypto: chtls - wait for memory sendmsg, sendpage crypto: chtls - key len correction crypto: salsa20 - Revert "crypto: salsa20 - export generic helpers" crypto: x86/salsa20 - remove x86 salsa20 implementations crypto: ccp - Add GET_ID SEV command crypto: ccp - Add DOWNLOAD_FIRMWARE SEV command crypto: qat - Add MODULE_FIRMWARE for all qat drivers crypto: ccree - silence debug prints crypto: ccree - better clock handling crypto: ccree - correct host regs offset crypto: chelsio - Remove separate buffer used for DMA map B0 block in CCM crypt: chelsio - Send IV as Immediate for cipher algo crypto: chelsio - Return -ENOSPC for transient busy indication. crypto: caam/qi - fix warning in init_cgr() crypto: caam - fix rfc4543 descriptors crypto: caam - fix MC firmware detection crypto: clarify licensing of OpenSSL asm code ...
2018-06-04Merge branch 'work.aio-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfsLinus Torvalds1-13/+16
Pull aio updates from Al Viro: "Majority of AIO stuff this cycle. aio-fsync and aio-poll, mostly. The only thing I'm holding back for a day or so is Adam's aio ioprio - his last-minute fixup is trivial (missing stub in !CONFIG_BLOCK case), but let it sit in -next for decency sake..." * 'work.aio-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (46 commits) aio: sanitize the limit checking in io_submit(2) aio: fold do_io_submit() into callers aio: shift copyin of iocb into io_submit_one() aio_read_events_ring(): make a bit more readable aio: all callers of aio_{read,write,fsync,poll} treat 0 and -EIOCBQUEUED the same way aio: take list removal to (some) callers of aio_complete() aio: add missing break for the IOCB_CMD_FDSYNC case random: convert to ->poll_mask timerfd: convert to ->poll_mask eventfd: switch to ->poll_mask pipe: convert to ->poll_mask crypto: af_alg: convert to ->poll_mask net/rxrpc: convert to ->poll_mask net/iucv: convert to ->poll_mask net/phonet: convert to ->poll_mask net/nfc: convert to ->poll_mask net/caif: convert to ->poll_mask net/bluetooth: convert to ->poll_mask net/sctp: convert to ->poll_mask net/tipc: convert to ->poll_mask ...
2018-05-26random: convert to ->poll_maskChristoph Hellwig1-13/+16
The big change is that random_read_wait and random_write_wait are merged into a single waitqueue that uses keyed wakeups. Because wait_event_* doesn't know about that this will lead to occassional spurious wakeups in _random_read and add_hwgenerator_randomness, but wait_event_* is designed to handle these and were are not in a a hot path there. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-24ipmi: Properly release srcu locks on error conditionsCorey Minyard1-18/+25
When SRCU was added for handling hotplug, some error conditions were not handled properly. Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-05-23ipmi: NPCM7xx KCS BMC: enable interrupt to the hostAvi Fishman1-3/+14
Original kcs_bmc_npcm7xx.c was missing enabling to send interrupt to the host on writes to output buffer. This patch fixes it by setting the bits that enables the generation of IRQn events by hardware control based on the status of the OBF flag. Signed-off-by: Avi Fishman <AviFishman70@gmail.com> Reviewed-by: Haiyue Wang <haiyue.wang@linux.intel.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-05-22ipmi:bt: Set the timeout before doing a capabilities checkCorey Minyard1-1/+2
There was one place where the timeout value for an operation was not being set, if a capabilities request was done from idle. Move the timeout value setting to before where that change might be requested. IMHO the cause here is the invisible returns in the macros. Maybe that's a job for later, though. Reported-by: Nordmark Claes <Claes.Nordmark@tieto.com> Signed-off-by: Corey Minyard <cminyard@mvista.com> Cc: stable@vger.kernel.org
2018-05-19hwrng: n2 - fix spelling mistake: "restesting" -> "retesting"Colin Ian King1-1/+1
Trivial fix to spelling mistake in dev_err error message Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2018-05-16tty: replace ->proc_fops with ->proc_showChristoph Hellwig1-14/+1
Just set up the show callback in the tty_operations, and use proc_create_single_data to create the file without additional boilerplace code. Signed-off-by: Christoph Hellwig <hch@lst.de>
2018-05-16proc: introduce proc_create_single{,_data}Christoph Hellwig6-86/+7
Variants of proc_create{,_data} that directly take a seq_file show callback and drastically reduces the boilerplate code in the callers. All trivial callers converted over. Signed-off-by: Christoph Hellwig <hch@lst.de>
2018-05-16proc: introduce proc_create_seq{,_data}Christoph Hellwig1-14/+1
Variants of proc_create{,_data} that directly take a struct seq_operations argument and drastically reduces the boilerplate code in the callers. All trivial callers converted over. Signed-off-by: Christoph Hellwig <hch@lst.de>
2018-05-10agp: uninorth: make two functions staticMathieu Malaterre1-2/+2
Both ‘uninorth_remove_memory’ and ‘null_cache_flush’ can be made static. So make them. Silence the following gcc warning (W=1): drivers/char/agp/uninorth-agp.c:198:5: warning: no previous prototype for ‘uninorth_remove_memory’ [-Wmissing-prototypes] and drivers/char/agp/uninorth-agp.c:473:6: warning: no previous prototype for ‘null_cache_flush’ [-Wmissing-prototypes] Signed-off-by: Mathieu Malaterre <malat@debian.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2018-05-09ipmi: Remove the proc interfaceCorey Minyard4-486/+0
It has been deprecated long enough, get rid of it. Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-05-05hwrng: stm32 - fix pm_suspend issuelionel.debieve@st.com1-2/+7
When suspend is called after pm_runtime_suspend, same callback is used and access to rng register is freezing system. By calling the pm_runtime_force_suspend, it first checks that runtime has been already done. Signed-off-by: Lionel Debieve <lionel.debieve@st.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2018-05-05hwrng: stm32 - define default state for rng driverlionel.debieve@st.com1-0/+1
Define default state for stm32_rng driver. It will be default selected with multi_v7_defconfig Signed-off-by: Lionel Debieve <lionel.debieve@st.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2018-04-30Merge 4.17-rc3 into char-misc-nextGreg Kroah-Hartman2-92/+113
We want the fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-26Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhostLinus Torvalds1-86/+71
Pull virtio fixups from Michael Tsirkin: - Latest header update will break QEMU (if it's rebuilt with the new header) - and it seems that the code there is so fragile that any change in this header will break it. Add a better interface so users do not need to change their code every time that header changes. - Fix virtio console for spec compliance. * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio_console: reset on out of memory virtio_console: move removal code virtio_console: drop custom control queue cleanup virtio_console: free buffers after reset virtio: add ability to iterate over vqs virtio_console: don't tie bufs to a vq virtio_balloon: add array of stat names
2018-04-26Merge tag 'random_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/randomLinus Torvalds1-6/+42
Pull /dev/random fixes from Ted Ts'o: "Fix a regression on NUMA kernels and suppress excess unseeded entropy pool warnings" * tag 'random_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: random: rate limit unseeded randomness warnings random: fix possible sleeping allocation from irq context
2018-04-25virtio_console: reset on out of memoryMichael S. Tsirkin1-7/+10
When out of memory and we can't add ctrl vq buffers, probe fails. Unfortunately the error handling is out of spec: it calls del_vqs without bothering to reset the device first. To fix, call the full cleanup function in this case. Cc: stable@vger.kernel.org Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-04-25virtio_console: move removal codeMichael S. Tsirkin1-36/+36
Will make it reusable for error handling. Cc: stable@vger.kernel.org Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-04-25virtio_console: drop custom control queue cleanupMichael S. Tsirkin1-17/+0
We now cleanup all VQs on device removal - no need to handle the control VQ specially. Cc: stable@vger.kernel.org Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-04-25virtio_console: free buffers after resetMichael S. Tsirkin1-25/+24
Console driver is out of spec. The spec says: A driver MUST NOT decrement the available idx on a live virtqueue (ie. there is no way to “unexpose” buffers). and it does exactly that by trying to detach unused buffers without doing a device reset first. Defer detaching the buffers until device unplug. Of course this means we might get an interrupt for a vq without an attached port now. Handle that by discarding the consumed buffer. Reported-by: Tiwei Bie <tiwei.bie@intel.com> Fixes: b3258ff1d6 ("virtio: Decrement avail idx on buffer detach") Cc: stable@vger.kernel.org Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-04-25virtio_console: don't tie bufs to a vqMichael S. Tsirkin1-7/+7
an allocated buffer doesn't need to be tied to a vq - only vq->vdev is ever used. Pass the function the just what it needs - the vdev. Cc: stable@vger.kernel.org Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-04-25random: rate limit unseeded randomness warningsTheodore Ts'o1-5/+34
On systems without sufficient boot randomness, no point spamming dmesg. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@vger.kernel.org
2018-04-24random: fix possible sleeping allocation from irq contextTheodore Ts'o1-1/+8
We can do a sleeping allocation from an irq context when CONFIG_NUMA is enabled. Fix this by initializing the NUMA crng instances in a workqueue. Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Reported-by: syzbot+9de458f6a5e713ee8c1a@syzkaller.appspotmail.com Fixes: 8ef35c866f8862df ("random: set up the NUMA crng instances...") Cc: stable@vger.kernel.org Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-04-23char: mspec: change return type to vm_fault_tSouptick Joarder1-9/+2
Use new return type vm_fault_t for the fault handler in struct vm_operations_struct. For now, this is just documenting that the function returns a VM_FAULT value rather than an errno. Once all instances are converted, vm_fault_t will become a distinct type. This driver failed to handle any error returned by vm_insert_pfn. Use the new vmf_insert_pfn function to return the correct value. Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com> Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-21Merge tag 'random_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/randomLinus Torvalds1-31/+97
Pull /dev/random fixes from Ted Ts'o: "Fix some bugs in the /dev/random driver which causes getrandom(2) to unblock earlier than designed. Thanks to Jann Horn from Google's Project Zero for pointing this out to me" * tag 'random_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: random: add new ioctl RNDRESEEDCRNG random: crng_reseed() should lock the crng instance that it is modifying random: set up the NUMA crng instances after the CRNG is fully initialized random: use a different mixing algorithm for add_device_randomness() random: fix crng_ready() test
2018-04-21hwrng: via - support new Centaur CPUdavidwang1-1/+1
New Centaur CPU(Family > 6) supprt Random Number Generator, but can't support MSR_VIA_RNG. Just like VIA Nano. Signed-off-by: David Wang <davidwang@zhaoxin.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2018-04-19ipmi_ssif: Fix uninitialized variable issueGustavo A. R. Silva1-2/+1
Currently, function ssif_remove returns _rv_, which is a variable that is never initialized. Fix this by removing variable _rv_ and return 0 instead. Addresses-Coverity-ID: 1467999 ("Uninitialized scalar variable") Fixes: 6a0d23ed338e ("ipmi: ipmi_unregister_smi() cannot fail, have it return void") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-04-18ipmi: add an NPCM7xx KCS BMC driverHaiyue Wang3-0/+220
This driver exposes the Keyboard Controller Style (KCS) interface on Novoton NPCM7xx SoCs as a character device. Such SOCs are commonly used as a BaseBoard Management Controller (BMC) on a server board, and KCS interface is commonly used to perform the in-band IPMI communication between the server and its BMC. Signed-off-by: Avi Fishman <avifishman70@gmail.com> Signed-off-by: Haiyue Wang <haiyue.wang@linux.intel.com> Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-04-18ipmi_si: Clean up shutdown a bitCorey Minyard1-21/+11
Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-04-18ipmi_si: Rename intf_num to si_numCorey Minyard1-9/+9
There is already an intf_num in the main IPMI device structure, use a different name in the ipmi_si code to avoid confusion. Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-04-18ipmi: Remove smi->intf checksCorey Minyard2-17/+6
Due to changes in the way shutdown is done, it is no longer required to check that the interface is set. Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-04-18ipmi_ssif: Get rid of unused intf_numCorey Minyard1-5/+0
Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-04-18ipmi: ipmi_unregister_smi() cannot fail, have it return voidCorey Minyard3-10/+3
Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-04-18ipmi_devintf: Add an error return on invalid ioctlsCorey Minyard1-0/+4
Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-04-18ipmi_ssif: Remove usecount handlingCorey Minyard1-21/+0
Now that we can handle hot remove there is no need for usecounts for interfaces. Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-04-18ipmi: Remove condition on interface shutdownCorey Minyard1-2/+1
Now that the interfaces have shutdown handlers, this no longer needs to be conditional. Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-04-18ipmi_ssif: Convert over to a shutdown handlerCorey Minyard1-24/+31
Move the shutdown handling to a shutdown function called from the IPMI core code. That makes for a cleaner shutdown. Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-04-18ipmi_si: Convert over to a shutdown handlerCorey Minyard1-13/+18
Move the shutdown handling to a shutdown function called from the IPMI core code. That makes for a cleaner shutdown. Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-04-18ipmi: Rework locking and shutdown for hot removeCorey Minyard1-210/+280
To handle hot remove of interfaces, a lot of rework had to be done to the locking. Several things were switched over to srcu and shutdown for users and interfaces was added for cleaner shutdown. Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-04-18ipmi: Fix some counter issuesCorey Minyard1-31/+45
Counters would not be pegged properly on some errors. Have deliver_response() return an error so the counters can be incremented properly. Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-04-18ipmi: Change ipmi_smi_t to struct ipmi_smi *Corey Minyard3-95/+99
Get rid of this coding style violation in the user files. Include files will come later. Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-04-18ipmi: Rename ipmi_user_t to struct ipmi_user *Corey Minyard4-47/+47
Get rid of that non-compliance in the user files. Include files will come later. Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-04-18ipmi_devintf: Small lock reworkCorey Minyard1-55/+28
The mutex didn't really serve any useful purpose, from what I can tell, and it would just get in the way. So remove it. Removing that required a mutex around the default value setting and getting, so just use the receive mutex for that. Also pull the fasync stuff outside of the lock for adding the data to the queue, since it didn't need to be there. Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-04-18ipmi: Clean up some style issues in the message handlerCorey Minyard1-48/+35
Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-04-18ipmi: Break up i_ipmi_requestCorey Minyard1-310/+344
It was huge, and easily broken into pieces. Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-04-18ipmi:devintf: Clean up some coding style issuesCorey Minyard1-22/+18
Signed-off-by: Corey Minyard <cminyard@mvista.com>
2018-04-18ipmi: Clean up some debug codeCorey Minyard1-33/+25
Replace ifdefs in the code with a simple function. Signed-off-by: Corey Minyard <cminyard@mvista.com>