Commit graph

17 commits

Author SHA1 Message Date
Mike Christie
0c72191da6 scsi: qedi: Fix cleanup session block/unblock use
Drivers shouldn't be calling block/unblock session for cmd cleanup because
the functions can change the session state from under libiscsi.  This adds
a new a driver level bit so it can block all I/O the host while it drains
the card.

Link: https://lore.kernel.org/r/20210525181821.7617-26-michael.christie@oracle.com
Reviewed-by: Manish Rangankar <mrangankar@marvell.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-06-02 01:28:23 -04:00
Manish Rangankar
7dc71ac8eb scsi: qedi: Add schedule_hw_err_handler callback for fan failure
On fan failure event from MFW, bring down active connections and unload
the firmware context.

Link: https://lore.kernel.org/r/20200924070338.8270-1-mrangankar@marvell.com
Signed-off-by: Manish Rangankar <mrangankar@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-10-02 21:24:15 -04:00
Manish Rangankar
f4ba4e55db scsi: qedi: Add firmware error recovery invocation support
Add support to initiate MFW process recovery for all the devices if storage
function receives the event first.

Also added fix for kernel test robot warning,

>> drivers/scsi/qedi/qedi_main.c:1119:6: warning: no previous prototype
>> for 'qedi_schedule_hw_err_handler' [-Wmissing-prototypes]

Link: https://lore.kernel.org/r/20200908095657.26821-8-mrangankar@marvell.com
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Manish Rangankar <mrangankar@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-09-08 22:40:25 -04:00
Manish Rangankar
3f8ad0072b scsi: qedi: Use qed count from set_fp_int in msix allocation
To avoid unnecessary vector allocation when the number of fast-path queues
is less then available msix vectors, use return count from module
qed->set_fp_int.

Link: https://lore.kernel.org/r/20200908095657.26821-2-mrangankar@marvell.com
Signed-off-by: Manish Rangankar <mrangankar@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-09-08 22:40:20 -04:00
Manish Rangankar
4f93c4bf0f scsi: qedi: Add PCI shutdown handler support
Add PCI shutdown handler support for supporting wake-on-lan feature.

Link: https://lore.kernel.org/r/20200319083811.19499-3-mrangankar@marvell.com
Signed-off-by: Manish Rangankar <mrangankar@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-03-26 22:38:54 -04:00
Manish Rangankar
4b1068f5d7 scsi: qedi: Add MFW error recovery process
This patch adds the mfw error recovery process in the qedi driver. The
process includes a partial/customized driver unload and load to reset
context by preserving active iSCSI session kernel state.

Link: https://lore.kernel.org/r/20200319083811.19499-2-mrangankar@marvell.com
Signed-off-by: Manish Rangankar <mrangankar@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-03-26 22:38:52 -04:00
Thomas Gleixner
3287e96af0 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 440
Based on 1 normalized pattern(s):

  this software is available under the terms of the gnu general public
  license gpl version 2 available from the file copying in the main
  directory of this source tree

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 35 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190531190115.411886531@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-05 17:37:17 +02:00
Nilesh Javali
dcceeeb71f scsi: qedi: add module param to set ping packet size
Default packet size is 0x400. For jumbo packets set to 0x2400.

Signed-off-by: Nilesh Javali <nilesh.javali@cavium.com>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-11-28 20:51:47 -05:00
Nilesh Javali
f853053da9 scsi: qedi: Fix spelling mistake "OUSTANDING" -> "OUTSTANDING"
Fix trivial spelling mistake within macro definition.

Signed-off-by: Nilesh Javali <nilesh.javali@cavium.com>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-11-28 20:51:47 -05:00
Nilesh Javali
3fb5a21fd0 scsi: qedi: Cleanup redundant QEDI_PAGE_SIZE macro definition
Remove redundant macro definition.

Signed-off-by: Nilesh Javali <nilesh.javali@cavium.com>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-11-28 20:51:46 -05:00
Nilesh Javali
c77a2fa3ff scsi: qedi: Add the CRC size within iSCSI NVM image
The QED driver commit, 1ac4329a1c ("qed: Add configuration information
to register dump and debug data"), removes the CRC length validation
causing nvm_get_image failure while loading qedi driver:

[qed_mcp_get_nvm_image:2700(host_10-0)]Image [0] is too big - 00006008 bytes
where only 00006004 are available
[qedi_get_boot_info:2253]:10: Could not get NVM image. ret = -12

Hence add and adjust the CRC size to iSCSI NVM image to read boot info at
qedi load time.

Signed-off-by: Nilesh Javali <nilesh.javali@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-08-30 07:15:22 -04:00
Manish Rangankar
534bbdf883 qedi: Add support for populating ethernet TLVs.
This patch adds callbacks for providing the ethernet protocol driver TLVs.

Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-05-22 23:29:54 -04:00
Manish Rangankar
42d7c10f23 scsi: qedi: Limit number for CQ queues.
[qed_sp_iscsi_func_start:189(host_7-0)]Cannot satisfy CQ amount. Queues
requested 8, CQs available 4. Aborting function start

Above condition will resolve as management firmware is capable of
telling us the number of CQs available for a given PF, qed will
communicate the same number to qedi, So that qedi will know how much CQs
are allowed.

Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-08-24 22:28:50 -04:00
Nilesh Javali
c57ec8fb7c scsi: qedi: Add support for Boot from SAN over iSCSI offload
This patch adds support for Boot from SAN over iSCSI offload. The iSCSI
boot information in the NVRAM is populated under
/sys/firmware/iscsi_bootX/ using qed NVM-image reading API and further
exported to open-iscsi to perform iSCSI login enabling boot over offload
iSCSI interface in a Boot from SAN environment.

Signed-off-by: Arun Easi <arun.easi@cavium.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@cavium.com>
Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Signed-off-by: Nilesh Javali <nilesh.javali@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-07-12 16:52:27 -04:00
manish.rangankar@cavium.com
d0788a528d scsi: qedi: Set dma_boundary to 0xfff.
Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-05-23 22:16:43 -04:00
manish.rangankar@cavium.com
fc2fbf0d42 scsi: qedi: Correctly set firmware max supported BDs.
Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-05-23 22:16:43 -04:00
Manish Rangankar
ace7f46ba5 scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.
The QLogic FastLinQ Driver for iSCSI (qedi) is the iSCSI specific module
for 41000 Series Converged Network Adapters by QLogic.

This patch consists of following changes:

  - MAINTAINERS Makefile and Kconfig changes for qedi,
  - PCI driver registration,
  - iSCSI host level initialization,
  - Debugfs and log level infrastructure.

The following indiviual changes are merged into this commit:

  qedi: Add LL2 iSCSI interface for offload iSCSI.
  qedi: Add support for iSCSI session management.
  qedi: Add support for data path.

Signed-off-by: Nilesh Javali <nilesh.javali@cavium.com>
Signed-off-by: Adheer Chandravanshi <adheer.chandravanshi@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@cavium.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@cavium.com>
Signed-off-by: Arun Easi <arun.easi@cavium.com>
Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2016-12-14 14:56:28 -05:00