Hi Guilherme,

Thanks for your pointing out this! I think I were thinking about byte_count
when I calculated it since byte_count is 2A0.

Thanks,
Wendy



From:   "Guilherme G. Piccoli" <gpicc...@linux.vnet.ibm.com>
To:     wenxi...@linux.vnet.ibm.com
Cc:     iprdd-devel@lists.sourceforge.net
Date:   03/02/2017 01:20 PM
Subject:        Re: [Iprdd-devel] [PATCH] ipruitls: Add reserved bits in page 2
            of ses device



On 03/02/2017 02:20 PM, wenxi...@linux.vnet.ibm.com wrote:
> From: Wen Xiong <wenxi...@linux.vnet.ibm.com>
>
> The length of Page 2 with Slider SFF is 0x2A4. Add reserved bits in
> structure of Page 2.
>
> Signed-off-by: Wen Xiong <wenxi...@linux.vnet.ibm.com>
> ---
>  iprlib.h |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/iprlib.h b/iprlib.h
> index 1e32a1b..54a78ea 100644
> --- a/iprlib.h
> +++ b/iprlib.h
> @@ -2646,6 +2646,7 @@ struct ipr_encl_status_ctl_pg {
>                u16 byte_count;
>                u8 reserved1[4];
>                struct ipr_drive_elem_status elem_status
[IPR_NUM_DRIVE_ELEM_STATUS_ENTRIES];
> +              u8 reserved2[0x1d0];            /*rest of page 2*/

Wendy, probably a silly question (sorry!): why 0x1d0?
The whole structure needs to allocate 0x2A4 (676 in decimal) bytes, right?

IPR_NUM_DRIVE_ELEM_STATUS_ENTRIES == 50 and, if I did the math correctly
(possibly not heheh), sizeof(struct ipr_drive_elem_status) is 4 bytes.
So, in the end, the current size of the structure ipr_encl_status is:

50x4 + 8 == 208 bytes, or 0xD0 in hex.

So, 0x2A4 - 0xD0 == 0x1D4.

Perhaps my math has issues, sorry if it's the case.
Thanks,


Guilherme

>  };
>
>  struct ipr_ses_config_pg {
>


------------------------------------------------------------------------------

Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Iprdd-devel mailing list
Iprdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iprdd-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Iprdd-devel mailing list
Iprdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iprdd-devel

Reply via email to