From patchwork Sat Jul 13 23:43:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 13732555 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB67516C69E for ; Sat, 13 Jul 2024 23:44:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720914252; cv=none; b=r2Ai8s1o/AMTy3SAX/8yQLWnCN6u1YAkY47ZwdA9jBGbmNrMIF6aE5bKJibhXH0YvBFZqL+Qg0J+Jr1eWTPE5ldcfCNtdqpNZN8D3xehe+2R2LG8FaCXBpzg0JHPjgjOgpk626rarIscCESrC0L8IgSnCsorDCXcgQ741ootzf4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720914252; c=relaxed/simple; bh=TYnk3Sj1dpQqAD8x/xP4qIeRHhQDDYTvUb3mrZCE6mo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nAdwixkWD8ttF4CSxQhTz2THTwf/zmEoF66mT0IgCuZ2TBCnRhBsBUlJZucm6C1ymRZXAK2f75f7b8+zq0xtE0rTSeEkaIomm8qmnjHx0ux5FKWhJI0sS0rdRLhoj3JjvObBO1MiEb65sE5Ji716B94WMTvCnxucQJ2fj02eIBg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=VZ+VBH91; arc=none smtp.client-ip=209.85.222.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="VZ+VBH91" Received: by mail-qk1-f177.google.com with SMTP id af79cd13be357-7a05b7c8e38so197992685a.0 for ; Sat, 13 Jul 2024 16:44:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1720914250; x=1721519050; darn=vger.kernel.org; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=8iSO18cKwRVFZCgDza7Do32W5XQ/XJhhejeUqBJC/pw=; b=VZ+VBH91jqLizYWgfH618iLGV+mfvnRWnZmLEFoFZdSOQsSkUu2wZQ4c9EYaevuDTR dmfHq8HkKOzThJOZt0+A77sdVLmPELfs/lKDFQ7nwVYm0KTA+bkK870+SmC2PXmbBUN+ SPyvUaFtPevzBp40iW7COKuHu0yXt9Rdamzjk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720914250; x=1721519050; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8iSO18cKwRVFZCgDza7Do32W5XQ/XJhhejeUqBJC/pw=; b=h1ELaPGc5MuTDcqpOCDEOwvmXW3NNBoCsdn2HhFq8WshXTnOC+eoC6suqyjx6MkWAt VFnyeXGuzlnrHv6jsCoi3Bt+KB9taPsdYB46cwawjg6sa6lQIYYBx4liHgrrRqIOMvAv Py1xfb4m0nORZJ8AsLkdeFqzrtAZHszFaep58Ata45uJ/NTBcWHY49vEiLtbOBu6K8RC 3D+lK4XRuR6wFOK+FQu7So2e+YYr8lNWf1CuA0MHtepJjXXd9ozcZiYQBebPHO1YHfS/ 5a7xDOa1KWnzMtac9D/1yDW6ntaswI2tQUPg+Xvg2xhDZd7fUZKUgDzSH7RdFooQoUv8 b3+Q== X-Gm-Message-State: AOJu0Yyne6/Eak6rh21Qlxjx3gKLRYDgPxd2XIEp9Qgsv4sz150BrmgL t8x2QsYNv7zfzTmjn0SR1WrhgETrZtWv0lKjaIDGT7mndC54izfoxPm7xVPiWA== X-Google-Smtp-Source: AGHT+IFVlpb09uzgXQbIZ0OpPcJ+hYEQ1B4Ys1MroV59yyldkItk+Ytof+Y6fsV8EBaxTFt7RLurdQ== X-Received: by 2002:ae9:f701:0:b0:79f:15ca:b786 with SMTP id af79cd13be357-79f19a51dbemr1556234085a.16.1720914249723; Sat, 13 Jul 2024 16:44:09 -0700 (PDT) Received: from lvnvda5233.lvn.broadcom.net ([192.19.161.250]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a160bbe6f7sm78124585a.37.2024.07.13.16.44.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Jul 2024 16:44:09 -0700 (PDT) From: Michael Chan To: davem@davemloft.net Cc: netdev@vger.kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, pavan.chebbi@broadcom.com, andrew.gospodarek@broadcom.com, Somnath Kotur , Hongguang Gao Subject: [PATCH net-next 6/9] bnxt_en: Remove register mapping to support INTX Date: Sat, 13 Jul 2024 16:43:36 -0700 Message-ID: <20240713234339.70293-7-michael.chan@broadcom.com> X-Mailer: git-send-email 2.43.4 In-Reply-To: <20240713234339.70293-1-michael.chan@broadcom.com> References: <20240713234339.70293-1-michael.chan@broadcom.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org In legacy INTX mode, a register is mapped so that the INTX handler can read it to determine if the NIC is the source of the interrupt. This and all the related macros are no longer needed. Reviewed-by: Somnath Kotur Reviewed-by: Hongguang Gao Signed-off-by: Michael Chan Reviewed-by: Simon Horman --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 19 ------------------- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 -- 2 files changed, 21 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 39407b7c8958..085dffcbe6f2 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -302,10 +302,6 @@ static bool bnxt_vf_pciid(enum board_idx idx) #define DB_CP_REARM_FLAGS (DB_KEY_CP | DB_IDX_VALID) #define DB_CP_FLAGS (DB_KEY_CP | DB_IDX_VALID | DB_IRQ_DIS) -#define DB_CP_IRQ_DIS_FLAGS (DB_KEY_CP | DB_IRQ_DIS) - -#define BNXT_CP_DB_IRQ_DIS(db) \ - writel(DB_CP_IRQ_DIS_FLAGS, db) #define BNXT_DB_CQ(db, idx) \ writel(DB_CP_FLAGS | DB_RING_IDX(db, idx), (db)->doorbell) @@ -11934,20 +11930,6 @@ static int bnxt_update_phy_setting(struct bnxt *bp) return rc; } -/* Common routine to pre-map certain register block to different GRC window. - * A PF has 16 4K windows and a VF has 4 4K windows. However, only 15 windows - * in PF and 3 windows in VF that can be customized to map in different - * register blocks. - */ -static void bnxt_preset_reg_win(struct bnxt *bp) -{ - if (BNXT_PF(bp)) { - /* CAG registers map to GRC window #4 */ - writel(BNXT_CAG_REG_BASE, - bp->bar0 + BNXT_GRCPF_REG_WINDOW_BASE_OUT + 12); - } -} - static int bnxt_init_dflt_ring_mode(struct bnxt *bp); static int bnxt_reinit_after_abort(struct bnxt *bp) @@ -12052,7 +12034,6 @@ static int __bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init) { int rc = 0; - bnxt_preset_reg_win(bp); netif_carrier_off(bp->dev); if (irq_re_init) { /* Reserve rings now if none were reserved at driver probe. */ diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.h b/drivers/net/ethernet/broadcom/bnxt/bnxt.h index 10e642abacf1..6598c8ef9ccb 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.h +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.h @@ -1754,8 +1754,6 @@ struct bnxt_test_info { #define BNXT_GRCPF_REG_CHIMP_COMM 0x0 #define BNXT_GRCPF_REG_CHIMP_COMM_TRIGGER 0x100 #define BNXT_GRCPF_REG_WINDOW_BASE_OUT 0x400 -#define BNXT_CAG_REG_LEGACY_INT_STATUS 0x4014 -#define BNXT_CAG_REG_BASE 0x300000 #define BNXT_GRC_REG_STATUS_P5 0x520