Easwar Hariharan [Mon, 26 Oct 2015 14:28:36 +0000 (10:28 -0400)]
staging/rdma/hfi1: Fix port bounce issues with 0.22 DC firmware
The DC firmware overwrites the enable_lane_tx register and does not update it
on a host request to go to Poll. This causes an infinite loop through the LNI
state machine if a link width downgrade occurs. This patch re-sets the
enable_lane_tx register to all 4 lanes.
Reviewed-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Easwar Hariharan <easwar.hariharan@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Caz Yokoyama [Mon, 26 Oct 2015 14:28:34 +0000 (10:28 -0400)]
staging/rdma/hfi1: Reset firmware instead of reloading Sbus
Reset firmware instead of reloading Sbus firmware if it's already done for this
ASIC. To work around thermal polling problem in firmware, don't reload Sbus
firmware, instead, reset the firmware on the initialization of the second HFI.
Reviewed-by: Easwar Hariharan <easwar.hariharan@intel.com> Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Reviewed-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Caz Yokoyama <caz.yokoyama@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging/rdma/hfi1: Add coalescing support for SDMA TX descriptors
This fixes transmit errors when the number of scatter gather elements in the
request is more that the number of per packet descriptors supported by the
hardware, allocate and coalesce the extra scatter gather elements into a single
buffer. The last descriptor is reserved and used for this coalesced buffer.
Verbs potentially need this support when transferring small data chunks
involving different memory regions.
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com> Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
If packets stop egressing the hardware link, software can lock up.
Implement a timeout for send context halt recovery. This patch increases the
timeout for packet egress to 500 us and timer resets to zero if the packet
occupancy changes. Also we bounce the link on time out.
Reviewed-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Vennila Megavannan <vennila.megavannan@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Easwar Hariharan [Mon, 26 Oct 2015 14:28:28 +0000 (10:28 -0400)]
staging/rdma/hfi1: Fix code to reset ASIC CSRs on FLR
The ASIC registers were not reset on FLR, and the code to
protect the ASIC block against multiple initializations by
peer HFIs did not extend to multiple ASICs in a system. This
patch addresses this gap.
Reviewed-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Easwar Hariharan <easwar.hariharan@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mike Marciniszyn [Mon, 26 Oct 2015 14:28:27 +0000 (10:28 -0400)]
staging/rdma/hfi1: Fix regression in send performance
The clear_ahg call is new in hfi1 vs qib. For small messages the progress
routine always builds one and clears out the ahg state when the queue has gone
to empty which is the predominant case for small messages.
Inline the routine and avoid the call to sdma_ahg_free to mitigate the
performance impact. Finally, move the routine to qp.h for scope reasons.
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
There are several occurencies of '#ifdef CAP_EXP<something>', spelled
differently each time. None of these is ever defined and therefore they
enclose dead code that can be removed.
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mike Rapoport [Mon, 26 Oct 2015 07:06:06 +0000 (09:06 +0200)]
staging: sm750fb: merge lynx_share into sm750_dev
Both struct lynx_share and struct sm750_dev reprsent some parts of the
SM750 graphics adapter. There is no point to keep these parts in
different structures.
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cristina Moraru [Sun, 25 Oct 2015 21:31:41 +0000 (23:31 +0200)]
staging: iio: adis16060_core: Fix error handling
We need to check adis16060_spi_read return code to avoid feeding user
space with bogus data.
While, at it introduce out_unlock label in order to simplify locking
on error path.
Lijun Pan [Sun, 25 Oct 2015 22:41:19 +0000 (17:41 -0500)]
staging: fsl-mc: section mismatch bug fix
WARNING: drivers/staging/built-in.o(.init.text+0xdc): Section mismatch in reference from the function fsl_mc_bus_driver_init() to the function .exit.text:dprc_driver_exit()
The function __init fsl_mc_bus_driver_init() references
a function __exit dprc_driver_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __exit annotation of
dprc_driver_exit() so it may be used outside an exit section.
Signed-off-by: Lijun Pan <Lijun.Pan@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Staging: lustre: Replace LPROCFS_CLIMP_CHECK with lprocfs_climp_check
Static inline functions are preferred over macros. The function is
placed in obd_class.h instead lprocfs_status.h because obd_class.h
includes header obd.h which contains definition of struct obd_device
and in that way avoids build error: Dereferencing pointer to incomplete
type. Also remove macro LPROCFS_CLIMP_CHECK since it's no longer used.
Cristina Moraru [Mon, 26 Oct 2015 22:30:08 +0000 (00:30 +0200)]
staging: lustre: Replace sscanf with kstrtoint
Replace single variable sscanf with specialized function
kstrtoint at the suggestion of checkpatch.pl, to fix
'WARNING: Prefer kstrto<type> to single variable sscanf'
Ian Abbott [Fri, 23 Oct 2015 09:56:09 +0000 (10:56 +0100)]
staging: comedi: fix extreme case of comedi_nsamples_left()
`comedi_nsamples_left(s, nsamples)` returns the number of samples
remaining to complete an asynchronous command or the passed in
`nsamples`, whichever is lower. However, it goes wrong in the extreme
case of setting the `nsamples` parameter to `UINT_MAX` when the number
of conversions per "scan" (`s->async->cmd.scan_end_arg`) is 1. It uses
`comedi_nscans_remaining(s, nscans)` to determine the number of scans
remaining, or the parameter `nscans`, whichever is lower. To determine
the parameter `nscans`, it divides `nsamples` by the number of
conversions per scan and adds 1. The addition of 1 is to avoid setting
the parameter `nscans` to 0, as `comedi_nscans_remaining(s, nscans)`
treats that value specially. However in the extreme case where
`nsamples` is `UINT_MAX` and the number of samples per scan is 1, the
addition of 1 to `nscans` overflows, producing the unwanted 0.
Fix it by refactoring new a function `__comedi_nscans_remaining(s,
nscans)` out of `comedi_nscans_remaining(s, nscans)`. The new function
does everything except the special handling when `nscans` is 0. Change
`comedi_nsamples_remaining()` to call the new function without adding 1
to `nscans` to avoid the overflow.
This overflow bug doesn't affect any of the current COMEDI drivers. I
stumbled across it while changing to one of the drivers.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shivani Bhardwaj [Mon, 26 Oct 2015 14:51:05 +0000 (20:21 +0530)]
Staging: wilc1000: coreconfigurator: Remove irrelevant wrapper function
Remove the function get_current_channel() and replace its calls by
get_current_channel_802_11n() as the former function's definition
involves only returning the value of latter function.
Semantic patch used to find out the issue:
Shivani Bhardwaj [Mon, 26 Oct 2015 14:46:32 +0000 (20:16 +0530)]
Staging: wilc1000: coreconfigurator: Drop unneeded wrapper functions
Replace the wrapper functions get_address1(), get_address2() and get_address3()
with the standard kernel function ether_addr_copy().
Semantic patch used to identify the issue:
Chaehyun Lim [Mon, 26 Oct 2015 00:44:43 +0000 (09:44 +0900)]
staging: wilc1000: fix parameter name of function declaration
This patch changes struct host_if_drv of host_int_set_WEPDefaultKeyID
function declaration from hWFIDrv to hif_drv in host_interface.h
With this change, first parameter name of this function declaration and
definition has same name as hif_drv.
Chaehyun Lim [Mon, 26 Oct 2015 00:44:42 +0000 (09:44 +0900)]
staging: wilc1000: fix return type of host_int_set_WEPDefaultKeyID
This patch changes return type of host_int_set_WEPDefaultKeyID from s32
to int. The result variable gets return value from wilc_mq_send that has
return type of int. It should be changed return type int as well as data
type of result variable.
Staging: mt29f_spinand: Prefer using the BIT macro
Replace all instances of bit shifting on 1 with the BIT(x) macro. In
addition, convert other non-1 shift operations with the equivalent
BIT(x) macro for uniformity. Issue pointed out by checkpatch.
CHECK: Prefer using the BIT macro
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Staging: mt29f_spinand: Replace udelay function with usleep_range
Use 'usleep_range' instead of 'udelay' to elapse time. For
spinand_reset, define the upper limit by a factor of 2 to keep the wait
short while still allowing a "good enough" range for wakeup. Define the
range 250us - 1ms for spinand_cmdfunc to provide enough leeway before
issuing spinand_reset. Checkpatch found this issue.
CHECK: usleep_range is preferred over udelay; see
Documentation/timers/timers-howto.txt
Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Use of the timer API function setup_timer instead of init_timer, removing
the structure field assignments, and make the codeflow more readable.
The simplified sematic patch used is :-
<smpl>
Use the timer API function setup_timer instead of init_timer, removing
the structure field assignments.
The simplified semantic patch used is :-
<smpl>
Dennis Menschel [Wed, 21 Oct 2015 21:16:56 +0000 (23:16 +0200)]
staging: fbtft: fix voltage settings for C-Berry28
This patch fixes some internal voltage settings for the C-Berry28 display.
The original example source files for the C-Berry28 as provided by
its vendor admatec contained six issues where a command parameter's value
didn't match its corresponding comment.
I've informed admatec about these discrepancies on 2015-08-25. In the
meantime, I've assumed the comments to be more reliable than the code,
and thus have used these values to write the initial C-Berry28 driver.
After having received a reply from admatec on 2015-10-16 that the issues
have been fixed in their example code, it has turned out that for the
voltages VCOM and AVDD, the code was indeed correct, but the comments
were wrong. This patch is meant to fix these two pending mistakes.
Signed-off-by: Dennis Menschel <menschel-d@posteo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dennis Menschel [Wed, 21 Oct 2015 21:16:55 +0000 (23:16 +0200)]
staging: fbtft: use init function instead of init sequence
This patch converts the default init sequence of the ST7789V
display controller into an init function, as init sequences
are considered deprecated by the maintainers of fbtft.
Signed-off-by: Dennis Menschel <menschel-d@posteo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dennis Menschel [Wed, 21 Oct 2015 21:16:54 +0000 (23:16 +0200)]
staging: fbtft: remove redundant set_addr_win() function
This patch removes the function set_addr_win() from fb_st7789v.c, as its
definition is redundant to the default implementation fbtft_set_addr_win()
which can be found in fbtft-core.c.
Signed-off-by: Dennis Menschel <menschel-d@posteo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dennis Menschel [Wed, 21 Oct 2015 21:16:53 +0000 (23:16 +0200)]
staging: fbtft: use MIPI DCS for ST7789V and C-Berry28
This patch makes use of the standard MIPI Display Command Set to remove
redundant entries from the command enum of the ST7789V display controller
and also some of the magic constants found in the init sequence of the
C-Berry28 display.
Signed-off-by: Dennis Menschel <menschel-d@posteo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>