Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp918985imu; Tue, 11 Dec 2018 09:32:47 -0800 (PST) X-Google-Smtp-Source: AFSGD/U8iPS0PWkBPUz+b9ncbuEj/MhkLXjiog+az4Ad5RL6jUPen9/mlhVOUt4JxIlRQUA8K7WK X-Received: by 2002:a17:902:9897:: with SMTP id s23mr16101204plp.69.1544549567751; Tue, 11 Dec 2018 09:32:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544549567; cv=none; d=google.com; s=arc-20160816; b=zEaiRocpzWKw/+8PQ+1vjCxxHbek0CX4IcMdPhK3Nwa+X/c4L+MB3uhi4DBkZqAAiZ tmRc9Cq13JeG2l+wX884MncSRHaVgaicSfr16L5KLTSfWjy5s8k654+d2idimYuFr3ve 7+B2X95zSrsFhhauqWnweP1bVvxfIBLvuqR9+X6cLXZTpi497pi6i5jrMnZoikH8nru8 QBzzXlI8JYiadqdK4udUuicFos1tEZom/XUtfRz7D+akojiNk/4laH5V4rkpgg1/j5Zv MGYw1NHX2qV3p6t+hHMejKp21wnwWTpcgx3Sk66gXXS+EYBl3TBruEgCBn3P8ugGjACQ pl2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IhLUWYqp7/cQp9zLhWh5UG81k8PaDfuJ/937hzP3kKE=; b=zcdcSsVxvaKPva6lWZNwdcfFULTP8Xx5Gdjv0nb7ttJLDEVb0ZX04B6x1D7yiVTo9Y PCv/MwstA4ghZ6IRoF5DfUoF0bJMK1gbctkd4T27566NXA0TV4TXfZtj02cFBjKchSlv I7muRBGeSMtYLFAnJh0hBbRFiy/8NvVt9MzLxhh1ClNE0qc7rsvLmMXID2PbdOgLkQzK fMrAdXG6EhL/jpZlSc+NFPb09qV+rwPLg+EsjMwkh3h+d/Q8g7n13Ad4dEf0EEorBQ6A Lh9DN1XAnETficAw9YRmcbRsbCxtE1v55G+YEzal6fq/+HhMaqqHgw2ICtZ5pX4YHfZu Qbrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="bVaKUBw/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l38si13323459plb.48.2018.12.11.09.32.32; Tue, 11 Dec 2018 09:32:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="bVaKUBw/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728473AbeLKPrH (ORCPT + 99 others); Tue, 11 Dec 2018 10:47:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:35508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728458AbeLKPrF (ORCPT ); Tue, 11 Dec 2018 10:47:05 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4E3502133F; Tue, 11 Dec 2018 15:47:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544543224; bh=UcY9bugxz+DHqZpQVPXsVM+fY6aWZ+XYkvmPCkEqUBI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bVaKUBw/CRkRzAYjHiWJWvPaw4hrqiZXEwCTqV+m2kL5kpXjD4jbwpiOpUS4X9pt0 uw++BzhpX6kdpfxRd1P/g9EV1BJe/tH43KJi14F5Gz0KHCTzoRstdL3J/e4wGYBCHo drv/Dhqcm7TTOABUFUiiARKXWpjlZa1otCAyiJFQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sudarsana Reddy Kalluru , Michal Kalderon , "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 61/91] bnx2x: Assign unique DMAE channel number for FW DMAE transactions. Date: Tue, 11 Dec 2018 16:41:20 +0100 Message-Id: <20181211151611.020726539@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181211151606.026852373@linuxfoundation.org> References: <20181211151606.026852373@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 77e461d14ed141253573eeeb4d34eccc51e38328 ] Driver assigns DMAE channel 0 for FW as part of START_RAMROD command. FW uses this channel for DMAE operations (e.g., TIME_SYNC implementation). Driver also uses the same channel 0 for DMAE operations for some of the PFs (e.g., PF0 on Port0). This could lead to concurrent access to the DMAE channel by FW and driver which is not legal. Hence need to assign unique DMAE id for FW. Currently following DMAE channels are used by the clients, MFW - OCBB/OCSD functionality uses DMAE channel 14/15 Driver 0-3 and 8-11 (for PF dmae operations) 4 and 12 (for stats requests) Assigning unique dmae_id '13' to the FW. Changes from previous version: ------------------------------ v2: Incorporated the review comments. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 7 +++++++ drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h index 1ea068815419..2491cdc2535c 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h @@ -2291,6 +2291,13 @@ void bnx2x_igu_clear_sb_gen(struct bnx2x *bp, u8 func, u8 idu_sb_id, #define PMF_DMAE_C(bp) (BP_PORT(bp) * MAX_DMAE_C_PER_PORT + \ E1HVN_MAX) +/* Following is the DMAE channel number allocation for the clients. + * MFW: OCBB/OCSD implementations use DMAE channels 14/15 respectively. + * Driver: 0-3 and 8-11 (for PF dmae operations) + * 4 and 12 (for stats requests) + */ +#define BNX2X_FW_DMAE_C 13 /* Channel for FW DMAE operations */ + /* PCIE link and speed */ #define PCICFG_LINK_WIDTH 0x1f00000 #define PCICFG_LINK_WIDTH_SHIFT 20 diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c index ff702a707a91..343e3366d751 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c @@ -5931,6 +5931,7 @@ static inline int bnx2x_func_send_start(struct bnx2x *bp, rdata->sd_vlan_tag = cpu_to_le16(start_params->sd_vlan_tag); rdata->path_id = BP_PATH(bp); rdata->network_cos_mode = start_params->network_cos_mode; + rdata->dmae_cmd_id = BNX2X_FW_DMAE_C; rdata->vxlan_dst_port = cpu_to_le16(start_params->vxlan_dst_port); rdata->geneve_dst_port = cpu_to_le16(start_params->geneve_dst_port); -- 2.19.1