Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ad60b4b
qla2x00t-32gbit: Revert "qla2x00t-32gbit: Perform lockless command co…
abattersby Oct 14, 2025
f1f585d
qla2x00t-32gbit: Fix initiator mode with qlini_mode=exclusive
abattersby Oct 14, 2025
61984de
qla2x00t-32gbit: Fix lost interrupts with qlini_mode=disabled
abattersby Oct 14, 2025
a66eccd
qla2x00t-32gbit: Use reinit_completion on mbx_intr_comp
abattersby Oct 14, 2025
d3d3cb5
qla2x00t-32gbit: target: Remove code for unsupported hardware
abattersby Oct 14, 2025
4e3b082
qla2x00t-32gbit: target: Improve debug output for term exchange
abattersby Oct 14, 2025
4a7b94d
qla2x00t-32gbit: target: Fix term exchange when cmd_sent_to_fw == 1
abattersby Oct 14, 2025
443c7b8
qla2x00t-32gbit: Clear cmds after chip reset
abattersby Oct 14, 2025
700cfe1
qla2x00t-32gbit: target: Fix races with aborting commands
abattersby Oct 14, 2025
bbeeebd
qla2x00t-32gbit: target: Fix races with aborting commands
abattersby Oct 14, 2025
b12b658
qla2x00t-32gbit: target: Improve checks in qlt_xmit_response / qlt_rd…
abattersby Oct 14, 2025
006dde2
qla2x00t-32gbit: Fix TMR failure handling
abattersby Oct 14, 2025
5d36858
qla2x00t-32gbit: target: Fix invalid memory access with big CDBs
abattersby Oct 14, 2025
50c0aa7
qla2x00t-32gbit: target: Fix invalid memory access with big CDBs
abattersby Oct 14, 2025
84e2ef3
qla2x00t-32gbit: target: Add cmd->rsp_sent
abattersby Oct 14, 2025
266d826
qla2x00t-32gbit: target: Add cmd->rsp_sent
abattersby Oct 14, 2025
9798bdd
qla2x00t-32gbit: target: Improve cmd logging
abattersby Oct 14, 2025
0f1a3d6
qla2x00t-32gbit: target: Add back SRR support
abattersby Oct 14, 2025
c3b4481
qla2x00t-32gbit: target: Add back SRR support
abattersby Oct 14, 2025
bf3f516
qla2x00t-32gbit: target: Improve safety of cmd lookup by handle
abattersby Oct 14, 2025
5a78a96
qla2x00t-32gbit: target: Add on_abort_cmd callback
abattersby Oct 14, 2025
4da5957
qla2x00t-32gbit: Backport to older kernel versions
lnocturno Oct 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
310 changes: 239 additions & 71 deletions qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.c

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion qla2x00t-32gbit/qla_dbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@
* | Misc | 0xd303 | 0xd031-0xd0ff |
* | | | 0xd101-0xd1fe |
* | | | 0xd214-0xd2fe |
* | Target Mode | 0xe081 | |
* | Target Mode | 0xe089 | |
* | Target Mode Management | 0xf09b | 0xf002 |
* | | | 0xf046-0xf049 |
* | Target Mode Task Management | 0x1000d | |
* | Target Mode SRR | 0x11038 | |
* ----------------------------------------------------------------------
*/

Expand Down
1 change: 0 additions & 1 deletion qla2x00t-32gbit/qla_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -3564,7 +3564,6 @@ struct isp_operations {
#define QLA_MSIX_RSP_Q 0x01
#define QLA_ATIO_VECTOR 0x02
#define QLA_MSIX_QPAIR_MULTIQ_RSP_Q 0x03
#define QLA_MSIX_QPAIR_MULTIQ_RSP_Q_HS 0x04

#define QLA_MIDX_DEFAULT 0
#define QLA_MIDX_RSP_Q 1
Expand Down
2 changes: 1 addition & 1 deletion qla2x00t-32gbit/qla_gbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ extern int qla2x00_dfs_remove(scsi_qla_host_t *);

/* Globa function prototypes for multi-q */
extern int qla25xx_request_irq(struct qla_hw_data *, struct qla_qpair *,
struct qla_msix_entry *, int);
struct qla_msix_entry *);
extern int qla25xx_init_req_que(struct scsi_qla_host *, struct req_que *);
extern int qla25xx_init_rsp_que(struct scsi_qla_host *, struct rsp_que *);
extern int qla25xx_create_req_que(struct qla_hw_data *, uint16_t, uint8_t,
Expand Down
1 change: 1 addition & 0 deletions qla2x00t-32gbit/qla_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -4372,6 +4372,7 @@ qla2x00_setup_chip(scsi_qla_host_t *vha)
ha->max_npiv_vports =
MIN_MULTI_ID_FABRIC - 1;
}
qlt_config_nvram_with_fw_version(vha);
qla2x00_get_resource_cnts(vha);
qla_init_iocb_limit(vha);

Expand Down
32 changes: 3 additions & 29 deletions qla2x00t-32gbit/qla_isr.c
Original file line number Diff line number Diff line change
Expand Up @@ -4494,32 +4494,6 @@ qla2xxx_msix_rsp_q(int irq, void *dev_id)
return IRQ_HANDLED;
}

irqreturn_t
qla2xxx_msix_rsp_q_hs(int irq, void *dev_id)
{
struct qla_hw_data *ha;
struct qla_qpair *qpair;
struct device_reg_24xx __iomem *reg;
unsigned long flags;

qpair = dev_id;
if (!qpair) {
ql_log(ql_log_info, NULL, 0x505b,
"%s: NULL response queue pointer.\n", __func__);
return IRQ_NONE;
}
ha = qpair->hw;

reg = &ha->iobase->isp24;
spin_lock_irqsave(&ha->hardware_lock, flags);
wrt_reg_dword(&reg->hccr, HCCRX_CLR_RISC_INT);
spin_unlock_irqrestore(&ha->hardware_lock, flags);

queue_work(ha->wq, &qpair->q_work);

return IRQ_HANDLED;
}

/* Interrupt handling helpers. */

/* <linux/pci.h> */
Expand All @@ -4545,7 +4519,6 @@ static const struct qla_init_msix_entry msix_entries[] = {
{ "rsp_q", qla24xx_msix_rsp_q },
{ "atio_q", qla83xx_msix_atio_q },
{ "qpair_multiq", qla2xxx_msix_rsp_q },
{ "qpair_multiq_hs", qla2xxx_msix_rsp_q_hs },
};

static const struct qla_init_msix_entry qla82xx_msix_entries[] = {
Expand Down Expand Up @@ -4928,9 +4901,10 @@ qla2x00_free_irqs(scsi_qla_host_t *vha)
}

int qla25xx_request_irq(struct qla_hw_data *ha, struct qla_qpair *qpair,
struct qla_msix_entry *msix, int vector_type)
struct qla_msix_entry *msix)
{
const struct qla_init_msix_entry *intr = &msix_entries[vector_type];
const struct qla_init_msix_entry *intr =
&msix_entries[QLA_MSIX_QPAIR_MULTIQ_RSP_Q];
scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev);
int ret;

Expand Down
2 changes: 2 additions & 0 deletions qla2x00t-32gbit/qla_mbx.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
/* Issue set host interrupt command to send cmd out. */
ha->flags.mbox_int = 0;
clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags);
reinit_completion(&ha->mbx_intr_comp);

/* Unlock mbx registers and wait for interrupt */
ql_dbg(ql_dbg_mbx, vha, 0x100f,
Expand All @@ -279,6 +280,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
"cmd=%x Timeout.\n", command);
spin_lock_irqsave(&ha->hardware_lock, flags);
clear_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags);
reinit_completion(&ha->mbx_intr_comp);
spin_unlock_irqrestore(&ha->hardware_lock, flags);

if (chip_reset != ha->chip_reset) {
Expand Down
4 changes: 1 addition & 3 deletions qla2x00t-32gbit/qla_mid.c
Original file line number Diff line number Diff line change
Expand Up @@ -899,9 +899,7 @@ qla25xx_create_rsp_que(struct qla_hw_data *ha, uint16_t options,
rsp->options, rsp->id, rsp->rsp_q_in,
rsp->rsp_q_out);

ret = qla25xx_request_irq(ha, qpair, qpair->msix,
ha->flags.disable_msix_handshake ?
QLA_MSIX_QPAIR_MULTIQ_RSP_Q : QLA_MSIX_QPAIR_MULTIQ_RSP_Q_HS);
ret = qla25xx_request_irq(ha, qpair, qpair->msix);
if (ret)
goto que_failed;

Expand Down
35 changes: 20 additions & 15 deletions qla2x00t-32gbit/qla_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -1912,12 +1912,6 @@ __qla2x00_abort_all_cmds(struct qla_qpair *qp, int res)
for (cnt = 1; cnt < req->num_outstanding_cmds; cnt++) {
sp = req->outstanding_cmds[cnt];
if (sp) {
if (qla2x00_chip_is_down(vha)) {
req->outstanding_cmds[cnt] = NULL;
sp->done(sp, res);
continue;
}

switch (sp->cmd_type) {
case TYPE_SRB:
qla2x00_abort_srb(qp, sp, res, &flags);
Expand All @@ -1931,10 +1925,26 @@ __qla2x00_abort_all_cmds(struct qla_qpair *qp, int res)
continue;
}
cmd = (struct qla_tgt_cmd *)sp;
cmd->aborted = 1;

if (cmd->sg_mapped)
qlt_unmap_sg(vha, cmd);

if (cmd->state == QLA_TGT_STATE_NEED_DATA) {
cmd->aborted = 1;
cmd->write_data_transferred = 0;
cmd->state = QLA_TGT_STATE_DATA_IN;
ha->tgt.tgt_ops->handle_data(cmd);
} else {
ha->tgt.tgt_ops->free_cmd(cmd);
}
break;
case TYPE_TGT_TMCMD:
/* Skip task management functions. */
/*
* Currently, only ABTS response gets on the
* outstanding_cmds[]
*/
qlt_free_ul_mcmd(ha,
(struct qla_tgt_mgmt_cmd *) sp);
break;
default:
break;
Expand Down Expand Up @@ -3545,13 +3555,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
ha->mqenable = 0;

if (ha->mqenable) {
bool startit = false;

if (QLA_TGT_MODE_ENABLED())
startit = false;

if (ql2x_ini_mode == QLA2XXX_INI_MODE_ENABLED)
startit = true;
bool startit = !!(host->active_mode & MODE_INITIATOR);

/* Create start of day qpairs for Block MQ */
for (i = 0; i < ha->max_qpairs; i++)
Expand Down Expand Up @@ -7367,6 +7371,7 @@ qla2xxx_wake_dpc(struct scsi_qla_host *vha)
if (!test_bit(UNLOADING, &vha->dpc_flags) && t)
wake_up_process(t);
}
EXPORT_SYMBOL(qla2xxx_wake_dpc);

/*
* qla2x00_rst_aen
Expand Down
Loading
Loading