Public bug reported:

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:ch...@llnl.gov]
Sent: Friday, May 30, 2014 10:26 AM
To: Dande, Shashi
Cc: freeipmi-de...@gnu.org
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);

** Affects: freeipmi (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to freeipmi in Ubuntu.
https://bugs.launchpad.net/bugs/1324992

Title:
  freeipmi patch for HP moonshot ARM cartridges with I2c

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/freeipmi/+bug/1324992/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to