Commit Graph

6615 Commits

Author SHA1 Message Date
Bart Van Assche
3b661a286d qla2x00t-32gbit: Add beacon LED config sysfs interface
This patch provides an interface to do the following (using MBC 0x3B):
    
 - Displays (in hex) the LED config words for all three LEDs.
    
 - Programs the config words for one LED or for all three LEDs.

The sysfs node defined is named beacon_config.

First, to allow driver to gain LED control, do this:
 # echo 1 > /sys/class/scsi_host/host#/beacon

Then, to display config words for all three LEDs do this:
 # cat /sys/class/scsi_host/host#/beacon_config

To set config words for all three LEDs do this:
 # echo 3 xxxx yyyy zzzz > /sys/class/scsi_host/host#/beacon_config

Or, to set config word for a specific single LED n do this:
 # echo n xxxx > /sys/class/scsi_host/host#/beacon_config
  where n is the LED number (0, 1, 2)

Finally, to restore LED control back to firmware, do this:
 # echo 0 > /sys/class/scsi_host/host#/beacon

Link: https://lore.kernel.org/r/20200212214436.25532-2-hmadhani@marvell.com
Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 07553b1e83b46414caa693ba10d1a16487409b61 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8786 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:09:38 +00:00
Bart Van Assche
590c45cf32 qla2x00t-32gbit: Check locking assumptions at runtime in qla2x00_abort_srb()
Document the locking assumptions this function relies on and also verify
these locking assumptions at runtime.

Cc: Quinn Tran <qutran@marvell.com>
Cc: Daniel Wagner <dwagner@suse.de>
Link: https://lore.kernel.org/r/20200123042345.23886-2-bvanassche@acm.org
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 2494c2868d6e0eaaefd42f4fd2d260a8c35d240d upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8785 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:08:16 +00:00
Bart Van Assche
98a11ac4cd qla2x00t-32gbit: Fix unbound NVME response length
On certain cases when response length is less than 32, NVME response data
is supplied inline in IOCB. This is indicated by some combination of state
flags. There was an instance when a high, and incorrect, response length
was indicated causing driver to overrun buffers. Fix this by checking and
limiting the response payload length.

Fixes: 7401bc18d1ee3 ("scsi: qla2xxx: Add FC-NVMe command handling")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200124045014.23554-1-hmadhani@marvell.com
Signed-off-by: Arun Easi <aeasi@marvell.com>
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>

[ commit 00fe717ee1ea3c2979db4f94b1533c57aed8dea9 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8784 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:06:52 +00:00
Bart Van Assche
69d90841b6 iscsi-scstd: Fix a memory leak in conn_free()
Signed-off-by: Lev Vainblat <lev@zadarastorage.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8783 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-05 02:35:34 +00:00
Bart Van Assche
688561c795 README, qla2x00t web page: Remove references to QLogic git repository
Since the QLogic qla2x00t git repository is no longer online, remove all
references to that repository.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8782 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-02-27 02:23:09 +00:00
Bart Van Assche
6b11f4f3bb scst/ChangeLog: Update the changelog
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8781 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-02-24 03:38:12 +00:00
Bart Van Assche
ed8d890ce0 scst/ChangeLog: Update the changelog
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8780 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-02-24 03:24:47 +00:00
Bart Van Assche
d3f6d72be3 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8779 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-02-24 02:07:03 +00:00
Bart Van Assche
e8de615950 scst: Move RTPG and STPG handling into the SCST core
This patch does not change the behavior when using one of the vdisk handlers.
When using dev_disk to forward SCSI commands from one SCST node to another,
this patch causes RTPG and STPG commands to be processed on the source SCST
node (as it should) instead of on the destination SCST node.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8778 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-02-23 23:07:18 +00:00
Bart Van Assche
6d4c15da22 scst: Move the expl_alua member variable from scst_vdisk_dev into scst_device
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8777 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-02-23 23:05:43 +00:00
Bart Van Assche
785e721cf3 scst: Add the 'forward_src' sysfs attribute
Make forwarding source mode configurable per target port instead of
having a compile-time global option.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8776 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-02-23 23:05:13 +00:00
Bart Van Assche
2e5620098c scst: Add the 'forward_dst' sysfs attribute
Add the 'forward_dst' sysfs attribute next to the 'forwarding' attribute. The
plan is to remove the 'forwarding' attribute at some time in the future.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8775 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-02-23 23:04:11 +00:00
Bart Van Assche
bf2393ff01 scst: Split scst_tg_set_group_info()
Since scst_tg_set_group_info() is too long, split it into two functions.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8774 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-02-23 22:59:32 +00:00
Bart Van Assche
dc670b9c07 scst_vdisk: Clean up show() functions
Leave out "? 1 : 0" from after single bit variables.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8773 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-02-23 22:58:25 +00:00
Bart Van Assche
88711323dc scst: Use bitmap_parse() instead of __bitmap_parse()
__bitmap_parse() has been removed from kernel v5.6. See also commit
2d6261583be0 ("lib: rework bitmap_parse()") # v5.6-rc1.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8772 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-02-23 22:57:43 +00:00
Bart Van Assche
3ad0566ac7 scst/README: Fix spelling
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8771 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-02-23 22:55:59 +00:00
Bart Van Assche
4402104510 scst: Add a source code comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8770 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-02-23 17:31:58 +00:00
Bart Van Assche
3d98a7174e scst: Use enum scst_exec_res where appropriate
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8769 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-02-23 17:29:26 +00:00
Bart Van Assche
40b4dfd289 scst: Split the scst_targ.c source file
Since the scst_targ.c source file is large, move the functions for processing
SCSI commands into a new source file, scst_local_cmd.c.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8768 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-02-23 17:16:12 +00:00
Bart Van Assche
e72eae316a scst: Replace relative target port information in the INQUIRY response
Signed-off-by: Tamas Bartha <tamas.bartha@barre.hu>
[ bvanassche: reformatted this patch and renamed several variables ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8767 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-02-23 00:03:28 +00:00
Bart Van Assche
e2c2fab4a0 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8766 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-02-08 05:45:43 +00:00
Bart Van Assche
a709260f2e scst/kernel/in-tree/Makefile.drivers.Linux-5.5.patch: Add this file
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8765 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-01-28 04:22:39 +00:00
Bart Van Assche
525e6a7028 qla2x00t-32gbit: Port to Linux kernel v5.5
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8764 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-01-28 04:22:07 +00:00
Bart Van Assche
af64553f9f nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8763 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-01-19 21:15:31 +00:00
Bart Van Assche
07ef7d36ca nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8762 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-01-13 04:25:25 +00:00
Bart Van Assche
f0e474c4d8 iscsi-scst: Suppress multiple Coverity complaints
Suppress several Coverity "tainted scalar" complaints and also two other
false positive Coverity complaints.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8761 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-01-12 05:37:34 +00:00
Bart Van Assche
ffd85476ae scst: Suppress a false positive Coverity memory corruption complaint
This patch suppresses the following Coverity complaint:

CID 119689 (#1 of 1): Out-of-bounds access (OVERRUN)
overrun-buffer-arg: Overrunning struct type scst_event of 64 bytes by
passing it to a function which accesses it at byte offset 3135 using
argument 64UL + payload_len (which evaluates to 3136). [Note: The source
code implementation of the function has been overridden by a builtin model.]



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8760 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-01-04 17:46:07 +00:00
Bart Van Assche
2c530f79af scst: Use designated initializers for sys_alloc_fns
Designated initializers are required for GCC to safely implement
RANDSTRUCT, a GCC plugin pulled from the Grsecurity patch set
upstream ~2017.

Fix the compile error caused by implementation of sys_alloc_fns
by rewriting the struct with designated members.

See also https://github.com/bvanassche/scst/pull/17.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8759 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-30 04:38:51 +00:00
Bart Van Assche
422d670126 srpt, isert-scst: Fix the build against MOFED
This patch is a fix for commit a169500590 ("Makefiles:
Use KBUILD_EXTRA_SYMBOLS instead of copying Module.symvers"; r8686).

Reported-by: Grant Albitz <GAlbitz@All-Bits.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8758 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-28 04:28:19 +00:00
Bart Van Assche
52370acb84 qla2x00t-32gbit: Reduce the size of struct qla_tgt_cmd
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8757 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:43:09 +00:00
Bart Van Assche
4978587a52 qla2x00t-32gbit: Fix a bug in qlt_alloc_qfull_cmd()
Remove a memset() call that clears the data members initialized by
sqa_qla2xxx_get_cmd().

Fixes: b8a1634ced ("qla2x00t-32gbit: Import this driver into the SCST repository")


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8756 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:42:31 +00:00
Bart Van Assche
3f63399dff qla2x00t-32gbit: Update driver version to 10.01.00.22-k
Link: https://lore.kernel.org/r/20191217220617.28084-15-hmadhani@marvell.com
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit e849efe8c8734aee0d207a1f006705d7a6d8dd39 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8755 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:42:06 +00:00
Bart Van Assche
cbe98a9ce7 qla2x00t-32gbit: Fix mtcp dump collection failure
MTCP dump failed due to MB Reg 10 was picking garbage data from stack
memory.

Fixes: 81178772b636a ("[SCSI] qla2xxx: Implemetation of mctp.")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20191217220617.28084-14-hmadhani@marvell.com
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 7ae8c12cb1a5278795afbefabc67b119fe769b61 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8754 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:41:45 +00:00
Bart Van Assche
c75fc9910e qla2x00t-32gbit: Fix stuck session in GNL
Fix race condition between GNL completion processing and GNL request. Late
submission of GNL request was not seen by the GNL completion thread. This
patch will re-submit the GNL request for late submission fcport.

Link: https://lore.kernel.org/r/20191217220617.28084-13-hmadhani@marvell.com
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 5c3f46d332234b833ed733144fb9dd40577eb8bc upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8753 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:41:20 +00:00
Bart Van Assche
22c88c2686 qla2x00t-32gbit: Fix RIDA Format-2
This patch fixes offset for Format-2 data structure for Report ID
Acquisition. This caused driver to set remote_nport_id to 0x0000 in N2N
configuration. In a scenario where initiator's WWPN is higher than target's
WWPN, driver will assign 0x00 as target nport-id, which results into login
failure.

Link: https://lore.kernel.org/r/20191217220617.28084-12-hmadhani@marvell.com
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 101346ec73d9376823e7471b719c2e8445aa3541 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8752 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:40:58 +00:00
Bart Van Assche
a838112bdb qla2x00t-32gbit: Consolidate fabric scan
Consolidate scan for fabric loop and fabric topologies into a single scan.

Link: https://lore.kernel.org/r/20191217220617.28084-11-hmadhani@marvell.com
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 25009f0e147951f02618d71e4671a3104e2bb552 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8751 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:40:25 +00:00
Bart Van Assche
9d2b5a9184 qla2x00t-32gbit: Correct fcport flags handling
This patch fixes some instances of FCF_ASYNC_{SENT|ACTIVE} flag setting and
clearning were missing.

Link: https://lore.kernel.org/r/20191217220617.28084-10-hmadhani@marvell.com
Signed-off-by: Shyam Sundar <ssundar@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 0333e5f4f5d3edb2d0f43ea0f4befd20aaf812b4 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8750 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:40:05 +00:00
Bart Van Assche
c8fe6bdf91 qla2x00t-32gbit: Fix stuck login session using prli_pend_timer
Session is stuck if driver sees FW has received a PRLI. Driver allows FW to
finish with processing of PRLI by checking back with FW at a later time to
see if the PRLI has finished. Instead, driver failed to push forward after
re-checking PRLI completion.

Fixes: 974950710e2a ("qla2xxx: Fix stuck login session")
Cc: stable@vger.kernel.org # 5.3
Link: https://lore.kernel.org/r/20191217220617.28084-9-hmadhani@marvell.com
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 08c0de658b08408284e5176d585782f924a21173 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8749 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:39:34 +00:00
Bart Van Assche
d65276050d qla2x00t-32gbit: Use common routine to free fcport struct
This patch does not change any any functionality.

Link: https://lore.kernel.org/r/20191217220617.28084-8-hmadhani@marvell.com
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 3dae220595baa7a9fb582b851b54c10ad6a0cbae upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8748 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:39:13 +00:00
Bart Van Assche
6892c83653 qla2x00t-32gbit: Add D-Port Diagnostic reason explanation logs
This patch adds more details when D-Port diag async event is generated by
the firmware.

Link: https://lore.kernel.org/r/20191217220617.28084-7-hmadhani@marvell.com
Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 425215647fc53ba183026e03206fa86fe5a4f542 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8747 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:38:50 +00:00
Bart Van Assche
6c8601bc82 qla2x00t-32gbit: Fix update_fcport for current_topology
logout_on_delete flag should not be set if the topology is Loop. This patch
fixes unintentional logout during loop topology.

Link: https://lore.kernel.org/r/20191217220617.28084-6-hmadhani@marvell.com
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 89eb2e7e794da2691e5aca02ed102bb287e3575a upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8746 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:38:30 +00:00
Bart Van Assche
b7ce0c8460 qla2x00t-32gbit: Cleanup unused async_logout_done
This patch removes unused qla2x00_async_logout_done from the code.

Link: https://lore.kernel.org/r/20191217220617.28084-5-hmadhani@marvell.com
Signed-off-by: Shyam Sundar <ssundar@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 96a0eb7164d125100ac692c7efeb6e70a7585042 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8745 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:38:04 +00:00
Bart Van Assche
d847f25524 qla2x00t-32gbit: Add a shadow variable to hold disc_state history of fcport
This patch adds a shadow variable to hold disc_state history for the fcport
and prints state transition when the logging is enabled.

Link: https://lore.kernel.org/r/20191217220617.28084-4-hmadhani@marvell.com
Signed-off-by: Shyam Sundar <ssundar@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 27258a5771446f9c7edc929ecb76fe2c12c29d97 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8744 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:37:40 +00:00
Bart Van Assche
6ce21edf8b qla2x00t-32gbit: Fix fabric scan hang
On timeout, SRB pointer was cleared from outstanding command array and
dropped.  It was not allowed to go through the done process and cleanup.
This patch will abort the SRB where FW will return it with an error status
and resume the normal cleanup.

Link: https://lore.kernel.org/r/20191217220617.28084-3-hmadhani@marvell.com
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit f57a0107359605b29f4ea9afb8ee2e03473b1448 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8743 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:37:12 +00:00
Bart Van Assche
c27e7694d8 qla2x00t-32gbit: Remove defer flag to indicate immeadiate port loss
During cable pull test case, if the port is disconnected for time larger
than devloss timeout, driver does not mark path offline.  In such case,
instead of notifying SCSI-ML of loop down, driver goes into endless loop of
device relogin because defer flag is set.

With newer handling of device relogin in driver discovery, defer flag is
now redundant. This patch removes defer flag and cleans up code handling
port lost indication to SCSI-ML.

Link: https://lore.kernel.org/r/20191217220617.28084-2-hmadhani@marvell.com
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>

[ commit 3c75ad1d87c7d277c6174051b98757fe981d592d upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8742 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:36:52 +00:00
Bart Van Assche
bb6f896ac4 qla2x00t-32gbit: Add debug dump of LOGO payload and ELS IOCB
The change adds a way to debug LOGO ELS, likewise PLOGI.

Link: https://lore.kernel.org/r/20191125165702.1013-14-r.bolshakov@yadro.com
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Acked-by: Quinn Tran <qutran@marvell.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Tested-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 9545767db3cde2d4f9ca581d096d97ed00754282 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8741 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:36:30 +00:00
Bart Van Assche
be35a0b615 qla2x00t-32gbit: Ignore PORT UPDATE after N2N PLOGI
PORT UPDATE asynchronous event is generated on the host that issues PLOGI
ELS (in the case of higher WWPN). In that case, the event shouldn't be
handled as it sets unwanted DPC flags (i.e. LOOP_RESYNC_NEEDED) that
trigger link flap.

Ignore the event if the host has higher WWPN, but handle otherwise.

Cc: Quinn Tran <qutran@marvell.com>
Link: https://lore.kernel.org/r/20191125165702.1013-13-r.bolshakov@yadro.com
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Tested-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit af22f0c7b052c5c203207f1e5ebd6aa65f87c538 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8740 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:36:11 +00:00
Bart Van Assche
027599ccd0 qla2x00t-32gbit: Don't defer relogin unconditonally
qla2x00_configure_local_loop sets RELOGIN_NEEDED bit and calls
qla24xx_fcport_handle_login to perform the login. This bit triggers a wake
up of DPC later after a successful login.

The deferred call is not needed if login succeeds, and it's set in
qla24xx_fcport_handle_login in case of errors, hence it should be safe to
drop.

Link: https://lore.kernel.org/r/20191125165702.1013-12-r.bolshakov@yadro.com
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Acked-by: Quinn Tran <qutran@marvell.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Tested-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit dabc5ec915f3a2c657ecfb529cd3d4ec303a4412 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8739 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:35:42 +00:00
Bart Van Assche
341ef8cf2c qla2x00t-32gbit: Send Notify ACK after N2N PLOGI
qlt_handle_login schedules session for deletion even if a login is in
progress. That causes login bouncing, i.e. a few logins are made before it
settles down.

Complete the first login by sending Notify Acknowledge IOCB via
qlt_plogi_ack_unref if the session is pending login completion.

Fixes: 9cd883f07a54 ("scsi: qla2xxx: Fix session cleanup for N2N")
Cc: Krishna Kant <krishna.kant@purestorage.com>
Cc: Alexei Potashnik <alexei@purestorage.com>
Link: https://lore.kernel.org/r/20191125165702.1013-11-r.bolshakov@yadro.com
Acked-by: Quinn Tran <qutran@marvell.com>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Tested-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 5e6b01d84b9d20bcd77fc7c4733a2a4149bf220a upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8738 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:35:23 +00:00
Bart Van Assche
0a6f0f9ac5 qla2x00t-32gbit: Configure local loop for N2N target
qla2x00_configure_local_loop initializes PLOGI payload for PLOGI ELS using
Get Parameters mailbox command.

In the case when the driver is running in target mode, the topology is N2N
and the target port has higher WWPN, LOCAL_LOOP_UPDATE bit is cleared too
early and PLOGI payload is not initialized by the Get Parameters
command. That causes a failure of ELS IOCB carrying the PLOGI with 0x15 aka
Data Underrun error.

LOCAL_LOOP_UPDATE has to be set to initialize PLOGI payload.

Fixes: 48acad099074 ("scsi: qla2xxx: Fix N2N link re-connect")
Link: https://lore.kernel.org/r/20191125165702.1013-10-r.bolshakov@yadro.com
Acked-by: Quinn Tran <qutran@marvell.com>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Tested-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit fd1de5830a5abaf444cc4312871e02c41e24fdc1 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8737 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:35:02 +00:00