Patchwork sfc: mtd: Use MTD_FAIL_ADDR_UNKNOWN instead of 0xffffffff

login
register
mail settings
Submitter Shmulik Ladkani
Date Feb. 12, 2012, 9:13 a.m.
Message ID <20120212111308.0267f200@pixies.home.jungo.com>
Download mbox | patch
Permalink /patch/140807/
State New
Headers show

Comments

Shmulik Ladkani - Feb. 12, 2012, 9:13 a.m.
From: Shmulik Ladkani <shmulik.ladkani@gmail.com>

As of bb0eb217, MTD_FAIL_ADDR_UNKNOWN should be used to indicate mtd
erase failure not specific to any particular block.

Use MTD_FAIL_ADDR_UNKNOWN instead of 0xffffffff when setting
'erase->fail_addr' in 'efx_mtd_erase()'.

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
---
David Miller - Feb. 13, 2012, 5:51 a.m.
From: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Date: Sun, 12 Feb 2012 11:13:08 +0200

> From: Shmulik Ladkani <shmulik.ladkani@gmail.com>
> 
> As of bb0eb217, MTD_FAIL_ADDR_UNKNOWN should be used to indicate mtd
> erase failure not specific to any particular block.
> 
> Use MTD_FAIL_ADDR_UNKNOWN instead of 0xffffffff when setting
> 'erase->fail_addr' in 'efx_mtd_erase()'.
> 
> Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>

Ben, what would you like me to do with this one?
Artem Bityutskiy - Feb. 13, 2012, 7:44 a.m.
On Mon, 2012-02-13 at 00:51 -0500, David Miller wrote:
> From: Shmulik Ladkani <shmulik.ladkani@gmail.com>
> Date: Sun, 12 Feb 2012 11:13:08 +0200
> 
> > From: Shmulik Ladkani <shmulik.ladkani@gmail.com>
> > 
> > As of bb0eb217, MTD_FAIL_ADDR_UNKNOWN should be used to indicate mtd
> > erase failure not specific to any particular block.
> > 
> > Use MTD_FAIL_ADDR_UNKNOWN instead of 0xffffffff when setting
> > 'erase->fail_addr' in 'efx_mtd_erase()'.
> > 
> > Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
> 
> Ben, what would you like me to do with this one?

Please, do nothing if you can, we'll handle this through the MTD tree,
thanks.
Ben Hutchings - Feb. 13, 2012, 4:15 p.m.
On Sun, 2012-02-12 at 11:13 +0200, Shmulik Ladkani wrote:
> From: Shmulik Ladkani <shmulik.ladkani@gmail.com>
> 
> As of bb0eb217, MTD_FAIL_ADDR_UNKNOWN should be used to indicate mtd
> erase failure not specific to any particular block.
> 
> Use MTD_FAIL_ADDR_UNKNOWN instead of 0xffffffff when setting
> 'erase->fail_addr' in 'efx_mtd_erase()'.
> 
> Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>

> ---
> diff --git a/drivers/net/ethernet/sfc/mtd.c b/drivers/net/ethernet/sfc/mtd.c
> index 6622eca..c44a03e 100644
> --- a/drivers/net/ethernet/sfc/mtd.c
> +++ b/drivers/net/ethernet/sfc/mtd.c
> @@ -193,7 +193,7 @@ static int efx_mtd_erase(struct mtd_info *mtd, struct erase_info *erase)
>  		erase->state = MTD_ERASE_DONE;
>  	} else {
>  		erase->state = MTD_ERASE_FAILED;
> -		erase->fail_addr = 0xffffffff;
> +		erase->fail_addr = MTD_FAIL_ADDR_UNKNOWN;
>  	}
>  	mtd_erase_callback(erase);
>  	return rc;
Artem Bityutskiy - Feb. 13, 2012, 4:56 p.m.
On Mon, 2012-02-13 at 16:15 +0000, Ben Hutchings wrote:
> On Sun, 2012-02-12 at 11:13 +0200, Shmulik Ladkani wrote:
> > From: Shmulik Ladkani <shmulik.ladkani@gmail.com>
> > 
> > As of bb0eb217, MTD_FAIL_ADDR_UNKNOWN should be used to indicate mtd
> > erase failure not specific to any particular block.
> > 
> > Use MTD_FAIL_ADDR_UNKNOWN instead of 0xffffffff when setting
> > 'erase->fail_addr' in 'efx_mtd_erase()'.
> > 
> > Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
> Acked-by: Ben Hutchings <bhutchings@solarflare.com>

OK, pushed to l2-mtd.git with this ack, thanks!

Patch

diff --git a/drivers/net/ethernet/sfc/mtd.c b/drivers/net/ethernet/sfc/mtd.c
index 6622eca..c44a03e 100644
--- a/drivers/net/ethernet/sfc/mtd.c
+++ b/drivers/net/ethernet/sfc/mtd.c
@@ -193,7 +193,7 @@  static int efx_mtd_erase(struct mtd_info *mtd, struct erase_info *erase)
 		erase->state = MTD_ERASE_DONE;
 	} else {
 		erase->state = MTD_ERASE_FAILED;
-		erase->fail_addr = 0xffffffff;
+		erase->fail_addr = MTD_FAIL_ADDR_UNKNOWN;
 	}
 	mtd_erase_callback(erase);
 	return rc;