summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2014-09-14iio:bma180: Enable use of device without IRQPeter Meerwald
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Cc: Oleksandr Kravchenko <o.v.kravchenko@globallogic.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-09-14iio: gyro: bmi055 gyro sensor driverIrina Tirdea
Add support for the BMI055 gyroscope sensor. BMI055 is a package consisting of an acceleration sensor and a gyroscope. This patch adds support for the gyroscope only. Spec downloaded from: http://ae-bst.resource.bosch.com/media/products/dokumente/bmi055/BST-BMI055-DS000-06.pdf The BMI055 gyroscope uses the same register definition as BMG160, but does not specify a temp register. However, the temp register seems to be working in the same way as for BMG160, so this patch does not remove the temp channel for BMI055. Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-09-14iio: accel: kxcjk-1013: Fix defined but unused warningDaniel Baluta
Noticed when compiling with CONFIG_PM_RUNTIME not set: kxcjk-1013.c: warning: ‘kxcjk1013_get_startup_times’ defined but not used [-Wunused-function] Introduced by commit 124e1b1d (iio: accel: kxcjk-1013: support runtime pm). Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-09-14iio: magn: ak8975: fix unnecessary casting between char* and const char*Irina Tirdea
Use const char* instead of casting const char* to char*. Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-09-14iio: gyro: bmg160: only set power state if PM_RUNTIME is definedIrina Tirdea
When CONFIG_PM_RUNTIME is not defined and bmg160 tries to power off the device, bmg160_set_power_state will call pm_runtime_put_autosuspend, which is not implemented (wil return -ENOSYS). Only call bmg160_set_power_state when CONFIG_PM_RUNTIME is defined. Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Acked-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-09-14iio: accel: kxcjk-1013: add support for kxtj2-1009Daniel Baluta
This patch adds support for KXTJ2-1009 3-axis acceleromenter sensor. KXTJ2-1009 uses the same register definitions as KXCJK-1013. The specification for KXTJ2-1009 can be downloaded from: http://www.kionix.com/sites/default/files/KXTJ2-1009%20Specifications%20Rev%204.pdf Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-09-13iio: accel: BMC150: add support for other Bosch chipsLaurentiu Palcu
The following chips are either similar or have only the resolution different. Hence, change this driver to support these chips too: BMI055 - combo chip (accelerometer part is identical to BMC150's) BMA255 - identical to BMC150's accelerometer BMA222E - 8 bit resolution BMA250E - 10 bit resolution BMA280 - 14 bit resolution Additionally: * add bmc150_accel_match_acpi_device() function to check that the device has been enumerated through ACPI; * rename bmc150_accel_acpi_gpio_probe() to bmc150_accel_gpio_probe() since the ACPI matching has been moved to the new function. Also, this will allow for the GPIO matching to be done against a device tree too, not only ACPI tree; * rename bmc150_scale_info struct member 'range' to 'reg_range' to be consistent with the naming convention used elsewhere in the driver and declare it u8, instead of int; * change CONFIG description to list all supported chips; Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-09-13staging: iio: light: isl29018: add ACPI supportLaurentiu Palcu
Add support for enumerating the device through ACPI. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-09-10iio: Add Dyna-Image AL3320A ambient light sensor driverDaniel Baluta
Minimal implementation. This driver provides raw illuminance readings. This is based on drivers/hwmon/al3320.c (*) driver from msm tree written by Tsechih Lin <Tsechih_Lin@asus.com> * https://android.googlesource.com/kernel/msm.git Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Reviewed-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-31staging: ad7606_core: Fix checkpatch warningSören Brinkmann
Fix the checkpatch complaint regarding unnecessary line continuation. WARNING: Avoid unnecessary line continuations #143: FILE: ad7606_core.c:143: Signed-off-by: Sören Brinkmann <soeren.brinkmann@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-30iio: accel: kxcjk-1013: add support for kxcj9-1008Daniel Baluta
This patch adds support for KXCJ9-1008 3-axis acceleromenter sensor. KXCJ9-1008 uses the same register definitions as KXCJK-1013. The specification for KXCJ9-1008 can be downloaded from: http://www.kionix.com/sites/default/files/KXCJ9-1008%20Specifications%20Rev%205.pdf Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-30iio: accel: BMC150: fix issues when CONFIG_PM_RUNTIME is not setLaurentiu Palcu
When CONFIG_PM_RUNTIME is not set, the following issues are seen: * warning message at compilation time: warning: 'bmc150_accel_get_startup_times' defined but not used [-Wunused-function] * bmc150_accel_set_power_state() will always fail and reading the accelerometer data is impossible; This occurs because of the call to pm_runtime_put_autosuspend calls __pm_runtime_suspend which returns -ENOSYS. This commit fixes these. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-30iio: accel: BMC150: fix scale value for 16GLaurentiu Palcu
According to documentation ([1] - page 27), the range for 16G is 7.81mg/LSB. Converted to SI, this is: 7.81 * 10^-3 * 9.80665 m/s^2 / LSB = 0.0765899365 m/s^2 / LSB [1] http://ae-bst.resource.bosch.com/media/products/dokumente/bmc150/BST-BMC150-DS000-04.pdf Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-30staging: iio: light: isl29018: add support for isl29023 and isl29035Laurentiu Palcu
Intersil chips ISL29018, ISL29023 and ISL29035 are very similar. They're all ambience light sensors. The ISL29018, however, is also a proximity sensor. The registers are similar too: -------------+----------+---------- AVAILABLE IN | ADDR REG | NAME 290xx | | -------------+----------+---------- 18/23/35| 00h| COMMANDI 18/23/35| 01h| COMMANDII (B4-7 are used only in 29018 for proximity) 18/23/35| 02h| DATALSB 18/23/35| 03h| DATAMSB 18/23/35| 04h| INT_LT_LSB 18/23/35| 05h| INT_LT_MSB 18/23/35| 06h| INT_HT_LSB 18/23/35| 07h| INT_HT_MSB 18/23| 08h| TEST 35| 0Fh| ID -------------+----------+----------- So, this patch will add support for ISL29023 and ISL29035 to the existing isl29018 driver. Since these 2 chips don't have proximity detection, the proximity sysfs attribute is not needed. Also, for ISL29035, since it has an ID register, make use of it in order to properly detect the chip and clear the brownout bit. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-30staging: iio: light: isl29018: fix typoLaurentiu Palcu
isl29108 was used, instead of isl29018. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-30iio: sensors-core: st: Check st_sensors_set_drdy_int_pin()'s return valueLee Jones
Value from st_sensors_set_drdy_int_pin() is assigned to err here, but that stored value is not used before it is overwritten. To fix this we're enforcing a check on st_sensors_set_drdy_int_pin()'s return value and if it's an error, we're returning right away. Cc: jic23@kernel.org Cc: linux-iio@vger.kernel.org Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-30iio: adc: at91: make the function handle_adc_eoc_trigger() staticJosh Wu
The handle_adc_eoc_trigger() in only used in at91_adc.c. So make it static. Signed-off-by: Josh Wu <josh.wu@atmel.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-30iio: adc: rockchip_saradc: remove unused variable in probeHeiko Stübner
The rate variable in the probe function of the saradc is a remnant of a previous patch iteration. It is unused and thus produces a compile time warning. Therefore remove it. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-30iio: imu: inv_mpu6050: Remove casting the return value which is a void pointerJingoo Han
Casting the return value which is a void pointer is redundant. The conversion from void pointer to any other pointer type is guaranteed by the C programming language. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-26iio: remove .owner field for driver using module_platform_driverSanjeev Sharma
This patch removes the .owner field for drivers which use the platform_driver_register api because this is overriden in _platform_driver_register. Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-26iio: accel: kxcjk-1013: Support thresholdsSrinivas Pandruvada
This chip has a motion detect capability. Using IIO events to specify thresholds and pushing events. In addition a new trigger of type any-motion is added, which pushes data to buffer only when there is any movement. Change list: Comments addressed for Re: [PATCH 5/6] iio: accel: kxcjk-1013: Support thresholds Date: 07/20/2014 - Both motion detect and data ready can be enabled together - Sending RISING/FALLING events based on int status - Separate interrupt configuration for data ready and motion detect Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-26io: accel: kxcjk1013: Remove redundant assignmentDaniel Baluta
data->range is already set by kxcjk1013_set_range. Signed-off-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-26iio:gyro:bmg160 Gyro Sensor driverSrinivas Pandruvada
This change implements support for BMG160 Gyro sensor. Although chip has several advanced features, this change implements minimum set required for using gyro sensor. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-26staging: unisys: fix indentation of uisutil_copy_fragsinfo_from_skb()Benjamin Romer
The function uisutil_copy_fragsinfo_from_skb() in uisutils.c is messy and over-indented. This patch fixes the function's indentation so it is cleaner. Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-26staging: unisys: fix spacing in uisthread.cBenjamin Romer
Fix the missing blank line between code and declarations in uisthread.c. Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-26staging: unisys: remove void return from uislib_mod_exit()Benjamin Romer
Remove the extraneous return from the uislib module exit function. Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-26staging: unisys: simplify destroy_bus() in uislib.cBenjamin Romer
The destroy_bus() function is heavily indented and many lines extend past the right margin. This patch simplifies the function without changing its effects. Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-26staging: unisys: fix spacing in uislib.cBenjamin Romer
Fix the line spacing between code and local variables in uislib.c. Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-25Merge tag 'iio-for-3.18a' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into work-next Jonathan writes: 1st round of new IIO drivers, functionality and cleanups for the 3.18 cycle. Maintainer Updates * Add 3 designated reviewers for IIO. Lars, Peter and Hartmut have been actively reviewing a lot of patches for a while now so this reflects the status quo. These three are probably the only reason I keep my head above the water! New drivers and device support * max5821 DAC * Rockchip SARADC * TI ADC128S052 ADC * BMC150 Accelerometer * exynos ADC driver gains support for s3c24xx and s3c64xx parts. * kxcjk-1013 gainst range control and runtime PM support to drive down it's power usage. Driver removals * Drop ad5930, ad99850, ad9852, ad9910 and ad9951 drivers on the simple basis that they drivers just provided a register write function with no compliant user space ABI whatsoever. Much better to drop them and start again for these in the fullness of time. Core Enhancements * Join together neighbouring elements in the demux units that feeds the binary interfaces. This cuts down on the number of individual copies needed when splitting out individual channels from the incoming channel scans. * Other demux related cleanups such as using roundup instead of a local implementation. Cleanups * Drop an unnecessary double setting of the owner field in xilinx adc. * Some more patches to use managed (devm) interfaces to cut down on complexity of removal code. * adis16060 coding style fixlets. * Fix some incorrect error returns in the Xilinx ADC driver. * Coding style fixlets for various accelerometer drivers. * Some sparse warning fixes to do with endianness and sign of variables. * Fix an incorrect and entirely pointless use of sizeof on a dynamic pointer in hid-sensor-magn-3d by dropping the relevant code.
2014-08-19iio: adc: xilinx: Remove .owner field for driverMichal Simek
There is no need to init .owner field. Based on the patch from Peter Griffin <peter.griffin@linaro.org> "mmc: remove .owner field for drivers using module_platform_driver" This patch removes the superflous .owner field for drivers which use the module_platform_driver API, as this is overriden in platform_driver_register anyway." Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-19staging:iio: Remove ad5930/ad9850/ad9852/ad9910/ad9951 dummy driversLars-Peter Clausen
All what these 'drivers' do is expose a single (non standard ABI) sysfs attribute that when written to does a direct pass-through to spi_write(). This is rather ugly and does not justify the existence of a driver as the same can easily done by using the spidev interface. The drivers will eventually be rewritten as proper IIO ABI compliant drivers which do have the proper abstraction layers between userspace and the device. But in the meantime these driver do not add any extra value and just clutter up the staging area. So just remove them. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2014-08-17staging: dgnc: Remove unnecessary dgnc_Major_Control_Registered variableKonrad Zapalowicz
The dgnc_Major_Control_Registered variable purpose was to act as a flag to indicate if the character device has been successfully registered into the kernel. This flag was later checked in the module cleanup function to know if the character device needs to be deregistered. However the {device,class}_destroy and unregister_chrdev functions may be called with 'invalid' data perfectly fine. This means that this variable is not needed and can safely be removed which is what this commit does. Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging: dgnc: Remove not needed dgnc_driver_start variableKonrad Zapalowicz
The dgnc_driver_start variable purpose was to indicate if the driver 'start' routine has been called. Now, because the 'start' routine can only be called once this variable is not needed thus this commit removes it. Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging: dgnc: Remove driver-wide polling counter variableKonrad Zapalowicz
The polling counter variable is only exposed via sysfs and has no other purpose. Now, since the polling shall be implemented as a board specific feature rather than being global in the driver this counter is obsolete. Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging: dgnc: Remove driver-wide state variableKonrad Zapalowicz
This commit removes the driver's global state variable. This is ok because the state was changed only once at the end of init phase thus the future usage of this variable is pointless. Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging: android: fix attribute as suggested by checkpatchPurnendu Kapadia
we should use __packed attribute Signed-off-by: Purnendu Kapadia <pro8linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging: wlan-ng: prism2mgmt.c Fix break not usefulJeshwanth Kumar N K
Fixed up warnings, break is not useful after return statement. And the exit Label is deleted, now returning inline. Signed-off-by: Jeshwanth Kumar N K <jeshkumar555@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging: lustre: lustre: libcfs: pr_warn instead printkHema Prathaban
This patch fixes the following warning using checkpatch.pl WARNING: Prefer [subsystem eg: netdev]_warn([subsystem]dev, ... then dev_warn(dev, ... then pr_warn(... to printk(KERN_WARNING ... Signed-off-by: Hema Prathaban <hemaklnce@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging: lustre: lustre: libcfs: do not use assignment in if conditionHema Prathaban
This patch fixes the following error using checkpatch.pl Error: do not use assignment in if condition Signed-off-by: Hema Prathaban <hemaklnce@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging/lustre: get rid of obd_* typedefsOleg Drokin
We have a bunch of typedefs for common things that made no sense and hid the actual type from plain view. Replace them with proper uXX or sXX types. Exception is in lustre_idl.h where they are replaced with __uXX and __sXX to be able to be included in userspace Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging/lustre: get rid of seqno_t and mdsno_t typedefsOleg Drokin
seqno_t is u64 and mdsno_t is u32 so just use them as such. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging: vt6655: Convert DBG_PRT to pr_<level>Joe Perches
DBG_PRT uses are unnecessarily complex. Convert DBG_PRT msglevel to pr_<level>. This changes the KERN_<level> type of several uses. It also enables dynamic_debug for the pr_debug conversions. This patch can be a prelude to converting these pr_<level> uses to dev_<level> as appropriate. Other changes: Realign arguments of these conversions. Remove now unused static int msglevel declarations. Remove now unused DBG_PRT #define. Compile tested only. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging/lustre/llite: Fix integer overflow in ll_fid2pathOleg Drokin
Reported by Dan Carpenter <dan.carpenter@oracle.com> outsize = sizeof(*gfout) + gfin->gf_pathlen; Where outsize is int and gf_pathlen is u32 from userspace can lead to integer overflowwhere outsize is some small number less than sizeof(*gfout) Add a check for pathlen to be of sensical size. Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Reviewed-on: http://review.whamcloud.com/11412 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5476 Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging/lustre/llite: optimize ll_fid2path()Frank Zago
The only parameter from userspace that matters is the length of the buffer. We don't need to allocate then import the whole structure. By importing only that length, we can save a memory allocation. Add sparse annotations to that function. Signed-off-by: frank zago <fzago@cray.com> Reviewed-on: http://review.whamcloud.com/11167 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5389 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging/lustre/llite: hold inode mutex around ll_setattr_raw()John L. Hammond
ll_setattr_raw() expects to be called with the inode mutex held so do when calling it from ll_hsm_import(). Signed-off-by: John L. Hammond <john.hammond@intel.com> Reviewed-on: http://review.whamcloud.com/11349 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5456 Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Faccini Bruno <bruno.faccini@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging/lustre/clio: reorder initialization in cl_req_alloc()John L. Hammond
In cl_req_alloc() ensure that the list heads crq_pages and crq_layers have been initialized before passing the request to cl_req_completion(). This fixes an oops in the error path. Signed-off-by: John L. Hammond <john.hammond@intel.com> Reviewed-on: http://review.whamcloud.com/11009 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5290 Reviewed-by: Bobi Jam <bobijam@gmail.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging/lustre/ldlm: drop redundant ibits lock interoperability checkFan Yong
In very old release (older than Lustre-1.8), if the client talks with the server that does not support ibits lock, then the client needs to convert it as plain lock. Such interoperability check and convertion is out of date for a long time. Drop it. Signed-off-by: Fan Yong <fan.yong@intel.com> Reviewed-on: http://review.whamcloud.com/11004 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4971 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: wangdi <di.wang@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging/lustre/llite: Make sure ft_flags is validPaul Cassella
In ll_fault0, the 'fault' struct is mostly cleared before the call to cl_io_loop, but ft_flags is not reset. It is ordinarily set by the call to filemap_fault in vvp_io_kernel_fault, but if Lustre returns before calling filemap_fault, it still has the old value of ft_flags. ll_fault0 will then consume the ft_flags field. If it has the VM_FAULT_RETRY bit set, it will be used as ll_fault0() and ll_fault()'s return value. This is a problem when VM_FAULT_RETRY is in ft_flags: When fault/filemap_fault return with that flag set, they have already released the mmap semaphore, and do_page_fault does not need to release it. Incorrectly returning this flag from ll_fault means mmap_sem is not upped in the kernel's do_page_fault(). In addition to clearing ft_flags, this patch does not use it unless it is valid. It's potentially misleading to return ft_flags in "fault_ret" if ft_flags has not been set by filemap_fault. This adds clarity, but does not change the current behavior: When not valid, ft_flags is replaced by fault_ret, which is zero, as is ft_flags when not set by filemap_fault. Signed-off-by: Patrick Farrell <paf@cray.com> Reviewed-on: http://review.whamcloud.com/10956 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5291 Reviewed-by: Bobi Jam <bobijam@gmail.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging/lustre/mdc: cleanup intent if mdc_finish_enqueue() failsJohn L. Hammond
In mdc_enqueue() clear the lock handle, lock mode, and request stored in the lookup intent if mdc_finish_enqueue() fails. Signed-off-by: John L. Hammond <john.hammond@intel.com> Reviewed-on: http://review.whamcloud.com/10963 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5289 Reviewed-by: Lai Siyao <lai.siyao@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-17staging/lustre/llite: check for integer overflow in hsm user requestNathaniel Clark
Check to make sure total size of request does not overflow when calculated. Return -1 from hur_len() if it does overflow. Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com> Reviewed-on: http://review.whamcloud.com/10615 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4984 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>