From patchwork Fri Aug 19 09:50:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jitendra Bhivare X-Patchwork-Id: 9289921 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 EC345607FF for ; Fri, 19 Aug 2016 09:51:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DCD66292FF for ; Fri, 19 Aug 2016 09:51:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D13D129333; Fri, 19 Aug 2016 09:51:34 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham 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 5935E292FF for ; Fri, 19 Aug 2016 09:51:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754280AbcHSJvZ (ORCPT ); Fri, 19 Aug 2016 05:51:25 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:33199 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750850AbcHSJvW (ORCPT ); Fri, 19 Aug 2016 05:51:22 -0400 Received: by mail-wm0-f49.google.com with SMTP id d196so7879755wmd.0 for ; Fri, 19 Aug 2016 02:51:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=y1QYI6Muf2kM2EzjK7T4hZMug+EBqI28SUHS2xxbDd0=; b=GVIRm02CmJbnhvHY6Mg1YSoD5C2RMWOkcZdv+r0PyhguQPFeHi5R5r6B9V0qIeeDVA TLlwATmOH6LdhXsPSwykLtEPtCowXFYW7m8eyiT0T/arcrt4cLK+gCQ0PiHsXXe9HYtI 6GHpVMIb5RLhzrIETsxvEm9Ep+EBjxe9IJroQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=y1QYI6Muf2kM2EzjK7T4hZMug+EBqI28SUHS2xxbDd0=; b=iNFjnyMdVZycatA8Jeg8f3xquG+NMpf9gRi2sPh4P4sxpMcgc+JoA1Kz7eVTab1Ch9 cnlNjfCTJ6f3I1FExrJr8bsgzwd4J27yUE9CMG1c0U+qz0OAAP6zyZ8iNtsoF6XlWi97 +z0u7aKVK6DZILxT4pXxXdIuTQ2dkKz92XZeACEww7zukl+5me1u0t9qyjHJRofjyzDd Jek6u31SSir9cMNrSD9Oxo/r/ePIMaABDZTFQS2MXSsYsw+fj5+mBoDXSfAZqVw/YCOO kf12ebb+zOTSIHaGQZ69qVYRJi2ZOEkaPdDYDXJVw0BBEKU0oafM6x5xqyDrnhyQ2wpz uL0w== X-Gm-Message-State: AEkooutUUDOlwh4rrV2tkcYJ37A2V8qbGpsDcY4KQm4dwxdxGzLJHfW/6wFCfGWxAgIeQBpB X-Received: by 10.194.6.229 with SMTP id e5mr5462098wja.85.1471600280737; Fri, 19 Aug 2016 02:51:20 -0700 (PDT) Received: from android.dhcp.avagotech.net ([192.19.239.250]) by smtp.gmail.com with ESMTPSA id n131sm3650096wmd.3.2016.08.19.02.51.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Aug 2016 02:51:20 -0700 (PDT) From: Jitendra Bhivare To: linux-scsi@vger.kernel.org Cc: mchristi@redhat.com, Jitendra Bhivare Subject: [PATCH v2 12/29] be2iscsi: Remove alloc_mcc_tag & beiscsi_pci_soft_reset Date: Fri, 19 Aug 2016 15:20:09 +0530 Message-Id: <1471600226-22055-13-git-send-email-jitendra.bhivare@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1471600226-22055-1-git-send-email-jitendra.bhivare@broadcom.com> References: <1471600226-22055-1-git-send-email-jitendra.bhivare@broadcom.com> 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 alloc_mcc_tag was replaced with alloc_mcc_wrb and is no more used. beiscsi_pci_soft_reset is not used at all and won't be needed. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke --- drivers/scsi/be2iscsi/be_cmds.c | 76 ----------------------------------------- drivers/scsi/be2iscsi/be_cmds.h | 1 - 2 files changed, 77 deletions(-) diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c index 59b8e2d..4032962 100644 --- a/drivers/scsi/be2iscsi/be_cmds.c +++ b/drivers/scsi/be2iscsi/be_cmds.c @@ -21,60 +21,6 @@ #include "be.h" #include "be_mgmt.h" -int beiscsi_pci_soft_reset(struct beiscsi_hba *phba) -{ - u32 sreset; - u8 *pci_reset_offset = 0; - u8 *pci_online0_offset = 0; - u8 *pci_online1_offset = 0; - u32 pconline0 = 0; - u32 pconline1 = 0; - u32 i; - - pci_reset_offset = (u8 *)phba->pci_va + BE2_SOFT_RESET; - pci_online0_offset = (u8 *)phba->pci_va + BE2_PCI_ONLINE0; - pci_online1_offset = (u8 *)phba->pci_va + BE2_PCI_ONLINE1; - sreset = readl((void *)pci_reset_offset); - sreset |= BE2_SET_RESET; - writel(sreset, (void *)pci_reset_offset); - - i = 0; - while (sreset & BE2_SET_RESET) { - if (i > 64) - break; - msleep(100); - sreset = readl((void *)pci_reset_offset); - i++; - } - - if (sreset & BE2_SET_RESET) { - printk(KERN_ERR DRV_NAME - " Soft Reset did not deassert\n"); - return -EIO; - } - pconline1 = BE2_MPU_IRAM_ONLINE; - writel(pconline0, (void *)pci_online0_offset); - writel(pconline1, (void *)pci_online1_offset); - - sreset |= BE2_SET_RESET; - writel(sreset, (void *)pci_reset_offset); - - i = 0; - while (sreset & BE2_SET_RESET) { - if (i > 64) - break; - msleep(1); - sreset = readl((void *)pci_reset_offset); - i++; - } - if (sreset & BE2_SET_RESET) { - printk(KERN_ERR DRV_NAME - " MPU Online Soft Reset did not deassert\n"); - return -EIO; - } - return 0; -} - int be_chk_reset_complete(struct beiscsi_hba *phba) { unsigned int num_loop; @@ -104,28 +50,6 @@ int be_chk_reset_complete(struct beiscsi_hba *phba) return 0; } -unsigned int alloc_mcc_tag(struct beiscsi_hba *phba) -{ - unsigned int tag = 0; - - spin_lock(&phba->ctrl.mcc_lock); - if (phba->ctrl.mcc_tag_available) { - tag = phba->ctrl.mcc_tag[phba->ctrl.mcc_alloc_index]; - phba->ctrl.mcc_tag[phba->ctrl.mcc_alloc_index] = 0; - phba->ctrl.mcc_tag_status[tag] = 0; - phba->ctrl.ptag_state[tag].tag_state = 0; - } - if (tag) { - phba->ctrl.mcc_tag_available--; - if (phba->ctrl.mcc_alloc_index == (MAX_MCC_CMD - 1)) - phba->ctrl.mcc_alloc_index = 0; - else - phba->ctrl.mcc_alloc_index++; - } - spin_unlock(&phba->ctrl.mcc_lock); - return tag; -} - struct be_mcc_wrb *alloc_mcc_wrb(struct beiscsi_hba *phba, unsigned int *ref_tag) { diff --git a/drivers/scsi/be2iscsi/be_cmds.h b/drivers/scsi/be2iscsi/be_cmds.h index a4bc83c..c50b74a 100644 --- a/drivers/scsi/be2iscsi/be_cmds.h +++ b/drivers/scsi/be2iscsi/be_cmds.h @@ -1376,7 +1376,6 @@ struct be_cmd_get_port_name { * the cxn */ -int beiscsi_pci_soft_reset(struct beiscsi_hba *phba); int be_chk_reset_complete(struct beiscsi_hba *phba); void be_wrb_hdr_prepare(struct be_mcc_wrb *wrb, int payload_len,