Hey Bala,

How can we go about debugging this?

Al

On Mon, 2008-01-21 at 03:56 -0800, Bala.A wrote:
> Hi Al,
> 
> I think, there is no such device address 42 and 84.  I suspect a bug in
> SSIF device driver code.
> 
> Regards,
> Bala
> 
> >>
> >> [EMAIL PROTECTED]:~# bmc-info --no-probing -D SSIF --driver-address=42
> >> --driver-device=/dev/i2c-0 --register-spacing=1
> >> ipmi-ssif-api-udm.c: 81: ipmi_ssif_cmd_udm: errnum (4): expression
> >> failed
> >> ipmi_cmd_get_device_id: permission denied
> >>
> >> [EMAIL PROTECTED]:~# bmc-info --no-probing -D SSIF --driver-address=84
> >> --driver-device=/dev/i2c-0 --register-spacing=1
> >> ipmi-ssif-api-udm.c: 81: ipmi_ssif_cmd_udm: errnum (4): expression
> >> failed
> >> ipmi_cmd_get_device_id: permission denied
> >
> > Bala, FYI line 81 is a call to 'ipmi_ssif_write'.
> >
> > errnum 4 in the ssif lib is IPMI_SSIF_CTX_ERR_PERMISSION.
> >
> > the errnum seems to be  set via this code chunk:
> >
> >   if (buf_len <= IPMI_I2C_SMBUS_BLOCK_MAX)
> >     {
> >       count = ipmi_ssif_single_part_write (ctx->device_fd,
> >                                            buf,
> >                                            buf_len);
> >     }
> >   else
> >     {
> >       count = ipmi_ssif_multi_part_write (ctx->device_fd,
> >                                           buf,
> >                                           buf_len);
> >     }
> >
> >   if (count < 0)
> >     {
> >       if (errno == EACCES || errno == EPERM)
> >         ctx->errnum = IPMI_SSIF_CTX_ERR_PERMISSION;
> >       else
> >         ERR_LOG(ctx->errnum = IPMI_SSIF_CTX_ERR_SYSTEM_ERROR);
> >       goto cleanup;
> >     }
> >
> > tracing this into the deeper write calls, the errno is coming from the
> > core ioctl() call for ssif.
> >
> > It looks like Chris is root above, so EACCES is not the likely returned
> > errno, EPERM = "Operation Not Permitted" is.  So the question is why is
> > the ioctl not allowed.
> >
> 
-- 
Albert Chu
[EMAIL PROTECTED]
925-422-5311
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory


_______________________________________________
Freeipmi-users mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/freeipmi-users

Reply via email to