John L. Hammond [Mon, 20 Jun 2016 20:55:25 +0000 (16:55 -0400)]
staging/lustre/llite: correct request handling after ll_lookup_it()
In the FIFO cases of ll_atomic_open() and ll_lookup_nd() remove
spurious calls to ptlrpc_req_finished(). Explain that these cases are
unreachable in practice anyway.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/17068
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7402 Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Lai Siyao <lai.siyao@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Emoly Liu [Mon, 20 Jun 2016 20:55:24 +0000 (16:55 -0400)]
staging/lustre/llite: allocate and free client cache asynchronously
Since the inflight request holds import refcount as well as export,
sometimes obd_disconnect() in client_common_put_super() can't put
the last refcount of OSC import (e.g. due to network disconnection),
this will cause cl_cache being accessed after free.
To fix this issue, ccc_users is used as cl_cache refcount, and
lov/llite/osc all hold one cl_cache refcount respectively, to avoid
the race that a new OST is being added into the system when the client
is mounted.
The following cl_cache functions are added:
- cl_cache_init(): allocate and initialize cl_cache
- cl_cache_incref(): increase cl_cache refcount
- cl_cache_decref(): decrease cl_cache refcount and free the cache
if refcount=0.
Fan Yong [Mon, 20 Jun 2016 02:53:53 +0000 (22:53 -0400)]
staging: lustre: remove remote client support
There are several obsolete sub commands for lfs to work with
remote client. We do not support that anymore, and should be
deleted along with any kernel code related to remote client.
Signed-off-by: Fan Yong <fan.yong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6971
Reviewed-on: http://review.whamcloud.com/19789 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: James Simmons <uja.ornl@yahoo.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>
Linus Torvalds [Sun, 19 Jun 2016 17:05:14 +0000 (07:05 -1000)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull UDF fixes and a reiserfs fix from Jan Kara:
"A couple of udf fixes (most notably a bug in parsing UDF partitions
which led to inability to mount recent Windows installation media) and
a reiserfs fix for handling kstrdup failure"
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
reiserfs: check kstrdup failure
udf: Use correct partition reference number for metadata
udf: Use IS_ERR when loading metadata mirror file entry
udf: Don't BUG on missing metadata partition descriptor
Linus Torvalds [Sun, 19 Jun 2016 06:36:17 +0000 (20:36 -1000)]
Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC fixes from Olof Johansson:
"Another batch of fixes for ARM SoC platforms. Most are smaller fixes.
Two areas that are worth pointing out are:
- OMAP had a handful of changes to voltage specs that caused a bit of
churn, most of volume of change in this branch is due to this.
- There are a couple of _rcuidle fixes from Paul that touch common
code and came in through the OMAP tree since they were the ones who
saw the problems.
The rest is smaller changes across a handful of platforms"
* tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (36 commits)
ARM: dts: STi: stih407-family: Disable reserved-memory co-processor nodes
ARM: dts: am437x-sk-evm: Reduce i2c0 bus speed for tps65218
ARM: OMAP2+: timer: add probe for clocksources
ARM: OMAP1: fix ams-delta FIQ handler to work with sparse IRQ
memory: omap-gpmc: Fix omap gpmc EXTRADELAY timing
arm: Use _rcuidle for smp_cross_call() tracepoints
MAINTAINERS: Add myself as reviewer of ARM FSL/NXP
ARM: OMAP: DRA7: powerdomain data: Remove unused pwrsts_mem_ret
ARM: OMAP: DRA7: powerdomain data: Remove unused pwrsts_logic_ret
ARM: OMAP: DRA7: powerdomain data: Set L3init and L4per to ON
ARM: imx6ul: Fix Micrel PHY mask
ARM: OMAP2+: Select OMAP_INTERCONNECT for SOC_AM43XX
ARM: dts: DRA74x: fix DSS PLL2 addresses
ARM: OMAP2: Enable Errata 430973 for OMAP3
ARM: dts: socfpga: Add missing PHY phandle
ARM: dts: exynos: Fix port nodes names for Exynos5420 Peach Pit board
ARM: dts: exynos: Fix port nodes names for Exynos5250 Snow board
ARM: dts: sun6i: yones-toptech-bs1078-v2: Drop constraints on dc1sw regulator
ARM: dts: sun6i: primo81: Drop constraints on dc1sw regulator
ARM: dts: sunxi: Add OLinuXino Lime2 eMMC to the Makefile
...
Olof Johansson [Sun, 19 Jun 2016 05:57:48 +0000 (22:57 -0700)]
Merge tag 'omap-for-v4.7/fixes-powedomain' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
Fixes for omaps for v4.7-rc cycle:
- Fix dra7 for hardware issues limiting L4Per and L3init power domains
to on state. Without this the devices may not work correctly after
some time of use because of asymmetric aging. And related to this,
let's also remove the unusable states.
- Always select omap interconnect for am43x as otherwise the am43x
only configurations will not boot properly. This can happen easily
for any product kernels that leave out other SoCs to save memory.
- Fix DSS PLL2 addresses that have gone unused for now
- Select erratum 430973 for omap3, this is now safe to do and can
save quite a bit of debugging time for people who may have left
it out.
* tag 'omap-for-v4.7/fixes-powedomain' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: OMAP: DRA7: powerdomain data: Remove unused pwrsts_mem_ret
ARM: OMAP: DRA7: powerdomain data: Remove unused pwrsts_logic_ret
ARM: OMAP: DRA7: powerdomain data: Set L3init and L4per to ON
ARM: OMAP2+: Select OMAP_INTERCONNECT for SOC_AM43XX
ARM: dts: DRA74x: fix DSS PLL2 addresses
ARM: OMAP2: Enable Errata 430973 for OMAP3
+ Linux 4.7-rc2
Olof Johansson [Sun, 19 Jun 2016 05:21:52 +0000 (22:21 -0700)]
Merge tag 'fixes-rcu-fiq-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
Fixes for omaps for v4.7-rc cycle:
- Two boot warning fixes from the RCU tree that should have gotten
merged several weeks ago already but did not because of issues
with who merges them. Paul has now split the RCU warning fixes into
sets for various maintainers.
- Fix PM for omap3 boards using timer12 and gptimer, like the
original beagleboard
- Fix hangs on am437x-sk-evm by lowering the I2C bus speed
* tag 'fixes-rcu-fiq-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: dts: am437x-sk-evm: Reduce i2c0 bus speed for tps65218
ARM: OMAP2+: timer: add probe for clocksources
ARM: OMAP1: fix ams-delta FIQ handler to work with sparse IRQ
arm: Use _rcuidle for smp_cross_call() tracepoints
arm: Use _rcuidle tracepoint to allow use from idle
When booting with a compressed kernel, we need to be careful how we
populate memory close to DDR start. AUTO_ZRELADDR is enabled by default
in multi-arch enabled configurations, which place some restrictions on
where the kernel is placed and where it will be uncompressed to on boot.
AUTO_ZRELADDR takes the decompressor code's start address and masks out
the bottom 28 bits to obtain an address to uncompress the kernel to
(thus a load address of 0x42000000 means that the kernel will be
uncompressed to 0x40000000 i.e. DDR START on this platform).
Even changing the load address to after the co-processor's shared memory
won't render a booting platform, since the AUTO_ZRELADDR algorithm still
ensures the kernel is uncompressed into memory shared with the first
co-processor (0x40000000).
Another option would be to move loading to 0x4A000000, since this will
mean the decompressor will decompress the kernel to 0x48000000. However,
this would mean a large chunk (0x44000000 => 0x48000000 (64MB)) of
memory would essentially be wasted for no good reason.
Until we can work with ST to find a suitable memory location to
relocate co-processor shared memory, let's disable the shared memory
nodes. This will ensure a working platform in the mean time.
NB: The more observant of you will notice that we're leaving the DMU
shared memory node enabled; this is because a) it is the only one in
active use at the time of this writing and b) it is not affected by
the current default behaviour which is causing issues.
Fixes: fe135c6 (ARM: dts: STiH407: Move over to using the 'reserved-memory' API for obtaining DMA memory) Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Maxime Coquelin <maxime.coquelin@st.com> Signed-off-by: Olof Johansson <olof@lixom.net>
Oleg Drokin [Sun, 19 Jun 2016 03:53:13 +0000 (23:53 -0400)]
staging/lustre: Update FID documentation link.
When OpenSFS took over lustre.org, there was some reshuffling.
FIDs on ZFS document is now at
http://wiki.old.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs
instead of the old location, so update comments accordingly.
Wolfram Sang [Fri, 17 Jun 2016 08:46:52 +0000 (10:46 +0200)]
staging: ks7010: remove cfg file handling
I verified that all but two settings from the config file can be set up
also via 'iwconfig' or 'iwpriv'. The two missing are ROM_FILE and
PhyInformationTimer. ROM_FILE can be easily dropped. There is only one
known firmware floating on the net, so, the name is fix and we can make
this constant. Frankly, I don't know when PhyInformationTimer needs to
be set to non-zero. But if we need it somewhen, there is already
(currently commented out) code to add this as another private method, so
we could use that. Summa summarum: We can remove the config file
handling and the example config file. The only useful action,
initialization of the configuration struct, is now moved to the sdio
main file.
Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Torvalds [Sun, 19 Jun 2016 01:20:15 +0000 (15:20 -1000)]
Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King:
"A couple of fixes for pmd_mknotpresent()/pmd_present() for LPAE
systems"
* 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm:
ARM: 8579/1: mm: Fix definition of pmd_mknotpresent
ARM: 8578/1: mm: ensure pmd_present only checks the valid bit
Linus Torvalds [Sat, 18 Jun 2016 16:06:49 +0000 (06:06 -1000)]
Merge tag 'usb-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH:
"Here are a bunch (65) of USB fixes for 4.7-rc4. Sorry about the
quantity, I've been slow in getting these out.
The majority are the "normal" gadget, musb, and xhci fixes, that we
all are used to. There are also a few other tiny fixes resolving a
number of reported issues that showed up in 4.7-rc1.
All of these have been in linux-next"
* tag 'usb-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (65 commits)
usbip: rate limit get_frame_number message
usb: musb: sunxi: Remove bogus "Frees glue" comment
usb: musb: sunxi: Fix NULL ptr deref when gadget is registered before musb
usb: echi-hcd: Add ehci_setup check before echi_shutdown
usb: host: ehci-msm: Conditionally call ehci suspend/resume
MAINTAINERS: Add file patterns for usb device tree bindings
usb: host: ehci-tegra: Avoid getting the same reset twice
usb: host: ehci-tegra: Grab the correct UTMI pads reset
USB: mos7720: delete parport
USB: OHCI: Don't mark EDs as ED_OPER if scheduling fails
phy: ti-pipe3: Program the DPLL even if it was already locked
usb: musb: Stop bulk endpoint while queue is rotated
usb: musb: Ensure rx reinit occurs for shared_fifo endpoints
usb: musb: host: correct cppi dma channel for isoch transfer
usb: musb: only restore devctl when session was set in backup
usb: phy: Check initial state for twl6030
usb: musb: Use normal module_init for 2430 glue
usb: musb: Remove pm_runtime_set_irq_safe
usb: musb: Remove extra PM runtime calls from 2430 glue layer
usb: musb: Return error value from musb_mailbox
...
Linus Torvalds [Sat, 18 Jun 2016 16:05:28 +0000 (06:05 -1000)]
Merge tag 'staging-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull IIO and staging fixes from Greg KH:
"Here are a number of IIO and staging bugfixes for 4.7-rc4.
Nothing huge, the normal amount of iio driver fixes, and some small
staging driver bugfixes for some reported problems (2 are reverts of
patches that went into 4.7-rc1). All have been in linux-next with no
reported issues"
* tag 'staging-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (24 commits)
Revert "Staging: rtl8188eu: rtw_efuse: Use sizeof type *pointer instead of sizeof type."
Revert "Staging: drivers: rtl8188eu: use sizeof(*ptr) instead of sizeof(struct)"
staging: lustre: lnet: Don't access NULL NI on failure path
iio: hudmidity: hdc100x: fix incorrect shifting and scaling
iio: light apds9960: Add the missing dev.parent
iio: Fix error handling in iio_trigger_attach_poll_func
iio: st_sensors: Disable DRDY at init time
iio: st_sensors: Init trigger before irq request
iio: st_sensors: switch to a threaded interrupt
iio: light: bh1780: assign a static name
iio: bh1780: dereference the client properly
iio: humidity: hdc100x: fix IIO_TEMP channel reporting
iio:st_pressure: fix sampling gains (bring inline with ABI)
iio: proximity: as3935: fix buffer stack trashing
iio: proximity: as3935: remove triggered buffer processing
iio: proximity: as3935: correct IIO_CHAN_INFO_RAW output
max44000: Remove scale from proximity
iio: humidity: am2315: Remove a stray unlock
iio: humidity: hdc100x: correct humidity integration time mask
iio: pressure: bmp280: fix error message for wrong chip id
...
Linus Torvalds [Sat, 18 Jun 2016 16:04:01 +0000 (06:04 -1000)]
Merge tag 'driver-core-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core fixes from Greg KH:
"Here are a small number of debugfs, ISA, and one driver core fix for
4.7-rc4.
All of these resolve reported issues. The ISA ones have spent the
least amount of time in linux-next, sorry about that, I didn't realize
they were regressions that needed to get in now (thanks to Thorsten
for the prodding!) but they do all pass the 0-day bot tests. The
others have been in linux-next for a while now.
Full details about them are in the shortlog below"
* tag 'driver-core-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
isa: Dummy isa_register_driver should return error code
isa: Call isa_bus_init before dependent ISA bus drivers register
watchdog: ebc-c384_wdt: Allow build for X86_64
iio: stx104: Allow build for X86_64
gpio: Allow PC/104 devices on X86_64
isa: Allow ISA-style drivers on modern systems
base: make module_create_drivers_dir race-free
debugfs: open_proxy_open(): avoid double fops release
debugfs: full_proxy_open(): free proxy on ->open() failure
kernel/kcov: unproxify debugfs file's fops
Linus Torvalds [Sat, 18 Jun 2016 16:02:37 +0000 (06:02 -1000)]
Merge tag 'char-misc-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver fixes from Greg KH:
"Here are a small number of char and misc driver fixes for 4.7-rc4.
They resolve some minor issues that have been reported, and have all
been in linux-next"
* tag 'char-misc-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
coresight: Handle build path error
coresight: Fix erroneous memset in tmc_read_unprepare_etr
coresight: Fix tmc_read_unprepare_etr
coresight: Fix NULL pointer dereference in _coresight_build_path
extcon: palmas: Fix boot up state of VBUS when using GPIO detection
mcb: Acquire reference to carrier module in core
mcb: Acquire reference to device in probe
mei: don't use wake_up_interruptible for wr_ctrl
Linus Torvalds [Sat, 18 Jun 2016 15:57:59 +0000 (05:57 -1000)]
Merge branch 'for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fixes from Chris Mason:
"The most user visible change here is a fix for our recent superblock
validation checks that were causing problems on non-4k pagesized
systems"
* 'for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
Btrfs: btrfs_check_super_valid: Allow 4096 as stripesize
btrfs: remove build fixup for qgroup_account_snapshot
btrfs: use new error message helper in qgroup_account_snapshot
btrfs: avoid blocking open_ctree from cleaner_kthread
Btrfs: don't BUG_ON() in btrfs_orphan_add
btrfs: account for non-CoW'd blocks in btrfs_abort_transaction
Btrfs: check if extent buffer is aligned to sectorsize
btrfs: Use correct format specifier
Linus Torvalds [Sat, 18 Jun 2016 06:22:37 +0000 (20:22 -1000)]
Merge tag 'acpi-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI fix from Rafael Wysocki:
"Revert a recent ACPICA commit that introduced a suspend-to-RAM
regression on one system due to incorrect information in its ACPI
tables that had not been taken into consideration at all before (and
everything worked), but the commit in question started to use it"
* tag 'acpi-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
Revert "ACPICA: ACPI 2.0, Hardware: Add access_width/bit_offset support for acpi_hw_write()"
Linus Torvalds [Sat, 18 Jun 2016 06:08:00 +0000 (20:08 -1000)]
Merge tag 'pm-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fixes from Rafael Wysocki:
"Fixes for two recent regressions that may lead to degraded performance
(operating performance points framework, intel_pstate).
Specifics:
- Fix a recent regression in the intel_pstate driver that may lead to
degraded performance on some systems due to missing turbo state
entry in the table returned by the ACPI _PSS object (Srinivas
Pandruvada).
- Fix a recent regression in the OPP (operating performance points)
framework that may lead to degraded performance on some systems
where the OPP table is created too early (Viresh Kumar)"
* tag 'pm-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
PM / OPP: Add 'UNKNOWN' status for shared_opp in struct opp_table
cpufreq: intel_pstate: Adjust _PSS[0] freqeuency if needed
Linus Torvalds [Sat, 18 Jun 2016 05:27:12 +0000 (19:27 -1000)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID subsystem fixes from Jiri Kosina:
- kernel panic fix in hid-elo from Oliver Neukum
- Surface Pro 3 device quirk from Benjamin Tissoires
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: multitouch: Add MT_QUIRK_NOT_SEEN_MEANS_UP to Surface Pro 3
HID: elo: kill not flush the work
Since commit 49d200deaa68 ("debugfs: prevent access to removed files'
private data"), a debugfs file's file_operations methods get proxied
through lifetime aware wrappers.
However, only a certain subset of the file_operations members is supported
by debugfs and ->compat_ioctl isn't among them -- it appears to be NULL
from the VFS layer's perspective.
This behaviour breaks the /sys/kernel/debug/sync/sw_sync file introduced
concurrently with commit a44eb74cd413 ("staging/android: move SW_SYNC_USER
to a debugfs file").
Since that file never gets removed, there is no file removal race and thus,
a lifetime checking proxy isn't needed.
Avoid the proxying for /sys/kernel/debug/sync/sw_sync by creating it via
debugfs_create_file_unsafe() rather than debugfs_create_file().
For consistency, do the same for /sys/kernel/debug/sync/info.
Fixes: 49d200deaa68 ("debugfs: prevent access to removed files' private data") Fixes: a44eb74cd413 ("staging/android: move SW_SYNC_USER to a debugfs file") Signed-off-by: Nicolai Stange <nicstange@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gustavo Padovan [Tue, 31 May 2016 19:59:08 +0000 (16:59 -0300)]
staging/android: make sw_ioctl info internal to sw_sync.c
We don't want to export this from the kernel. This is interface is only
for testing and debug. So testers shall copy the ioctl info in their own
projects.
Gustavo Padovan [Tue, 31 May 2016 19:59:07 +0000 (16:59 -0300)]
staging/android: make sync_timeline internal to sw_sync
The only use sync_timeline will have in upstream kernel is for debugging
through the SW_SYNC interface. So make it internal to SW_SYNC to avoid
people use it in the future.
Gustavo Padovan [Tue, 31 May 2016 19:59:04 +0000 (16:59 -0300)]
staging/android: bring struct sync_pt back
Move the list_head members from sync_pt to struct fence was a mistake,
they will not be used by struct fence as planned before, so here we create
sync_pt again to bring the list heads back.
Gustavo Padovan [Tue, 31 May 2016 19:58:58 +0000 (16:58 -0300)]
staging/android: remove struct sync_timeline_ops
Move drv_name, the last field of sync_timeline_ops, to sync_timeline
and remove sync_timeline_ops.
struct sync_timeline_ops was just an extra abstraction on top of
fence_ops, and in the last few commits we removed all it ops in favor
of cleaner fence_ops.
Arnd Bergmann [Fri, 17 Jun 2016 19:56:15 +0000 (21:56 +0200)]
staging: comedi: avoid using timeval
Comedi uses 32-bit seconds for its timestamps, on both 32-bit and
64-bit machines. For all I can tell, this was originally meant as
a 'timespec', which would overflow in 2038 because of the use of
a signed 'long' on 32-bit machines, but it is now used as an
array of two unsigned 'lsampl_t' values in comedilib, which will
only overflow in 2106, on both 32-bit and 64-bit machines.
In an effort to get rid of all uses of 'struct timeval' in the kernel,
this replaces the internal code with a call to ktime_get_real_ts64()
and a comment at the location of the conversion.
checkpatch.pl warns that a cast of 1 to (long long) is unnecessary.
Remove the cast and also add code to check and make sure that
maxdata_list[chan] is not shifted too far, as suggested by Ian
Abbott.
Signed-off-by Chris Cesare <chris.cesare@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This Replace all occurences of (1<<x) by BIT(x) and DMM32AT_CTRL_PAGE(x),
DMM32AT_AI_CFG_SCINT(x) macros to get rid of checkpatch.pl
"CHECK" output "Prefer using the BIT macro"
This patch Replace all occurences of (1<<x) by BIT(x) and DAS6402_CTRL_TRIG(x),
DAS6402_MODE_RANGE(x), DAS6402_MODE_DMA(x) macros in the file das6402.c
to get rid of checkpatch.pl "CHECK" output "Prefer using the BIT macro"
The watchdog subdevice is supported using the addi_watchdog module and
it uses the register defines from addi_tcw.h. The only register define
needed it the iobase offset to the register block.
Remove the unnecessary defines and rename the iobase define.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: addi_apci_1564: rewrite the timer subdevice support
The support functions for the timer subdevice are broken.
1) The (*insn_write) assumes that insn->n is always 2 (data[1] is used)
2) The (*insn_read) assumes that insn->n is always 2 (data can be returned in
data[0] and data[1]).
3) The (*insn_config) does not follow the API. It assumes insn->n is always 4
(data[1], data[2] and data[3] are used). It also doesn't use data[0] to
determine what the config "instruction" is.
Rewrite the code to follow the comedi API and add the missing comedi driver
comment block.
The new implementation is based on the (minimal) datasheet I have from
ADDI-DATA.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: addi_apci_1564: use comedi_handle_event() for counters
The counter subdevice can generate an interrupt. Currently send_sig() is used
to let the task know when the interrupt occurs. Use the dev->read_subdev and
comedi_handle_events() instead.
Remove the, now unused, 'tsk_current' member from the private data and the
unnecessary include of <linux/sched.h>.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: addi_apci_1564: use comedi_handle_event() for timer
The timer subdevice can generate an interrupt. Currently send_sig() is used
to let the task know when the interrupt occurs. Use the dev->read_subdev
and comedi_handle_events() instead.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: addi_apci_1564: clarify change-of-state interrupt support
This board supports change-of-state interrupts on digital inputs 4 to 19
not 0 to 15.
The current code "works" but it could set inappropriate bits in the mode1
and mode2 registers that setup which channels are enabled. It also doesn't
return the status of the upper 4 channels (19 to 16).
Fix the comment and mask the mode1/mode2 values so that only the interrupt
capable channels can be enabled.
Add the SDF_LSAMPL flag to the subdevice so that 32-bit samples are used
instead of 16-bit ones. This allows returning the upper 4 channels. Use
the remaining bits in the sample to return "event" flags to the user.
The timer and counter subdevices can also generate interrupts and are a bit
hacked. They don't currently follow the comedi API and they use send_sig()
to let the task that know that the interrupt occured. The "event" flags will
be used instead when these subdevices are fixed.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 20 May 2016 13:49:20 +0000 (14:49 +0100)]
staging: comedi: plx9080.h: tidy up some comments
Use the usual block comment style and remove some excess spaces from
single-line comments. Remove some obvious stuff about register offsets
being zero relative. Remove some text about the original history of the
file, as it bears hardly any resemblance to it now.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Add macros in "plx9080.h" that define values for the DMATHR register
values. Use the prefix `PLX_DMATHR_` for the macros. Make use of the
`BIT(x)` and `GENMASK(h,l)` macros to define the values.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace the existing macros in "plx9080.h" that define values for the
DMACSR0 and DMACSR0 registers. Use the prefix `PLX_DMACSR_` for the
macros. Make use of the `BIT(x)` macro to define the values.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace the existing macros in "plx9080.h" that define values for the
DMADPR0 and DMADPR1 registers. (A little-endian version of the register
value is also placed in the `next` member of `struct plx_dma_desc`.)
Use the prefix `PLX_DMADPR_` for the macros. Make use of the `BIT(x)`
and `GENMASK(h,l)` macros to define the values.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace the existing macros in "plx9080.h" that define values for the
DMAMODE0 and DMAMODE1 registers. Use the prefix `PLX_DMAMODE_` for the
macros. Make use of the `BIT(x)` and `GENMASK(h,l)` macros to define
the values.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 20 May 2016 13:49:15 +0000 (14:49 +0100)]
staging: comedi: plx9080.h: add hard-coded PCIHIDR register value
For the PLX PCI 9080, the read-only PCIHIDR register is hard-coded with
the value `0x908010b5`. Add a macro `PLX_PCIHIDR_9080` that expands to
this value.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Replace the existing macros in "plx9080.h" that define values for the
CNTRL register. Use the prefix `PLX_CNTRL_` for the macros. Make use
of the `BIT(x)` and `GENMASK(h,l)` macros to define the values.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>