Hi Jean-Michel,

Thanks for committing the LAN patch! I've checked the committed code and everything looks fine to me.

Please find the updated patch for HPM.1 in the attached.

Regards,
Dmitry

Audet, Jean-Michel wrote:
Hi Dmitry,
        I just commited the hpm patch from Radisys.  You can know generate your 
patch and resend me the new one.

  I just also commit your lan plugin double bridge modifications to the CVS.  
Please make sure that everything is OK.

It's compiling and it looks like it working but please take a closer look.

Let me know.
Jean-Michel Audet
Kontron Canada

-----Message d'origine-----
De : Dmitry Konyshev [mailto:[EMAIL PROTECTED] Envoye' : Monday, July 09, 2007 7:33 AM
A` : Audet, Jean-Michel
Cc : ipmitool-devel@lists.sourceforge.net
Objet : Re: [Ipmitool-devel] patch for HPM.1 implementation (ipmi_hpmfwupg.c)

Hi Jean-Michel,

It's fine for us to regenerate the patch once the HPM.1 source code in CVS has been updated. Please let me know when you've committed the Radisys's patch.

Could you please let us also know about your intentions regarding the other our patch for the LAN plugin?

Regards,
Dmitry

Audet, Jean-Michel wrote:
Hi again, I do have looked at the patch that you submit. To be honest, we were planning to commit a HPM patch next week (from a Radisys Inc. patch submitted) and it looks like there is conflict on some section.
The possible conflict is most probably with this section:

- Handling of the long response option of the Upload Firmware Block command is implemented.

I will commit the changes next week.  Could it be possible for you to check 
your patch against next week commit and resubmit the patch after?

And yes, I do have made the changes for double bridge LAN on the IPMI IOL 2.0 
only.  I will test it and surely commit this patch next week too.

Thanks and let me know.

Jean-Michel Audet
Kontron Canada.


-----Message d'origine-----
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Dmitry Konyshev
Envoye' : Friday, July 06, 2007 10:44 AM
A` : ipmitool-devel@lists.sourceforge.net
Objet : [Ipmitool-devel] patch for HPM.1 implementation (ipmi_hpmfwupg.c)

Hi All,

Please find in the attached the patch for HPM.1 functionality of ipmitool.

The patch includes the following fixes and improvements:

- The length of the Upload Firmware Block command is shrunk to conform to the IPMI-defined maximum for non-bridged messages (32 bytes) when sent via KCS interface.

- Double bridging via LAN is taken into account when calculating the maximum Upload Firmware Block command length.

- Handling of the long response option of the Upload Firmware Block command is implemented.

- The Component parameter of the Finish Firmware Upload command is changed from component mask to component ID to conform to the HPM.1 specification.

- The Rollback Override parameter of the Activate Firmware command is implemented. The hpm activate command-line parameter is extended with optional "norollback" parameter.

- A bug that prevented from usage of multiple components in a single upgrade image is fixed.

- Garbage in output of the component's description property is eliminated.

Regards,
Dmitry



Index: lib/ipmi_hpmfwupg.c
===================================================================
RCS file: /cvsroot/ipmitool/ipmitool/lib/ipmi_hpmfwupg.c,v
retrieving revision 1.12
diff -p -u -r1.12 ipmi_hpmfwupg.c
--- lib/ipmi_hpmfwupg.c 9 Jul 2007 19:59:22 -0000       1.12
+++ lib/ipmi_hpmfwupg.c 11 Jul 2007 07:39:25 -0000
@@ -445,8 +445,8 @@ struct HpmfwupgInitiateUpgradeActionCtx
  */
 
 #define HPMFWUPG_SEND_DATA_COUNT_MAX   32
-#define HPMFWUPG_SEND_DATA_COUNT_KCS   HPMFWUPG_SEND_DATA_COUNT_MAX
-#define HPMFWUPG_SEND_DATA_COUNT_LAN   26
+#define HPMFWUPG_SEND_DATA_COUNT_KCS   30
+#define HPMFWUPG_SEND_DATA_COUNT_LAN   25
 #define HPMFWUPG_SEND_DATA_COUNT_IPMB  26
 #define HPMFWUPG_SEND_DATA_COUNT_IPMBL 26
 
@@ -478,7 +478,7 @@ struct HpmfwupgUploadFirmwareBlockCtx
 struct HpmfwupgFinishFirmwareUploadReq
 {
    unsigned char picmgId;
-   struct HpmfwupgComponentBitMask componentsMask;
+   unsigned char componentId;
    unsigned char imageLength[HPMFWUPG_IMAGE_SIZE_BYTE_COUNT];
 }__attribute__ ((packed));
 
@@ -500,6 +500,7 @@ struct HpmfwupgFinishFirmwareUploadCtx
 struct HpmfwupgActivateFirmwareReq
 {
    unsigned char picmgId;
+   unsigned char rollback_override;
 }__attribute__ ((packed));
 
 struct HpmfwupgActivateFirmwareResp
@@ -1046,12 +1047,12 @@ int HpmfwupgTargetCheck(struct ipmi_intf
                 if (rc != HPMFWUPG_SUCCESS)
                 {
                     lprintf(LOG_NOTICE,"Get CompRollbackVersion Failed for 
component Id %d\n",componentId);
-                    return rc;
-                }
-                gVersionInfo[componentId].rollbackMajor = getCompProp.resp
-                    .Response.rollbackFwVersionResp.rollbackFwVersion[0];
-                gVersionInfo[componentId].rollbackMinor = getCompProp.resp
-                    .Response.rollbackFwVersionResp.rollbackFwVersion[1];
+                } else {
+                    gVersionInfo[componentId].rollbackMajor = getCompProp.resp
+                      .Response.rollbackFwVersionResp.rollbackFwVersion[0];
+                    gVersionInfo[componentId].rollbackMinor = getCompProp.resp
+                      .Response.rollbackFwVersionResp.rollbackFwVersion[1];
+                }
                 mode |= ROLLBACK_VER;
             }
 
@@ -1853,7 +1854,9 @@ int HpmfwupgUpgradeStage(struct ipmi_int
                   /* Find max buffer length according the connection 
parameters */
                   if ( strstr(intf->name,"lan") != NULL )
                   {
-                     bufLength = HPMFWUPG_SEND_DATA_COUNT_LAN;
+                     bufLength = HPMFWUPG_SEND_DATA_COUNT_LAN - 2;
+                     if ( intf->transit_addr != intf->my_addr && 
intf->transit_addr != 0 )
+                         bufLength -= 8;
                   }
                   else
                   {
@@ -1866,7 +1869,7 @@ int HpmfwupgUpgradeStage(struct ipmi_int
                         )
                      )
                      {
-                        bufLength = HPMFWUPG_SEND_DATA_COUNT_KCS;
+                        bufLength = HPMFWUPG_SEND_DATA_COUNT_KCS - 2;
                      }
                      else
                      {
@@ -2036,7 +2039,7 @@ int HpmfwupgUpgradeStage(struct ipmi_int
                    {
                      /* Send finish component */
                      /* Set image length */
-                     finishCmd.req.componentsMask = pActionRecord->components;
+                     finishCmd.req.componentId = componentId;
                      /* We need to send the actual data that is sent 
                       * not the comlete firmware image length   
                       */
@@ -2627,7 +2630,8 @@ int HpmfwupgActivateFirmware(struct ipmi
    req.msg.netfn    = IPMI_NETFN_PICMG;
        req.msg.cmd      = HPMFWUPG_ACTIVATE_FIRMWARE;
        req.msg.data     = (unsigned char*)&pCtx->req;
-       req.msg.data_len = sizeof(struct HpmfwupgActivateFirmwareReq);
+        req.msg.data_len = sizeof(struct HpmfwupgActivateFirmwareReq) -
+          (!pCtx->req.rollback_override ? 1 : 0);
       
    rsp = HpmfwupgSendCmd(intf, req, pFwupgCtx); 
    
@@ -3014,7 +3018,8 @@ struct ipmi_rs * HpmfwupgSendCmd(struct 
                req.msg.netfn == IPMI_NETFN_PICMG
                &&
                ( req.msg.cmd == HPMFWUPG_ACTIVATE_FIRMWARE ||
-                 req.msg.cmd == HPMFWUPG_MANUAL_FIRMWARE_ROLLBACK )
+                 req.msg.cmd == HPMFWUPG_MANUAL_FIRMWARE_ROLLBACK ||
+                 req.msg.cmd == HPMFWUPG_GET_UPGRADE_STATUS )
                  
             )
             {
@@ -3033,8 +3038,7 @@ struct ipmi_rs * HpmfwupgSendCmd(struct 
             ( 
                req.msg.netfn == IPMI_NETFN_PICMG
                &&
-               ( req.msg.cmd == HPMFWUPG_GET_UPGRADE_STATUS ||
-                 req.msg.cmd == HPMFWUPG_QUERY_ROLLBACK_STATUS )
+               ( req.msg.cmd == HPMFWUPG_QUERY_ROLLBACK_STATUS )
             )
             {
                /* 
@@ -3190,7 +3194,7 @@ static void HpmfwupgPrintUsage(void)
    lprintf(LOG_NOTICE,"upgrade <file> activate - Upgrade the firmware using a 
valid HPM.1 image <file>");
    lprintf(LOG_NOTICE,"                          If activate is specified, 
activate new firmware rigth");
    lprintf(LOG_NOTICE,"                          away");
-   lprintf(LOG_NOTICE,"activate                - Activate the newly uploaded 
firmware");
+   lprintf(LOG_NOTICE,"activate [norollback]   - Activate the newly uploaded 
firmware");
    lprintf(LOG_NOTICE,"targetcap               - Get the target upgrade 
capabilities");
    lprintf(LOG_NOTICE,"compprop <id> <select>  - Get the specified component 
properties");
    lprintf(LOG_NOTICE,"                          Valid component <ID> 0-7 ");
@@ -3298,9 +3302,13 @@ int ipmi_hpmfwupg_main(struct ipmi_intf 
       }
    }
     
-   else if ( (argc == 1) && (strcmp(argv[0], "activate") == 0) )
+   else if ( (argc >= 1) && (strcmp(argv[0], "activate") == 0) )
    {
       struct HpmfwupgActivateFirmwareCtx cmdCtx;
+      if ( (argc == 2) && (strcmp(argv[1], "norollback") == 0) )
+         cmdCtx.req.rollback_override = 1;
+      else
+         cmdCtx.req.rollback_override = 0;
       rc = HpmfwupgActivateFirmware(intf, &cmdCtx, NULL);
    }
    else if ( (argc == 1) && (strcmp(argv[0], "targetcap") == 0) )
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Ipmitool-devel mailing list
Ipmitool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel

Reply via email to