Skip to content

Commit

Permalink
scsi: qla2xxx: Enable ATIO interrupt handshake for ISP27XX
Browse files Browse the repository at this point in the history
Enable ATIO Q interrupt handshake for ISP27XX. This patch
coalesce ATIO's interrupts for Quad port ISP27XX adapter.
Interrupt coalesce allows performance to scale for this
specific case.

Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Quinn Tran authored and martinkpetersen committed Jan 4, 2018
1 parent 9b3e0f4 commit d2b292c
Showing 1 changed file with 25 additions and 14 deletions.
39 changes: 25 additions & 14 deletions drivers/scsi/qla2xxx/qla_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -6574,27 +6574,38 @@ void
qlt_24xx_config_rings(struct scsi_qla_host *vha)
{
struct qla_hw_data *ha = vha->hw;
struct init_cb_24xx *icb;
struct qla_msix_entry *msix = &ha->msix_entries[2];
struct init_cb_24xx *icb = (struct init_cb_24xx *)ha->init_cb;

if (!QLA_TGT_MODE_ENABLED())
return;

WRT_REG_DWORD(ISP_ATIO_Q_IN(vha), 0);
WRT_REG_DWORD(ISP_ATIO_Q_OUT(vha), 0);
RD_REG_DWORD(ISP_ATIO_Q_OUT(vha));

icb = (struct init_cb_24xx *)ha->init_cb;

if ((ql2xenablemsix != 0) && IS_ATIO_MSIX_CAPABLE(ha)) {
struct qla_msix_entry *msix = &ha->msix_entries[2];

icb->msix_atio = cpu_to_le16(msix->entry);
ql_dbg(ql_dbg_init, vha, 0xf072,
"Registering ICB vector 0x%x for atio que.\n",
msix->entry);
} else if (ql2xenablemsix == 0) {
icb->firmware_options_2 |= cpu_to_le32(BIT_26);
ql_dbg(ql_dbg_init, vha, 0xf07f,
"Registering INTx vector for ATIO.\n");
if (ha->flags.msix_enabled) {
if (IS_QLA83XX(ha) || IS_QLA27XX(ha)) {
if (IS_QLA2071(ha)) {
/* 4 ports Baker: Enable Interrupt Handshake */
icb->msix_atio = 0;
icb->firmware_options_2 |= BIT_26;
} else {
icb->msix_atio = cpu_to_le16(msix->entry);
icb->firmware_options_2 &= ~BIT_26;
}
ql_dbg(ql_dbg_init, vha, 0xf072,
"Registering ICB vector 0x%x for atio que.\n",
msix->entry);
}
} else {
/* INTx|MSI */
if (IS_QLA83XX(ha) || IS_QLA27XX(ha)) {
icb->msix_atio = 0;
icb->firmware_options_2 |= BIT_26;
ql_dbg(ql_dbg_init, vha, 0xf072,
"%s: Use INTx for ATIOQ.\n", __func__);
}
}
}

Expand Down

0 comments on commit d2b292c

Please sign in to comment.