From patchwork Fri Aug 9 10:21:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Morrow X-Patchwork-Id: 143049 X-Patchwork-Delegate: ajit.khaparde@broadcom.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3EDEB45778; Fri, 9 Aug 2024 13:05:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20B9942DC9; Fri, 9 Aug 2024 13:05:31 +0200 (CEST) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by mails.dpdk.org (Postfix) with ESMTP id 8D721402C4 for ; Fri, 9 Aug 2024 12:21:43 +0200 (CEST) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4266f3e0df8so12710645e9.2 for ; Fri, 09 Aug 2024 03:21:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723198902; x=1723803702; darn=dpdk.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=st0CzMzdgoNMBKvnrU9cU/QoaGyRnvWcclhxvFoobzU=; b=ONiY4X8VKnt1I71UGkVWnvyePz5+E4LMhPyWBT13ZQDShiIu46cmZPWgvTM72Yvxm1 iEXz1BPMxvLcVQaVkKVOFqwfrYovwYZMhiY7eD4ukApdaMbZZ3l625SK8t+bZAZmGj+W /AHyJQPpYPES/zD37Ed8gKw8QuwEtRyqL6bjhFeiJKWZMRyrRXduHZBq9EToU12RHZ7f WJEDgfzrBADMPnLl1f1WU9G4CQVek6UHocpvT6Yx6sZkUiUj7sAL2heqsCsW16XtE7VS StPzpJnKiQRples2B+yObC4ipmxRA+u/3pNV/KmVSFRjvLl4tCpaWUCw/Jmg9LGsmszG 9nLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723198902; x=1723803702; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=st0CzMzdgoNMBKvnrU9cU/QoaGyRnvWcclhxvFoobzU=; b=RYAfLwT169OoE9j6RjhBlrnBrS6J1KTwQXI+90F+0sNtjE1fPY1xGlfAksDvtDHvAa 9Jfh5ktq+Tjt9TOgykvvQ1LkF5UGuTvTjuBC4OuBYo/HOeuOjs1h8M55qnV35UZCZzFy /ATH//fDlDxhomQK7B6fLWYZNB2tjrGmHM87zMw9Zb/d6pHztuHf36ngcqUIB6mEuOGH QJ5BtlWxff3UaE/JTcZB5W38UNraErmRhuqub8m4Jx1Xj7hSNfOzdDMY3ANH5WbhpM57 2ugWxX0Tb7yH9iD8ttUk/vI/Q1NWAsNSoqnkxhVKJ27jz6iL5Mn14ZCycVKp17XCSW5s 9cVw== X-Gm-Message-State: AOJu0YxTMBbfATXNJ/sQQC/EPBeodMjny/UGCDdY365/mDI3D03j7Gpp bMVQI9yF+EAZFbBjAPs6t2GqCqxxRqzJCisUQXqip0cQJe+rfjX3h/tWyQ== X-Google-Smtp-Source: AGHT+IFx5LENusLbvTQpeODggLlAJ96uLVom+d8YZ/3AmY5UsKufVYprKSp/nb89twYDL1Xdx+XmFw== X-Received: by 2002:a05:600c:3555:b0:426:5269:983a with SMTP id 5b1f17b1804b1-429c3a1531cmr8395595e9.8.1723198901614; Fri, 09 Aug 2024 03:21:41 -0700 (PDT) Received: from p15v.lan (90.3.169.217.in-addr.arpa. [217.169.3.90]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4290c79f345sm67781955e9.39.2024.08.09.03.21.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Aug 2024 03:21:41 -0700 (PDT) From: Peter Morrow To: dev@dpdk.org Cc: Peter Morrow , Peter Morrow , Ajit Khaparde , Somnath Kotur Subject: [PATCH] net/bnxt: fix issue reading sff8436 sfp eeproms Date: Fri, 9 Aug 2024 11:21:15 +0100 Message-Id: <20240809102115.629429-1-pdmorrow@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 09 Aug 2024 13:05:29 +0200 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Peter Morrow If a SFP which supports SFF-8436 is present then currently the DDM information present in the eeprom is not read. Furthermore bnxt_get_module_eeprom() will return -EINVAL for these eeproms since the length of these eeproms is 512 bytes but we are only ever selecting 2 pages (256 bytes) to read. Signed-off-by: Peter Morrow --- drivers/net/bnxt/bnxt_ethdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index e63febe782..8c4608a1b9 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -4130,7 +4130,6 @@ static int bnxt_get_module_eeprom(struct rte_eth_dev *dev, switch (module_info[0]) { case SFF_MODULE_ID_SFP: - module_info[SFF_DIAG_SUPPORT_OFFSET] = 0; if (module_info[SFF_DIAG_SUPPORT_OFFSET]) { pg_addr[2] = I2C_DEV_ADDR_A2; pg_addr[3] = I2C_DEV_ADDR_A2;