Re: [PATCH] mmc-utils: Fix reported offset for enhanced user area start address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



+ Chris

On 25 August 2016 at 06:23,  <tomas.melin@xxxxxxxxxxx> wrote:
> Block-addressed devices should have address multiplied with sector size.
>
> Clarify with comment how is_blockaddressed() is calculated.
>
> Signed-off-by: Tomas Melin<tomas.melin@xxxxxxxxxxx>

Chris Ball maintains mmc-utils, you need to send these changes to him.
I have added him on cc this time.

Kind regards
Uffe

> ---
>   mmc_cmds.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mmc_cmds.c b/mmc_cmds.c
> index 295d505..21ddd55 100644
> --- a/mmc_cmds.c
> +++ b/mmc_cmds.c
> @@ -794,7 +794,7 @@ unsigned int get_sector_count(__u8 *ext_csd)
>   int is_blockaddresed(__u8 *ext_csd)
>   {
>       unsigned int sectors = get_sector_count(ext_csd);
> -
> +        /* over 2GiB devices are block-addressed */
>       return (sectors > (2u * 1024 * 1024 * 1024) / 512);
>   }
>
> @@ -1659,7 +1659,7 @@ int do_read_extcsd(int nargs, char **argv)
>           printf("Enhanced User Data Start Address"
>               " [ENH_START_ADDR]: 0x%06x\n", regl);
>           printf(" i.e. %lu bytes offset\n", (is_blockaddresed(ext_csd) ?
> -                1l : 512l) * regl);
> +                512l : 1l) * regl);
>
>           /* A441]: reserved [135] */
>           printf("Bad Block Management mode"
> --
> 2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux