mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 11:11:27 +00:00
qla2x00t-32gbit: Backport to kernel v4.13
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8102 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -5,7 +5,14 @@
|
||||
* See LICENSE.qla2xxx for copyright and licensing details.
|
||||
*/
|
||||
|
||||
#ifdef INSIDE_KERNEL_TREE
|
||||
#include <scst/backport.h> /* timer_setup() */
|
||||
#else
|
||||
#include "backport.h"
|
||||
#endif
|
||||
|
||||
#include "qla_target.h"
|
||||
|
||||
/**
|
||||
* qla24xx_calc_iocbs() - Determine number of Command Type 3 and
|
||||
* Continuation Type 1 IOCBs to allocate.
|
||||
|
||||
@@ -45,7 +45,13 @@ int qla_nvme_register_remote(struct scsi_qla_host *vha, struct fc_port *fcport)
|
||||
req.port_name = wwn_to_u64(fcport->port_name);
|
||||
req.node_name = wwn_to_u64(fcport->node_name);
|
||||
req.port_role = 0;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)
|
||||
/*
|
||||
* See also commit 9dd9686b1419 ("scsi: qla2xxx: Add changes for
|
||||
* devloss timeout in driver") # v4.17.
|
||||
*/
|
||||
req.dev_loss_tmo = NVME_FC_DEV_LOSS_TMO;
|
||||
#endif
|
||||
|
||||
if (fcport->nvme_prli_service_param & NVME_PRLI_SP_INITIATOR)
|
||||
req.port_role = FC_PORT_ROLE_NVME_INITIATOR;
|
||||
@@ -629,7 +635,9 @@ static void qla_nvme_unregister_remote_port(struct work_struct *work)
|
||||
"%s: Notify FC-NVMe transport, set devloss=0\n",
|
||||
__func__);
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)
|
||||
nvme_fc_set_remoteport_devloss(fcport->nvme_remote_port, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
list_for_each_entry_safe(qla_rport, trport,
|
||||
|
||||
@@ -7191,7 +7191,15 @@ static int qla2xxx_map_queues(struct Scsi_Host *shost)
|
||||
if (USER_CTRL_IRQ(vha->hw))
|
||||
rc = blk_mq_map_queues(&shost->tag_set);
|
||||
else
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)
|
||||
/*
|
||||
* See also commit f23f5bece686 ("blk-mq: Allow PCI vector
|
||||
* offset for mapping queues") # v4.17.
|
||||
*/
|
||||
rc = blk_mq_pci_map_queues(&shost->tag_set, vha->hw->pdev);
|
||||
#else
|
||||
rc = blk_mq_pci_map_queues(&shost->tag_set, vha->hw->pdev, 0);
|
||||
#endif
|
||||
#endif
|
||||
return rc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user