As per HP for moonshot arm cartridges freeipmi changes are needed. So this request is to pull the patch from upstream into current version of trusty to support the i2c communication on HP moonshot chassis.
Here are the details.
svn://svn.savannah.gnu.org/freeipmi/trunk
Revision: 10072
Author: chu11
Date: Friday, May 30, 2014 10:21:03 AM
Message:
Retry ssif reads as needed
----
Modified : /trunk/ChangeLog
Modified : /trunk/libfreeipmi/api/ipmi-ssif-driver-api.c
Modified : /trunk/libfreeipmi/api/ipmi-ssif-driver-api.h
I have attached the ChangeLog and patch file for your reference.
-----Original Message-----
From: Al Chu [mailto:<email address hidden>]
Sent: Friday, May 30, 2014 10:26 AM
To: Dande, Shashi
Cc: <email address hidden>
Subject: RE: FreeIPMI Patch Submission
Great. It'll be in the next release of FreeIPMI (1.4.4)
Al
On Thu, 2014-05-29 at 23:32 +0000, Dande, Shashi wrote:
> Hi Al
>
> Here is the updated patch per our conversation today.
>
> Thanks
> Shashi
>
> Index: ipmi-ssif-driver-api.c
> ===================================================================
> --- ipmi-ssif-driver-api.c (revision 10066)
> +++ ipmi-ssif-driver-api.c (working copy)
> @@ -319,7 +319,9 @@
> uint8_t cmd = 0; /* used for debugging */
> uint8_t group_extension = 0; /* used for debugging */
> uint64_t val;
> -
> + struct timespec request, remain;
> + uint8_t retry = IPMI_SSIF_RETRY_DEFAULT;
> +
> assert (ctx
> && ctx->magic == IPMI_CTX_MAGIC
> && ctx->type == IPMI_DEVICE_SSIF
> @@ -350,9 +352,39 @@
> if (_ssif_cmd_write (ctx, cmd, group_extension, obj_cmd_rq) < 0)
> return (-1);
>
> + /******************************************************************************
> + 12.9 SMBus NACKs and Error Recovery:
> + ====================================
> + The BMC can NACK the SMBus host controller if it is not ready to accept a new
> + transaction. Typically, this will be exhibited by the BMC NACK'ing its slave
> + address.
> +
> + If the BMC NACKs a single part transaction, software can simply retry it.
> + If a 'middle' or 'end' transaction is NACK'd, software should not retry the
> + particular but should restart the multi-part read or write from the beginning
> + Start transaction for the transfer.
> +
> + ********************************************************************
> + ***********/
> if (_ssif_cmd_read (ctx, cmd, group_extension, obj_cmd_rs) < 0)
> - return (-1);
> + {
> + while (1)
> + {
> + request.tv_sec = 0;
> + request.tv_nsec = IPMI_SSIF_TIMEOUT_DEFAULT;
> + if (nanosleep (&request, &remain) < 0 )
> + return (-1);
>
> + if (_ssif_cmd_read (ctx, cmd, group_extension, obj_cmd_rs) < 0)
> + {
> + if (retry == 0)
> + return (-1);
> +
> + retry--;
> + }
> + else
> + break;
> + }
> + }
> +
> return (0);
> }
>
> Index: ipmi-ssif-driver-api.h
> ===================================================================
> --- ipmi-ssif-driver-api.h (revision 10066)
> +++ ipmi-ssif-driver-api.h (working copy)
> @@ -23,6 +23,9 @@
> #include <freeipmi/api/ipmi-api.h>
> #include <freeipmi/fiid/fiid.h>
>
> +#define IPMI_SSIF_RETRY_DEFAULT 5
> +#define IPMI_SSIF_TIMEOUT_DEFAULT 20000000 /* 20 ms */
> +
> int api_ssif_cmd (ipmi_ctx_t ctx,
> fiid_obj_t obj_cmd_rq,
> fiid_obj_t obj_cmd_rs);
As per HP for moonshot arm cartridges freeipmi changes are needed. So this request is to pull the patch from upstream into current version of trusty to support the i2c communication on HP moonshot chassis.
Here are the details.
svn://svn. savannah. gnu.org/ freeipmi/ trunk
Revision: 10072 libfreeipmi/ api/ipmi- ssif-driver- api.c libfreeipmi/ api/ipmi- ssif-driver- api.h
Author: chu11
Date: Friday, May 30, 2014 10:21:03 AM
Message:
Retry ssif reads as needed
----
Modified : /trunk/ChangeLog
Modified : /trunk/
Modified : /trunk/
I have attached the ChangeLog and patch file for your reference.
-----Original Message-----
From: Al Chu [mailto:<email address hidden>]
Sent: Friday, May 30, 2014 10:26 AM
To: Dande, Shashi
Cc: <email address hidden>
Subject: RE: FreeIPMI Patch Submission
Great. It'll be in the next release of FreeIPMI (1.4.4)
Al
On Thu, 2014-05-29 at 23:32 +0000, Dande, Shashi wrote: driver- api.c ======= ======= ======= ======= ======= ======= ======= ======= ==== driver- api.c (revision 10066) driver- api.c (working copy) RETRY_DEFAULT; ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ** ======= ======= ======= ======= = ******* ******* ******* ******* ******* ******* ******* ******* ***** TIMEOUT_ DEFAULT; driver- api.h ======= ======= ======= ======= ======= ======= ======= ======= ==== driver- api.h (revision 10066) driver- api.h (working copy) api/ipmi- api.h> fiid/fiid. h> RETRY_DEFAULT 5 TIMEOUT_ DEFAULT 20000000 /* 20 ms */
> Hi Al
>
> Here is the updated patch per our conversation today.
>
> Thanks
> Shashi
>
> Index: ipmi-ssif-
> =======
> --- ipmi-ssif-
> +++ ipmi-ssif-
> @@ -319,7 +319,9 @@
> uint8_t cmd = 0; /* used for debugging */
> uint8_t group_extension = 0; /* used for debugging */
> uint64_t val;
> -
> + struct timespec request, remain;
> + uint8_t retry = IPMI_SSIF_
> +
> assert (ctx
> && ctx->magic == IPMI_CTX_MAGIC
> && ctx->type == IPMI_DEVICE_SSIF
> @@ -350,9 +352,39 @@
> if (_ssif_cmd_write (ctx, cmd, group_extension, obj_cmd_rq) < 0)
> return (-1);
>
> + /******
> + 12.9 SMBus NACKs and Error Recovery:
> + =======
> + The BMC can NACK the SMBus host controller if it is not ready to accept a new
> + transaction. Typically, this will be exhibited by the BMC NACK'ing its slave
> + address.
> +
> + If the BMC NACKs a single part transaction, software can simply retry it.
> + If a 'middle' or 'end' transaction is NACK'd, software should not retry the
> + particular but should restart the multi-part read or write from the beginning
> + Start transaction for the transfer.
> +
> + *******
> + ***********/
> if (_ssif_cmd_read (ctx, cmd, group_extension, obj_cmd_rs) < 0)
> - return (-1);
> + {
> + while (1)
> + {
> + request.tv_sec = 0;
> + request.tv_nsec = IPMI_SSIF_
> + if (nanosleep (&request, &remain) < 0 )
> + return (-1);
>
> + if (_ssif_cmd_read (ctx, cmd, group_extension, obj_cmd_rs) < 0)
> + {
> + if (retry == 0)
> + return (-1);
> +
> + retry--;
> + }
> + else
> + break;
> + }
> + }
> +
> return (0);
> }
>
> Index: ipmi-ssif-
> =======
> --- ipmi-ssif-
> +++ ipmi-ssif-
> @@ -23,6 +23,9 @@
> #include <freeipmi/
> #include <freeipmi/
>
> +#define IPMI_SSIF_
> +#define IPMI_SSIF_
> +
> int api_ssif_cmd (ipmi_ctx_t ctx,
> fiid_obj_t obj_cmd_rq,
> fiid_obj_t obj_cmd_rs);