From patchwork Mon Aug 12 10:34:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Morrow X-Patchwork-Id: 143122 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 AA039457BB; Wed, 14 Aug 2024 09:48:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7BD7E40647; Wed, 14 Aug 2024 09:48:36 +0200 (CEST) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by mails.dpdk.org (Postfix) with ESMTP id 69A014029C for ; Mon, 12 Aug 2024 12:34:18 +0200 (CEST) Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-367990aaef3so2378393f8f.0 for ; Mon, 12 Aug 2024 03:34:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723458857; x=1724063657; 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=yS4swb1ICw+HAVdr8r7wXkNZTnUV6EeMFz4CKOKZxNI=; b=eKxZpy4u0T0L/+0aYWC0pbA+UshoXyoNEyDiIn2/ZDZmPYNUDT1av6RHthAnxs4w17 UrSPvzdN55+ELMDZeD0LsReG2kKMTPzhZp56xGjiNnGbn/+gLgEvTtxyx0jCiDQZCH0K dZggG2ru7diDPB0a1iVI6W5mDy1jW3ggCuXJi/cR7rB2juKvekVnNWOq/n92lQDrGVOA 6UZl8mjFKiLDXkpWe0IpMXWHryB42a9aMWiWje1O5bvBbzHkmDs1pwylI4ILoloyQtt4 nUhPeiN0LtX9QLtnN5uwyp6HWCGPzgO78oJkKCDnRnIOqg5fSMA6X5BqwgdNehsmZH/m 0DOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723458857; x=1724063657; 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=yS4swb1ICw+HAVdr8r7wXkNZTnUV6EeMFz4CKOKZxNI=; b=BPTmc3109lrfPvA8jE1QrpHVd3Bq9/CFb/rNsfcIgqUk1FTp14unDgrnQeHg39kO1c mNmvyBE+NkGK/eLf3QOzStE+mY6RvTXAy68gupx7AUL1IwGjnPOVr276UWk9r8VNNNpr QyVeSGWlxu0714RQdAoCXZJVOYim3Nue5QYpSQfsuGAS2mpq22GfvvEdFtl3DPtqrRio 9DwvZICCE2WopzSk9rfUjR/qyyCZvw1FxL+y8TUbdhfcog8J/U2aU92SS/cOY+GGD8hx RZ4/qTcO8o4dP/Q3O9zvqmSR/q28L4pCxfgyity5NG7TdYUz8tAozwdjflEpPp5weG8w aQdQ== X-Gm-Message-State: AOJu0Yx9Tr1nyZ+pKYLINWnggljHL3VlqazXz9gb7ImdY8XK4W0UTZw5 Py57W+wS7LNh0h2ajedJfnP1mJ6N0k8fLdricEzbvbd673K+TN0hXn2POw== X-Google-Smtp-Source: AGHT+IFZ0yrQT+bpgK5QP2tKaQ7jg4dUhUxwmjmtIAQWgCv9BnU5ElampErhPkqOYyl6UaCWNa3OOA== X-Received: by 2002:a5d:4290:0:b0:368:4e2e:7596 with SMTP id ffacd0b85a97d-36d5efe0a67mr7520372f8f.37.1723458856544; Mon, 12 Aug 2024 03:34:16 -0700 (PDT) Received: from p15v.lan (90.3.169.217.in-addr.arpa. [217.169.3.90]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36e4e51ea09sm7109524f8f.71.2024.08.12.03.34.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Aug 2024 03:34:16 -0700 (PDT) From: Peter Morrow To: dev@dpdk.org Cc: Peter Morrow , Ajit Khaparde , Somnath Kotur Subject: [PATCH v2] net/bnxt: fix issue reading sff8436 sfp eeproms Date: Mon, 12 Aug 2024 11:34:05 +0100 Message-Id: <20240812103405.2041816-1-pdmorrow@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 14 Aug 2024 09:48:35 +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 --- Corrected sob email address. 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;