From patchwork Wed Jun 14 03:47:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 9785213 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3A0916038E for ; Wed, 14 Jun 2017 03:47:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B4EA27FA3 for ; Wed, 14 Jun 2017 03:47:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3F8FE285A3; Wed, 14 Jun 2017 03:47:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A95428294 for ; Wed, 14 Jun 2017 03:47:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754021AbdFNDry (ORCPT ); Tue, 13 Jun 2017 23:47:54 -0400 Received: from mail-co1nam03on0073.outbound.protection.outlook.com ([104.47.40.73]:19872 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753926AbdFNDrw (ORCPT ); Tue, 13 Jun 2017 23:47:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=bkHYzFBJIjWVdphV+cfjedT9f5vTx3lLO0IgyVRIVqE=; b=fkbBeqRdpLcsrAK5KZji4sq1T8CXZSiTNVTmJhHeNYppCIWwlz81c37fv7PpJg2yLDvARheRoB+XpppG+UdPpKbIoHIA2F9R8xAkkPc//7Wse+Cr/8wLdTPxEbc3yct0OuDKBGRHs8UXd6Ktps6CsgQFlR1J+AZ9fBCVxrLcLmU= Received: from CO2PR07CA0043.namprd07.prod.outlook.com (2603:10b6:100::11) by DM2PR0701MB1018.namprd07.prod.outlook.com (2a01:111:e400:246f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Wed, 14 Jun 2017 03:47:49 +0000 Received: from BL2FFO11FD047.protection.gbl (2a01:111:f400:7c09::199) by CO2PR07CA0043.outlook.office365.com (2603:10b6:100::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14 via Frontend Transport; Wed, 14 Jun 2017 03:47:48 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=cavium.com; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BL2FFO11FD047.mail.protection.outlook.com (10.173.161.209) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1143.11 via Frontend Transport; Wed, 14 Jun 2017 03:47:46 +0000 Received: from dut1171.mv.qlogic.com (172.29.51.171) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Tue, 13 Jun 2017 20:47:43 -0700 Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id v5E3lhhk015467; Tue, 13 Jun 2017 20:47:43 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v5E3lhmn015466; Tue, 13 Jun 2017 20:47:43 -0700 From: Himanshu Madhani To: , CC: , , Subject: [PATCH v2 01/15] qla2xxx: Combine Active command arrays. Date: Tue, 13 Jun 2017 20:47:16 -0700 Message-ID: <20170614034730.15428-2-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170614034730.15428-1-himanshu.madhani@cavium.com> References: <20170614034730.15428-1-himanshu.madhani@cavium.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39410400002)(39400400002)(39850400002)(39450400003)(39840400002)(2980300002)(428002)(199003)(189002)(9170700003)(5003940100001)(54906002)(42186005)(8676002)(6666003)(2950100002)(189998001)(81166006)(8936002)(5660300001)(47776003)(4326008)(1076002)(356003)(38730400002)(48376002)(50466002)(50226002)(50986999)(80596001)(2906002)(36756003)(33646002)(105586002)(478600001)(86362001)(575784001)(76176999)(72206003)(305945005)(87636003)(101416001)(106466001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0701MB1018; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD047; 1:rKxNEnO9W1D/i7qcr8sS9Ziwl9y3+fblzQ/Ao4QJcCEazCBgsmk1dQk4CcAjxF9r/F9hbNTGu90mr8gIS1bb7eeROWkRTSZc4v+Oi3EhV7hVK6BeIby6zE8HDNLBKirnwn3vdf1ZrM9Zsk9kacxUD96ztBu+yiTc35Y9F0MhLlN7lEHYryrlbumInzhBQFevnURz8U0v1XqNDfvdB+fRfYU4bFZAqFN984ZJT86thkaodPcsOgUDWrhpvfjHJGT1G5wOqo6rcTX/M5tQArpxKz0VGAeob6dApMjYbC2ya/YTJbQKvs1ucIXq5ecBpKvgQpIWZ7QMYJZjZD2LucYDSBa4Jz+T0t/ap2FFXAMUj2qRcLQJcYdcgfN5w/jxPqXUcJDvqeUYfhktzL3Nc+fyC5hfMtIgitQY6VnAJmR5qC/vm3yWoBFGnV5kKVpw1FnBwYLTZJU4vz+q+G67bjodYUBepB75r7AxBF3TJvVj9X6UrKEC/uLxXmIsVerBDg0/OmyXfYe3mAzCMCbDwcKXiw== X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM2PR0701MB1018: X-MS-Office365-Filtering-Correlation-Id: 1a46d2f9-6d55-42b1-ea9a-08d4b2d81fa7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:DM2PR0701MB1018; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1018; 3:KAVLb68SuQDNuBwqapCsZ2yoEe8R58NujlklFHvKH3Wzxp2s/4sGMrDvGULRiePPZZU1B++a2/SVCf29Kj80V081DtxhS4tWufFgGTNbxc0OskS2Zu43h3uGLp9YERCzsBjB7YxRS5IDMcpshT72wOUApMd6OrVMxuQG4YGt8ktqgklSTHF3ro3DAM4KJVwQYQoA6muDJdrtv1qmfrtMYdd9lMGZNvGsH+spW33x3QuJ0s4I2W4tfoQ5LDKC2gVPynockaP5bsGcH/m8nbtrk345tSuwUGYUhjyZMpaP8XGbWGTNZJ0DTLV/dePlkKvsi3neB2YQSzVN9aULXFKIvKBGzhE+i7HKaCPGHXQCn+rvTOSS9OHcKWaDyxY4m5C0nFTr0RwCucw07KxVt0Qek/K2UEI25ylUL7Pmpdu2nttq4FMaNZ3snslSZ0sWCW63O7DErk50f3x6h6iIfaHPXiwIcHIkTRat2u9JDSWvRVsFoIId6nqBY3W+t+OsJM14 X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1018; 25:YHnzc4IeCltMrJEMtz+Rvw3Z+aXa7sY2n7TZbceGYypqZbLQ1z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qPxoZDekQfnl7pecOZttCGM5+Yjn3+QU7JgrfcVYBIDe0eaeji+d61TEcqCzZvcySI3R9lgQbz2wj+qJjz+91R+WkoBfnoeyhEVSAnjf7MpYli6YzAUydpix+RyeXupOoY+zn3d5XU14lLJu74djRHFwzAu47vN7Fjo2MKUb+ko84wbtQz X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(13016025)(13018025)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93001095)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123558100)(20161123562025)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM2PR0701MB1018; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM2PR0701MB1018; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0701MB1018; 4:1+DE7mgwIeeFtw7HesOs1WcGQCn15xFoT6pM2g7T?= =?us-ascii?Q?yeFFROtEIdcKnGtkxkPGycORnye8gEL4jvAXRIshN/aypBh1Nr32NpK+KX4E?= =?us-ascii?Q?2jC+qTMo79L30MyErWY0ZV2jd4SmBiGlTwVgzvCmHRJorJojSCleV3QXEuWh?= =?us-ascii?Q?KAVrOl4DOicp6pwB0/h5QbuSEEQPm8itkGJjz5lO/Q8vrGyPKRhlnJcct2Sj?= =?us-ascii?Q?o2Jh9tdLJhjRzfr82dhZajxYzXkSfCVS+nsUkuciBgaKjlzTHlLqnN5ZD/g2?= =?us-ascii?Q?+eYn1UFydek24BnuIcLXpEfdPXbpxgUn2KmIjjtYdxOPuutTk+g1BRoxn2bO?= =?us-ascii?Q?qadtIoF9k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/DBXfQoMXcS+doIUoo8xn1Flz+vKpkZRap6bHcj8vcNI1hhe1qxY9Ru15zA0fWPWQnU0vLYeih0ZxAPqnrLIGVdpbLdgdlLPH8GKIe4f6rGk1mfUvgtJdWrQ0IT5dpNoeL1lnJW6X+3rdlN9TK2IzHKyViBOGuReOUQZ3of2O+6NxGhRe0nM+G1iqjdnyKws/oa72tApXIUEPoPN71MRizVE5spUalJ1ZZrxIYObrLUycLp0wLrSHMFFJQ25wVYrFXb0W+/3/C/N49mHiNOs2aJFpzxQ6+wj0gQWE0yDnlOSyZULP5tUtOab1nvtQjJwRcojVe6rL6+ypWjahStImGU5IG+52QuBP7kI7WqKqa3EAyDlAXIMSxDZ40+F1ORIfrn+AZwYV6GoWY+k9ZJ538wnB9N2rFjmlxH7Ae3; 24:dXaBxR0buBWRrhQSUikpgKLorM0Vlrs4gEB9vGa4n72iDZBLzIxK5I64Sr6rUNH6F1z3oGIz+RoFPh4wNjea3IJMwQGIr2LsCkC97pkdKUo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1018; 7:X8ZneMUaRtcy0d3rl2LSVCzwDLRmm48yLNlgj6jR25qsC3SG4smt+iT8sTfmMN7l+YmjwkbiJoFUvW2Iq1DIlDOiqcjw90UGsH4vmRLt8hBf46BfhCqLQfG195lC5G95f6tDcSgLCiLTiUg3UosW8PK72onkD3VO6HYbHiX1e8INCw+4qfoOdcmiQ4f+kNSkhNv6lWmJ5UlWfcH1DfJtRf9d4reuiQUhw3TTYGDZRgrPmXO78d8Bp4BlIKeHrIU8UyabshV7uvWhvhK++r17pOboU2JKjdFlBct7Srl4UkNGGWjOSu32ZvA95XXouDOAULTSaQ5r8wvtMKCj236nzQ== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2017 03:47:46.4884 (UTC) X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194; Ip=[50.232.66.26]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0701MB1018 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Quinn Tran Merge active/outstanding cmd arrays from target side and initiator side together in prepration for Target Multi Queue support. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h | 15 +++- drivers/scsi/qla2xxx/qla_gbl.h | 2 - drivers/scsi/qla2xxx/qla_inline.h | 1 + drivers/scsi/qla2xxx/qla_isr.c | 48 +++++++++---- drivers/scsi/qla2xxx/qla_os.c | 75 ++++++++++++++------ drivers/scsi/qla2xxx/qla_target.c | 144 ++++++++++++-------------------------- drivers/scsi/qla2xxx/qla_target.h | 23 ++++-- 7 files changed, 164 insertions(+), 144 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index ddf93efe3986..1b5049b1ef4a 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -437,7 +437,18 @@ struct srb_iocb { #define SRB_NACK_PRLI 17 #define SRB_NACK_LOGO 18 +enum { + TYPE_SRB, + TYPE_TGT_CMD, +}; + typedef struct srb { + /* + * Do not move cmd_type field, it needs to + * line up with qla_tgt_cmd->cmd_type + */ + uint8_t cmd_type; + uint8_t pad[3]; atomic_t ref_count; struct fc_port *fcport; struct scsi_qla_host *vha; @@ -3287,9 +3298,6 @@ struct qlt_hw_data { uint32_t __iomem *atio_q_out; struct qla_tgt_func_tmpl *tgt_ops; - struct qla_tgt_cmd *cmds[DEFAULT_OUTSTANDING_COMMANDS]; - uint16_t current_handle; - struct qla_tgt_vp_map *tgt_vp_map; int saved_set; @@ -4258,6 +4266,7 @@ enum nexus_wait_type { WAIT_LUN, }; +#include "qla_target.h" #include "qla_gbl.h" #include "qla_dbg.h" #include "qla_inline.h" diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index f8540f5c9e5d..63355f40ff2f 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h @@ -834,8 +834,6 @@ extern irqreturn_t qla8044_intr_handler(int, void *); extern void qla82xx_mbx_completion(scsi_qla_host_t *, uint16_t); extern int qla8044_abort_isp(scsi_qla_host_t *); extern int qla8044_check_fw_alive(struct scsi_qla_host *); - -extern void qlt_host_reset_handler(struct qla_hw_data *ha); extern int qla_get_exlogin_status(scsi_qla_host_t *, uint16_t *, uint16_t *); extern int qla_set_exlogin_mem_cfg(scsi_qla_host_t *vha, dma_addr_t phys_addr); diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h index 9996ec0daab1..99028d48c664 100644 --- a/drivers/scsi/qla2xxx/qla_inline.h +++ b/drivers/scsi/qla2xxx/qla_inline.h @@ -250,6 +250,7 @@ qla2x00_get_sp(scsi_qla_host_t *vha, fc_port_t *fcport, gfp_t flag) memset(sp, 0, sizeof(*sp)); sp->fcport = fcport; + sp->cmd_type = TYPE_SRB; sp->iocbs = 1; sp->vha = vha; done: diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 2984abcc29e7..8aaddb75f964 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -17,7 +17,7 @@ static void qla2x00_mbx_completion(scsi_qla_host_t *, uint16_t); static void qla2x00_status_entry(scsi_qla_host_t *, struct rsp_que *, void *); static void qla2x00_status_cont_entry(struct rsp_que *, sts_cont_entry_t *); -static void qla2x00_error_entry(scsi_qla_host_t *, struct rsp_que *, +static int qla2x00_error_entry(scsi_qla_host_t *, struct rsp_que *, sts_entry_t *); /** @@ -2280,6 +2280,14 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt) return; } + if (sp->cmd_type != TYPE_SRB) { + req->outstanding_cmds[handle] = NULL; + ql_dbg(ql_dbg_io, vha, 0x3015, + "Unknown sp->cmd_type %x %p).\n", + sp->cmd_type, sp); + return; + } + if (unlikely((state_flags & BIT_1) && (sp->type == SRB_BIDI_CMD))) { qla25xx_process_bidir_status_iocb(vha, pkt, req, handle); return; @@ -2632,8 +2640,9 @@ qla2x00_status_cont_entry(struct rsp_que *rsp, sts_cont_entry_t *pkt) * qla2x00_error_entry() - Process an error entry. * @ha: SCSI driver HA context * @pkt: Entry pointer + * return : 1=allow further error analysis. 0=no additional error analysis. */ -static void +static int qla2x00_error_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, sts_entry_t *pkt) { srb_t *sp; @@ -2654,18 +2663,35 @@ qla2x00_error_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, sts_entry_t *pkt) if (pkt->entry_status & RF_BUSY) res = DID_BUS_BUSY << 16; - if (pkt->entry_type == NOTIFY_ACK_TYPE && - pkt->handle == QLA_TGT_SKIP_HANDLE) - return; + if ((pkt->handle & ~QLA_TGT_HANDLE_MASK) == QLA_TGT_SKIP_HANDLE) + return 0; - sp = qla2x00_get_sp_from_handle(vha, func, req, pkt); - if (sp) { - sp->done(sp, res); - return; + switch (pkt->entry_type) { + case NOTIFY_ACK_TYPE: + case STATUS_TYPE: + case STATUS_CONT_TYPE: + case LOGINOUT_PORT_IOCB_TYPE: + case CT_IOCB_TYPE: + case ELS_IOCB_TYPE: + case ABORT_IOCB_TYPE: + case MBX_IOCB_TYPE: + sp = qla2x00_get_sp_from_handle(vha, func, req, pkt); + if (sp) { + sp->done(sp, res); + return 0; + } + break; + + case ABTS_RESP_24XX: + case CTIO_TYPE7: + case CTIO_CRC2: + default: + return 1; } fatal: ql_log(ql_log_warn, vha, 0x5030, "Error entry - invalid handle/queue (%04x).\n", que); + return 0; } /** @@ -2746,9 +2772,7 @@ void qla24xx_process_response_queue(struct scsi_qla_host *vha, } if (pkt->entry_status != 0) { - qla2x00_error_entry(vha, rsp, (sts_entry_t *) pkt); - - if (qlt_24xx_process_response_error(vha, pkt)) + if (qla2x00_error_entry(vha, rsp, (sts_entry_t *) pkt)) goto process_err; ((response_t *)pkt)->signature = RESPONSE_PROCESSED; diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index dcf50aa61e9d..d92e65b40c44 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -1649,8 +1649,9 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *vha, int res) srb_t *sp; struct qla_hw_data *ha = vha->hw; struct req_que *req; - - qlt_host_reset_handler(ha); + struct qla_tgt *tgt = vha->vha_tgt.qla_tgt; + struct qla_tgt_cmd *cmd; + uint8_t trace = 0; spin_lock_irqsave(&ha->hardware_lock, flags); for (que = 0; que < ha->max_req_queues; que++) { @@ -1662,27 +1663,57 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *vha, int res) for (cnt = 1; cnt < req->num_outstanding_cmds; cnt++) { sp = req->outstanding_cmds[cnt]; if (sp) { - /* Don't abort commands in adapter during EEH - * recovery as it's not accessible/responding. - */ - if (GET_CMD_SP(sp) && !ha->flags.eeh_busy && - (sp->type == SRB_SCSI_CMD)) { - /* Get a reference to the sp and drop the lock. - * The reference ensures this sp->done() call - * - and not the call in qla2xxx_eh_abort() - - * ends the SCSI command (with result 'res'). + req->outstanding_cmds[cnt] = NULL; + if (sp->cmd_type == TYPE_SRB) { + /* + * Don't abort commands in adapter + * during EEH recovery as it's not + * accessible/responding. */ - sp_get(sp); - spin_unlock_irqrestore(&ha->hardware_lock, flags); - status = qla2xxx_eh_abort(GET_CMD_SP(sp)); - spin_lock_irqsave(&ha->hardware_lock, flags); - /* Get rid of extra reference if immediate exit - * from ql2xxx_eh_abort */ - if (status == FAILED && (qla2x00_isp_reg_stat(ha))) - atomic_dec(&sp->ref_count); + if (GET_CMD_SP(sp) && + !ha->flags.eeh_busy && + (sp->type == SRB_SCSI_CMD)) { + /* + * Get a reference to the sp + * and drop the lock. The + * reference ensures this + * sp->done() call and not the + * call in qla2xxx_eh_abort() + * ends the SCSI command (with + * result 'res'). + */ + sp_get(sp); + spin_unlock_irqrestore( + &ha->hardware_lock, flags); + status = qla2xxx_eh_abort( + GET_CMD_SP(sp)); + spin_lock_irqsave( + &ha->hardware_lock, flags); + /* + * Get rid of extra reference + * if immediate exit from + * ql2xxx_eh_abort + */ + if (status == FAILED && + (qla2x00_isp_reg_stat(ha))) + atomic_dec( + &sp->ref_count); + } + sp->done(sp, res); + } else { + if (!vha->hw->tgt.tgt_ops || !tgt || + qla_ini_mode_enabled(vha)) { + if (!trace) + ql_dbg(ql_dbg_tgt_mgt, + vha, 0xf003, + "HOST-ABORT-HNDLR: dpc_flags=%lx. Target mode disabled\n", + vha->dpc_flags); + continue; + } + cmd = (struct qla_tgt_cmd *)sp; + qlt_abort_cmd_on_host_reset(cmd->vha, + cmd); } - req->outstanding_cmds[cnt] = NULL; - sp->done(sp, res); } } } @@ -5862,6 +5893,8 @@ qla2x00_timer(scsi_qla_host_t *vha) sp = req->outstanding_cmds[index]; if (!sp) continue; + if (sp->cmd_type != TYPE_SRB) + continue; if (sp->type != SRB_SCSI_CMD) continue; sfcp = sp->fcport; diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 88eea4d34487..25145be51381 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -115,8 +115,6 @@ static int qlt_issue_task_mgmt(struct fc_port *sess, u64 lun, int fn, void *iocb, int flags); static void qlt_send_term_exchange(struct scsi_qla_host *ha, struct qla_tgt_cmd *cmd, struct atio_from_isp *atio, int ha_locked, int ul_abort); -static void qlt_abort_cmd_on_host_reset(struct scsi_qla_host *vha, - struct qla_tgt_cmd *cmd); static void qlt_alloc_qfull_cmd(struct scsi_qla_host *vha, struct atio_from_isp *atio, uint16_t status, int qfull); static void qlt_disable_vha(struct scsi_qla_host *vha); @@ -2291,28 +2289,35 @@ static inline void *qlt_get_req_pkt(struct scsi_qla_host *vha) /* ha->hardware_lock supposed to be held on entry */ static inline uint32_t qlt_make_handle(struct scsi_qla_host *vha) { - struct qla_hw_data *ha = vha->hw; uint32_t h; + int index; + uint8_t found = 0; + struct req_que *req = vha->req; + + h = req->current_outstanding_cmd; - h = ha->tgt.current_handle; - /* always increment cmd handle */ - do { - ++h; - if (h > DEFAULT_OUTSTANDING_COMMANDS) - h = 1; /* 0 is QLA_TGT_NULL_HANDLE */ - if (h == ha->tgt.current_handle) { - ql_dbg(ql_dbg_io, vha, 0x305b, - "qla_target(%d): Ran out of " - "empty cmd slots in ha %p\n", vha->vp_idx, ha); - h = QLA_TGT_NULL_HANDLE; + for (index = 1; index < req->num_outstanding_cmds; index++) { + h++; + if (h == req->num_outstanding_cmds) + h = 1; + + if (h == QLA_TGT_SKIP_HANDLE) + continue; + + if (!req->outstanding_cmds[h]) { + found = 1; break; } - } while ((h == QLA_TGT_NULL_HANDLE) || - (h == QLA_TGT_SKIP_HANDLE) || - (ha->tgt.cmds[h-1] != NULL)); + } - if (h != QLA_TGT_NULL_HANDLE) - ha->tgt.current_handle = h; + if (found) { + req->current_outstanding_cmd = h; + } else { + ql_dbg(ql_dbg_io, vha, 0x305b, + "qla_target(%d): Ran out of empty cmd slots\n", + vha->vp_idx); + h = QLA_TGT_NULL_HANDLE; + } return h; } @@ -2323,7 +2328,6 @@ static int qlt_24xx_build_ctio_pkt(struct qla_tgt_prm *prm, { uint32_t h; struct ctio7_to_24xx *pkt; - struct qla_hw_data *ha = vha->hw; struct atio_from_isp *atio = &prm->cmd->atio; uint16_t temp; @@ -2343,8 +2347,9 @@ static int qlt_24xx_build_ctio_pkt(struct qla_tgt_prm *prm, * the session and, so, the command. */ return -EAGAIN; - } else - ha->tgt.cmds[h - 1] = prm->cmd; + } else { + vha->req->outstanding_cmds[h] = (srb_t *)prm->cmd; + } pkt->handle = h | CTIO_COMPLETION_HANDLE_MARK; pkt->nport_handle = prm->cmd->loop_id; @@ -2888,7 +2893,7 @@ qlt_build_ctio_crc2_pkt(struct qla_tgt_prm *prm, scsi_qla_host_t *vha) */ return -EAGAIN; } else - ha->tgt.cmds[h-1] = prm->cmd; + vha->req->outstanding_cmds[h] = (srb_t *)prm->cmd; pkt->handle = h | CTIO_COMPLETION_HANDLE_MARK; pkt->nport_handle = cpu_to_le16(prm->cmd->loop_id); @@ -2994,7 +2999,7 @@ qlt_build_ctio_crc2_pkt(struct qla_tgt_prm *prm, scsi_qla_host_t *vha) crc_queuing_error: /* Cleanup will be performed by the caller */ - vha->hw->tgt.cmds[h - 1] = NULL; + vha->req->outstanding_cmds[h] = NULL; return QLA_FUNCTION_FAILED; } @@ -3676,50 +3681,38 @@ static int qlt_term_ctio_exchange(struct scsi_qla_host *vha, void *ctio, return term; } -/* ha->hardware_lock supposed to be held on entry */ -static inline struct qla_tgt_cmd *qlt_get_cmd(struct scsi_qla_host *vha, - uint32_t handle) -{ - struct qla_hw_data *ha = vha->hw; - - handle--; - if (ha->tgt.cmds[handle] != NULL) { - struct qla_tgt_cmd *cmd = ha->tgt.cmds[handle]; - ha->tgt.cmds[handle] = NULL; - return cmd; - } else - return NULL; -} /* ha->hardware_lock supposed to be held on entry */ static struct qla_tgt_cmd *qlt_ctio_to_cmd(struct scsi_qla_host *vha, uint32_t handle, void *ctio) { struct qla_tgt_cmd *cmd = NULL; + struct req_que *req = vha->req; /* Clear out internal marks */ - handle &= ~(CTIO_COMPLETION_HANDLE_MARK | - CTIO_INTERMEDIATE_HANDLE_MARK); + handle &= ~QLA_TGT_HANDLE_MASK; if (handle != QLA_TGT_NULL_HANDLE) { if (unlikely(handle == QLA_TGT_SKIP_HANDLE)) return NULL; - /* handle-1 is actually used */ - if (unlikely(handle > DEFAULT_OUTSTANDING_COMMANDS)) { + handle &= QLA_CMD_HANDLE_MASK; + + if (unlikely(handle > req->num_outstanding_cmds)) { ql_dbg(ql_dbg_tgt, vha, 0xe052, "qla_target(%d): Wrong handle %x received\n", vha->vp_idx, handle); return NULL; } - cmd = qlt_get_cmd(vha, handle); - if (unlikely(cmd == NULL)) { - ql_dbg(ql_dbg_tgt, vha, 0xe053, - "qla_target(%d): Suspicious: unable to " - "find the command with handle %x\n", vha->vp_idx, - handle); + cmd = (struct qla_tgt_cmd *)req->outstanding_cmds[handle]; + if (unlikely((cmd == NULL) || + (cmd->cmd_type != TYPE_TGT_CMD))) { + ql_dbg(ql_dbg_async, vha, 0xe053, + "qla_target(%d): Suspicious: unable to find the command with handle %x cmd %p\n", + vha->vp_idx, handle, cmd); return NULL; } + req->outstanding_cmds[handle] = NULL; } else if (ctio != NULL) { /* We can't get loop ID from CTIO7 */ ql_dbg(ql_dbg_tgt, vha, 0xe054, @@ -3732,7 +3725,7 @@ static struct qla_tgt_cmd *qlt_ctio_to_cmd(struct scsi_qla_host *vha, } /* hardware_lock should be held by caller. */ -static void +void qlt_abort_cmd_on_host_reset(struct scsi_qla_host *vha, struct qla_tgt_cmd *cmd) { struct qla_hw_data *ha = vha->hw; @@ -3767,42 +3760,6 @@ qlt_abort_cmd_on_host_reset(struct scsi_qla_host *vha, struct qla_tgt_cmd *cmd) ha->tgt.tgt_ops->free_cmd(cmd); } -void -qlt_host_reset_handler(struct qla_hw_data *ha) -{ - struct qla_tgt_cmd *cmd; - unsigned long flags; - scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); - scsi_qla_host_t *vha = NULL; - struct qla_tgt *tgt = base_vha->vha_tgt.qla_tgt; - uint32_t i; - - if (!base_vha->hw->tgt.tgt_ops) - return; - - if (!tgt || qla_ini_mode_enabled(base_vha)) { - ql_dbg(ql_dbg_tgt_mgt, vha, 0xf003, - "Target mode disabled\n"); - return; - } - - ql_dbg(ql_dbg_tgt_mgt, vha, 0xff10, - "HOST-ABORT-HNDLR: base_vha->dpc_flags=%lx.\n", - base_vha->dpc_flags); - - spin_lock_irqsave(&ha->hardware_lock, flags); - for (i = 1; i < DEFAULT_OUTSTANDING_COMMANDS + 1; i++) { - cmd = qlt_get_cmd(base_vha, i); - if (!cmd) - continue; - /* ha->tgt.cmds entry is cleared by qlt_get_cmd. */ - vha = cmd->vha; - qlt_abort_cmd_on_host_reset(vha, cmd); - } - spin_unlock_irqrestore(&ha->hardware_lock, flags); -} - - /* * ha->hardware_lock supposed to be held on entry. Might drop it, then reaquire */ @@ -4084,7 +4041,7 @@ static struct qla_tgt_cmd *qlt_get_tag(scsi_qla_host_t *vha, cmd = &((struct qla_tgt_cmd *)se_sess->sess_cmd_map)[tag]; memset(cmd, 0, sizeof(struct qla_tgt_cmd)); - + cmd->cmd_type = TYPE_TGT_CMD; memcpy(&cmd->atio, atio, sizeof(*atio)); cmd->state = QLA_TGT_STATE_NEW; cmd->tgt = vha->vha_tgt.qla_tgt; @@ -6638,21 +6595,6 @@ qlt_83xx_iospace_config(struct qla_hw_data *ha) ha->msix_count += 1; /* For ATIO Q */ } -int -qlt_24xx_process_response_error(struct scsi_qla_host *vha, - struct sts_entry_24xx *pkt) -{ - switch (pkt->entry_type) { - case ABTS_RECV_24XX: - case ABTS_RESP_24XX: - case CTIO_TYPE7: - case NOTIFY_ACK_TYPE: - case CTIO_CRC2: - return 1; - default: - return 0; - } -} void qlt_modify_vp_config(struct scsi_qla_host *vha, diff --git a/drivers/scsi/qla2xxx/qla_target.h b/drivers/scsi/qla2xxx/qla_target.h index c328a267c4c3..2120456c4709 100644 --- a/drivers/scsi/qla2xxx/qla_target.h +++ b/drivers/scsi/qla2xxx/qla_target.h @@ -70,6 +70,16 @@ /* Used to mark CTIO as intermediate */ #define CTIO_INTERMEDIATE_HANDLE_MARK BIT_30 +#define QLA_TGT_NULL_HANDLE 0 + +#define QLA_TGT_HANDLE_MASK 0xF0000000 +#define QLA_QPID_HANDLE_MASK 0x000F0000 /* qpair id mask */ +#define QLA_CMD_HANDLE_MASK 0x0000FFFF +#define QLA_TGT_SKIP_HANDLE (0xFFFFFFFF & ~QLA_TGT_HANDLE_MASK) + +#define QLA_QPID_HANDLE_SHIFT 16 +#define GET_QID(_h) ((_h & QLA_QPID_HANDLE_MASK) >> QLA_QPID_HANDLE_SHIFT) + #ifndef OF_SS_MODE_0 /* @@ -664,6 +674,7 @@ struct abts_resp_from_24xx_fw { struct qla_tgt_mgmt_cmd; struct fc_port; +struct qla_tgt_cmd; /* * This structure provides a template of function calls that the @@ -744,11 +755,6 @@ int qla2x00_wait_for_hba_online(struct scsi_qla_host *); #define QLA_TGT_STATE_DATA_IN 2 /* Data arrived + target processing */ #define QLA_TGT_STATE_PROCESSED 3 /* target done processing */ - -/* Special handles */ -#define QLA_TGT_NULL_HANDLE 0 -#define QLA_TGT_SKIP_HANDLE (0xFFFFFFFF & ~CTIO_COMPLETION_HANDLE_MARK) - /* ATIO task_codes field */ #define ATIO_SIMPLE_QUEUE 0 #define ATIO_HEAD_OF_QUEUE 1 @@ -858,6 +864,11 @@ enum trace_flags { }; struct qla_tgt_cmd { + /* + * Do not move cmd_type field. it needs to line up with srb->cmd_type + */ + uint8_t cmd_type; + uint8_t pad[7]; struct se_cmd se_cmd; struct fc_port *sess; int state; @@ -1077,5 +1088,7 @@ extern void qlt_do_generation_tick(struct scsi_qla_host *, int *); void qlt_send_resp_ctio(scsi_qla_host_t *, struct qla_tgt_cmd *, uint8_t, uint8_t, uint8_t, uint8_t); +extern void qlt_abort_cmd_on_host_reset(struct scsi_qla_host *, + struct qla_tgt_cmd *); #endif /* __QLA_TARGET_H */