Commit Graph

6646 Commits

Author SHA1 Message Date
Bart Van Assche
545a43ff56 qla2x00t-32gbit: Use FC generic update firmware options routine for ISP27xx
This patch uses generic firmware update options for FCoE based
adapters as well to reduce code duplication.

Link: https://lore.kernel.org/r/20200226224022.24518-4-hmadhani@marvell.com
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 37efd51f75f30b48c2d19ee94eeccfd4325c3cb4 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8817 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:31:12 +00:00
Bart Van Assche
ab031229ce qla2x00t-32gbit: Avoid setting firmware options twice in 24xx_update_fw_options.
This patch moves ql2xrdpenable check earlier to avoids setting
fw_option once again before exiting qla24xx_update_fw_options.

Link: https://lore.kernel.org/r/20200226224022.24518-3-hmadhani@marvell.com
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 9ef4847a80d317e4033c2ecf0e73e54c5fd4771d upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8816 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:30:37 +00:00
Bart Van Assche
4000dcb0fa qla2x00t-32gbit: Add 16.0GT for PCI String
This patch adds 16.0GT for readable display string.

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

[ commit efd39a2ad6ff6d1187caac8491d710f41b6a93ab upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8815 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:30:03 +00:00
Bart Van Assche
c9e7188d20 qla2x00t-32gbit: Convert MAKE_HANDLE() from a define into an inline function
This patch allows sparse to verify the endianness of the arguments passed
to make_handle().

Link: https://lore.kernel.org/r/20200220043441.20504-5-bvanassche@acm.org
Cc: Roman Bolshakov <r.bolshakov@yadro.com>
Cc: Daniel Wagner <dwagner@suse.de>
Cc: Martin Wilck <mwilck@suse.com>
Cc: Quinn Tran <qutran@marvell.com>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
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>

[ commit c25eb70a10243c1ad24e74375aceb65ab8951e93 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8814 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:29:20 +00:00
Bart Van Assche
37b9c87479 qla2x00t-32gbit: Fix sparse warnings triggered by the PCI state checking code
This patch fixes the following sparse warnings:

drivers/scsi/qla2xxx/qla_mbx.c:120:21: warning: restricted pci_channel_state_t degrades to integer
drivers/scsi/qla2xxx/qla_mbx.c:120:37: warning: restricted pci_channel_state_t degrades to integer

>From include/linux/pci.h:

enum pci_channel_state {
	/* I/O channel is in normal state */
	pci_channel_io_normal = (__force pci_channel_state_t) 1,

	/* I/O to channel is blocked */
	pci_channel_io_frozen = (__force pci_channel_state_t) 2,

	/* PCI card is dead */
	pci_channel_io_perm_failure = (__force pci_channel_state_t) 3,
};

Link: https://lore.kernel.org/r/20200220043441.20504-4-bvanassche@acm.org
Cc: Roman Bolshakov <r.bolshakov@yadro.com>
Cc: Martin Wilck <mwilck@suse.com>
Cc: Quinn Tran <qutran@marvell.com>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
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>

[ commit 471298cab82d255e358901ea5baff24abe1a53b8 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8813 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:28:39 +00:00
Bart Van Assche
69315453ff qla2x00t-32gbit: Suppress endianness complaints in qla2x00_configure_local_loop()
Instead of changing endianness in-place, write the data in CPU endian
format in another buffer and copy that buffer back. This patch does not
change any functionality but silences some sparse endianness warnings.

Link: https://lore.kernel.org/r/20200220043441.20504-3-bvanassche@acm.org
Cc: Roman Bolshakov <r.bolshakov@yadro.com>
Cc: Martin Wilck <mwilck@suse.com>
Cc: Quinn Tran <qutran@marvell.com>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
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 1ee5ac365c2a554b59b0e7445455d93a0577662b upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8812 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:27:57 +00:00
Bart Van Assche
75581dea86 qla2x00t-32gbit: Simplify the code for aborting SCSI commands
Since the SCSI core does not reuse the tag of the SCSI command that is
being aborted by .eh_abort() before .eh_abort() has finished it is not
necessary to check from inside that callback whether or not the SCSI
command has already completed. Instead, rely on the firmware to return an
error code when attempting to abort a command that has already
completed. Additionally, rely on the firmware to return an error code when
attempting to abort an already aborted command.

In qla2x00_abort_srb(), use blk_mq_request_started() instead of
sp->completed and sp->aborted.

Link: https://lore.kernel.org/r/20200220043441.20504-2-bvanassche@acm.org
Cc: Martin Wilck <mwilck@suse.com>
Cc: Quinn Tran <qutran@marvell.com>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
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>

c81ef0ed4477c637d1f1dd96ecd8e8fbe18b7283


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8811 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:27:19 +00:00
Bart Van Assche
0f6172d6ac qla2x00t-32gbit: Fix sparse warning reported by kbuild bot
this patch fixes following sparse warnings

 >> drivers/scsi/qla2xxx/qla_tmpl.c:873:32: sparse: sparse: incorrect type in assignment (different base types)
 >> drivers/scsi/qla2xxx/qla_tmpl.c:873:32: sparse:    expected unsigned int [usertype] capture_timestamp
 >> drivers/scsi/qla2xxx/qla_tmpl.c:873:32: sparse:    got restricted __le32 [usertype]
    drivers/scsi/qla2xxx/qla_tmpl.c:885:29: sparse: sparse: incorrect type in assignment (different base types)
 >> drivers/scsi/qla2xxx/qla_tmpl.c:885:29: sparse:    expected unsigned int

  vim +873 drivers/scsi/qla2xxx/qla_tmpl.c

  869
  870	static void
  871	qla27xx_time_stamp(struct qla27xx_fwdt_template *tmp)
  872	{
> 873		tmp->capture_timestamp = cpu_to_le32(jiffies);
  874	}
  875
  876	static void
  877	qla27xx_driver_info(struct qla27xx_fwdt_template *tmp)
  878	{
  879		uint8_t v[] = { 0, 0, 0, 0, 0, 0 };
  880
  881		WARN_ON_ONCE(sscanf(qla2x00_version_str,
  882				    "%hhu.%hhu.%hhu.%hhu.%hhu.%hhu",
  883				    v+0, v+1, v+2, v+3, v+4, v+5) != 6);
  884
> 885		tmp->driver_info[0] = cpu_to_le32(
  886			v[3] << 24 | v[2] << 16 | v[1] << 8 | v[0]);
  887		tmp->driver_info[1] = cpu_to_le32(v[5] << 8 | v[4]);
  888		tmp->driver_info[2] = __constant_cpu_to_le32(0x12345678);
  889	}
  890

Link: https://lore.kernel.org/r/20200227201148.13973-1-hmadhani@marvell.com
Fixes: a31056ddc665 ("scsi: qla2xxx: Use endian macros to assign static fields in fwdump header")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 0a36fd6cef5e3a11a273300e777a26cb26274547 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8810 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:26:34 +00:00
Bart Van Assche
f46232802b qla2x00t-32gbit: Update driver version to 10.01.00.24-k
Link: https://lore.kernel.org/r/20200212214436.25532-26-hmadhani@marvell.com
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 1939295a8dfa7be1cea478d6d7d283c091b780d4 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8809 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:25:31 +00:00
Bart Van Assche
9959382e10 qla2x00t-32gbit: Use QLA_FW_STOPPED macro to propagate flag
This patch uses QLA_FW_STOPPED macro so that flag is propogated to all the
QPairs.

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

[ commit 0fc5b7e62322e1aa8384013ee1caff3f87d30207 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8808 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:24:47 +00:00
Bart Van Assche
b72c9a33d2 qla2x00t-32gbit: Add fixes for mailbox command
This patch fixes:

- qla2x00_issue_iocb_timeout will now return if chip is down

- only check for sp->qpair in abort handling

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

[ commit 345f574dac85276d1471492c6e90c57e3f90a4f3 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8807 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:23:58 +00:00
Bart Van Assche
7c96145fa5 qla2x00t-32gbit: Fix control flags for login/logout IOCB
This patch fixes control flag options for login/logout IOCB.

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

[ commit 419ae5fe73e50084fa794934fb62fab34f564b7c upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8806 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:23:24 +00:00
Bart Van Assche
a14a1505f2 qla2x00t-32gbit: Save rscn_gen for new fcport
Add missing rscn_gen when creating new fcport.

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

[ commit d26a8982c9bd92ce3596eb4f86e922cdaf6751e5 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8805 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:22:51 +00:00
Bart Van Assche
62a6e7be90 qla2x00t-32gbit: Use correct ISP28xx active FW region
For ISP28xx, use 28xx call to retrieve active FW region.

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

[ commit 8d4926d13076a89c1f750fe5af4c082d8ea15008 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8804 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:22:15 +00:00
Bart Van Assche
be964cdb42 qla2x00t-32gbit: Print portname for logging in qla24xx_logio_entry()
Add port name in the messages file to help debugging of Login/Logout IOCBs

Link: https://lore.kernel.org/r/20200212214436.25532-20-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 cbe729a63d5a2c5909c6ae7e54665059496e43b9 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8803 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:21:46 +00:00
Bart Van Assche
67f2033af8 qla2x00t-32gbit: Fix qla2x00_echo_test() based on ISP type
Ths patch fixes MBX in-direction for setting right bits for
qla2x00_echo_test()

Link: https://lore.kernel.org/r/20200212214436.25532-19-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 83cfd3dc002fc730387a1ec5fa0d4097cc31ee9f upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8802 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:21:17 +00:00
Bart Van Assche
369e73fb5a qla2x00t-32gbit: Correction to selection of loopback/echo test
This fixes loopback and echo test options.

Link: https://lore.kernel.org/r/20200212214436.25532-18-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 64d21b314173c46d5c88a55cf559b0677e39d884 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8801 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:20:40 +00:00
Bart Van Assche
b06d019fd8 qla2x00t-32gbit: Use endian macros to assign static fields in fwdump header
This takes care of big endian architectures.

Link: https://lore.kernel.org/r/20200212214436.25532-17-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 a31056ddc6651b457d72d8d71d32143764df86d2 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8800 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:20:03 +00:00
Bart Van Assche
d2d888e9d8 qla2x00t-32gbit: Fix RDP response size
This patch fixes RDP length in case when driver needs to reduce length of
RDP response

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

[ commit 84f7d2e7b1f5203050b47cfa65e284182d32f203 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8799 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:19:26 +00:00
Bart Van Assche
9350f88176 qla2x00t-32gbit: Handle cases for limiting RDP response payload length
This patch reduces RDP response payload length, if requesting port is a
domain controller (sid 0xfffc01) and fw is earlier than 8.09.00 and fw is
not 8.05.65 then limit the RDP response payload length to maximum of 256
bytes by terminating the response just before the optical element
descriptor.

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

[ commit 4879237cd28eebb9350a7e6d970677997abe2b9d upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8798 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:18:56 +00:00
Bart Van Assche
f2c5c66f39 qla2x00t-32gbit: Add deferred queue for processing ABTS and RDP
This patch adds deferred queue for processing aborts and RDP in the driver.

Link: https://lore.kernel.org/r/20200212214436.25532-14-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 576bfde80b28232a1dfcf0466986ed2934146d0a upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8797 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:18:23 +00:00
Bart Van Assche
04176824aa qla2x00t-32gbit: Cleanup ELS/PUREX iocb fields
This patch does the following to improve RDP processing:

 - Rename field port_id to d_id in ELS and PUREX iocb structs to match FW
   spec.

 - Remove redundant comments from ELS and PUREX iocb structs.

 - Refactor fields in ELS iocb struct for error subcode common access.

 - Properly use error subcode fields in rdp processing routine.

 - Add print logs for alloc failure in purex rdp processing routine.

Link: https://lore.kernel.org/r/20200212214436.25532-13-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 09e382bc3dd946cfee74044d18d1886567874300 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8796 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:17:40 +00:00
Bart Van Assche
e57446e99f qla2x00t-32gbit: Show correct port speed capabilities for RDP command
This patch correctly displays port speed capability and current speed for
RDP command.

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

[ commit 8b01e4db834db611555cc4ec5d8d9550024361af upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8795 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:16:41 +00:00
Bart Van Assche
57b38d0397 qla2x00t-32gbit: Display message for FCE enabled
During Link up phase and Data rate MBX command response, print message
indicating FCE is enabled.

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

[ commit 75666f4a8c4103fb120717140c26cdbf6b1bf053 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8794 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:16:11 +00:00
Bart Van Assche
28a97cee1b qla2x00t-32gbit: Add vendor extended FDMI commands
This patch adds support for extended FDMI commands and cleans up code to
reduce duplication.

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

[ commit 52bfb089d9d384a1ac0f6d94da7636eb9373a8f9 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8793 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:15:33 +00:00
Bart Van Assche
0519dae5de qla2x00t-32gbit: Add ql2xrdpenable module parameter for RDP
This patch provides separate module parameter ql2xrdpenable to turn on/off
RDP capability in the driver. However, if ql2xsmartsan parameter is
enabled, it will also turn on ql2xfdmienable parameter since it is required
for RDP to work.

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

[ commit bd7de0b1c3947e176effb5f5b4a47eab79db771e upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8792 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:14:49 +00:00
Bart Van Assche
b88921cc3c qla2x00t-32gbit: Add vendor extended RDP additions and amendments
This patch adds RDP command support in the driver. With the help of new
ql2xsmartsan parameter, driver will use PUREX IOCB mode to send RDP command
to switch and will be able to receive various diagnostic data.

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

[ commit d83a80ee57f0cb38baccc75e96bc56ac47d300b3 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8791 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:12:42 +00:00
Bart Van Assche
9121118763 qla2x00t-32gbit: Add changes in preparation for vendor extended FDMI/RDP
This patch prepares code for implementing Vendor specific extended FDMI/RDP
commands. It also addes support for MBC_GET_PORT_DATABASE and
MBC_GET_RNID_PARAMS commands.

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

[ commit 818c7f87a177781bc155a2bfa39066c89c5a6cdc upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8790 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:12:12 +00:00
Bart Van Assche
3fe1f17050 qla2x00t-32gbit: Add endianizer macro calls to fc host stats
This patch fixes endian warning for fc_host_stats.

Link: https://lore.kernel.org/r/20200212214436.25532-6-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 974c086045446a7cdad5de26ff691d9ac82a24a6 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8789 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:11:28 +00:00
Bart Van Assche
75f9dada7a qla2x00t-32gbit: Add sysfs node for D-Port Diagnostics AEN data
This patch adds sysfs node to show D-Port diag data.

Link: https://lore.kernel.org/r/20200212214436.25532-4-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 e6ad2b79b82f41a51f90c95686c39cd8be4a35f3 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8788 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:10:56 +00:00
Bart Van Assche
bdb841a713 qla2x00t-32gbit: Move free of fcport out of interrupt context
This patch moves freeing of fcport out of interrupt context.

Link: https://lore.kernel.org/r/20200212214436.25532-3-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 054f4382417098b4d0028f8145fa214d448792d7 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8787 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-03-07 21:10:16 +00:00
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