summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2017-02-09staging: greybus: operation: add generic timeout supportJohan Hovold
Add a struct timer_list to struct gb_operation and use that to implement generic operation timeouts. This simplifies the synchronous operation handling somewhat while also providing a generic timeout mechanism that drivers can use for asynchronous operations. Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Bryan O'Donoghue <pure.logic@nexus-software.ie> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-06Merge 4.10-rc7 into staging-nextGreg Kroah-Hartman
This resolves the merge errors that were reported in linux-next and it picks up the staging and IIO fixes that we need/want in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-05staging: fbtft: fix unaligned parenthesesUmang Raghuvanshi
Fix the following formatting issues: CHECK: Alignment should match open parenthesis Signed-off-by: Umang Raghuvanshi <u@umangis.me> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-05Drivers: staging: speakup: spk_priv.h - style fixDerek Robson
Changed function definition argument to have identifier name. found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-05staging: vchip_shim: Remove unneeded stddef.h includeStafford Horne
Building on openrisc musl toolchain this causes the allyesconfig build to fail. drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c:42:20: fatal error: stddef.h: No such file or directory Removing this causes no issues with the build. Signed-off-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-05staging: vt6656: Add missing identifier namesSimon Sandström
Fix all "function definition argument '...' should also have an identifier name" warnings in vt6656. Use identifier name from each corresponding C file. Signed-off-by: Simon Sandström <simon@nikanor.nu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-05Staging: bcm2835-audio: removed spaces around parenthesisMichael Rupprecht
Removed unnecessary spaces around parenthesis as reported by checkpatch.pl Signed-off-by: Michael Rupprecht <mail.michaelrupprecht@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-05staging:most/hdm-i2c: Replace symbolic permissions with octal permissionsZhengyi Shen
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. This warning was detected by checkpatch.pl for hdm_i2c.c. Signed-off-by: Zhengyi Shen <shenzhengyi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-05staging: octeon: Fix line over 80 charactersKamal Heib
This patch fix the line over 80 characters warning that was detected using checkpatch.pl script. Fixes: 6fe5efa1415c ('staging: octeon: Convert create_singlethread_workqueue()') Cc: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Kamal Heib <kamalheib1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-04Merge tag 'char-misc-4.10-rc7' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are two bugfixes that resolve some reported issues. One in the firmware loader, that should fix the much-reported problem of crashes with it. The other is a hyperv fix for a reported regression. Both have been in linux-next for a week or so with no reported issues" * tag 'char-misc-4.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read() firmware: fix NULL pointer dereference in __fw_load_abort()
2017-02-04Merge tag 'staging-4.10-rc7' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO fixes from Greg KH: "Here are a few small IIO and one staging driver fix for 4.10-rc7. They fix some reported issues with the drivers. All of them have been in linux-next for a week or so with no reported issues" * tag 'staging-4.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: greybus: timesync: validate platform state callback iio: dht11: Use usleep_range instead of msleep for start signal iio: adc: palmas_gpadc: retrieve a valid iio_dev in suspend/resume iio: health: max30100: fixed parenthesis around FIFO count check iio: health: afe4404: retrieve a valid iio_dev in suspend/resume iio: health: afe4403: retrieve a valid iio_dev in suspend/resume
2017-02-04Merge tag 'usb-4.10-rc7' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB fixes for some reported issues, and the usual number of new device ids for 4.10-rc7. All of these, except the last new device id, have been in linux-next for a while with no reported issues" * tag 'usb-4.10-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: serial: pl2303: add ATEN device ID usb: gadget: f_fs: Assorted buffer overflow checks. USB: Add quirk for WORLDE easykey.25 MIDI keyboard usb: musb: Fix external abort on non-linefetch for musb_irq_work() usb: musb: Fix host mode error -71 regression USB: serial: option: add device ID for HP lt2523 (Novatel E371) USB: serial: qcserial: add Dell DW5570 QDL
2017-02-03Merge tag 'scsi-fixes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fix from James Bottomley: "A single fix this time: a fix for a virtqueue removal bug which only appears to affect S390, but which results in the queue hanging forever thus causing the machine to fail shutdown" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: virtio_scsi: Reject commands when virtqueue is broken
2017-02-03Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhostLinus Torvalds
Pull virtio/vhost fixes from Michael S. Tsirkin: "Last minute fixes: - ARM DMA fix revert - vhost endian-ness fix - MAINTAINERS: email address change for Amit" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: MAINTAINERS: update email address for Amit Shah vhost: fix initialization for vq->is_le Revert "vring: Force use of DMA API for ARM-based systems with legacy devices"
2017-02-03Merge tag 'vfio-v4.10-rc7' of git://github.com/awilliam/linux-vfioLinus Torvalds
Pull VFIO fix from Alex Williamson: "Fix an error path in SPAPR IOMMU backend (Alexey Kardashevskiy)" * tag 'vfio-v4.10-rc7' of git://github.com/awilliam/linux-vfio: vfio/spapr: Fix missing mutex unlock when creating a window
2017-02-03Merge branch 'akpm' (patches from Andrew)Linus Torvalds
Merge fixes from Andrew Morton: "8 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: mm, fs: check for fatal signals in do_generic_file_read() fs: break out of iomap_file_buffered_write on fatal signals base/memory, hotplug: fix a kernel oops in show_valid_zones() mm/memory_hotplug.c: check start_pfn in test_pages_in_a_zone() jump label: pass kbuild_cflags when checking for asm goto support shmem: fix sleeping from atomic context kasan: respect /proc/sys/kernel/traceoff_on_warning zswap: disable changing params if init fails
2017-02-03base/memory, hotplug: fix a kernel oops in show_valid_zones()Toshi Kani
Reading a sysfs "memoryN/valid_zones" file leads to the following oops when the first page of a range is not backed by struct page. show_valid_zones() assumes that 'start_pfn' is always valid for page_zone(). BUG: unable to handle kernel paging request at ffffea017a000000 IP: show_valid_zones+0x6f/0x160 This issue may happen on x86-64 systems with 64GiB or more memory since their memory block size is bumped up to 2GiB. [1] An example of such systems is desribed below. 0x3240000000 is only aligned by 1GiB and this memory block starts from 0x3200000000, which is not backed by struct page. BIOS-e820: [mem 0x0000003240000000-0x000000603fffffff] usable Since test_pages_in_a_zone() already checks holes, fix this issue by extending this function to return 'valid_start' and 'valid_end' for a given range. show_valid_zones() then proceeds with the valid range. [1] 'Commit bdee237c0343 ("x86: mm: Use 2GB memory block size on large-memory x86-64 systems")' Link: http://lkml.kernel.org/r/20170127222149.30893-3-toshi.kani@hpe.com Signed-off-by: Toshi Kani <toshi.kani@hpe.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Zhang Zhen <zhenzhang.zhang@huawei.com> Cc: Reza Arbab <arbab@linux.vnet.ibm.com> Cc: David Rientjes <rientjes@google.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: <stable@vger.kernel.org> [4.4+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-03Merge tag 'regulator-fix-v4.10-rc6' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "Three changes here: two run of the mill driver specific fixes and a change from Mark Rutland which reverts some new device specific ACPI binding code which was added during the merge window as there are concerns about this sending the wrong signal about usage of regulators in ACPI systems" * tag 'regulator-fix-v4.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: fixed: Revert support for ACPI interface regulator: axp20x: AXP806: Fix dcdcb being set instead of dcdce regulator: twl6030: fix range comparison, allowing vsel = 59
2017-02-03vhost: fix initialization for vq->is_leHalil Pasic
Currently, under certain circumstances vhost_init_is_le does just a part of the initialization job, and depends on vhost_reset_is_le being called too. For this reason vhost_vq_init_access used to call vhost_reset_is_le when vq->private_data is NULL. This is not only counter intuitive, but also real a problem because it breaks vhost_net. The bug was introduced to vhost_net with commit 2751c9882b94 ("vhost: cross-endian support for legacy devices"). The symptom is corruption of the vq's used.idx field (virtio) after VHOST_NET_SET_BACKEND was issued as a part of the vhost shutdown on a vq with pending descriptors. Let us make sure the outcome of vhost_init_is_le never depend on the state it is actually supposed to initialize, and fix virtio_net by removing the reset from vhost_vq_init_access. With the above, there is no reason for vhost_reset_is_le to do just half of the job. Let us make vhost_reset_is_le reinitialize is_le. Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com> Reported-by: Michael A. Tebolt <miket@us.ibm.com> Reported-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Fixes: commit 2751c9882b94 ("vhost: cross-endian support for legacy devices") Cc: <stable@vger.kernel.org> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Greg Kurz <groug@kaod.org> Tested-by: Michael A. Tebolt <miket@us.ibm.com>
2017-02-03Revert "vring: Force use of DMA API for ARM-based systems with legacy devices"Michael S. Tsirkin
This reverts commit c7070619f3408d9a0dffbed9149e6f00479cf43b. This has been shown to regress on some ARM systems: by forcing on DMA API usage for ARM systems, we have inadvertently kicked open a hornets' nest in terms of cache-coherency. Namely that unless the virtio device is explicitly described as capable of coherent DMA by firmware, the DMA APIs on ARM and other DT-based platforms will assume it is non-coherent. This turns out to cause a big problem for the likes of QEMU and kvmtool, which generate virtio-mmio devices in their guest DTs but neglect to add the often-overlooked "dma-coherent" property; as a result, we end up with the guest making non-cacheable accesses to the vring, the host doing so cacheably, both talking past each other and things going horribly wrong. We are working on a safer work-around. Fixes: c7070619f340 ("vring: Force use of DMA API for ARM-based systems with legacy devices") Reported-by: Robin Murphy <robin.murphy@arm.com> Cc: <stable@vger.kernel.org> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com>
2017-02-03Merge tag 'usb-serial-4.10-rc7' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for v4.10-rc7 One more device ID for pl2303. Signed-off-by: Johan Hovold <johan@kernel.org>
2017-02-03Merge tag 'mmc-v4.10-rc6' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fix from Ulf Hansson: "MMC host: sdhci: Avoid hang when receiving spurious CARD_INT interrupts" * tag 'mmc-v4.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci: Ignore unexpected CARD_INT interrupts
2017-02-03Merge tag 'drm-fixes-for-v4.10-rc7' of ↵Linus Torvalds
git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Another fixes pull for v4.10, it's a bit big due to the backport of the VMA fixes for i915 that should fix the oops on shutdown problems that you've worked around. There are also two drm core connector registration fixes, a bunch of nouveau regression fixes and two AMD fixes" * tag 'drm-fixes-for-v4.10-rc7' of git://people.freedesktop.org/~airlied/linux: drm/radeon: Fix vram_size/visible values in DRM_RADEON_GEM_INFO ioctl drm/amdgpu/si: fix crash on headless asics drm/i915: Track pinned vma in intel_plane_state drm/atomic: Unconditionally call prepare_fb. drm/atomic: Fix double free in drm_atomic_state_default_clear drm/nouveau/kms/nv50: request vblank events for commits that send completion events drm/nouveau/nv1a,nv1f/disp: fix memory clock rate retrieval drm/nouveau/disp/gt215: Fix HDA ELD handling (thus, HDMI audio) on gt215 drm/nouveau/nouveau/led: prevent compiling the led-code if nouveau=y and leds=m drm/nouveau/disp/mcp7x: disable dptmds workaround drm/nouveau: prevent userspace from deleting client object drm/nouveau/fence/g84-: protect against concurrent access to semaphore buffers drm: Don't race connector registration drm: prevent double-(un)registration for connectors
2017-02-03staging: bcm2835: cleanup: remove deprecated <asm/uaccess.h> includeSeraphime Kirkovski
This replaces the last occurrence of the deprecated <asm/uaccess.h> include in the staging directory with the newer <linux/uaccess.h> Signed-off-by: Seraphime Kirkovski <kirkseraph@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: libcfs: double copy bugDan Carpenter
The problem is that we copy hdr.ioc_len, we verify it, then we copy it again without checking to see if it has changed in between the two copies. This could result in an information leak. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: fix coding style issue in vvp_page.cZhengyi Shen
This is a patch to fix "WARNING: line over 80 characters" found by checkpatch.pl in vvp_page.c. Signed-off-by: Zhengyi Shen <shenzhengyi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: ptlrpc : remove userland usage from ptlrpcJames Simmons
The reason for __REQ_LAYOUT_USER__ was to expose a section of code in layout.c to userland for a utility similar to wireshark. This was done before wireshark existed but now that it does we no longer need to do this type of hack. This also reduces lustre_acl.h to strictly a kernel header now. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8945 Reviewed-on: https://review.whamcloud.com/24396 Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: osc: avoid 64 divide in osc_cache_too_muchJames Simmons
The use of 64 bit time introduces an expensive 64 bit division operation. Since the time lapse being calculated in osc_cache_too_much will never be more than seventy years we can cast the time lapse to an long and perform a normal 32 bit divison operation instead. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8835 Reviewed-on: https://review.whamcloud.com/23814 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: lmv: remove nlink check in lmv_revalidate_slaveswang di
If an application attempts to remove millions of files in a single directory it will fail. This failure was tracked down to the nlink < 2 check in lmv_revalidate_slaves, because after nlink reaches to maximum value of LDISKFS_LINK_MAX (65000), the nlink broadcast back from the server will be reported as one. The return value of 1 is not invalid so lets remove the check. Signed-off-by: wang di <di.wang@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6984 Reviewed-on: http://review.whamcloud.com/16490 Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Jian Yu <jian.yu@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: llite: don't invoke direct_IO for the EOF caseYang Sheng
The function generic_file_read_iter() does not check EOF before invoke direct_IO callback. So we have to check it ourselves. Signed-off-by: Yang Sheng <yang.sheng@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8969 Reviewed-on: https://review.whamcloud.com/24552 Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Bobi Jam <bobijam@hotmail.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: obd: move s3 in lmd_parse to inner loopJames Simmons
Building the lustre client with W=1 reports the following error: obdclass/obd_mount.c: In function lmd_parse: obdclass/obd_mount.c:880: warning: variable set but not used The solution is to move s3 to the inner loop where it is only used. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8378 Reviewed-on: https://review.whamcloud.com/23820 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: fid: Change positional struct initializers to C99Steve Guminski
This patch makes no functional changes. Struct initializers in the fid directory that use C89 or GCC-only syntax are updated to C99 syntax. The C99 syntax prevents incorrect initialization if values are accidently placed in the wrong position, allows changes in the struct definition, and clears any members that are not given an explicit value. The following struct initializers have been updated: lustre/fid/fid_lib.c: const struct lu_seq_range LUSTRE_SEQ_SPACE_RANGE const struct lu_seq_range LUSTRE_SEQ_ZERO_RANGE lustre/fid/lproc_fid.c: struct lprocfs_vars seq_client_debugfs_list Signed-off-by: Steve Guminski <stephenx.guminski@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6210 Reviewed-on: https://review.whamcloud.com/23789 Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com> Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: ptlrpc: update replay cursor when close during replayNiu Yawei
The replay cursor should be updated properly when close happened during replay, otherwise, ptlrpc_replay_next() could run into a dead loop due to an invalid replay cursor: - replay cursor is moved to an open request during replay; - application close that open file, so the rq_replay of the open request is cleared; - ptlrpc_replay_next() calls ptlrpc_free_committed() to free committed/closed requests, the open request is removed from the committed list, so the replay cursor is changed to an empty list_head now. The open request won't be freed now since it's still held by the pending close request; - ptlrpc_replay_next() continue to move the replay cursor to next and run into a dead loop at the end; Another change in this patch is to remove the out of date comments in ptlrpc_replay_next() and cover the whole process of finding replay request within imp_lock, because: 1. With two separated replay lists and replay cursor introduced, finding replay request won't take much time as before, it's not necessary to do this "lock -> unlock -> lock -> unlock" trick anymore; 2. Nowadays there are various kind of non-replay requests are allowed during recovery, so ptlrpc_free_committed() may run in parallel to remove an open request while ptlrpc_replay_next() is iterating the open requests list; Signed-off-by: Niu Yawei <yawei.niu@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8765 Reviewed-on: https://review.whamcloud.com/23418 Reviewed-by: Yang Sheng <yang.sheng@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: ptlrpc: update MODULE_PARAM_DESC in ptlrpcd.cDmitry Eremin
Update max_ptlrpcds module parameter descriptions to let users know its obsolete. Change cpt to CPT for the module parameter description ptlrpcd_per_cpt_max so it matches documentation. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8890 Reviewed-on: https://review.whamcloud.com/24065 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: ptlrpc: remove unused pc->pc_envDmitry Eremin
Environment for request interpreters is not used any more. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8887 Reviewed-on: https://review.whamcloud.com/24061 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: socklnd: remove socklnd_init_msgJames Simmons
Remove the inline function socklnd_init_msg. Its only used by the kernel code so no point keeping it in an UAPI header. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6142 Reviewed-on: https://review.whamcloud.com/18506 Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: ksocklnd: ignore timedout TX on closing connectionLiang Zhen
ksocklnd reaper thread always tries to close the connection for the first timedout zero-copy TX. This is wrong if this connection is already being closed, because the reaper will see the same TX again and again and cannot find out other timedout zero-copy TXs and close connections for them. Signed-off-by: Liang Zhen <liang.zhen@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8867 Reviewed-on: https://review.whamcloud.com/23973 Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: mdc: avoid returning freed requestJohn L. Hammond
In mdc_close() if ptlrpc_request_pack() fails then set req to NULL so that an already freed request is not returned in *request. Signed-off-by: John L. Hammond <john.hammond@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8811 Reviewed-on: https://review.whamcloud.com/23843 Reviewed-by: Patrick Farrell <paf@cray.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: mdc: Make IT_OPEN take lookup bits lockPatrick Farrell
An earlier commit accidentally changed handling of IT_OPEN, making it take the MDS_INODELOCK_UPDATE bits lock instead of MDS_INODELOCK_LOOKUP. This does not cause any known bugs. Signed-off-by: Patrick Farrell <paf@cray.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8842 Reviewed-on: https://review.whamcloud.com/23797 Fixes: 70a251f68dea ("staging: lustre: obd: decruft md_enqueue() and md_intent_lock()" Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Lai Siyao <lai.siyao@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: libcfs: Change positional struct initializers to C99Steve Guminski
This patch makes no functional changes. Struct initializers in the libcfs directory that use C89 or GCC-only syntax are updated to C99 syntax. The C99 syntax prevents incorrect initialization if values are accidently placed in the wrong position, allows changes in the struct definition, and clears any members that are not given an explicit value. The following struct initializers have been updated: libcfs/include/libcfs/libcfs_crypto.h: static struct cfs_crypto_hash_type hash_types[] Signed-off-by: Steve Guminski <stephenx.guminski@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6210 Reviewed-on: https://review.whamcloud.com/23332 Reviewed-by: Frank Zago <fzago@cray.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: libcfs: fix error messagesDmitry Eremin
Don't treat unability to set CPU partition affinity as error. Improve those warning messages. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8703 Reviewed-on: https://review.whamcloud.com/23307 Reviewed-by: Patrick Farrell <paf@cray.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: obd: remove OBD_NOTIFY_CREATEJohn L. Hammond
None of the obd_notify() handlers listen for the OBD_NOTIFY_CREATE event, so remove it and its sole use in lov_add_target(). Signed-off-by: John L. Hammond <john.hammond@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8403 Reviewed-on: https://review.whamcloud.com/21420 Reviewed-by: Ben Evans <bevans@cray.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: ptlrpc: allow blocking asts to be delayedVladimir Saveliev
ptlrpc_import_delay_req() refuses to delay blocking asts when import is not in LUSTRE_IMP_FULL yet. That leads to client eviction assuming that it failed to respond. Allow delays for blocking asts being resent. Signed-off-by: Vladimir Saveliev <vladimir.saveliev@seagate.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8351 Seagate-bug-id: MRP-3500 Reviewed-on: https://review.whamcloud.com/21065 Reviewed-by: Bobi Jam <bobijam@hotmail.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: osc: osc_match_base prototype differs from declarationSteve Guminski
The patch updates the prototype in osc_internal.h to match the enums used in the declaration. The osc_match_base declaration in lustre/osc/osc_request.c uses enums for stricter checking on the type and mode parameters: int osc_match_base(struct obd_export *exp, ... --> enum ldlm_type type, union ldlm_policy_data *policy, --> enum ldlm_mode mode, ... int unref) The prototype in lustre/osc/osc_internal.h instead used unsigned ints: int osc_match_base(struct obd_export *exp, ... --> __u32 type, union ldlm_policy_data *policy, --> __u32 mode, ... int unref); Signed-off-by: Steve Guminski <stephenx.guminski@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8189 Reviewed-on: http://review.whamcloud.com/23167 Reviewed-by: Frank Zago <fzago@cray.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: ptlrpc: leaked rs on difficult replyNiu Yawei
reply_out_callback() should call ptlrpc_schedule_difficult_reply() to finalize the rs if it's already not on uncommitted list, otherwise, the rs and the export held by rs could be leaked: - target_send_reply() sends a difficult reply before the transaction committed, the reply is linked to scp_rep_active; - export gets disconnected by umount or whatever reason, server_disconnect_export() is called to complete all outstanding replies, which will calls into ptlrpc_handle_rs() to dispose of the rs, so the rs is removed from the uncommitted list and LNetMDUnlink() is called to unlink the reply buffer and generate an unlink event; - reply_out_callback() is called to process above unlink event, ptlrpc_schedule_difficult_reply() is supposed to be called to dispose of the rs finally. However, it could be skipped because of following flawed code snippet: if (!rs->rs_no_ack || rs->rs_transno <= rs->rs_export->exp_obd->obd_last_committed) ptlrpc_schedule_difficult_reply(rs); The intention of above code is: if rs_no_ack is true (COS enabled), and transaction is not committed, we should rely on commit callback to release the rs. However, it overlooked the situation that rs could have been removed from the uncommitted list by disconnecting export. Signed-off-by: Niu Yawei <yawei.niu@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7903 Reviewed-on: http://review.whamcloud.com/22696 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Lai Siyao <lai.siyao@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: libcfs: remove integer types abstraction from libcfsJames Simmons
Replace the ulong_ptr_t and long_ptr_t with standard kernel types. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/20204 Reviewed-by: Frank Zago <fzago@cray.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: llite: Adding timed wait in ll_umount_beginRahul Deshmukh
There exists timing race between umount and other thread which will increment the reference count on mnt e.g. getattr. If umount thread lose the race then umount fails with EBUSY error. To avoid this timed wait is added so that umount thread will wait for user to decrement the mnt reference count. Signed-off-by: Rahul Deshmukh <rahul.deshmukh@seagate.com> Signed-off-by: Lokesh Nagappa Jaliminche <lokesh.jaliminche@seagate.com> Signed-off-by: Jian Yu <jian.yu@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1882 Seagate-bug-id: MRP-1192 Reviewed-on: http://review.whamcloud.com/20061 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Lai Siyao <lai.siyao@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: llite: specify READA debug mask for ras_updateBobi Jam
So that debug log only contains relevant messages for debugging purpose. Signed-off-by: Bobi Jam <bobijam.xu@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8413 Reviewed-on: http://review.whamcloud.com/22753 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Fan Yong <fan.yong@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: header: remove assert from interval_set()James Simmons
In the case of interval_tree.h only interval_set() uses LASSERT which is removed in this patch and interval_set() instead reports a real error. The header libcfs.h for interval_tree.h is not needed anymore so we can just use the standard linux kernel headers instead.h Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/22522 Reviewed-on: https://review.whamcloud.com/24323 Reviewed-by: Frank Zago <fzago@cray.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03staging: lustre: lov: ld_target could be NULLBobi Jam
lov_device::ld_target[ost_idx] could be NULL if the OST target is not filled in lov_device::ld_lov::lov_tgt_desc[ost_idx] yet. Signed-off-by: Bobi Jam <bobijam.xu@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8018 Reviewed-on: http://review.whamcloud.com/21411 Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>