From patchwork Wed Aug 18 13:53:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 498908 Delivered-To: patch@linaro.org Received: by 2002:a02:6f15:0:0:0:0:0 with SMTP id x21csp697501jab; Wed, 18 Aug 2021 06:58:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLnRHvleA7yxKBJqkzO9VsnvjD5kK8Bc2KwDkNJzlhKDCTwcdpacn7KJDBIvBWIZFCiOou X-Received: by 2002:a17:906:5a69:: with SMTP id my41mr9845280ejc.220.1629295097589; Wed, 18 Aug 2021 06:58:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629295097; cv=none; d=google.com; s=arc-20160816; b=q703rx0qsFLzk1m/IFwBcbhpQQkJMDTOHdFFlGlowxfDSYdSIztI/U5cF6zXPYlQGa kgyZCD0ONNvp9QZHuzTZPxb+N2vTo0ihXd4HkQoWEL3QADgK3KCRJ8axAplSjjWUkGBb 6qvZTiwh6aQy5QZLbQ6ZMwPodFB5U6fKIdkmCFJ/J/U+H+ygHIKZAb93kTJWHCq5CFjw OqTYKISnaCX6srIu3LfS2JVbwAtD35N5kXRITkiOGVolJLGD0d92F7lSkPRJlGxKdyud ru7i6bZuyvbPyDw+9Acd3lyZkH+vLleYWyM1JyiFev2hl8bKh71juh1ZGmKgfaPHRkrq vFMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=F4ywADIUVBs9IY/+lsapoDmy54P9u3/F6SXX+g5Xw7g=; b=vC71G78TSP3sBjge7udDh5K77ij2AnIefl5Q3KNZeVRF9Zz2L0fpKDpnQPNq6TdIhP h91RUQkV+Vzidf3AT3kqKYOcME2sS86IcIrc/Wr8JHclqZA7zqERIqLWI4MGdsVBwXcR Tm4XF8XDX0GibzHAd+36wH5hG6//B9+2VQh/VUz3hv2Fe696n1Jva3DxpAd+ePvrx9V0 H0a2k9u9a5Rm5ULegLiOZuhzmyqRlVoe40hxxJdhduR4ycWNC9YxsmmMH27H8rp1KxKA H4gvvICFFJwa8QS3LNY9WAtxC35MNWnc/DsXbmcvxV4x/OZuZO5vgeziS29w7dIVmiOO 9znQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y6si7077ejd.416.2021.08.18.06.58.17 for ; Wed, 18 Aug 2021 06:58:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238098AbhHRN6v (ORCPT ); Wed, 18 Aug 2021 09:58:51 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3664 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235675AbhHRN6t (ORCPT ); Wed, 18 Aug 2021 09:58:49 -0400 Received: from fraeml711-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4GqTwr0WmZz6H6wL; Wed, 18 Aug 2021 21:57:16 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml711-chm.china.huawei.com (10.206.15.60) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Wed, 18 Aug 2021 15:58:13 +0200 Received: from localhost.localdomain (10.69.192.58) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Wed, 18 Aug 2021 14:58:10 +0100 From: John Garry To: , , CC: , , , John Garry Subject: [PATCH 1/2] scsi: qla1280: Stop using scsi_cmnd.tag Date: Wed, 18 Aug 2021 21:53:20 +0800 Message-ID: <1629294801-32102-2-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1629294801-32102-1-git-send-email-john.garry@huawei.com> References: <1629294801-32102-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Use scsi_cmd_to_rq(cmd)->tag instead of scsi_cmnd.tag as preference. Signed-off-by: John Garry --- drivers/scsi/qla1280.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index aec92471c5f2..b4f7d8d7a01c 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -3980,7 +3980,7 @@ __qla1280_print_scsi_cmd(struct scsi_cmnd *cmd) qla1280_dump_buffer(1, (char *)sg, (cmd->use_sg*sizeof(struct scatterlist))); } */ printk(" tag=%d, transfersize=0x%x \n", - cmd->tag, cmd->transfersize); + scsi_cmd_to_rq(cmd)->tag, cmd->transfersize); printk(" SP=0x%p\n", CMD_SP(cmd)); printk(" underflow size = 0x%x, direction=0x%x\n", cmd->underflow, cmd->sc_data_direction); From patchwork Wed Aug 18 13:53:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 498909 Delivered-To: patch@linaro.org Received: by 2002:a02:6f15:0:0:0:0:0 with SMTP id x21csp697541jab; Wed, 18 Aug 2021 06:58:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVoeYHD2baOVoWZCUH18a7Z73COKZJW646ZkD0QYGFPs82kJXGYN1QX+nRi7z77wBgVZU1 X-Received: by 2002:a05:6402:288b:: with SMTP id eg11mr10348713edb.241.1629295099928; Wed, 18 Aug 2021 06:58:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629295099; cv=none; d=google.com; s=arc-20160816; b=Ux8/avELjC/qjq3zC+luYLqgaRJmUmHhMqwzn9mF+lQZHeTxm8eB9gvCI0vbekd0G5 b4bfNKXi4I3ybT5vc5eRS5/5na+nT3gsb05+cOvZKDKbbCV9xQxKWxbzWEgyEimS23h7 lS6NS72BPQKaZPVdFWWXV7/Tc0zwpihpW35UjehWPb6EznNoUvxSfFgV5oe6HOHHrx+m VMVJsCV9/DjIsDN9wRZLfb/npO1qMlRuTlp7HpsVvqiNkdwXNTzvKnWh/+p7CQm8+W14 HOj45FaKrHkIVi+8X+zejrMADwOFCZEyr5CqPHRJYWNBbjJc1ikxWI4yx4TuXkq0IFRq XbXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=oYcNbApSHVwT3RUPVxbFF0VicswZSZEBYgG4dOzvXMY=; b=ZmffOrKWpUaW+6LHvRGuLN+1nhVausX+pxU9Kr7JNaqzndP/qOLL4kav+diPUGvykg YJvkNPnD5wiNTkoU+VCAsU4knNrpuygK1n5Owwdoq1p9ihWrX0fZIwscbuWi/DWdyRN8 hGLkrkT38sTfFGEeKzUZhjbWiT5U/nNjOWxmsHyAuSH30OA+683rMGNdbtg145+zRu2L XePqDa2yYus80djlBglJzOl9pZCVt6Q88JgXlOg7ctvBLv/R9KVjsqC6U9g4uA9+wp15 cpz3QxXhNuOuQR02+TmgrQqo0JIqn7CaaESIHJ8yGSkQ2Scr6JrrUCQ4NpAsewVJFCl6 LBdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x17si5668033edd.517.2021.08.18.06.58.19 for ; Wed, 18 Aug 2021 06:58:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238252AbhHRN6x (ORCPT ); Wed, 18 Aug 2021 09:58:53 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3665 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238027AbhHRN6v (ORCPT ); Wed, 18 Aug 2021 09:58:51 -0400 Received: from fraeml709-chm.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4GqTws1vP1z6D9Px; Wed, 18 Aug 2021 21:57:17 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml709-chm.china.huawei.com (10.206.15.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Wed, 18 Aug 2021 15:58:15 +0200 Received: from localhost.localdomain (10.69.192.58) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Wed, 18 Aug 2021 14:58:13 +0100 From: John Garry To: , , CC: , , , John Garry Subject: [PATCH 2/2] scsi: qla1280: Fix DEBUG_QLA1280 compilation issues Date: Wed, 18 Aug 2021 21:53:21 +0800 Message-ID: <1629294801-32102-3-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1629294801-32102-1-git-send-email-john.garry@huawei.com> References: <1629294801-32102-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The driver does not compile under DEBUG_QLA1280 flag, so fix up with as little fuss as possible some debug statements. Also delete ql1280_dump_device(), which looks to have never been referenced. Signed-off-by: John Garry --- drivers/scsi/qla1280.c | 39 ++++++++------------------------------- 1 file changed, 8 insertions(+), 31 deletions(-) -- 2.17.1 diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index b4f7d8d7a01c..27b16ec399cd 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -2807,7 +2807,7 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) dprintk(2, "start: cmd=%p sp=%p CDB=%xm, handle %lx\n", cmd, sp, cmd->cmnd[0], (long)CMD_HANDLE(sp->cmd)); - dprintk(2, " bus %i, target %i, lun %i\n", + dprintk(2, " bus %i, target %i, lun %lld\n", SCSI_BUS_32(cmd), SCSI_TCN_32(cmd), SCSI_LUN_32(cmd)); qla1280_dump_buffer(2, cmd->cmnd, MAX_COMMAND_SIZE); @@ -2879,7 +2879,7 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) remseg--; } dprintk(5, "qla1280_64bit_start_scsi: Scatter/gather " - "command packet data - b %i, t %i, l %i \n", + "command packet data - b %i, t %i, l %lld \n", SCSI_BUS_32(cmd), SCSI_TCN_32(cmd), SCSI_LUN_32(cmd)); qla1280_dump_buffer(5, (char *)pkt, @@ -2937,14 +2937,14 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) remseg -= cnt; dprintk(5, "qla1280_64bit_start_scsi: " "continuation packet data - b %i, t " - "%i, l %i \n", SCSI_BUS_32(cmd), + "%i, l %lld \n", SCSI_BUS_32(cmd), SCSI_TCN_32(cmd), SCSI_LUN_32(cmd)); qla1280_dump_buffer(5, (char *)pkt, REQUEST_ENTRY_SIZE); } } else { /* No data transfer */ dprintk(5, "qla1280_64bit_start_scsi: No data, command " - "packet data - b %i, t %i, l %i \n", + "packet data - b %i, t %i, l %lld \n", SCSI_BUS_32(cmd), SCSI_TCN_32(cmd), SCSI_LUN_32(cmd)); qla1280_dump_buffer(5, (char *)pkt, REQUEST_ENTRY_SIZE); } @@ -3126,7 +3126,7 @@ qla1280_32bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) *dword_ptr++ = cpu_to_le32(lower_32_bits(sg_dma_address(s))); *dword_ptr++ = cpu_to_le32(sg_dma_len(s)); - dprintk(3, "S/G Segment phys_addr=0x%lx, len=0x%x\n", + dprintk(3, "S/G Segment phys_addr=0x%x, len=0x%x\n", (lower_32_bits(sg_dma_address(s))), (sg_dma_len(s))); remseg--; @@ -3182,7 +3182,7 @@ qla1280_32bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) remseg -= cnt; dprintk(5, "qla1280_32bit_start_scsi: " "continuation packet data - " - "scsi(%i:%i:%i)\n", SCSI_BUS_32(cmd), + "scsi(%i:%i:%lld)\n", SCSI_BUS_32(cmd), SCSI_TCN_32(cmd), SCSI_LUN_32(cmd)); qla1280_dump_buffer(5, (char *)pkt, REQUEST_ENTRY_SIZE); @@ -3663,7 +3663,7 @@ qla1280_status_entry(struct scsi_qla_host *ha, struct response *pkt, dprintk(2, "qla1280_status_entry: Check " "condition Sense data, b %i, t %i, " - "l %i\n", SCSI_BUS_32(cmd), SCSI_TCN_32(cmd), + "l %lld\n", SCSI_BUS_32(cmd), SCSI_TCN_32(cmd), SCSI_LUN_32(cmd)); if (sense_sz) qla1280_dump_buffer(2, @@ -3963,7 +3963,7 @@ __qla1280_print_scsi_cmd(struct scsi_cmnd *cmd) sp = (struct srb *)CMD_SP(cmd); printk("SCSI Command @= 0x%p, Handle=0x%p\n", cmd, CMD_HANDLE(cmd)); - printk(" chan=%d, target = 0x%02x, lun = 0x%02x, cmd_len = 0x%02x\n", + printk(" chan=%d, target = 0x%02x, lun = 0x%02llx, cmd_len = 0x%02x\n", SCSI_BUS_32(cmd), SCSI_TCN_32(cmd), SCSI_LUN_32(cmd), CMD_CDBLEN(cmd)); printk(" CDB = "); @@ -3985,29 +3985,6 @@ __qla1280_print_scsi_cmd(struct scsi_cmnd *cmd) printk(" underflow size = 0x%x, direction=0x%x\n", cmd->underflow, cmd->sc_data_direction); } - -/************************************************************************** - * ql1280_dump_device - * - **************************************************************************/ -static void -ql1280_dump_device(struct scsi_qla_host *ha) -{ - - struct scsi_cmnd *cp; - struct srb *sp; - int i; - - printk(KERN_DEBUG "Outstanding Commands on controller:\n"); - - for (i = 0; i < MAX_OUTSTANDING_COMMANDS; i++) { - if ((sp = ha->outstanding_cmds[i]) == NULL) - continue; - if ((cp = sp->cmd) == NULL) - continue; - qla1280_print_scsi_cmd(1, cp); - } -} #endif