Re: [PATCH] mmc: fix calculation of Max Enhanced Area

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

 



Hi Roland,

On Thu, Mar 23, 2023 at 01:42:46PM +0000, Schoyswohl, Roland wrote:
> According extcsd documentation, the HC_ERASE_GRP_SIZE must be multiplied by
> HC_ERASE_GRP_SIZE and not added.
> 
> Signed-off-by: Roland Schoyswohl roland.schoyswohl@xxxxxxxxxxxxx
> ---
> commands/mmc_extcsd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Your patch has tabs converted to whitespaces so doesn't apply. I fixed
this up manually this time.

Sascha

> 
> diff --git a/commands/mmc_extcsd.c b/commands/mmc_extcsd.c
> index 7ae068348d..f67c48404a 100644
> --- a/commands/mmc_extcsd.c
> +++ b/commands/mmc_extcsd.c
> @@ -1427,7 +1427,7 @@ static int print_field(u8 *reg, int index)
> 
>             case EXT_CSD_MAX_ENH_SIZE_MULT:
>                        tmp = get_field_val(EXT_CSD_HC_WP_GRP_SIZE, 0, 0xFF);
> -                      tmp = tmp + get_field_val(EXT_CSD_HC_ERASE_GRP_SIZE, 0, 0xFF);
> +                      tmp = tmp * get_field_val(EXT_CSD_HC_ERASE_GRP_SIZE, 0, 0xFF);
>                        tmp64 *= tmp;
>                        tmp64 *= SZ_512K;
>                        printf("\tMax Enhanced Area: %llu B\n", tmp64);
> --
> 2.25.1
> 
> 
> Knorr-Bremse GmbH
> FN 38565p, LG Wr. Neustadt
> 
> This transmission is intended solely for the addressee and contains confidential information.
> If you are not the intended recipient, please immediately inform the sender and delete the message and any attachments from your system.
> Furthermore, please do not copy the message or disclose the contents to anyone unless agreed otherwise. To the extent permitted by law we shall in no way be liable for any damages, whatever their nature, arising out of transmission failures, viruses, external influence, delays and the like.
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux