diff options
author | Bart Van Assche <bvanassche@acm.org> | 2019-04-11 14:53:17 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-04-15 22:04:39 -0400 |
commit | bd432bb53cffeae1ec3f77338d69bd89d9d45bb2 (patch) | |
tree | 2f73b089547f997b985d8e0fa53e2e259394493e /drivers/scsi/qla2xxx/qla_target.c | |
parent | 2703eaaf4eae64a742fdcf888c8fcf4de567fb7d (diff) |
scsi: qla2xxx: Leave a blank line after declarations
This patch improves readability of the qla2xxx source code.
Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
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>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_target.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_target.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 12889a8cb108..afbe5c4cc982 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -184,6 +184,7 @@ static inline int qlt_issue_marker(struct scsi_qla_host *vha, int vha_locked) /* Send marker if required */ if (unlikely(vha->marker_needed != 0)) { int rc = qla2x00_issue_marker(vha, vha_locked); + if (rc != QLA_SUCCESS) { ql_dbg(ql_dbg_tgt, vha, 0xe03d, "qla_target(%d): issue_marker() failed\n", @@ -557,6 +558,7 @@ static int qla24xx_post_nack_work(struct scsi_qla_host *vha, fc_port_t *fcport, struct imm_ntfy_from_isp *ntfy, int type) { struct qla_work_evt *e; + e = qla2x00_alloc_work(vha, QLA_EVT_NACK); if (!e) return QLA_FUNCTION_FAILED; @@ -1076,6 +1078,7 @@ void qlt_free_session_done(struct work_struct *work) struct qlt_plogi_ack_t *con = sess->plogi_link[QLT_PLOGI_LINK_CONFLICT]; struct imm_ntfy_from_isp *iocb; + own = sess->plogi_link[QLT_PLOGI_LINK_SAME_WWN]; if (con) { @@ -1329,6 +1332,7 @@ static int qla24xx_get_loop_id(struct scsi_qla_host *vha, const uint8_t *s_id, res = -ENOENT; for (i = 0; i < entries; i++) { struct gid_list_info *gid = (struct gid_list_info *)id_iter; + if ((gid->al_pa == s_id[2]) && (gid->area == s_id[1]) && (gid->domain == s_id[0])) { @@ -2485,6 +2489,7 @@ static void qlt_unmap_sg(struct scsi_qla_host *vha, struct qla_tgt_cmd *cmd) { struct qla_hw_data *ha; struct qla_qpair *qpair; + if (!cmd->sg_mapped) return; @@ -3913,6 +3918,7 @@ static int qlt_term_ctio_exchange(struct qla_qpair *qpair, void *ctio, if (ctio != NULL) { struct ctio7_from_24xx *c = (struct ctio7_from_24xx *)ctio; + term = !(c->flags & cpu_to_le16(OF_TERM_EXCH)); } else @@ -4773,6 +4779,7 @@ static int abort_cmds_for_s_id(struct scsi_qla_host *vha, port_id_t *s_id) list_for_each_entry(op, &vha->unknown_atio_list, cmd_list) { uint32_t op_key = sid_to_key(op->atio.u.isp24.fcp_hdr.s_id); + if (op_key == key) { op->aborted = true; count++; @@ -4781,6 +4788,7 @@ static int abort_cmds_for_s_id(struct scsi_qla_host *vha, port_id_t *s_id) list_for_each_entry(cmd, &vha->qla_cmd_list, cmd_list) { uint32_t cmd_key = sid_to_key(cmd->atio.u.isp24.fcp_hdr.s_id); + if (cmd_key == key) { cmd->aborted = 1; count++; @@ -5051,6 +5059,7 @@ static int qlt_24xx_handle_els(struct scsi_qla_host *vha, if (sess != NULL) { bool delete = false; int sec; + spin_lock_irqsave(&tgt->ha->tgt.sess_lock, flags); switch (sess->fw_login_state) { case DSC_LS_PLOGI_PEND: @@ -5203,6 +5212,7 @@ static int qlt_24xx_handle_els(struct scsi_qla_host *vha, case ELS_ADISC: { struct qla_tgt *tgt = vha->vha_tgt.qla_tgt; + if (tgt->link_reinit_iocb_pending) { qlt_send_notify_ack(ha->base_qpair, &tgt->link_reinit_iocb, 0, 0, 0, 0, 0, 0); @@ -5266,6 +5276,7 @@ static void qlt_handle_imm_notify(struct scsi_qla_host *vha, case IMM_NTFY_LIP_LINK_REINIT: { struct qla_tgt *tgt = vha->vha_tgt.qla_tgt; + ql_dbg(ql_dbg_tgt_mgt, vha, 0xf033, "qla_target(%d): LINK REINIT (loop %#x, " "subcode %x)\n", vha->vp_idx, @@ -5883,6 +5894,7 @@ static void qlt_response_pkt(struct scsi_qla_host *vha, case CTIO_TYPE7: { struct ctio7_from_24xx *entry = (struct ctio7_from_24xx *)pkt; + qlt_do_ctio_completion(vha, rsp, entry->handle, le16_to_cpu(entry->status)|(pkt->entry_status << 16), entry); @@ -5893,6 +5905,7 @@ static void qlt_response_pkt(struct scsi_qla_host *vha, { struct atio_from_isp *atio = (struct atio_from_isp *)pkt; int rc; + if (atio->u.isp2x.status != cpu_to_le16(ATIO_CDB_VALID)) { ql_dbg(ql_dbg_tgt, vha, 0xe05e, @@ -5941,6 +5954,7 @@ static void qlt_response_pkt(struct scsi_qla_host *vha, case CONTINUE_TGT_IO_TYPE: { struct ctio_to_2xxx *entry = (struct ctio_to_2xxx *)pkt; + qlt_do_ctio_completion(vha, rsp, entry->handle, le16_to_cpu(entry->status)|(pkt->entry_status << 16), entry); @@ -5950,6 +5964,7 @@ static void qlt_response_pkt(struct scsi_qla_host *vha, case CTIO_A64_TYPE: { struct ctio_to_2xxx *entry = (struct ctio_to_2xxx *)pkt; + qlt_do_ctio_completion(vha, rsp, entry->handle, le16_to_cpu(entry->status)|(pkt->entry_status << 16), entry); @@ -5964,6 +5979,7 @@ static void qlt_response_pkt(struct scsi_qla_host *vha, case NOTIFY_ACK_TYPE: if (tgt->notify_ack_expected > 0) { struct nack_to_isp *entry = (struct nack_to_isp *)pkt; + ql_dbg(ql_dbg_tgt, vha, 0xe036, "NOTIFY_ACK seq %08x status %x\n", le16_to_cpu(entry->u.isp2x.seq_id), @@ -6239,6 +6255,7 @@ retry: if (rc == -ENOENT) { qlt_port_logo_t logo; + sid_to_portid(s_id, &logo.id); logo.cmd_count = 1; qlt_send_first_logo(vha, &logo); @@ -6499,6 +6516,7 @@ int qlt_add_target(struct qla_hw_data *ha, struct scsi_qla_host *base_vha) unsigned long flags; struct qla_qpair *qpair = ha->queue_pair_map[i]; + h = &tgt->qphints[i + 1]; INIT_LIST_HEAD(&h->hint_elem); if (qpair) { |