From patchwork Sat May 9 06:46:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Russkikh X-Patchwork-Id: 219574 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD448C28CBC for ; Sat, 9 May 2020 06:47:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9895E24955 for ; Sat, 9 May 2020 06:47:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marvell.com header.i=@marvell.com header.b="Tbs6nk8T" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728938AbgEIGrn (ORCPT ); Sat, 9 May 2020 02:47:43 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:54606 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725940AbgEIGrn (ORCPT ); Sat, 9 May 2020 02:47:43 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0496lgtW029194; Fri, 8 May 2020 23:47:42 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=qU3g098MnYcEEmAh7VK4Q6+uZprmKzAzkPY8f+Oolx4=; b=Tbs6nk8T4fO3sfKL4UKpRQZxYWmoP+6IBEWiOyqFwD+khWr+FTjlb3y7u2YpmgvP9NT8 bxQoRa1LRjez0Pp2VTvxBVCH1sYFSRjU0Olelb++OvHQzfktNRAN85JkwGnWGgX1tz2R 3AGugsoNrSgZSRVFGoUaj0m8cKsjhbpjrnUhWmhdnF7tEgvrtAj/GUgsu3HtJGwSO4yY 6je05NzJIfu3PvjIQKZxAk1fA7G931iYTdrfR3VwC6HkHHiqShXocMGgOfShFx2XmIRl jjvT90yH8ptjig4Xoc/moEPrbXPxrEgZYVbgrb6/YcNWk+jlQ+nFtsXGpZTG6ESQId/x lA== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0a-0016f401.pphosted.com with ESMTP id 30vtdkp390-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 08 May 2020 23:47:42 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 8 May 2020 23:47:40 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 8 May 2020 23:47:39 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 8 May 2020 23:47:39 -0700 Received: from NN-LT0019.marvell.com (unknown [10.193.46.2]) by maili.marvell.com (Postfix) with ESMTP id 519FD3F7040; Fri, 8 May 2020 23:47:31 -0700 (PDT) From: Igor Russkikh To: CC: "David S . Miller" , Mark Starovoytov , Jakub Kicinski , Igor Russkikh Subject: [PATCH v2 net-next 2/7] net: atlantic: minor MACSec code cleanup Date: Sat, 9 May 2020 09:46:55 +0300 Message-ID: <20200509064700.202-3-irusskikh@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200509064700.202-1-irusskikh@marvell.com> References: <20200509064700.202-1-irusskikh@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.676 definitions=2020-05-09_02:2020-05-08,2020-05-09 signatures=0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Mark Starovoytov This patch fixes a couple of minor merge issues found in macsec_api.c after corresponding patch series has been applied. These are not real bugs, so pushing to net-next. Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/macsec/macsec_api.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/macsec/macsec_api.c b/drivers/net/ethernet/aquantia/atlantic/macsec/macsec_api.c index fbe9d88b13c7..36c7cf05630a 100644 --- a/drivers/net/ethernet/aquantia/atlantic/macsec/macsec_api.c +++ b/drivers/net/ethernet/aquantia/atlantic/macsec/macsec_api.c @@ -846,8 +846,7 @@ static int get_ingress_sakey_record(struct aq_hw_s *hw, rec->key[7] = packed_record[14]; rec->key[7] |= packed_record[15] << 16; - rec->key_len = (rec->key_len & 0xFFFFFFFC) | - (packed_record[16] & 0x3); + rec->key_len = packed_record[16] & 0x3; return 0; } @@ -1158,6 +1157,7 @@ static int set_egress_ctlf_record(struct aq_hw_s *hw, packed_record[0] = rec->sa_da[0] & 0xFFFF; packed_record[1] = (rec->sa_da[0] >> 16) & 0xFFFF; + packed_record[2] = rec->sa_da[1] & 0xFFFF; packed_record[3] = rec->eth_type & 0xFFFF; @@ -1552,7 +1552,7 @@ static int set_egress_sc_record(struct aq_hw_s *hw, packed_record[5] |= (rec->sak_len & 0x3) << 4; - packed_record[7] |= (rec->valid & 0x1) << 15; + packed_record[7] = (rec->valid & 0x1) << 15; return set_raw_egress_record(hw, packed_record, 8, 2, ROWOFFSET_EGRESSSCRECORD + table_index); From patchwork Sat May 9 06:46:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Russkikh X-Patchwork-Id: 219573 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34750C28CBC for ; Sat, 9 May 2020 06:48:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 086ED217BA for ; Sat, 9 May 2020 06:48:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marvell.com header.i=@marvell.com header.b="yv1MW0F/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728951AbgEIGsF (ORCPT ); Sat, 9 May 2020 02:48:05 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:27034 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725940AbgEIGsE (ORCPT ); Sat, 9 May 2020 02:48:04 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0496jnXS032383; Fri, 8 May 2020 23:48:01 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=7u8s6MlNZAzqeZOchDppHwE2OCWEBkhvhLJ9CEiobx4=; b=yv1MW0F/0t9qu3Pg3m4EP0lJWd0M0wkj4dkv12wV1p0dZEH6xlN/GPDN7/CM2y+0+Ykb +wa1rBa4jEIKG/KGZ9RTSJ69VvWClHGQQkCCgpJNaJyj093F0uN4De+V3L/F8kSJ596r VH86VKo2Lv1eldx8+XVRkWMRr4aBMx+TAiwkmF4npPJqewcVY1PPMGMZ4ek5JEWUeerI E7r7Ceg7hXne4DZcdKs8CZu7v4ZP0kEl6YlKV6I2CY/7SVAA4po5oYjSPVAm7Sv+t8QF ZtQ5co/aQKg8tQHZCS9d3TCG2Yc6JBgXsu3VSi9BAfAoiiDgqu26cXJqSdGZYAIzaQZn yg== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 30wjj7gvcp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 08 May 2020 23:48:01 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 8 May 2020 23:47:59 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 8 May 2020 23:47:59 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 8 May 2020 23:47:59 -0700 Received: from NN-LT0019.marvell.com (unknown [10.193.46.2]) by maili.marvell.com (Postfix) with ESMTP id 67DA63F703F; Fri, 8 May 2020 23:47:50 -0700 (PDT) From: Igor Russkikh To: CC: "David S . Miller" , Mark Starovoytov , Jakub Kicinski , Igor Russkikh Subject: [PATCH v2 net-next 4/7] net: atlantic: remove TPO2 check from A0 code Date: Sat, 9 May 2020 09:46:57 +0300 Message-ID: <20200509064700.202-5-irusskikh@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200509064700.202-1-irusskikh@marvell.com> References: <20200509064700.202-1-irusskikh@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.676 definitions=2020-05-09_02:2020-05-08,2020-05-09 signatures=0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Mark Starovoytov TPO2 was introduced in B0 only, no reason to check for it in A0 code. Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh --- drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c index 70f06c40bdf2..1b0670a8ae33 100644 --- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c +++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c @@ -268,8 +268,7 @@ static int hw_atl_a0_hw_init_tx_path(struct aq_hw_s *self) hw_atl_tdm_tx_desc_wr_wb_irq_en_set(self, 1U); /* misc */ - aq_hw_write_reg(self, 0x00007040U, ATL_HW_IS_CHIP_FEATURE(self, TPO2) ? - 0x00010000U : 0x00000000U); + aq_hw_write_reg(self, 0x00007040U, 0x00000000U); hw_atl_tdm_tx_dca_en_set(self, 0U); hw_atl_tdm_tx_dca_mode_set(self, 0U); From patchwork Sat May 9 06:46:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Russkikh X-Patchwork-Id: 219572 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AD87C28CBC for ; Sat, 9 May 2020 06:48:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 60C68217BA for ; Sat, 9 May 2020 06:48:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marvell.com header.i=@marvell.com header.b="SDO7LR8Z" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728982AbgEIGsV (ORCPT ); Sat, 9 May 2020 02:48:21 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:52078 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725940AbgEIGsV (ORCPT ); Sat, 9 May 2020 02:48:21 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0496jnXT032383; Fri, 8 May 2020 23:48:19 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=syHoqBmNqOh4cZN7nFTgToX+h5xlAwPXz3MznaXFQ48=; b=SDO7LR8ZSZL6fKcF2SZ1rujr8sOozKiwcA6mZtQwN/LL97XzgCOu69XlSoWNvy0Njvcz z5LNejN3xlSbGCdDyTC8wcyD5sZ6Gj0Jy8Txnc1dipita9WrggZ3pFLLZu5NFB3kERWZ Y9KYnfBtf5IkX6XODHapv2EYtNDEI7JZ631Wr4g97yJdeiT3nj+HongbTsxfLszj8XMf YP2BKVLBoBhGhyXurWma086G7GdQMtVzh8+6zWUK5RJFNJmsZDPOZgqzh9ltyGsfAzSs c9Vs9+uIXsmQMAaXGV3H+3vjRodkVwPrHil/hwdtVbf2g7YOZxXbx36i+l/gCpFMhT0v yw== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 30wjj7gvda-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 08 May 2020 23:48:19 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 8 May 2020 23:48:17 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 8 May 2020 23:48:17 -0700 Received: from NN-LT0019.marvell.com (unknown [10.193.46.2]) by maili.marvell.com (Postfix) with ESMTP id 71DA53F704D; Fri, 8 May 2020 23:48:08 -0700 (PDT) From: Igor Russkikh To: CC: "David S . Miller" , Mark Starovoytov , Jakub Kicinski , Igor Russkikh Subject: [PATCH v2 net-next 6/7] net: atlantic: remove check for boot code survivability before reset request Date: Sat, 9 May 2020 09:46:59 +0300 Message-ID: <20200509064700.202-7-irusskikh@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200509064700.202-1-irusskikh@marvell.com> References: <20200509064700.202-1-irusskikh@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.676 definitions=2020-05-09_02:2020-05-08,2020-05-09 signatures=0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Mark Starovoytov This patch removes unnecessary check for boot code survivability before reset request. Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh --- .../ethernet/aquantia/atlantic/hw_atl2/hw_atl2_utils.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_utils.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_utils.c index 85ccc9a011a0..f3766780e975 100644 --- a/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_utils.c +++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_utils.c @@ -75,14 +75,6 @@ int hw_atl2_utils_soft_reset(struct aq_hw_s *self) u32 rbl_request; int err; - err = readx_poll_timeout_atomic(hw_atl2_mif_mcp_boot_reg_get, self, - rbl_status, - ((rbl_status & AQ_A2_BOOT_STARTED) && - (rbl_status != 0xFFFFFFFFu)), - 10, 500000); - if (err) - aq_pr_trace("Boot code probably hanged, reboot anyway"); - hw_atl2_mif_host_req_int_clr(self, 0x01); rbl_request = AQ_A2_FW_BOOT_REQ_REBOOT; #ifdef AQ_CFG_FAST_START