Re: [PATCH 2/3] mtd: peb: Do not mark as bad in mtd_peb_torture()

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

 



Hello Sascha,

On 15/7/19 15:54, Sascha Hauer wrote:
> diff --git a/common/state/backend_bucket_circular.c b/common/state/backend_bucket_circular.c
> index 4676730d05..9c106b7b63 100644
> --- a/common/state/backend_bucket_circular.c
> +++ b/common/state/backend_bucket_circular.c
> @@ -95,6 +95,7 @@ static int state_mtd_peb_read(struct state_backend_storage_bucket_circular *circ
>  	if (ret == -EBADMSG) {
>  		ret = mtd_peb_torture(circ->mtd, circ->eraseblock);
>  		if (ret == -EIO) {
> +			mtd_peb_mark_bad(mtd, circ->eraseblock);

There's no `mtd' in this scope. Do you mean `circ->mtd'?

>  			dev_err(circ->dev, "Tortured eraseblock failed and is marked bad now, PEB %u\n",
>  				circ->eraseblock);
>  			return -EIO;
> @@ -132,6 +133,7 @@ static int state_mtd_peb_write(struct state_backend_storage_bucket_circular *cir
>  	if (ret == -EBADMSG) {
>  		ret = mtd_peb_torture(circ->mtd, circ->eraseblock);
>  		if (ret == -EIO) {
> +			mtd_peb_mark_bad(mtd, circ->eraseblock);

Likewise.

>  			dev_err(circ->dev, "Tortured eraseblock failed and is marked bad now, PEB %u\n",
>  				circ->eraseblock);
>  			return -EIO;

Thanks,
Ahmad

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



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

  Powered by Linux