Glen Lee [Tue, 27 Oct 2015 09:27:45 +0000 (18:27 +0900)]
staging: wilc1000: wlan_initialize_threads: change argument with net_device
This patch changes function argument with net_device and use netdev private
data member wilc instead of g_linux_wlan. And there are assignment code with
different value continuously. Take last code.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 27 Oct 2015 09:27:40 +0000 (18:27 +0900)]
staging: wilc1000: wilc_handle_isr: add argument wilc to wilc_handle_isr
This patch add new argument wilc to wilc_handle_isr and pass wilc to
the function.
It is void type for now because wilc_wlan.c was implemented platform
independently at the beginning (linux_wlan.c is implementation of LINUX part),
so the header file which defines struct wilc cannot be included at this moment,
but this driver is dedicated to LINUX so wilc_wlan.c and linux_wlan.c will be
merged. After that, this void type will be changed with struct wilc as well as
other functions which are using void type in wilc_wlan.h.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 27 Oct 2015 09:27:37 +0000 (18:27 +0900)]
staging: wicl1000: isr_uh_routine: use netdev private wilc
Use netdev private member wilc instead of g_linux_wlan and change argument wilc
with dev in the function request_threaded_irq to pass back to handler
the function isr_uh_routine.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Tue, 27 Oct 2015 09:20:14 +0000 (18:20 +0900)]
staging: wilc1000: fix build error on SPI
wilc_netdev_init function has parameters to pass but no argument is passed
when bus type SPI is selected. Which causes build error.
This patch passes argument &wilc to the function wilc_netdev_init.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Fixes: 12ba5416dc77 ("staging: wilc1000: assign pointer of g_linux_wlan to sdio device data") Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Wed, 28 Oct 2015 16:54:28 +0000 (12:54 -0400)]
staging: lustre: cleanup over 80 characters in libcfs_hash.h
Fix up all the over 80 character line issues in libcfs_hash.h
reported by checkpatch.pl. At the same time update this header
to match what is in the OpenSFS lustre branch.
Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jubin John [Mon, 26 Oct 2015 14:28:47 +0000 (10:28 -0400)]
staging/rdma/hfi1: Add unit # to verbs txreq cache name
The name used to create the verbs txreq cache was not qualified with the unit
number. This causes a panic when destroying the cache on a dual HFI systems.
Create a unique name with the unit number with this patch
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Jubin John <jubin.john@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:46 +0000 (10:28 -0400)]
staging/rdma/hfi1: Load SBus firmware once per ASIC
Using fw_sbus_load to control SBus firmware load doesn't scale across multiple
HFI1 cards in a single system. This patch ensures that the SBus firmware is
loaded once per ASIC.
Reviewed-by: Dean Luick <dean.luick@intel.com> Reviewed-by: Dennis Dalessandro <dennis.dalessandro@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>
Dean Luick [Mon, 26 Oct 2015 14:28:44 +0000 (10:28 -0400)]
staging/rdma/hfi1: Thread the receive interrupt.
When under heavy load, the receive interrupt handler can run too long with IRQs
disabled. Add a mixed-mode threading scheme. Initially process packets in the
handler for quick responses (latency). If there are too many packets to
process move to a thread to continue (bandwidth).
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dean Luick [Mon, 26 Oct 2015 14:28:43 +0000 (10:28 -0400)]
staging/rdma/hfi1: Add irqsaves in the packet processing path
In preparation for threading the receive interrupt, add irqsaves in the packet
processing path.
When the receive interrupt is threaded, the packet processing path is no longer
guaranteed to have IRQs disabled. Add irqsaves where needed on several locks
in the packet processing path. Anything that did not have an obvious, "close"
irqsave in its caller is a candidate.
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mitko Haralanov [Mon, 26 Oct 2015 14:28:41 +0000 (10:28 -0400)]
staging/rdma/hfi1: Allow tuning of SDMA interrupt rate
The SDMA engines were configured to generate progress interrupts every time they
processed N/2 descriptors (where N is the size of the descriptor queue). This
interval was too infrequent, leading to degraded performance.
This commit adds a module parameter, as well as a recommended default, which
allows for the tuning of the interrupt frequency.
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The address being mapped into a process's memory for notification events was
improperly calculated due to cast that was happening too early. dd->events is a
pointer and should have been casted to unsigned long after the pointer
arithmetic was done, not before.
As a result, processes were looking at the wrong place and not seeing their
notification events.
Mitko Haralanov [Mon, 26 Oct 2015 14:28:37 +0000 (10:28 -0400)]
staging/rdma/hfi1: Prevent silent data corruption with user SDMA
User SDMA keeps track of progress into the submitted IO vectors by tracking an
offset into the vectors when packets are submitted. This offset is updated
after a successful submission of a txreq to the SDMA engine.
The same offset was used when determining whether an IO vector should be
'freed' (pages unpinned) in the SDMA callback functions.
This was causing a silent data corruption in big jobs (> 2 nodes, 120 ranks
each) on the receive side because the send side was mistakenly unpinning the
vector pages before the HW has processed all descriptors referencing the
vector.
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Mitko Haralanov <mitko.haralanov@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: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.