Commit Graph
873808 Commits
Author SHA1 Message Date
Steven Rostedt (VMware) d2a68c4eff x86/ftrace: Do not call function graph from dynamic trampolines
Since commit 79922b8009 ("ftrace: Optimize function graph to be
called directly"), dynamic trampolines should not be calling the
function graph tracer at the end. If they do, it could cause the function
graph tracer to trace functions that it filtered out.

Right now it does not cause a problem because there's a test to check if
the function graph tracer is attached to the same function as the
function tracer, which for now is true. But the function graph tracer is
undergoing changes that can make this no longer true which will cause
the function graph tracer to trace other functions.

 For example:

 # cd /sys/kernel/tracing/
 # echo do_IRQ > set_ftrace_filter
 # mkdir instances/foo
 # echo ip_rcv > instances/foo/set_ftrace_filter
 # echo function_graph > current_tracer
 # echo function > instances/foo/current_tracer

Would cause the function graph tracer to trace both do_IRQ and ip_rcv,
if the current tests change.

As the current tests prevent this from being a problem, this code does
not need to be backported. But it does make the code cleaner.

Cc: Thomas Gleixner <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: [email protected]
Signed-off-by: Steven Rostedt (VMware) <[email protected]>
2018-12-19 22:43:37 -05:00
Don Brace 1923f851eb scsi: smartpqi: update driver version
- need to bump up the driver version because
  of the OFA patch and the fw status register
  read timeout patch.

Reviewed-by: Gerry Morong <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:27:52 -05:00
Mahesh Rajashekhara 4fd22c13ad scsi: smartpqi: add ofa support
- when OFA event occurs, driver will stop traffic to RAID/HBA path. Driver
  waits for all the outstanding requests to complete.
- Driver sends OFA event acknowledgment to firmware.
- Driver will wait until the new firmware is up and running.
- Driver will free up the resources.
- Driver calls SIS/PQI initialization and rescans the device list.
- Driver will resume the traffic to RAID/HBA path.

Reviewed-by: Murthy Bhat <[email protected]>
Signed-off-by: Mahesh Rajashekhara <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:27:52 -05:00
Mahesh Rajashekhara 65111785ac scsi: smartpqi: increase fw status register read timeout
Problem:
 - during the driver initialization, driver will poll fw
   for KERNEL_UP in a 30 seconds timeout.

 - if the firmware is not ready after 30 seconds,
   driver will not be loaded.

Fix:
 - change timeout from 30 seconds to 3 minutes.

Reported-by: Feng Li <[email protected]>
Reviewed-by: Ajish Koshy <[email protected]>
Reviewed-by: Murthy Bhat <[email protected]>
Reviewed-by: Dave Carroll <[email protected]>
Reviewed-by: Kevin Barnett <[email protected]>
Signed-off-by: Mahesh Rajashekhara <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:27:52 -05:00
Don Brace f7cb8ac6e7 scsi: smartpqi: bump driver version
Reviewed-by: Gerry Morong <[email protected]>
Reviewed-by: Dave Carroll <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:23:35 -05:00
Don Brace 3d46a59a19 scsi: smartpqi: add smp_utils support
Reviewed-by: Scott Benesh <[email protected]>
Reviewed-by: Mahesh Rajashekhara <[email protected]>
Reviewed-by: Scott Teel <[email protected]>
Reviewed-by: Dave Carroll <[email protected]>
Reviewed-by: Kevin Barnett <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:23:35 -05:00
Kevin Barnett 2ba55c9851 scsi: smartpqi: correct lun reset issues
Problem:
The Linux kernel takes a logical volume offline after a LUN reset.  This is
generally accompanied by this message in the dmesg output:

Device offlined - not ready after error recovery

Root Cause:
The root cause is a "quirk" in the timeout handling in the Linux SCSI
layer. The Linux kernel places a 30-second timeout on most media access
commands (reads and writes) that it send to device drivers.  When a media
access command times out, the Linux kernel goes into error recovery mode
for the LUN that was the target of the command that timed out. Every
command that timed out is kept on a list inside of the Linux kernel to be
retried later. The kernel attempts to recover the command(s) that timed out
by issuing a LUN reset followed by a TEST UNIT READY. If the LUN reset and
TEST UNIT READY commands are successful, the kernel retries the command(s)
that timed out.

Each SCSI command issued by the kernel has a result field associated with
it. This field indicates the final result of the command (success or
error). When a command times out, the kernel places a value in this result
field indicating that the command timed out.

The "quirk" is that after the LUN reset and TEST UNIT READY commands are
completed, the kernel checks each command on the timed-out command list
before retrying it. If the result field is still "timed out", the kernel
treats that command as not having been successfully recovered for a
retry. If the number of commands that are in this state are greater than
two, the kernel takes the LUN offline.

Fix:
When our RAIDStack receives a LUN reset, it simply waits until all
outstanding commands complete. Generally, all of these outstanding commands
complete successfully. Therefore, the fix in the smartpqi driver is to
always set the command result field to indicate success when a request
completes successfully. This normally isn’t necessary because the result
field is always initialized to success when the command is submitted to the
driver. So when the command completes successfully, the result field is
left untouched. But in this case, the kernel changes the result field
behind the driver’s back and then expects the field to be changed by the
driver as the commands that timed-out complete.

Reviewed-by: Dave Carroll <[email protected]>
Reviewed-by: Scott Teel <[email protected]>
Signed-off-by: Kevin Barnett <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:23:35 -05:00
Dave Carroll 7ff44499ba scsi: smartpqi: correct volume status
- fix race condition when a unit is deleted after an RLL,
  and before we have gotten the LV_STATUS page of the unit.
  - In this case we will get a standard inquiry, rather than
    the desired page.  This will result in a unit presented
    which no longer exists.
  - If we ask for LV_STATUS, insure we get LV_STATUS

Reviewed-by: Murthy Bhat <[email protected]>
Reviewed-by: Mahesh Rajashekhara <[email protected]>
Reviewed-by: Scott Teel <[email protected]>
Reviewed-by: Kevin Barnett <[email protected]>
Signed-off-by: Dave Carroll <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:23:35 -05:00
Dave Carroll a9a681017c scsi: smartpqi: do not offline disks for transient did no connect conditions
Reviewed-by: Murthy Bhat <[email protected]>
Reviewed-by: Mahesh Rajashekhara <[email protected]>
Reviewed-by: Scott Teel <[email protected]>
Reviewed-by: Kevin Barnett <[email protected]>
Signed-off-by: Dave Carroll <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:23:35 -05:00
Ajish Koshy a91aaae024 scsi: smartpqi: allow for larger raid maps
Reviewed-by: Murthy Bhat <[email protected]>
Reviewed-by: Mahesh Rajashekhara <[email protected]>
Reviewed-by: Dave Carroll <[email protected]>
Reviewed-by: Scott Teel <[email protected]>
Reviewed-by: Kevin Barnett <[email protected]>
Signed-off-by: Ajish Koshy <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:23:35 -05:00
Mahesh Rajashekhara 1e46731efd scsi: smartpqi: check for null device pointers
- wait on all outstanding I/O to complete before the device is removed.

- check for null device pointers in IO entry/completion functions.

Reviewed-by: Scott Teel <[email protected]>
Reviewed-by: Murthy Bhat <[email protected]>
Reviewed-by: Dave Carroll <[email protected]>
Reviewed-by: Kevin Barnett <[email protected]>
Signed-off-by: Mahesh Rajashekhara <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:23:35 -05:00
Ajish Koshy c1b104755b scsi: smartpqi: add support for huawei controllers
Reviewed-by: Murthy Bhat <[email protected]>
Reviewed-by: Mahesh Rajashekhara <[email protected]>
Reviewed-by: Dave Carroll <[email protected]>
Reviewed-by: Scott Teel <[email protected]>
Reviewed-by: Kevin Barnett <[email protected]>
Signed-off-by: Ajish Koshy <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:23:35 -05:00
Sagar Biradar 62dc51fb94 scsi: smartpqi: enhance numa node detection
- set pci_dev->dev to 0 only if the node is NO_NUMA_NODE.
  If not, do not reset the value but retain it.

Reviewed-by: Murthy Bhat <[email protected]>
Reviewed-by: Mahesh Rajashekhara <[email protected]>
Reviewed-by: Dave Carroll <[email protected]>
Reviewed-by: Scott Teel <[email protected]>
Reviewed-by: Kevin Barnett <[email protected]>
Signed-off-by: Sagar Biradar <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:23:35 -05:00
Dave Carroll 2b447f811c scsi: smartpqi: wake up drives after os resumes from suspend
- set allow_restart option during scsi_device init.

   This allows the kernel to send a START/STOP Unit command to the drive if
   it encounters a 4/2 check condition in sense data.

Reviewed-by: Murthy Bhat <[email protected]>
Reviewed-by: Mahesh Rajashekhara <[email protected]>
Reviewed-by: Kevin Barnett <[email protected]>
Signed-off-by: Dave Carroll <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:23:34 -05:00
Murthy Bhat 5995b236c1 scsi: smartpqi: fix disk name mount point
- fix a formatting issue.

Reviewed-by: Mahesh Rajashekhara <[email protected]>
Reviewed-by: Scott Teel <[email protected]>
Reviewed-by: Dave Carroll <[email protected]>
Reviewed-by: Kevin Barnett <[email protected]>
Signed-off-by: Murthy Bhat <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:23:34 -05:00
Murthy Bhat 84a77fefe0 scsi: smartpqi: add h3c ssid
Reviewed-by: Scott Benesh <[email protected]>
Reviewed-by: Mahesh Rajashekhara <[email protected]>
Reviewed-by: Dave Carroll <[email protected]>
Reviewed-by: Scott Teel <[email protected]>
Reviewed-by: Kevin Barnett <[email protected]>
Signed-off-by: Murthy Bhat <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:23:34 -05:00
Dave Carroll cd12824416 scsi: smartpqi: add sysfs attributes
- add sysfs device attributes, unique_id, lunid and path_info.

Reviewed-by: Scott Teel <[email protected]>
Reviewed-by: Kevin Barnett <[email protected]>
Signed-off-by: Dave Carroll <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:23:34 -05:00
Dave Carroll 02133b68d5 scsi: smartpqi: refactor sending controller raid requests
Clean up the common code which creates a raid path request for the
controller LUNID and sends it synchronously, into a common routine;

Reviewed-by: Murthy Bhat <[email protected]>
Reviewed-by: Mahesh Rajashekhara <[email protected]>
Reviewed-by: Scott Teel <[email protected]>
Reviewed-by: Kevin Barnett <[email protected]>
Signed-off-by: Dave Carroll <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:23:34 -05:00
Dave Carroll 171c28653a scsi: smartpqi: turn off lun data caching for ptraid
- allow update the luns for PTRAID devices.

Reviewed-by: Ajish Koshy <[email protected]>
Reviewed-by: Murthy Bhat <[email protected]>
Reviewed-by: Mahesh Rajashekhara <[email protected]>
Reviewed-by: Justin Lindley <[email protected]>
Reviewed-by: Scott Teel <[email protected]>
Reviewed-by: Kevin Barnett <[email protected]>
Signed-off-by: Dave Carroll <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:23:34 -05:00
Mahesh Rajashekhara b2346b5030 scsi: smartpqi: correct host serial num for ssa
Reviewed-by: Scott Benesh <[email protected]>
Reviewed-by: Ajish Koshy <[email protected]>
Reviewed-by: Murthy Bhat <[email protected]>
Reviewed-by: Mahesh Rajashekhara <[email protected]>
Reviewed-by: Dave Carroll <[email protected]>
Reviewed-by: Scott Teel <[email protected]>
Reviewed-by: Kevin Barnett <[email protected]>
Signed-off-by: Mahesh Rajashekhara <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:23:34 -05:00
Dave Carroll b6e2ef67ed scsi: smartpqi: add no_write_same for logical volumes
During slave_alloc, for logical volumes include no_write_same into the
scsi_device structure. This will insure that WRITE_SAME will not be used
for LD's.

Reviewed-by: Ajish Koshy <[email protected]>
Reviewed-by: Murthy Bhat <[email protected]>
Reviewed-by: Mahesh Rajashekhara <[email protected]>
Reviewed-by: Justin Lindley <[email protected]>
Reviewed-by: Scott Benesh <[email protected]>
Reviewed-by: Scott Teel <[email protected]>
Reviewed-by: Kevin Barnett <[email protected]>
Signed-off-by: Dave Carroll <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:23:34 -05:00
Mahesh Rajashekhara 3406384b76 scsi: smartpqi: Add retries for device reset
Reviewed-by: Ajish Koshy <[email protected]>
Reviewed-by: Murthy Bhat <[email protected]>
Reviewed-by: Justin Lindley <[email protected]>
Reviewed-by: Scott Benesh <[email protected]>
Reviewed-by: Dave Carroll <[email protected]>
Reviewed-by: Scott Teel <[email protected]>
Reviewed-by: Kevin Barnett <[email protected]>
Signed-off-by: Mahesh Rajashekhara <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:23:34 -05:00
Kevin Barnett b212c2510d scsi: smartpqi: add support for PQI Config Table handshake
Add support for new IUs and parsing of the Firmware Features section of the
PQI Config Table to implement the "handshake" between the driver and
firmware to communicate firmware features supported and enabled by the
driver.

Reviewed-by: Ajish Koshy <[email protected]>
Reviewed-by: Mahesh Rajashekhara <[email protected]>
Reviewed-by: Murthy Bhat <[email protected]>
Reviewed-by: Justin Lindley <[email protected]>
Reviewed-by: Scott Teel <[email protected]>
Signed-off-by: Kevin Barnett <[email protected]>
Signed-off-by: Don Brace <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:23:34 -05:00
James Smart 9e1f03e4d3 scsi: lpfc: Update lpfc version to 12.0.0.10
Update lpfc version to 12.0.0.10

Signed-off-by: Dick Kennedy <[email protected]>
Signed-off-by: James Smart <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:13:08 -05:00
James Smart 5021267af1 scsi: lpfc: Adding ability to reset chip via pci bus reset
This patch adds a "pci_bus_reset" option to the board_mode sysfs attribute.
This option uses the pci_reset_bus() api to reset the PCIe link the adapter
is on, which will reset the chip/adapter.  Prior to issuing this option,
all functions on the same chip must be placed in the offline state by the
admin. After the reset, all of the instances may be brought online again.

The primary purpose of this functionality is to support cases where
firmware update required a chip reset but the admin did not want to reboot
the machine in order to instantiate the firmware update.

Sanity checks take place prior to the reset to ensure the adapter is the
sole entity on the PCIe bus and that all functions are in the offline
state.

Signed-off-by: Dick Kennedy <[email protected]>
Signed-off-by: James Smart <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:13:08 -05:00
James Smart 72ca6b2220 scsi: lpfc: Add log messages to aid in debugging fc4type discovery issues
Current messages report generic actions (like send GID_FT), but misses
reporting for what protocol type the action is taken.

Revise the messages to reflect the FC4 protocol type being worked on.

[mkp: typo]

Signed-off-by: Dick Kennedy <[email protected]>
Signed-off-by: James Smart <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:13:07 -05:00
James Smart 00292e0306 scsi: lpfc: Fix discovery failure when PLOGI is defered
When a target's link dropped, an RSCN was received to communicate the
change. The driver detected the loss of the target and issued and UNREG_RPI
mailbox command.  While that was being processed, another RSCN was received
to communicate the port coming back.  The driver deferred the PLOGI to the
port until the mailbox command finishes. When the mailbox command completed
it saw the pending port and called the routines to issue the
PLOGI. However, it forgot to clear the UNREG_INP state flag, so the PLOGI
xmt routine nooped the PLOGI request assuming it needed to wait for the
mailbox command.  At this point, login would never be re-attempted.

Clear UNREG_INP before issuing the deferred PLOGI.

Signed-off-by: Dick Kennedy <[email protected]>
Signed-off-by: James Smart <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:13:07 -05:00
James Smart 529b3ddcff scsi: lpfc: update fault value on successful trunk events.
Currently, when a trunk link goes down due to some fault, the driver
snapshots the fault code.  If the link then comes back up, meaning there is
no fault, the driver is not clearing the fault code so the sysfs link_state
entry reports old/stale data.

Revise the logic so that on successful link up the fault code is cleared.

Signed-off-by: Dick Kennedy <[email protected]>
Signed-off-by: James Smart <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:13:07 -05:00
James Smart e817e5d703 scsi: lpfc: Correct MDS loopback diagnostics support
The existing MDS loopback diagnostics support processing received frames in
the slowpath work thread. It caps the number of frames it will process at
64, before waiting for another event to indicate additional frame
reception. The net-net is this results in very slow frame processing during
loopback tests and sometimes orphans an io, causing the loopback test to
report failure by the switch.

Move MDS loopback frame processing out of the slow path worker thread and
into the normal RQ processing routines.

Signed-off-by: Dick Kennedy <[email protected]>
Signed-off-by: James Smart <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:13:07 -05:00
James Smart 2977a09512 scsi: lpfc: Fix link state reporting for trunking when adapter is offline
If the adapter is taken offline, the trunk link port attributes continue to
report trunk links as up even though all links are down as the adapter is
offline.

Clear the trunk links state as part of taking the adapter offline.

Signed-off-by: Dick Kennedy <[email protected]>
Signed-off-by: James Smart <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 22:13:07 -05:00
Colin Ian King 009b715614 scsi: bfa: clean up a couple of indentation issues
There is a break statement with an extra space that needs removed and a
call to bfa_trc that is indented one level too much. Fix these.

Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 21:54:58 -05:00
Colin Ian King efad046230 scsi: 3w-xxxx: fix indentation issue, add missing tab
There is a tab missing on a return statement, add the missing tab.

Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 21:54:07 -05:00
Varun Prakash 9934613edc scsi: csiostor: fix incorrect dma device in case of vport
In case of ->vport_create() call scsi_add_host_with_dma() instead of
scsi_add_host() to pass correct dma device.

Signed-off-by: Varun Prakash <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 21:45:04 -05:00
Christoph Hellwig 34a3492171 scsi: myrs: remove the dma_boundary_limit
The old DAC960 driver was fine with merging over segment boundaries, so
this new driver should be too.

[mkp: typos]

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 21:43:30 -05:00
Christoph Hellwig c3d6189ffd scsi: myrb: remove the dma_boundary limit
The old DAC960 driver was fine with merging over segment boundaries, so
this new driver should be too.

[mkp: typos]

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 21:43:17 -05:00
Shivasharan S 7b9e2d348c scsi: megaraid_sas: driver version update
Signed-off-by: Shivasharan S <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 21:41:11 -05:00
Linus Torvalds ab63e725b4 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Pull virtio fix from Michael Tsirkin:
 "A last-minute fix for a test build"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
  virtio: fix test build after uio.h change
2018-12-19 18:40:48 -08:00
Shivasharan S 894169db12 scsi: megaraid_sas: Use 63-bit DMA addressing
Although MegaRAID controllers support 64-bit DMA addressing, as per
hardware design, DMA address with all 64-bits set
(0xFFFFFFFF-FFFFFFFF) results in a firmware fault.

Driver will set 63-bit DMA mask to ensure the above address will not be
used.

Cc: [email protected]
Signed-off-by: Shivasharan S <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 21:38:54 -05:00
Linus Torvalds 8c9dff1ebd Merge tag 'nfs-for-4.20-6' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client bugfixes from Trond Myklebust:

 - Fix TCP socket disconnection races by ensuring we always call
   xprt_disconnect_done() after releasing the socket.

 - Fix a race when clearing both XPRT_CONNECTING and XPRT_LOCKED

 - Remove xprt_connect_status() so it does not mask errors that should
   be handled by call_connect_status()

* tag 'nfs-for-4.20-6' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  SUNRPC: Remove xprt_connect_status()
  SUNRPC: Fix a race with XPRT_CONNECTING
  SUNRPC: Fix disconnection races
2018-12-19 18:38:54 -08:00
Shivasharan S 272652fcbf scsi: megaraid_sas: add retry logic in megasas_readl
Due to hardware errata in Aero controllers, reads to certain fusion
registers could intermittently return zero.  This behavior is
transient in nature and subsequent reads will return valid value.

For Aero controllers, any calls to readl to read from certain
registers will be retried for maximum three times, if read returns
zero.

Signed-off-by: Shivasharan S <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 21:37:15 -05:00
Shivasharan S de516379e8 scsi: megaraid_sas: changes to function prototypes
Instead of the register address, pass the instance pointer to clear_intr
and read_fw_status_reg functions.  This is done in preparation for adding
adapter type based checks in these functions in later patches of this
series.

Signed-off-by: Shivasharan S <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 21:36:23 -05:00
Shivasharan S 154a7cde9a scsi: megaraid_sas: Introduce new Aero adapter type
Identify all Aero controller PCI IDs with new adapter type.

Signed-off-by: Shivasharan S <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 21:34:46 -05:00
Shivasharan S 630d42b70f scsi: megaraid_sas: Fix Ventura series based checks
In preparation for the new Aero series adapter type, all the places where
we check adapter type for Ventura series needs to include any later adapter
types.

Signed-off-by: Shivasharan S <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 21:34:07 -05:00
Stephan Günther 23c3828aa2 scsi: mpt3sas: fix memory ordering on 64bit writes
With commit 09c2f95ad4 ("scsi: mpt3sas: Swap I/O memory read value back
to cpu endianness"), 64bit writes in _base_writeq() were rewritten to use
__raw_writeq() instad of writeq().

This introduced a bug apparent on powerpc64 systems such as the Raptor
Talos II that causes the HBA to drop from the PCIe bus under heavy load and
being reinitialized after a couple of seconds.

It can easily be triggered on affacted systems by using something like

  fio --name=random-write --iodepth=4 --rw=randwrite --bs=4k --direct=0 \
    --size=128M --numjobs=64 --end_fsync=1
  fio --name=random-write --iodepth=4 --rw=randwrite --bs=64k --direct=0 \
    --size=128M --numjobs=64 --end_fsync=1

a couple of times. In my case I tested it on both a ZFS raidz2 and a btrfs
raid6 using LSI 9300-8i and 9400-8i controllers.

The fix consists in resembling the write ordering of writeq() by adding a
mandatory write memory barrier before device access and a compiler barrier
afterwards. The additional MMIO barrier is superfluous.

Signed-off-by: Stephan Günther <[email protected]>
Reported-by: Matt Corallo <[email protected]>
Acked-by: Sreekanth Reddy <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 21:31:41 -05:00
Linus Torvalds fe11279360 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull kvm fixes from Paolo Bonzini:

 -  One nasty use-after-free bugfix, from this merge window however

 -  A less nasty use-after-free that can only zero some words at the
    beginning of the page, and hence is not really exploitable

 -  A NULL pointer dereference

 -  A dummy implementation of an AMD chicken bit MSR that Windows uses
    for some unknown reason

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  kvm: x86: Add AMD's EX_CFG to the list of ignored MSRs
  KVM: X86: Fix NULL deref in vcpu_scan_ioapic
  KVM: Fix UAF in nested posted interrupt processing
  KVM: fix unregistering coalesced mmio zone from wrong bus
2018-12-19 18:27:58 -08:00
Anatoliy Glagolev 17b18eaa6f scsi: qla2xxx: deadlock by configfs_depend_item
The intent of invoking configfs_depend_item in commit 7474f52a82
("tcm_qla2xxx: Perform configfs depend/undepend for base_tpg")
was to prevent a physical Fibre Channel port removal when
virtual (NPIV) ports announced through that physical port are active.
The change does not work as expected: it makes enabled physical port
dependent on target configfs subsystem (the port's parent), something
the configfs guarantees anyway.

Besides, scheduling work in a worker thread and waiting for the work's
completion is not really a valid workaround for the requirement not to call
configfs_depend_item from a configfs callback: the call occasionally
deadlocks.

Thus, removing configfs_depend_item calls does not break anything and fixes
the deadlock problem.

Signed-off-by: Anatoliy Glagolev <[email protected]>
Acked-by: Himanshu Madhani <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
2018-12-19 21:26:38 -05:00
Linus Torvalds 2dd516ff7d Merge tag 'dma-mapping-4.20-4' of git://git.infradead.org/users/hch/dma-mapping
Pull dma-mapping fix from Christoph Hellwig:
 "Fix a regression in dma-direct that didn't take account the magic AMD
  memory encryption mask in the DMA address"

* tag 'dma-mapping-4.20-4' of git://git.infradead.org/users/hch/dma-mapping:
  dma-direct: do not include SME mask in the DMA supported check
2018-12-19 18:16:17 -08:00
David Ahern c0fde870d9 neighbor: NTF_PROXY is a valid ndm_flag for a dump request
When dumping proxy entries the dump request has NTF_PROXY set in
ndm_flags. strict mode checking needs to be updated to allow this
flag.

Fixes: 51183d233b ("net/neighbor: Update neigh_dump_info for strict data checking")
Signed-off-by: David Ahern <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2018-12-19 17:30:47 -08:00
David Ahern 754d5da631 neighbor: Initialize protocol when new pneigh_entry are created
pneigh_lookup uses kmalloc versus kzalloc when new entries are allocated.
Given that the newly added protocol field needs to be initialized.

Fixes: df9b0e30d4 ("neighbor: Add protocol attribute")
Signed-off-by: David Ahern <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2018-12-19 17:29:45 -08:00
Martin KaFai Lau 9df95e8ec5 bpf: sparc64: Enable sparc64 jit to provide bpf_line_info
This patch enables sparc64's bpf_int_jit_compile() to provide
bpf_line_info by calling bpf_prog_fill_jited_linfo().

Signed-off-by: Martin KaFai Lau <[email protected]>
Acked-by: David S. Miller <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
2018-12-20 02:04:53 +01:00