On Mon, Mar 01, 2010 at 03:41:57PM -0700, dann frazier wrote:
> I've been debugging an issue where it looks like a threshold mask is
> getting read in incorrectly.
>
> I have the following raw SDR:
>
> 00000760 1f 00 51 01 3b 20 00 1d 07 01 23 c3 03 09 00 00 |..Q.; ....#.....|
> 00000770 00 00 03 00 00 06 00 00 02 00 00 00 00 00 02 00 |................|
> 00000780 1e 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 cb |................|
> 00000790 50 6f 77 65 72 20 4d 65 74 65 72 00 00 00 00 00 |Power Meter.....|
>
> Byte 19 (Settable Threshold Mask) = 0x03
> Byte 20 (Readable Threshold Mask) = 0x00
>
> However, after parsing this sdr, ipmitool is seeing bits set in the Readable
> Threshold Mask. I verified that w/ the following patch:
>
> --- lib/ipmi_sdr.c.orig 2010-03-01 15:47:05.000000000 -0700
> +++ lib/ipmi_sdr.c 2010-03-01 15:47:09.000000000 -0700
> @@ -2472,6 +2472,8 @@ ipmi_sdr_print_sdr(struct ipmi_intf *int
> case SDR_RECORD_TYPE_FULL_SENSOR:
> sdrr->record.full =
> (struct sdr_record_full_sensor *) rec;
> + printf("Readable Threshold Mask LC is %x\n",
> + sdrr->record.full->mask.type.threshold.read.lcr);
> break;
> case SDR_RECORD_TYPE_COMPACT_SENSOR:
> sdrr->record.compact =
>
>
> Which outputs "Readable Threshold Mask LC is 1" for the sensor in question.
>
> This seems to be related to the use of uint16_t as the type, though I can't
> put my finger on exactly why. The patch below appears to fix it for me.
> fyi, my patch basically looks like a revert of this one:
>
> http://bit.ly/c539td
I think I've found the problem - it looks like the conversion to
uint16_t also should've swapped the bytes in little endian mode.
I've added an issue to the bug tracker (ID: 2962905) for this
including patches for two different ways to address this. One that
retains uint16_t and fixes little endia mode, and another that reverts
back to uint8_t mode.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ipmitool-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel