From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id C8EBEAC1936 for ; Thu, 14 Dec 2023 23:25:12 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=i+U0aCl5JJbGemCfGdtAU26MYbybnmeRo0HYcv0NRyo=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1702596311; v=1; b=dPOMslRNClFe+huu31jc0+TljYCc2lFpJNBHMgvuQMJweGDTrd6olotMWS/eGOtwcFWhI4uw kY/+moxM7b0p05B24TEfTSU8EAktv2Sh06Z48xIWBz6Nopwfpu1GwQNBWSRqvDMRDSSy1UOCXH4 qyn81/CnAokF3D0knEzWu46Q= X-Received: by 127.0.0.2 with SMTP id yhJLYY7687511xPzJCDkbHKY; Thu, 14 Dec 2023 15:25:11 -0800 X-Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by mx.groups.io with SMTP id smtpd.web10.44680.1702596309112631012 for ; Thu, 14 Dec 2023 15:25:09 -0800 X-Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-50bf8843a6fso62183e87.0 for ; Thu, 14 Dec 2023 15:25:08 -0800 (PST) X-Gm-Message-State: LzuyvjdqFCDzUdpO7zRtztrox7686176AA= X-Google-Smtp-Source: AGHT+IGZSx6rJQ0Vo5IcbLqFBmXxJkKTig4n9J7CKLYiDaQVda/EHG/gNSYw1Rpr1DcSLAuXxUojdw== X-Received: by 2002:a05:6512:1318:b0:50b:bcd6:8ea2 with SMTP id x24-20020a056512131800b0050bbcd68ea2mr7512525lfu.4.1702596307125; Thu, 14 Dec 2023 15:25:07 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id j24-20020ac24558000000b0050bfe5815e7sm1973119lfm.165.2023.12.14.15.25.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 14 Dec 2023 15:25:06 -0800 (PST) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com, Mike Maslenkin Subject: [edk2-devel] [PATCH v2 07/14] RedfishPkg: add proper initialization of IPMI request Date: Fri, 15 Dec 2023 02:24:51 +0300 Message-Id: <20231214232458.4636-8-mike.maslenkin@gmail.com> In-Reply-To: <20231214232458.4636-1-mike.maslenkin@gmail.com> References: <20231214232458.4636-1-mike.maslenkin@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=dPOMslRN; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io All fields of IPMI_CHANNEL_INFO_CHANNEL_NUMBER union must be initialized to avoid error condition on BMC side. Cc: Abner Chang Cc: Nickle Wang Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin --- .../PlatformHostInterfaceBmcUsbNicLib.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformH= ostInterfaceBmcUsbNicLib.c b/RedfishPkg/Library/PlatformHostInterfaceBmcUsb= NicLib/PlatformHostInterfaceBmcUsbNicLib.c index 7f295fe7f1c0..c73e76df5791 100644 --- a/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInte= rfaceBmcUsbNicLib.c +++ b/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInte= rfaceBmcUsbNicLib.c @@ -616,9 +616,10 @@ HostInterfaceIpmiCheckMacAddress ( }=0D =0D // Initial the get MAC address request.=0D - GetLanConfigReq.SetSelector =3D 0;=0D - GetLanConfigReq.BlockSelector =3D 0;=0D - GetLanConfigReq.ParameterSelector =3D IpmiLanMacAddress;=0D + GetLanConfigReq.ChannelNumber.Uint8 =3D 0;=0D + GetLanConfigReq.SetSelector =3D 0;=0D + GetLanConfigReq.BlockSelector =3D 0;=0D + GetLanConfigReq.ParameterSelector =3D IpmiLanMacAddress;=0D =0D ExitStatus =3D EFI_NOT_FOUND;=0D for (ChannelNum =3D IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_1;=0D @@ -640,6 +641,7 @@ HostInterfaceIpmiCheckMacAddress ( } else {=0D DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, " No cached IPMI LAN info\n")= );=0D DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, " Send NetFn =3D App, Command= =3D 0x42 to channel %d\n", ChannelNum));=0D + GetChanelInfoRequest.ChannelNumber.Uint8 =3D 0;=0D GetChanelInfoRequest.ChannelNumber.Bits.ChannelNo =3D (UINT8)Channel= Num;=0D Status =3D IpmiGetChannel= Info (=0D &GetChanelInfo= Request,=0D --=20 2.32.0 (Apple Git-132) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112556): https://edk2.groups.io/g/devel/message/112556 Mute This Topic: https://groups.io/mt/103181042/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-