This inline function simply returns the 'irq' of the struct pci_dev pointer
that is stored in struct mite_struct. This pci_dev pointer is the same as
the one that is already available in the (*auto_attach) functions where
mite_irq() is used.
Use the pci_dev pointer directly to get the irq and remove the unnecessary
inline function to remove the indirection.
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: ni_pcimio: remove ATMIO and PCIMIO defines
These defines were probably intended to be used so that ni_mio_common.c
could detect if it was included by a driver that uses ioport or memory
mapped register access. This can actually be detected by checking if
the 'mite' member in the private data has been allocated.
Regardless, the symbols are not used. Just remove them.
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: ni_mio_cs: remove ATMIO and PCIMIO defines
These defines were probably intended to be used so that ni_mio_common.c
could detect if it was included by a driver that uses ioport or memory
mapped register access. This can actually be detected by checking if
the 'mite' member in the private data has been allocated.
Regardless, the symbols are not used. Just remove them.
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: ni_atmio: remove ATMIO and PCIMIO defines
These defines were probably intended to be used so that ni_mio_common.c
could detect if it was included by a driver that uses ioport or memory
mapped register access. This can actually be detected by checking if
the 'mite' member in the private data has been allocated.
Regardless, the symbols are not used. Just remove them.
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: ni_stc.h: the boardinfo 'name' should be first
By convention, the first member of the boardinfo is a 'const char *' to
the board name, especially for those comedi drivers that rely on the
comedi core to set dev->board_ptr to the entry matching the board name
when doing a legacy (*attach) to a comedi driver.
Modify the ni_board_struct appropriately for consistency, although the
board name is only used for informational purposes by this driver (only
the driver name is matched by the comedi core).
For aesthetics, also move the members in the boardinfo declarations.
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>
Merge tag 'iio-for-3.17b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
Second round of new drivers and cleanups for IIO in the 3.17 cycle.
New drivers
* mcp4902, mcp4912 and mcp4922 SPI DAC driver.
* max1027, max1029 and max1031 SPI ADC driver.
Cleanups
* cm32181 - use devm APIs to simplify error paths.
* ak8975 - use devm APIs to simplify error paths.
* ad9850 - drop some unused defines and an unnecessary goto.
* hmc5843 - add missing devices to the device id table and the documentation.
* ad9832 - small formatting cleanups.
* sca3000 - hide direct use of the stufftoread element by adding a
data_available function. This is a precursor for the addition of buffer
watermarks to the subsystem but stands as a good cleanup on its own.
Vincent Heuken [Mon, 23 Jun 2014 12:09:18 +0000 (05:09 -0700)]
Staging: slicoss: fixed frivolous else statement warnings in slicoss.c
This is a patch for the slicoss.c file that fixes four instances
of the following warning:
WARNING: else is not generally useful after a break or return
Signed-off-by: Vincent Heuken <me@vincentheuken.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sachin Kamat [Mon, 23 Jun 2014 06:13:08 +0000 (11:43 +0530)]
staging: emxx_udc: Fix build error
devm_request_and_ioremap has been removed since commit c9d53c0f2d23
("devres: remove devm_request_and_ioremap()") Use devm_ioremap_resource
instead. While at it, also remove redundant error message as it is now
handled by devm_ioremap_resource. Without this patch we get the following
build error:
drivers/staging/emxx_udc/emxx_udc.c:3370:2: error: implicit declaration of function ‘devm_request_and_ioremap’ [-Werror=implicit-function-declaration]
The bug was caused by race between truncate & fsync.
osc_extent_wait() doesn't takes into account oe_trunc_pending
during setting oe_urgent. The race arises after
osc_object_unlock().
osc_extent_wait() should ignore extents with oe_trunc_pending
while waiting for OES_INV. osc_cache_truncate_end() will set
oe_urgent and call osc_io_unplug_async()
'sd.page_link' is used uninitialized in this function.
'ss.page_link' is used uninitialized in this function.
'sl.page_link' is used uninitialized in this function.
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: http://review.whamcloud.com/10613
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629 Reviewed-by: James Simmons <uja.ornl@gmail.com> 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>
staging/lustre/ptlrpc: Add schedule point to ptlrpc_check_set()
Most ptlrpc sets are believed to be small and bounded in length. However
at the very least the ptlrpcd reuses the ptlrpc sets at its primary work
queue. This work queue can easily have work added faster than the ptlrpcd
thread can process the work. The unbounded work can lead to the ptlrpcd
monopolizing a CPU for hundreds of seconds. Obviously a well-behaved
kernel function should obey the scheduler and share the processor.
We address that problem by inserting a cond_resched() at the top of the
main loop of ptlrpc_check_set().
Some have suggested putting the cond_resched() lower in the loop. However,
the only current way to bound the number of loops that we exceed our
allocated run time is to put the call at the top of the loop. Putting it
lower would allow an unknown number (and since it is unknown, it might be
excessively large at times) of cycles through the loop before a
resched is allowed.
Cheng Shao [Mon, 23 Jun 2014 01:32:13 +0000 (21:32 -0400)]
staging/lustre/mgc: replace hard-coded MGC_ENQUEUE_LIMIT value
During client mount, the client will send an LDLM_ENQUEUE request to
MGS with send delay set to MGC_ENQUEUE_LIMIT, which is hard coded to
50 seconds. On the other hand, the interval for pinger is deduced from
obd_timeout. When obd_timeout is configured for a longer period of
time, so does the pinger. We know that connecting to the secondary MGS
node is triggered by the pinger. Now that we have a longer interval,
the pinger will not be able to try the secondary before the
LDLM_ENQUEUE request fails the mount using the same delay limit.
This code change will replace the hard-coded send delay being
mentioned above with a value that is long enough to give the client a
chance to connect to the secondary MGS if exists.
Alexander.Boyko [Mon, 23 Jun 2014 01:32:12 +0000 (21:32 -0400)]
staging/lustre/ptlrpc: race at req processing
Race between ptlrpc_resend_req() and ptlrpc_check_set().
1 thread do ptlrpc_check_set()->after_reply()
2 thread do ptlrpc_resend_req()
The result is request with rq_resend = 1 and MSG_REPLY flag.
When this request will came to server it will cause client eviction.
The patch skip ptlrpc_resend_req logic if rq_replied is set,
and clear rq_resend flag at reply_in_callback() when client got
reply.
Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com>
Xyratex-bug-id: MRP-1888
Reviewed-on: http://review.whamcloud.com/10471
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5116 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Mike Pershin <mike.pershin@intel.com> Reviewed-by: Chris Horn <hornc@cray.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bobi Jam [Mon, 23 Jun 2014 01:32:11 +0000 (21:32 -0400)]
staging/lustre/osc: get rid of old checksum initial value
Old code residue assumes initial checksum value as ~0, and relies on
that to check whether OST server has calculated bulk data checksum.
That is not the case anymore.
Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Reviewed-on: http://review.whamcloud.com/10354
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4937 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andriy Skulysh [Mon, 23 Jun 2014 01:32:10 +0000 (21:32 -0400)]
staging/lustre/mgc: mgc import reconnect race
mgc import can be reconnected by pinger or
ptlrpc_reconnect_import().
ptlrpc_invalidate_import() isn't protected against
alteration of imp_invalid state. Import can be
reconnected by pinger which makes imp_invalid
equal to false. Thus LASSERT(imp->imp_invalid) fails
in ptlrpc_invalidate_import().
It is safe to call ptlrpc_invalidate_import() when
import is deactivated, but ptlrpc_reconnect_import() doesn't
deactivate it.
Let's use only pinger when available to reconnect import
*_enlarge_reqbuf class of functions can change request body location
for a request that's already in replay list, as such a parallel
traverser of the list (after_reply -> ptlrpc_free_committed) might
access freed and scrambled memory causing assertion.
Since all such users only can get to this request under imp_lock, take
imp_lock to protect against them in *_enlarge_reqbuf
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/10074
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3333 Reviewed-by: Mike Pershin <mike.pershin@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Oleg Drokin [Mon, 23 Jun 2014 01:32:05 +0000 (21:32 -0400)]
staging/lustre/libcfs: revert changes to libcfs_sock_ioctl
Changes introduced by 80db2734acbc78db12798cfb611d6acc7fe389e6
unfortunately totally break lustre, we use this function
to access not only socket proto obs, but also device ioctl
like SIOCGIFCONF that now fail.
Reverting part of the previous patch to regain the needed
functionality.
Ben Chan [Tue, 24 Jun 2014 07:55:58 +0000 (00:55 -0700)]
staging: gdm72xx: fix block comment style
This patch fixes the following checkpatch warnings, which are issued
when the gdm72xx driver is moved out of staging into drivers/net/wimax:
WARNING: networking block comments don't use an empty /* line, use /* Comment...
WARNING: networking block comments start with * on subsequent lines
WARNING: networking block comments put the trailing */ on a separate line
Signed-off-by: Ben Chan <benchan@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>