Commit graph

17987 commits

Author SHA1 Message Date
Bart Van Assche
395b9bca6b scsi: sd: Revert "Rely on the driver core for asynchronous probing"
Hibernation hangs as follows due to commit 21e6ba3f0e when using SATA:

Call Trace:
 __schedule+0x464/0xe70
 schedule+0x4e/0xd0
 blk_queue_enter+0x5fe/0x7e0
 generic_make_request+0x313/0x950
 submit_bio+0x9b/0x250
 submit_bio_wait+0xc9/0x110
 hib_submit_io+0x17d/0x1c0
 write_page+0x61/0xa0
 swap_write_page+0x4b/0x1f0
 swsusp_write+0x2f9/0x3d0
 hibernate.cold.10+0x108/0x231
 state_store+0xf7/0x100
 kobj_attr_store+0x37/0x50
 sysfs_kf_write+0x87/0xa0
 kernfs_fop_write+0x186/0x240
 __vfs_write+0x4d/0x90
 vfs_write+0xfa/0x260
 ksys_write+0xb9/0x1a0
 __x64_sys_write+0x43/0x50
 do_syscall_64+0x71/0x210
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Hence revert commit 21e6ba3f0e.

Cc: Pavel Machek <pavel@ucw.cz>
Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29 17:13:12 -04:00
Bart Van Assche
9a058e88fd scsi: sd: Revert "Inline sd_probe_part2()"
Reverts commit d16ece577b to make a clean revert of its predecessor
possible.

Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29 17:13:12 -04:00
Pedro Sousa
ebcb8f8508 scsi: ufs: Fix RX_TERMINATION_FORCE_ENABLE define value
Fix RX_TERMINATION_FORCE_ENABLE define value from 0x0089 to 0x00A9
according to MIPI Alliance MPHY specification.

Fixes: e785060ea3 ("ufs: definitions for phy interface")
Signed-off-by: Pedro Sousa <sousa@synopsys.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29 08:34:10 -04:00
YueHaibing
cc23c66179 scsi: qedf: remove set but not used variables
Fixes gcc '-Wunused-but-set-variable' warnings:

drivers/scsi/qedf/qedf_els.c: In function 'qedf_process_els_compl':
drivers/scsi/qedf/qedf_els.c:149:20: warning: variable 'sc_cmd' set but not used [-Wunused-but-set-variable]
drivers/scsi/qedf/qedf_els.c:148:28: warning: variable 'task_ctx' set but not used [-Wunused-but-set-variable]
drivers/scsi/qedf/qedf_els.c: In function 'qedf_send_srr':
drivers/scsi/qedf/qedf_els.c:612:6: warning: variable 'sid' set but not used [-Wunused-but-set-variable]

They are never used since introduction.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29 08:34:10 -04:00
Saurav Kashyap
b226a893d2 scsi: qedf: Update the driver version to 8.37.25.20
Update the driver version to 8.37.25.20.

Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29 08:34:10 -04:00
Saurav Kashyap
1e1ff604a3 scsi: qedf: Add return value to log message if scsi_add_host fails
Print return value of scsi_add_host on failure.

Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29 08:34:09 -04:00
Saurav Kashyap
7fa4142d8b scsi: qedf: Print fcport information on wait for upload timeout
Log fcport for which upload failed.

Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29 08:34:09 -04:00
Saurav Kashyap
19c2b6d84b scsi: qedf: Check the return value of start_xmit
Log the reason for start xmit failure.

Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Chad Dupuis <cdupuis@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29 08:34:09 -04:00
Saurav Kashyap
249b148f36 scsi: qedf: Log message if scsi_add_host fails
Print message on scsi_add_host failure.

Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Chad Dupuis <cdupuis@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29 08:34:09 -04:00
Saurav Kashyap
f4eecabe74 scsi: qedf: Check for fcoe_libfc_config failure
Print the fcoe_libfc_config failure and return proper failure.

Signed-off-by: Saurav Kashyap <saurav.kashyap@cavium.com>
Signed-off-by: Chad Dupuis <chad.dupuis@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29 08:34:09 -04:00
Saurav Kashyap
8b95b99c1a scsi: qedf: Add comment to display logging levels
Comment will help in decoding the logging level.

Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Chad Dupuis <cdupuis@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29 08:34:09 -04:00
Chad Dupuis
50ed27cb93 scsi: qedf: Add port_id for fcport into initiate_cleanup debug message
Port ID will help in debugging.

Signed-off-by: Chad Dupuis <cdupuis@marvell.com>
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29 08:34:09 -04:00
Chad Dupuis
1c8162479b scsi: qedf: Add LBA to underrun debug messages
Print LBA information for underrun cases.

Signed-off-by: Chad Dupuis <cdupuis@marvell.com>
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29 08:34:09 -04:00
Chad Dupuis
276eb3e5d0 scsi: qedf: Print scsi_cmd backpointer in good completion path if the command is still being used
Printing scsi command pointer will help in crash dump analysis.

Signed-off-by: Chad Dupuis <cdupuis@marvell.com>
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29 08:34:09 -04:00
Chad Dupuis
892f63d427 scsi: qedf: Add driver state to 'driver_stats' debugfs node
Add debugfs node for driver stats.

[mkp: typo]

Signed-off-by: Chad Dupuis <cdupuis@marvell.com>
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29 08:34:09 -04:00
Chad Dupuis
078d719957 scsi: qedf: Change MSI-X load error message
Change the message to display load failure.

Signed-off-by: Chad Dupuis <cdupuis@marvell.com>
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29 08:34:09 -04:00
Manish Rangankar
3252688f09 scsi: qedi: Adjust termination and offload ramrod timers
Whenever offload ramrod is issued, firmware wants driver to wait for max 5
secs, otherwise driver can initiate further corrective action. Similarly,
when termination ramrod is issued, irrespective of abortive or non-abortive
termination, driver should wait for 60 sec * max TCP-RT timeout.

[mkp: typos]

Signed-off-by: Manish Rangankar <mrangankar@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29 08:34:09 -04:00
Manish Rangankar
f848bfd8e1 scsi: qedi: Abort ep termination if offload not scheduled
Sometimes during connection recovery when there is a failure to resolve
ARP, and offload connection was not issued, driver tries to flush pending
offload connection work which was not queued up.

kernel: WARNING: CPU: 19 PID: 10110 at kernel/workqueue.c:3030 __flush_work.isra.34+0x19c/0x1b0
kernel: CPU: 19 PID: 10110 Comm: iscsid Tainted: G W 5.1.0-rc4 #11
kernel: Hardware name: Dell Inc. PowerEdge R730/0599V5, BIOS 2.9.1 12/04/2018
kernel: RIP: 0010:__flush_work.isra.34+0x19c/0x1b0
kernel: Code: 8b fb 66 0f 1f 44 00 00 31 c0 eb ab 48 89 ef c6 07 00 0f 1f 40 00 fb 66 0f 1f 44 00 00 31 c0 eb 96 e8 08 16 fe ff 0f 0b eb 8d <0f> 0b 31 c0 eb 87 0f 1f 40 00 66 2e 0f 1
f 84 00 00 00 00 00 0f 1f
kernel: RSP: 0018:ffffa6b4054dba68 EFLAGS: 00010246
kernel: RAX: 0000000000000000 RBX: ffff91df21c36fc0 RCX: 0000000000000000
kernel: RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff91df21c36fc0
kernel: RBP: ffff91df21c36ef0 R08: 0000000000000000 R09: 0000000000000000
kernel: R10: 0000000000000038 R11: ffffa6b4054dbd60 R12: ffffffffc05e72c0
kernel: R13: ffff91db10280820 R14: 0000000000000048 R15: 0000000000000000
kernel: FS:  00007f5d83cc1740(0000) GS:ffff91df2f840000(0000) knlGS:0000000000000000
kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kernel: CR2: 0000000001cc5000 CR3: 0000000465450002 CR4: 00000000001606e0
kernel: Call Trace:
kernel: ? try_to_del_timer_sync+0x4d/0x80
kernel: qedi_ep_disconnect+0x3b/0x410 [qedi]
kernel: ? 0xffffffffc083c000
kernel: ? klist_iter_exit+0x14/0x20
kernel: ? class_find_device+0x93/0xf0
kernel: iscsi_if_ep_disconnect.isra.18+0x58/0x70 [scsi_transport_iscsi]
kernel: iscsi_if_recv_msg+0x10e2/0x1510 [scsi_transport_iscsi]
kernel: ? copyout+0x22/0x30
kernel: ? _copy_to_iter+0xa0/0x430
kernel: ? _cond_resched+0x15/0x30
kernel: ? __kmalloc_node_track_caller+0x1f9/0x270
kernel: iscsi_if_rx+0xa5/0x1e0 [scsi_transport_iscsi]
kernel: netlink_unicast+0x17f/0x230
kernel: netlink_sendmsg+0x2d2/0x3d0
kernel: sock_sendmsg+0x36/0x50
kernel: ___sys_sendmsg+0x280/0x2a0
kernel: ? timerqueue_add+0x54/0x80
kernel: ? enqueue_hrtimer+0x38/0x90
kernel: ? hrtimer_start_range_ns+0x19f/0x2c0
kernel: __sys_sendmsg+0x58/0xa0
kernel: do_syscall_64+0x5b/0x180
kernel: entry_SYSCALL_64_after_hwframe+0x44/0xa9

Signed-off-by: Manish Rangankar <mrangankar@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29 08:34:08 -04:00
Varun Prakash
e95a5e4b1a scsi: csiostor: create per port irq affinity mask set
csiostor driver allocates per port num_online_cpus() irq vectors, so create
per-port irq affinity mask set to spread irq vectors evenly.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29 08:34:08 -04:00
Himanshu Madhani
a1f9ab4844 scsi: qla2xxx: Silence Successful ELS IOCB message
ELS IOCB done message should be moved to verbose logging to prevent
confusion about the error case v/s successful submission case.

[mkp: typos]

Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29 08:13:43 -04:00
Quinn Tran
2137490f21 scsi: qla2xxx: Fix device staying in blocked state
This patch fixes issue reported by some of the customers, who discovered
that after cable pull scenario the devices disappear and path seems to
remain in blocked state. Once the device reappears, driver does not seem to
update path to online. This issue appears because of the defer flag
creating race condition where the same session reappears.  This patch fixes
this issue by indicating SCSI-ML of device lost when
qlt_free_session_done() is called from qlt_unreg_sess().

Fixes: 41dc529a46 ("qla2xxx: Improve RSCN handling in driver")
Signed-off-by: Quinn Tran <qtran@marvell.com>
Cc: stable@vger.kernel.org #4.19
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29 08:13:43 -04:00
Christoph Hellwig
c6bcc59236 scsi: aic7xxx: improve the Kconfig entry
There is no old vs new driver anymore.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-29 08:13:43 -04:00
Colin Ian King
a7634b6f7c scsi: aic7xxx: fix spelling mistake "recevied" -> "received"
There is a spelling mistake in a kernel message, fix it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-18 20:37:40 -04:00
YueHaibing
c709297525 scsi: lpfc: Make lpfc_sli4_oas_verify static
Fix sparse warning:

drivers/scsi/lpfc/lpfc_init.c:13091:1: warning:
 symbol 'lpfc_sli4_oas_verify' was not declared. Should it be static?

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-18 20:35:58 -04:00
Colin Ian King
efc372c1bf scsi: megaraid_sas: fix spelling mistake "oustanding" -> "outstanding"
There are a couple of spelling mistakes in some kernel info and notice
messages. Fix these.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-18 20:34:46 -04:00
Colin Ian King
bc136f4d6e scsi: qedi: fix spelling mistake "oflload" -> "offload"
There are a couple of spelling mistakes in some kernel alert messages.  Fix
these.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Manish Rangankar <mrangankar@marvell.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-18 20:33:56 -04:00
Colin Ian King
65b1dc9900 scsi: qedf: remove memset/memcpy to nfunc and use func instead
Currently the qedf_dbg_* family of functions can overrun the end of the
source string if it is less than the destination buffer length because of
the use of a fixed sized memcpy. Remove the memset/memcpy calls to nfunc
and just use func instead as it is always a null terminated string.

Addresses-Coverity: ("Out-of-bounds access")
Fixes: 61d8658b4a ("scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework.")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-18 20:32:26 -04:00
Li Zhong
948e922fc4 scsi: core: map PQ=1, PDT=other values to SCSI_SCAN_TARGET_PRESENT
commit 84961f28e9 ("[SCSI] Don't add scsi_device for devices that return
PQ=1, PDT=0x1f") returns SCSI_SCAN_TARGET_PRESENT if inquiry returns PQ=1,
and PDT = 0x1f. However, from the scsi spec, it seemed setting PQ=1, and
PDT to the type it is capable to support, can also mean the device is not
connected. E.g. we see an IBM/2145 returns PQ=1 and PDT=0 for a non-mapped
lun (details attached at the end).

This patch changes the check condition a bit, so the check don't require
PTD to be 0x1f when PQ=1.

$ echo 0 0 1 > /sys/class/scsi_host/host1/scan
[ 2483.722186] scsi 1:0:0:1: scsi scan: INQUIRY pass 1 length 36
[ 2483.725687] scsi 1:0:0:1: scsi scan: INQUIRY successful with code 0x0
[ 2483.729171] scsi 1:0:0:1: scsi scan: INQUIRY pass 2 length 109
[ 2483.732481] scsi 1:0:0:1: scsi scan: INQUIRY successful with code 0x0
[ 2483.735911] scsi 1:0:0:1: Direct-Access     IBM      2145             0000 PQ: 1 ANSI: 6
[ 2483.741282] scsi 1:0:0:1: Attached scsi generic sg2 type 0

$ tail /proc/scsi/scsi
Attached devices:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: IBM      Model: 2145             Rev: 0000
  Type:   Direct-Access                    ANSI  SCSI revision: 06
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: IBM      Model: 2145             Rev: 0000
  Type:   Direct-Access                    ANSI  SCSI revision: 06
Host: scsi1 Channel: 00 Id: 00 Lun: 01
  Vendor: IBM      Model: 2145             Rev: 0000
  Type:   Direct-Access                    ANSI  SCSI revision: 06

$ lsscsi
[0:0:0:0]    disk    IBM      2145             0000  /dev/sdb
[1:0:0:0]    disk    IBM      2145             0000  /dev/sda
[1:0:0:1]    disk    IBM      2145             0000  -

Signed-off-by: Li Zhong <lizhongfs@gmail.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 22:25:00 -04:00
YueHaibing
7c3f8ca8e4 scsi: megaraid_sas: Make megasas_host_device_list_query() static
Fix sparse warning:

drivers/scsi/megaraid/megaraid_sas_base.c:4652:1: warning:
 symbol 'megasas_host_device_list_query' was not declared. Should it be static?

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 22:20:16 -04:00
Stanley Chu
e0347d894a scsi: ufs: Print real incorrect request response code
If UFS device responds an unknown request response code, we can not know
what it was via logs because the code is replaced by "DID_ERROR << 16"
before log printing.

Fix this to provide precise request response code information for easier
issue breakdown.

Signed-off-by: Stanley Chu <stanley.chu@mediatek.com>
Reviewed-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 22:17:19 -04:00
Varun Prakash
21112e13cc scsi: cxgb4i: fix incorrect spelling "reveive" -> "receive"
Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 22:15:06 -04:00
Varun Prakash
74dea0bed7 scsi: libcxgbi: update route finding logic
To support vlan and bridge devices first find route using ifindex 0, if
route is not found through net device associated with input scsi host then
find route using ifindex of net device.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 22:14:20 -04:00
Varun Prakash
ffcd686b91 scsi: libcxgbi: find cxgbi device by MAC address
If cxgbi_device_find_by_netdev() returns NULL then find cxgbi device by MAC
address.

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 22:13:12 -04:00
Ming Lei
18c4f0a42b scsi: core: don't hold device refcount in IO path
scsi_device's refcount is always grabbed in IO path.

Turns out it isn't necessary, because blk_queue_cleanup() will drain any
in-flight IOs, then cancel timeout/requeue work, and SCSI's requeue_work is
canceled too in __scsi_remove_device().

Also scsi_device won't go away until blk_cleanup_queue() is done.

So don't hold the refcount in IO path, especially the refcount isn't
required in IO path since blk_queue_enter() / blk_queue_exit() is
introduced in the legacy block layer.

Cc: Dongli Zhang <dongli.zhang@oracle.com>
Cc: James Smart <james.smart@broadcom.com>
Cc: Bart Van Assche <bart.vanassche@wdc.com>
Cc: linux-scsi@vger.kernel.org,
Cc: Martin K . Petersen <martin.petersen@oracle.com>,
Cc: Christoph Hellwig <hch@lst.de>,
Cc: James E . J . Bottomley <jejb@linux.vnet.ibm.com>,
Cc: jianchao wang <jianchao.w.wang@oracle.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 22:11:22 -04:00
Himanshu Madhani
1710ac1754 scsi: qla2xxx: Fix read offset in qla24xx_load_risc_flash()
This patch fixes regression introduced by commit f8f97b0c5b ("scsi:
qla2xxx: Cleanups for NVRAM/Flash read/write path") where flash read/write
routine cleanup left out code which resulted into checksum failure leading
to use-after-free stack during driver load.

Following stack trace is seen in the log file

qla2xxx [0000:00:00.0]-0005: : QLogic Fibre Channel HBA Driver: 10.01.00.16-k.
qla2xxx [0000:00:0b.0]-001d: : Found an ISP2532 irq 11 iobase 0x0000000000f47f03.
qla2xxx [0000:00:0b.0]-00cd:8: ISP Firmware failed checksum.
qla2xxx [0000:00:0b.0]-00cf:8: Setup chip ****FAILED****.
qla2xxx [0000:00:0b.0]-00d6:8: Failed to initialize adapter - Adapter flags 2.
==================================================================
BUG: KASAN: use-after-free in __list_del_entry_valid+0x15/0xd0
Read of size 8 at addr ffff8880ca05a490 by task modprobe/857

CPU: 0 PID: 857 Comm: modprobe Not tainted 5.1.0-rc1-dbg+ #4
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
Call Trace:
  dump_stack+0x86/0xca
  print_address_description+0x6c/0x234
  ? __list_del_entry_valid+0x15/0xd0
  kasan_report.cold.3+0x1b/0x34
  ? __list_del_entry_valid+0x15/0xd0
  ? __kmem_cache_shutdown.cold.95+0xf5/0x176
  ? __list_del_entry_valid+0x15/0xd0
  __asan_load8+0x54/0x90
  __list_del_entry_valid+0x15/0xd0
  dma_pool_destroy+0x4f/0x260
  ? dma_free_attrs+0xb4/0xd0
  qla2x00_mem_free+0x529/0xcc0 [qla2xxx]
  ? kobject_put+0xdb/0x230
  qla2x00_probe_one+0x2b5e/0x45f0 [qla2xxx]
  ? qla2xxx_pci_error_detected+0x210/0x210 [qla2xxx]
  ? match_held_lock+0x20/0x240
  ? find_held_lock+0xca/0xf0
  ? mark_held_locks+0x86/0xb0
  ? _raw_spin_unlock_irqrestore+0x52/0x60
  ? __pm_runtime_resume+0x5b/0xb0
  ? lockdep_hardirqs_on+0x185/0x260
  ? _raw_spin_unlock_irqrestore+0x52/0x60
  ? trace_hardirqs_on+0x24/0x130
  ? preempt_count_sub+0x13/0xc0
  ? _raw_spin_unlock_irqrestore+0x3d/0x60
  pci_device_probe+0x154/0x1e0
  really_probe+0x17d/0x540
  ? device_driver_attach+0x90/0x90
  driver_probe_device+0x113/0x170
  ? device_driver_attach+0x90/0x90
  device_driver_attach+0x88/0x90
  __driver_attach+0xb5/0x190
  bus_for_each_dev+0xf8/0x160
  ? subsys_dev_iter_exit+0x10/0x10
  ? kasan_check_read+0x11/0x20
  ? preempt_count_sub+0x13/0xc0
  ? _raw_spin_unlock+0x2c/0x50
  driver_attach+0x26/0x30
  bus_add_driver+0x238/0x2f0
  driver_register+0xd7/0x150
  __pci_register_driver+0xd5/0xe0
  ? 0xffffffffa06c8000
  qla2x00_module_init+0x208/0x254 [qla2xxx]
  do_one_initcall+0xc0/0x3c9
  ? trace_event_raw_event_initcall_finish+0x150/0x150
  ? __kasan_kmalloc.constprop.5+0xc7/0xd0
  ? kasan_unpoison_shadow+0x35/0x50
  ? kasan_poison_shadow+0x2f/0x40
  ? __asan_register_globals+0x5a/0x70
  do_init_module+0x103/0x330
  load_module+0x36df/0x3b70
  ? fsnotify+0x611/0x640
  ? module_frob_arch_sections+0x20/0x20
  ? kernel_read+0x74/0xa0
  ? kasan_check_write+0x14/0x20
  ? kernel_read_file+0x25e/0x320
  ? do_mmap+0x42c/0x6c0
  __do_sys_finit_module+0x133/0x1c0
  ? __do_sys_finit_module+0x133/0x1c0
  ? __do_sys_init_module+0x210/0x210
  ? fput_many+0x1b/0xc0
  ? fput+0xe/0x10
  ? do_syscall_64+0x14/0x210
  ? entry_SYSCALL_64_after_hwframe+0x49/0xbe
  __x64_sys_finit_module+0x3e/0x50
  do_syscall_64+0x72/0x210
  entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f8bd5c03219
Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 47 fc 0c 00 f7 d8 64 89 01 48
RSP: 002b:00007fff9d11de98 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
RAX: ffffffffffffffda RBX: 000055ef21596b50 RCX: 00007f8bd5c03219
RDX: 0000000000000000 RSI: 000055ef21596570 RDI: 0000000000000004
RBP: 000055ef21596570 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000000000
R13: 000055ef21596c80 R14: 0000000000040000 R15: 000055ef21596b50

Allocated by task 857:
  save_stack+0x43/0xd0
  __kasan_kmalloc.constprop.5+0xc7/0xd0
  kasan_kmalloc+0x9/0x10
  kmem_cache_alloc_trace+0x144/0x300
  dma_pool_create+0xb5/0x3b0
  qla2x00_mem_alloc+0xb98/0x1ad0 [qla2xxx]
  qla2x00_probe_one+0xe28/0x45f0 [qla2xxx]
  pci_device_probe+0x154/0x1e0
  really_probe+0x17d/0x540
  driver_probe_device+0x113/0x170
  device_driver_attach+0x88/0x90
  __driver_attach+0xb5/0x190
  bus_for_each_dev+0xf8/0x160
  driver_attach+0x26/0x30
  bus_add_driver+0x238/0x2f0
  driver_register+0xd7/0x150
  __pci_register_driver+0xd5/0xe0
  qla2x00_module_init+0x208/0x254 [qla2xxx]
  do_one_initcall+0xc0/0x3c9
  do_init_module+0x103/0x330
  load_module+0x36df/0x3b70
  __do_sys_finit_module+0x133/0x1c0
  __x64_sys_finit_module+0x3e/0x50
  do_syscall_64+0x72/0x210
  entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 857:
  save_stack+0x43/0xd0
  __kasan_slab_free+0x139/0x190
  kasan_slab_free+0xe/0x10
  kfree+0xf0/0x2c0
  dma_pool_destroy+0x24c/0x260
  qla2x00_mem_free+0x529/0xcc0 [qla2xxx]
  qla2x00_free_device+0x167/0x1b0 [qla2xxx]
  qla2x00_probe_one+0x2b28/0x45f0 [qla2xxx]
  pci_device_probe+0x154/0x1e0
  really_probe+0x17d/0x540
  driver_probe_device+0x113/0x170
  device_driver_attach+0x88/0x90
  __driver_attach+0xb5/0x190
  bus_for_each_dev+0xf8/0x160
  driver_attach+0x26/0x30
  bus_add_driver+0x238/0x2f0
  driver_register+0xd7/0x150
  __pci_register_driver+0xd5/0xe0
  qla2x00_module_init+0x208/0x254 [qla2xxx]
  do_one_initcall+0xc0/0x3c9
  do_init_module+0x103/0x330
  load_module+0x36df/0x3b70
  __do_sys_finit_module+0x133/0x1c0
  __x64_sys_finit_module+0x3e/0x50
  do_syscall_64+0x72/0x210
  entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff8880ca05a400
  which belongs to the cache kmalloc-192 of size 192
The buggy address is located 144 bytes inside of
  192-byte region [ffff8880ca05a400, ffff8880ca05a4c0)
The buggy address belongs to the page:
page:ffffea0003281680 count:1 mapcount:0 mapping:ffff88811bf03380 index:0x0 compound_mapcount: 0
flags: 0x4000000000010200(slab|head)
raw: 4000000000010200 0000000000000000 0000000c00000001 ffff88811bf03380
raw: 0000000000000000 0000000080200020 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
  ffff8880ca05a380: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
  ffff8880ca05a400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880ca05a480: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
                          ^
  ffff8880ca05a500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  ffff8880ca05a580: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
==================================================================

Fixes: f8f97b0c5b ("scsi: qla2xxx: Cleanups for NVRAM/Flash read/write path")
Reported-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 22:08:04 -04:00
Bart Van Assche
a630bdc54f scsi: qla2xxx: Move qla2x00_set_fcport_state() from a .h into a .c file
The qla2x00_set_fcport_state() function is not in the hot path so move its
definition from a .h into a .c file.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 22:04:40 -04:00
Bart Van Assche
81bcf1c5cf scsi: qla2xxx: Remove two superfluous casts
Casting a void pointer into another pointer before assigning the pointer to
a variable is not useful. Hence remove such casts.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 22:04:40 -04:00
Bart Van Assche
bb63e47b6f scsi: qla2xxx: Remove qla_tgt_cmd.data_work and qla_tgt_cmd.data_work_free
The 'data_work' and 'data_work_free' member variables are set but never
used. Hence remove both member variables. See also commit 6bcbb3174c
("qla2xxx: Fix incorrect tcm_qla2xxx_free_cmd use during TMR ABORT (v2)").

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 22:04:40 -04:00
Bart Van Assche
9dfb59a008 scsi: qla2xxx: Move the <linux/io-64-nonatomic-lo-hi.h> include directive
The <linux/io-64-nonatomic-lo-hi.h> header file is included because of the
readq() macro. Since that macro is only used in qla_nx.c, move that include
statement into qla_nx.c.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 22:04:40 -04:00
Bart Van Assche
c20605edb3 scsi: qla2xxx: Declare qla24xx_build_scsi_crc_2_iocbs() static
Since qla24xx_build_scsi_crc_2_iocbs() is only used inside a single source
file, declare this function static.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 22:04:40 -04:00
Bart Van Assche
c4dc7cd314 scsi: qla2xxx: Move the port_state_str[] definition from a .h to a .c file
Reduce the size of the qla2xxx kernel module by moving an array definition
from a .h into a .c file.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 22:04:40 -04:00
Bart Van Assche
58e2753c11 scsi: qla2xxx: Insert spaces where required
Improve source code readability by inserting spaces where these are
required according to the coding standard. This patch only inserts
whitespace and does not make any other changes.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 22:04:40 -04:00
Bart Van Assche
845bbb09b5 scsi: qla2xxx: Fix formatting of pointer types
Improve source code readability by following the Linux kernel coding style
for pointer types. This patch only changes whitespace.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 22:04:40 -04:00
Bart Van Assche
bd432bb53c scsi: qla2xxx: Leave a blank line after declarations
This patch improves readability of the qla2xxx source code.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 22:04:39 -04:00
Bart Van Assche
2703eaaf4e scsi: qla2xxx: Use tabs to indent code
Most but not all code in the qla2xxx driver uses tabs for indentation.
Make the qla2xxx code easier to read by using tabs consistently for
indentation. This patch improves conformance with the Linux kernel coding
style.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 22:04:39 -04:00
John Garry
3c236f8cc6 scsi: libsas: Print expander PHY indexes in decimal
Currently we print expander PHY indexes in a mix of decimal and hex.

It is more consistent and also more convenient to read decimal, so
make this change.

We use width of 2 for expander and 1 for root PHYs prints.

Some lines which were needlessly spilling multiple lines are unified.

Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 18:55:01 -04:00
John Garry
d8649fc1c5 scsi: libsas: Do discovery on empty PHY to update PHY info
When we discover the PHY is empty in sas_rediscover_dev(), the PHY
information (like negotiated linkrate) is not updated.

As such, for a user examining sysfs for that PHY, they would see
incorrect values:

root@(none)$ cd /sys/class/sas_phy/phy-0:0:20
root@(none)$ more negotiated_linkrate
3.0 Gbit
root@(none)$ echo 0 > enable
root@(none)$ more negotiated_linkrate
3.0 Gbit

So fix this, simply discover the PHY again, even though we know it's empty;
in the above example, this gives us:

root@(none)$ more negotiated_linkrate
Phy disabled

We must do this after unregistering the device associated with the PHY
(in sas_unregister_devs_sas_addr()).

Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 18:55:01 -04:00
John Garry
085f104a83 scsi: libsas: Inject revalidate event for root port event
According to the SAS spec, an expander device shall transmit BROADCAST
(CHANGE) from at least one phy in each expander port other than the
expander port that is the cause for transmitting BROADCAST (CHANGE).

As such, for when the link is lost for a root PHY attached to an expander
PHY, we get no broadcast event.

This causes an issue for libsas, in that we will not revalidate the domain
for these events.

As a solution, for when a root PHY is formed or deformed from a root port,
insert a broadcast event to trigger a domain revalidation.

Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 18:55:00 -04:00
John Garry
a5b38d3159 scsi: libsas: Improve vague log in SAS rediscovery
When an expander PHY which was part of a wideport disconnects, we would see
a log like this from sas_rediscover():

[   39.695554] sas: phy20 part of wide port with phy16

Here, phy20 is the PHY that disconnected, and phy16 is the lowest indexed
member PHY of the wideport.

The log implies the phy20 is still part of the wideport with phy16, so is
misleading or, at least, vague.

Improve the logs in SAS rediscovery by removing this log and adding a log
in sas_rediscover_dev() to tell what's really going on.

While we're at it, also make the logs in sas_find_bcast_dev() more
informative (and more consistent with the reset of the expander logs).

Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 18:55:00 -04:00
John Garry
f7ddb43eed scsi: libsas: Try to retain programmed min linkrate for SATA min pathway unmatch fixing
Currently for fixing the linkrate matching during discovery such that the
linkrate of a SATA PHY does not exceed min pathway to initiator, we set the
SATA PHY programmed min linkrate to the same value as the programmed max
linkrate.

This is unnecessary, and we should be able to keep the same programmed min
linkrate if it is already lower than this new max programmed linkrate.

This patch makes that change.

In effect, this will not make much difference since we generally will
negotiate a linkrate at the programmed max linkrate, and the programmed min
linkrate will have no impact.

Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 18:55:00 -04:00
John Garry
7b27c5fe24 scsi: libsas: Stop hardcoding SAS address length
Many times we use 8 for SAS address length, while we already have a macro
for this - SAS_ADDR_SIZE.

Replace instances of this with the macro. However, don't touch the SAS
address array sizes sas.h, as these are defined according to the SAS spec.

Some missing whitespaces are also added, and whitespace indentation
in sas_hash_addr() is also fixed (see sas_hash_addr()).

Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-15 18:55:00 -04:00
Xiang Chen
01d4e3a2fc scsi: hisi_sas: Some misc tidy-up
Do some minor tidy-up.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-12 21:30:12 -04:00
Luo Jiaxing
246ea3c0ad scsi: hisi_sas: Don't fail IT nexus reset for Open Reject timeout
Currently we call hisi_sas_softreset_ata_disk() in
hisi_sas_I_T_nexus_reset().

If this fails for open reject reason, there is no reason to fail the IT
nexus reset, so only fail for TMF_RESP_FUNC_FAILED.

Some other strings spilled over multiple lines are reunited.

Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-12 21:30:12 -04:00
Luo Jiaxing
a311570027 scsi: hisi_sas: Don't hard reset disk during controller reset
In the function of hisi_sas_init_device(), we added ops->hardreset() to
clear affiliation of STP target port or handle [STP pending] state.

Function hisi_sas_init_device() will be called when a device is found or
during controller reset. At controller reset, we call
hisi_sas_init_device() to re-init the disks, so calling hardreset() is
unnecessary and it also will cause some delay at controller reset.

Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-12 21:30:12 -04:00
Xiaofei Tan
3168d4f800 scsi: hisi_sas: Support all RAS events with MSI interrupts
This patch is to switch HW all error handling from PCI AER to MSI interrupt
due to non-standard PCI implementation. All HW errors which were being
reported through PCI AER can be reported through MSI interrupt also.

Do two things to complete the switch:

1. Notify FW to switch to MSI handling through ACPI DSM.

2. Add MSI handling for some hw errors, ECC errors and poison errors (we
   also call some of them AXI reuser error). They were handled only through
   PCI AER before.

For old FW reporting PCI AER events, the PCI AER handler will see that the
driver on longer support AER, and will leave the device in offlined state,
which is safe.

Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-12 21:30:12 -04:00
Xiang Chen
adb5b38c19 scsi: hisi_sas: allocate different SAS address for directly attached situation
In commit 8b8d665315 ("scsi: hisi_sas: make SAS address of SATA disks
unique"), we ensured that each SATA disk in the system has a unique SAS
address, even if it is fake. That was for v2 hw.

Add this for v3 hw.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-12 21:30:12 -04:00
Xiang Chen
18a54b329c scsi: hisi_sas: Adjust the printk format of functions hisi_sas_init_device()
In function hisi_sas_init_device(), the log is as follows when error for
hardreset:

  hisi_sas_v3_hw 0000:74:02.0: SATA disk hardreset fail: 0xffffffed

Actually if hardreset failed, its return value is negative, so change the
print format from %x to %d.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-12 21:30:12 -04:00
John Garry
c63b88ccff scsi: hisi_sas: Fix for setting the PHY linkrate when disconnected
In commit efdcad62e7 ("scsi: hisi_sas: Set PHY linkrate when
disconnected"), we use the sas_phy_data.enable flag to track whether the
PHY was enabled or not, so that we know if we should set the PHY negotiated
linkrate at SAS_LINK_RATE_UNKNOWN or SAS_PHY_DISABLED.

However, it is not proper to use sas_phy_data.enable, since it is only set
when libsas attempts to set the PHY disabled/enabled; hence, it may not
even have an initial value.

As a solution to this problem, introduce hisi_sas_phy.enable to track
whether the PHY is enabled or not, so that we can set the negotiated
linkrate properly when the PHY comes down.

Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-12 21:30:12 -04:00
Xiang Chen
447f78c0e1 scsi: hisi_sas: Remedy inconsistent PHY down state in software
Currently there are two scenarioes which may cause PHY state of hardware
(which is 0) is inconsistent with the state held in software:

- Unplug SAS wire before get_phys_state when SAS controller reset, then the
  interrupts of phy down are ignored, phy state is 0 before reset, and it
  also gets 0 after reset, so phy down doesn't occur even if unplugged SAS
  wire;

- For v3 hw later version, it will close bus when 2 bit ECC error occurs.
  So if unplug SAS wire at that time, interrupts of phy down also not
  occur. So at last it will cause host reset. It also get phy state 0
  before and after reset, the same issue occurs.

To solve it, use hisi_sas_phy_down() directly in rescan topology function.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-12 21:30:12 -04:00
Xiang Chen
a97fa58680 scsi: hisi_sas: add host reset interface for test
Add host reset interface to make it easier for testing the host reset
feature.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-12 21:30:11 -04:00
Martin K. Petersen
17631462cd Merge branch '5.1/scsi-fixes' into 5.2/merge
We have a few submissions for 5.2 that depend on fixes merged post
5.1-rc1. Merge the fixes branch into queue.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-12 21:27:23 -04:00
Hannes Reinecke
a6a6d0589a scsi: scsi_transport_fc: nvme: display FC-NVMe port roles
Currently the FC-NVMe driver is leverating the SCSI FC transport class to
access the remote ports. Which means that all FC-NVMe remote ports will be
visible to the fc transport layer, but due to missing definitions the port
roles will always be 'unknown'.  This patch adds the missing definitions to
the fc transport class to that the port roles are correctly displayed.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Reviewed-by: Giridhar Malavali <gmalavali@marvell.com>
Reviewed-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-12 20:09:34 -04:00
Colin Ian King
ea63e60f7a scsi: cxgbi: remove redundant __kfree_skb call on skb and free cst->atid
The error return path via label rel_resource checks for a non-null skb
before free'ing it.  However, skb is always null at this exit path, so the
null check and the free are redundant and can be removed.  Removing this
allows the original goto's to rel_resource to be cleaned up; the first can
be replaced by a return of -EINVAL, the second can be replaced by a more
appropriate -ENOMEM return and fix a memory leak by freeing csk->atid.

Addresses-Coverity: ("Logically Dead Code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-12 20:05:31 -04:00
Bart Van Assche
c8538b0b9e scsi: tcm_qla2xxx: Minimize #include directives
Only include those header files that are needed by the code in this source
file.

[mkp: include build fix from Bart for SPARC]

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-09 21:30:44 -04:00
Varun Prakash
5c2442fd78 scsi: csiostor: fix missing data copy in csio_scsi_err_handler()
If scsi cmd sglist is not suitable for DDP then csiostor driver uses
preallocated buffers for DDP, because of this data copy is required from
DDP buffer to scsi cmd sglist before calling ->scsi_done().

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-08 22:18:35 -04:00
Bart Van Assche
59c209a689 scsi: qla2xxx: Unregister resources in the opposite order of the registration order
Make sure that resources are only unregistered after the users of these
resources have been unregistered. Only unregister the character device if
registration of it succeeded.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-08 22:16:34 -04:00
Bart Van Assche
c794d24ec9 scsi: qla2xxx: Unregister chrdev if module initialization fails
If module initialization fails after the character device has been
registered, unregister the character device. Additionally, avoid
duplicating error path code.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
Fixes: 6a03b4cd78 ("[SCSI] qla2xxx: Add char device to increase driver use count") # v2.6.35.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-08 22:16:34 -04:00
Bart Van Assche
2c26348c4d scsi: qla2xxx: Use get/put_unaligned where appropriate
This patch makes the code easier to read but does not change any
functionality.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-08 22:16:34 -04:00
Bart Van Assche
7b006b9755 scsi: qla2xxx: Make qla2x00_process_response_queue() easier to read
Make qla2x00_process_response_queue() easier to read by splitting this
function. This patch does not change any functionality.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-08 22:16:34 -04:00
Bart Van Assche
6515ad717b scsi: qla2xxx: Reduce the number of forward declarations
Move the SCSI host template definition after the definition of the
functions that it references. Remove the forward declarations that became
unnecessary by that change. This patch does not change any functionality.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-08 22:16:34 -04:00
Bart Van Assche
b3ede8ea78 scsi: qla2xxx: Declare local symbols static
This patch avoids that sparse complains that a declaration is missing.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-08 22:16:34 -04:00
Bart Van Assche
b0a1c5b5c3 scsi: qla2xxx: Use ARRAY_SIZE() in the definition of QLA_LAST_SPEED
Make the code easier to read by avoiding to use a hard-coded constant. This
patch does not change any functionality.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-08 22:16:34 -04:00
Bart Van Assche
abe5706dcf scsi: qla2xxx: Remove a comment that refers to the SCSI host lock
Since qla2xxx_queuecommand() no longer takes the SCSI host lock, remove a
comment that refers to the host lock.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-08 22:16:34 -04:00
Bart Van Assche
c02ee1e5a9 scsi: qla2xxx: Change a stack variable into a static const variable
Make qla2x00_get_host_fabric_name() slightly faster by changing a stack
array into a static array. Declare that array const now that the
wwn_to_u64() argument pointer has been declared const.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-08 22:16:34 -04:00
Colin Ian King
ef19af9c28 scsi: qla2xxx: fix spelling mistake "alredy" -> "already"
There is a spelling mistake in a ql_log message. Fix it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-08 21:46:02 -04:00
James Smart
1a61e5486a scsi: lpfc: add support for posting FC events on FPIN reception
This patch adds support to recognize FPIN ELS's that are received.  When
one is received, the fc transport will be called to handle the the FPIN.

Signed-off-by: James Smart <jsmart2021@gmail.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-08 21:29:16 -04:00
James Smart
c39e0af64b scsi: scsi_transport_fc: Add FPIN fc event codes
Add a new event type - an FPIN event.

Add a new routine, fc_host_fpin_rcv(), that lldd's call when an FPIN is
received. The routine processes the fpin payload.  For now, the routine
only logs an FPIN event.

Signed-off-by: Muneendra <muneendra.kumar@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-08 21:29:16 -04:00
James Smart
2b1be55819 scsi: scsi_transport_fc: refactor event posting routines
There are two routines generating transport events that do the same thing
with only a couple of values set differently.

Refactor so there's a single routine doing the netlink operations to send
the event. All the differences are passed as arguments. Export the symbol
so the generic routine can be called by llds.

Modify the existing two event routines to use the helper.

Signed-off-by: James Smart <jsmart2021@gmail.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-08 21:29:16 -04:00
Bart Van Assche
d964b3e534 scsi: lpfc: Fix a recently introduced compiler warning
This patch avoids that the following compiler warning is reported with
CONFIG_NVME_FC=n:

drivers/scsi/lpfc/lpfc_nvme.c:2140:1: warning: 'lpfc_nvme_lport_unreg_wait' defined but not used [-Wunused-function]
 lpfc_nvme_lport_unreg_wait(struct lpfc_vport *vport,
 ^~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 3999df75bc ("scsi: lpfc: Declare local functions static")
Cc: James Smart <james.smart@broadcom.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-08 21:26:11 -04:00
YueHaibing
25ea6b19db scsi: qla2xxx: Remove useless set memory to zero use memset()
The memory return by kzalloc() has already be set to zero, so remove
useless memset(0).

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03 23:46:00 -04:00
Jan Kotas
4fed62bc1c scsi: ufs-cdns: Add support for UFSHCI with M31 PHY
This patch adds an additional PHY initialization, required for M31 PHY when
used with Cadence UFS HC.  A new compatible string has been added for this
purpose.

[mkp: nuke superfluous status return]

Signed-off-by: Jan Kotas <jank@cadence.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03 23:45:59 -04:00
Zeng Guangyue
60b7b823fb scsi: ufs: remove unnecessary pointer evaluation
The pointer value is initialized as &hba->vreg_info, and it's never
changed. It's not necessary to check the pointer is null or not.

Signed-off-by: Zeng Guangyue <zengguangyue@hisilicon.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03 23:45:59 -04:00
YueHaibing
6087550338 scsi: qedf: Remove set but not used variable 'fr_len'
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/scsi/qedf/qedf_fip.c: In function 'qedf_fcoe_send_vlan_req':
drivers/scsi/qedf/qedf_fip.c:22:6: warning:
 variable 'fr_len' set but not used [-Wunused-but-set-variable]

It's never used since introduction and can be removed.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Manish Rangankar <mrangankar@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03 23:45:59 -04:00
Colin Ian King
f310a4eab8 scsi: pm8001: fix spelling mistake, interupt -> interrupt
Rename the functions pm8001_chip_is_our_interupt,
pm80xx_chip_is_our_interupt and function pointer is_our_interrupt to fix
spelling mistakes.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03 23:45:59 -04:00
Colin Ian King
292c04cca8 scsi: pm8001: clean up dead code when PM8001_USE_MSIX is defined
When macro PM8001_USE_MSIX is defined there are redundant dead code calls
to pm8001_chip_intx_interrupt_{enable|disable} and pm8001_cr32.

Clean this up for the defined PM8001_USE_MSIX and undefined
PM8001_USE_MSIX cases.

[mkp: squashed two patches]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03 23:45:59 -04:00
Himanshu Madhani
f99b77e0bf scsi: qla2xxx: Update driver version to 10.01.00.16-k
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03 23:45:59 -04:00
Giridhar Malavali
711a08d79f scsi: qla2xxx: Change abort wait_loop from msleep to wait_event_timeout
This patch converts driver wait time from using msleep to
wair_event_timeout to prevent race condition.

Signed-off-by: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03 23:45:59 -04:00
Giridhar Malavali
b2d1453a45 scsi: qla2xxx: Fix driver unload when FC-NVMe LUNs are connected
This patch allows driver to unload using "modprobe -r" when FC-NVMe LUNs
are connected.

Signed-off-by: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03 23:45:58 -04:00
Anil Gurumurthy
e39a6645d9 scsi: qla2xxx: Cleanup redundant qla2x00_abort_all_cmds during unload
This patch removes redundant qla2x00_abort_all_cmds() during driver unload.

Signed-off-by: Anil Gurumurthy <agurumurthy@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03 23:45:58 -04:00
Giridhar Malavali
ffc81fc07e scsi: qla2xxx: Set remote port devloss timeout to 0
This patch sets remote_port_devloss value to 0. This indicates to FC-NVMe
transport that driver is unloading and transport should not retry.

Fixes: e476fe8af5 ("scsi: qla2xxx: Fix unload when NVMe devices are configured")
Cc: stable@vger.kernel.org
Signed-off-by: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03 23:45:58 -04:00
Quinn Tran
ffbc647666 scsi: qla2xxx: Cleanup fcport memory to prevent leak
Clean up fcport list and loopid in one place and iterate through for loop.

Signed-off-by: Quinn Tran <qtran@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03 23:45:58 -04:00
Quinn Tran
a6b95d1c71 scsi: qla2xxx: Use mutex protection during qla2x00_sysfs_read_fw_dump()
Add mutex protection to prevent driver from freeing the FW dump buffer
while the extraction is in progress.

[mkp: commit desc]

Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03 23:45:58 -04:00
Quinn Tran
a4226ec3ef scsi: qla2xxx: Fix fw dump corruption
If fw dump buffer size changes and there is an existing fw dump, then save
the old dump in the newly allocated buffer.

Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03 23:45:58 -04:00
Andrew Vasquez
e81d1bcbde scsi: qla2xxx: Further limit FLASH region write access from SysFS
Recent ISPs have larger and more complex flash-write semantics
(secure-access and signing). The BSG interfaces support these semantics for
all ISPs and is exclusively used by QLogic user-space tools. Limit
flash-write operations to ISPs <= 25xx.

Signed-off-by: Andrew Vasquez <andrewv@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03 23:45:58 -04:00
Andrew Vasquez
5cbdae10bf scsi: qla2xxx: Fix incorrect region-size setting in optrom SYSFS routines
Commit e6f77540c0 ("scsi: qla2xxx: Fix an integer overflow in sysfs
code") incorrectly set 'optrom_region_size' to 'start+size', which can
overflow option-rom boundaries when 'start' is non-zero.  Continue setting
optrom_region_size to the proper adjusted value of 'size'.

Fixes: e6f77540c0 ("scsi: qla2xxx: Fix an integer overflow in sysfs code")
Cc: stable@vger.kernel.org
Signed-off-by: Andrew Vasquez <andrewv@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03 23:45:53 -04:00
James Smart
4eb0153588 scsi: lpfc: Fix missing wakeups on abort threads
Abort thread wakeups, on some wqe types, are not happening.  The thread
wakeup logic is dependent upon the LPFC_DRIVER_ABORTED flag. However, on
these wqes, the completion handler running prior to the io completion
routine ends up clearing the flag.

Rework the wakeup logic to look at a non-null waitq element which must be
set if the abort thread is waiting. This is reverting the change in the
indicated patch.

Fixes: c2017260ee ("scsi: lpfc: Rework locking on SCSI io completion")
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03 23:35:09 -04:00
Michael Kelley
ed2e63aaec scsi: storvsc: Reduce default ring buffer size to 128 Kbytes
Reduce the default VMbus channel ring buffer size for storvsc SCSI devices
from 1 Mbyte to 128 Kbytes. Measurements show that ring buffer sizes above
128 Kbytes do not increase performance even at very high IOPS rates, so
don't waste the memory. Also remove the dependence on PAGE_SIZE, since the
ring buffer size should not change on architectures where PAGE_SIZE is not
4 Kbytes.

Signed-off-by: Michael Kelley <mikelley@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03 23:31:03 -04:00
Michael Kelley
382e06d11e scsi: storvsc: Fix calculation of sub-channel count
When the number of sub-channels offered by Hyper-V is >= the number of CPUs
in the VM, calculate the correct number of sub-channels.  The current code
produces one too many.

This scenario arises only when the number of CPUs is artificially
restricted (for example, with maxcpus=<n> on the kernel boot line), because
Hyper-V normally offers a sub-channel count < number of CPUs.  While the
current code doesn't break, the extra sub-channel is unbalanced across the
CPUs (for example, a total of 5 channels on a VM with 4 CPUs).

Signed-off-by: Michael Kelley <mikelley@microsoft.com>
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Long Li <longli@microsoft.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03 23:30:08 -04:00
Xose Vazquez Perez
1cb1d2c64e scsi: core: add new RDAC LENOVO/DE_Series device
Blacklist "Universal Xport" LUN. It's used for in-band storage array
management.  Also add model to the rdac dh family.

Cc: Martin Wilck <mwilck@suse.com>
Cc: Hannes Reinecke <hare@suse.de>
Cc: NetApp RDAC team <ng-eseries-upstream-maintainers@netapp.com>
Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: James E.J. Bottomley <jejb@linux.vnet.ibm.com>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: SCSI ML <linux-scsi@vger.kernel.org>
Cc: DM ML <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03 23:27:23 -04:00
Giridhar Malavali
5da05a26b8 scsi: qla2xxx: Disable T10-DIF feature with FC-NVMe during probe
With FC-NVMe enabled, driver does not support T10 DIF/DIX.  This patch
disables T10-PI information when ql2xnvmeenable is set.

Signed-off-by: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-04-03 23:11:36 -04:00