mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] commands: ubi: ubiupdatevol: Reduce error code to 0 or 1
@ 2018-01-29 13:04 Daniel Schultz
  2018-01-29 13:04 ` [PATCH 2/3] ARM: configs: am335x_defconfig: Reorder configs Daniel Schultz
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Daniel Schultz @ 2018-01-29 13:04 UTC (permalink / raw)
  To: barebox

do_ubiupdatevol can either return 0 or the ioctl return value. This is
not in conformity with the other ubi comannds return values.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
---
 commands/ubi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/commands/ubi.c b/commands/ubi.c
index 5e27584..de5633c 100644
--- a/commands/ubi.c
+++ b/commands/ubi.c
@@ -82,7 +82,7 @@ error:
 	close(fd_vol);
 error_img:
 	close(fd_img);
-	return ret;
+	return ret ? 1 : 0;
 }
 
 
-- 
2.7.4


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/3] ARM: configs: am335x_defconfig: Reorder configs
  2018-01-29 13:04 [PATCH 1/3] commands: ubi: ubiupdatevol: Reduce error code to 0 or 1 Daniel Schultz
@ 2018-01-29 13:04 ` Daniel Schultz
  2018-01-29 13:04 ` [PATCH 3/3] drivers: mtd: nand: omap: Return stat value Daniel Schultz
  2018-01-30  7:05 ` [PATCH 1/3] commands: ubi: ubiupdatevol: Reduce error code to 0 or 1 Sascha Hauer
  2 siblings, 0 replies; 9+ messages in thread
From: Daniel Schultz @ 2018-01-29 13:04 UTC (permalink / raw)
  To: barebox

These configs were added directly in the config file and not with
menuconfig. Reorder these like menuconfig would place them.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
---
 arch/arm/configs/am335x_defconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/configs/am335x_defconfig b/arch/arm/configs/am335x_defconfig
index 5a236fb..09dde90 100644
--- a/arch/arm/configs/am335x_defconfig
+++ b/arch/arm/configs/am335x_defconfig
@@ -29,12 +29,14 @@ CONFIG_BOOTM_OFTREE=y
 CONFIG_BLSPEC=y
 CONFIG_CONSOLE_ACTIVATE_NONE=y
 CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
+CONFIG_STATE=y
 CONFIG_RESET_SOURCE=y
 CONFIG_DEBUG_INFO=y
 CONFIG_LONGHELP=y
 CONFIG_CMD_IOMEM=y
 CONFIG_CMD_MEMINFO=y
 CONFIG_CMD_ARM_MMUINFO=y
+CONFIG_CMD_MMC_EXTCSD=y
 # CONFIG_CMD_BOOTU is not set
 CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_GO=y
@@ -87,7 +89,6 @@ CONFIG_CMD_OF_DISPLAY_TIMINGS=y
 CONFIG_CMD_OF_FIXUP_STATUS=y
 CONFIG_CMD_OFTREE=y
 CONFIG_CMD_TIME=y
-CONFIG_CMD_MMC_EXTCSD=y
 CONFIG_CMD_STATE=y
 CONFIG_NET=y
 CONFIG_NET_NFS=y
@@ -124,6 +125,7 @@ CONFIG_USB_MUSB_GADGET=y
 CONFIG_MCI=y
 CONFIG_MCI_STARTUP=y
 CONFIG_MCI_OMAP_HSMMC=y
+CONFIG_STATE_DRV=y
 CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_LED_GPIO_OF=y
@@ -143,5 +145,3 @@ CONFIG_FS_FAT_LFN=y
 CONFIG_FS_UBIFS=y
 CONFIG_FS_UBIFS_COMPRESSION_LZO=y
 CONFIG_FS_UBIFS_COMPRESSION_ZLIB=y
-CONFIG_STATE=y
-CONFIG_STATE_DRV=y
-- 
2.7.4


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3/3] drivers: mtd: nand: omap: Return stat value
  2018-01-29 13:04 [PATCH 1/3] commands: ubi: ubiupdatevol: Reduce error code to 0 or 1 Daniel Schultz
  2018-01-29 13:04 ` [PATCH 2/3] ARM: configs: am335x_defconfig: Reorder configs Daniel Schultz
@ 2018-01-29 13:04 ` Daniel Schultz
  2018-01-30  7:11   ` Sascha Hauer
  2018-01-30  7:05 ` [PATCH 1/3] commands: ubi: ubiupdatevol: Reduce error code to 0 or 1 Sascha Hauer
  2 siblings, 1 reply; 9+ messages in thread
From: Daniel Schultz @ 2018-01-29 13:04 UTC (permalink / raw)
  To: barebox

The read page function should return the total count of flipped bits,
otherwise the caller always thinks no bitflip occured.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
---
 drivers/mtd/nand/nand_omap_gpmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/nand_omap_gpmc.c b/drivers/mtd/nand/nand_omap_gpmc.c
index e18ce63..38f4960 100644
--- a/drivers/mtd/nand/nand_omap_gpmc.c
+++ b/drivers/mtd/nand/nand_omap_gpmc.c
@@ -712,7 +712,7 @@ static int omap_gpmc_read_page_bch_rom_mode(struct mtd_info *mtd,
 	else
 		mtd->ecc_stats.corrected += stat;
 
-	return 0;
+	return stat;
 }
 
 static int omap_gpmc_eccmode(struct gpmc_nand_info *oinfo,
-- 
2.7.4


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] commands: ubi: ubiupdatevol: Reduce error code to 0 or 1
  2018-01-29 13:04 [PATCH 1/3] commands: ubi: ubiupdatevol: Reduce error code to 0 or 1 Daniel Schultz
  2018-01-29 13:04 ` [PATCH 2/3] ARM: configs: am335x_defconfig: Reorder configs Daniel Schultz
  2018-01-29 13:04 ` [PATCH 3/3] drivers: mtd: nand: omap: Return stat value Daniel Schultz
@ 2018-01-30  7:05 ` Sascha Hauer
  2018-01-30  7:13   ` Sascha Hauer
  2 siblings, 1 reply; 9+ messages in thread
From: Sascha Hauer @ 2018-01-30  7:05 UTC (permalink / raw)
  To: Daniel Schultz; +Cc: barebox

On Mon, Jan 29, 2018 at 02:04:09PM +0100, Daniel Schultz wrote:
> do_ubiupdatevol can either return 0 or the ioctl return value. This is
> not in conformity with the other ubi comannds return values.
> 
> Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
> ---
>  commands/ubi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/commands/ubi.c b/commands/ubi.c
> index 5e27584..de5633c 100644
> --- a/commands/ubi.c
> +++ b/commands/ubi.c
> @@ -82,7 +82,7 @@ error:
>  	close(fd_vol);
>  error_img:
>  	close(fd_img);
> -	return ret;
> +	return ret ? 1 : 0;
>  }
>  
>  
> -- 
> 2.7.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] drivers: mtd: nand: omap: Return stat value
  2018-01-29 13:04 ` [PATCH 3/3] drivers: mtd: nand: omap: Return stat value Daniel Schultz
@ 2018-01-30  7:11   ` Sascha Hauer
  2018-02-15 12:51     ` Daniel Schultz
  0 siblings, 1 reply; 9+ messages in thread
From: Sascha Hauer @ 2018-01-30  7:11 UTC (permalink / raw)
  To: Daniel Schultz; +Cc: barebox

On Mon, Jan 29, 2018 at 02:04:11PM +0100, Daniel Schultz wrote:
> The read page function should return the total count of flipped bits,
> otherwise the caller always thinks no bitflip occured.
> 
> Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
> ---
>  drivers/mtd/nand/nand_omap_gpmc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/nand_omap_gpmc.c b/drivers/mtd/nand/nand_omap_gpmc.c
> index e18ce63..38f4960 100644
> --- a/drivers/mtd/nand/nand_omap_gpmc.c
> +++ b/drivers/mtd/nand/nand_omap_gpmc.c
> @@ -712,7 +712,7 @@ static int omap_gpmc_read_page_bch_rom_mode(struct mtd_info *mtd,
>  	else
>  		mtd->ecc_stats.corrected += stat;
>  
> -	return 0;
> +	return stat;
>  }

I'm afraid this is not enough. read_page should return the maximum
number of bitflips in any ECC step. You first have to change
omap_correct_bch() so that it returns this number.

Sascha


-- 
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] commands: ubi: ubiupdatevol: Reduce error code to 0 or 1
  2018-01-30  7:05 ` [PATCH 1/3] commands: ubi: ubiupdatevol: Reduce error code to 0 or 1 Sascha Hauer
@ 2018-01-30  7:13   ` Sascha Hauer
  0 siblings, 0 replies; 9+ messages in thread
From: Sascha Hauer @ 2018-01-30  7:13 UTC (permalink / raw)
  To: Daniel Schultz; +Cc: barebox

On Tue, Jan 30, 2018 at 08:05:09AM +0100, Sascha Hauer wrote:
> On Mon, Jan 29, 2018 at 02:04:09PM +0100, Daniel Schultz wrote:
> > do_ubiupdatevol can either return 0 or the ioctl return value. This is
> > not in conformity with the other ubi comannds return values.
> > 
> > Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
> > ---
> >  commands/ubi.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Applied, thanks

I meant I Applied 1 & 2.

Sascha

> 
> Sascha
> 
> > 
> > diff --git a/commands/ubi.c b/commands/ubi.c
> > index 5e27584..de5633c 100644
> > --- a/commands/ubi.c
> > +++ b/commands/ubi.c
> > @@ -82,7 +82,7 @@ error:
> >  	close(fd_vol);
> >  error_img:
> >  	close(fd_img);
> > -	return ret;
> > +	return ret ? 1 : 0;
> >  }
> >  
> >  
> > -- 
> > 2.7.4
> > 
> > 
> > _______________________________________________
> > barebox mailing list
> > barebox@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/barebox
> > 
> 
> -- 
> 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@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] drivers: mtd: nand: omap: Return stat value
  2018-01-30  7:11   ` Sascha Hauer
@ 2018-02-15 12:51     ` Daniel Schultz
  2018-02-16  7:56       ` Sascha Hauer
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Schultz @ 2018-02-15 12:51 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hi Sascha,


On 01/30/2018 08:11 AM, Sascha Hauer wrote:
> On Mon, Jan 29, 2018 at 02:04:11PM +0100, Daniel Schultz wrote:
>> The read page function should return the total count of flipped bits,
>> otherwise the caller always thinks no bitflip occured.
>>
>> Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
>> ---
>>   drivers/mtd/nand/nand_omap_gpmc.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/mtd/nand/nand_omap_gpmc.c b/drivers/mtd/nand/nand_omap_gpmc.c
>> index e18ce63..38f4960 100644
>> --- a/drivers/mtd/nand/nand_omap_gpmc.c
>> +++ b/drivers/mtd/nand/nand_omap_gpmc.c
>> @@ -712,7 +712,7 @@ static int omap_gpmc_read_page_bch_rom_mode(struct mtd_info *mtd,
>>   	else
>>   		mtd->ecc_stats.corrected += stat;
>>   
>> -	return 0;
>> +	return stat;
>>   }
> I'm afraid this is not enough. read_page should return the maximum
> number of bitflips in any ECC step. You first have to change
> omap_correct_bch() so that it returns this number.
ahh, we worked on this problem a half year ago and it seems like three 
patches are missing upstream:

http://lists.infradead.org/pipermail/barebox/2017-June/030385.html
http://lists.infradead.org/pipermail/barebox/2017-June/030384.html
http://lists.infradead.org/pipermail/barebox/2017-June/030355.html

Daniel

> Sascha
>
>

-- 
Mit freundlichen Grüßen,
With best regards,
   Daniel Schultz

- Entwicklung -
Tel.: 	+49 6131 92 21 457
d.schultz@phytec.de
www.phytec.de

Sie finden uns auch auf: Facebook, LinkedIn, Xing, YouTube

PHYTEC Messtechnik GmbH | Robert-Koch-Str. 39 | 55129 Mainz, Germany
Geschäftsführer: Dipl.-Ing. Michael Mitezki, Dipl.-Ing. Bodo Huber |
Handelsregister Mainz HRB 4656 | Finanzamt Mainz-Mitte | St.Nr. 266500608,
DE 149059855
This E-Mail may contain confidential or privileged information. If you are
not the intended recipient (or have received this E-Mail in error) please
notify the sender immediately and destroy this E-Mail. Any unauthorized
copying, disclosure or distribution of the material in this E-Mail is
strictly forbidden.


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] drivers: mtd: nand: omap: Return stat value
  2018-02-15 12:51     ` Daniel Schultz
@ 2018-02-16  7:56       ` Sascha Hauer
  2018-02-23 15:53         ` Daniel Schultz
  0 siblings, 1 reply; 9+ messages in thread
From: Sascha Hauer @ 2018-02-16  7:56 UTC (permalink / raw)
  To: Daniel Schultz; +Cc: barebox

On Thu, Feb 15, 2018 at 01:51:26PM +0100, Daniel Schultz wrote:
> Hi Sascha,
> 
> 
> On 01/30/2018 08:11 AM, Sascha Hauer wrote:
> > On Mon, Jan 29, 2018 at 02:04:11PM +0100, Daniel Schultz wrote:
> > > The read page function should return the total count of flipped bits,
> > > otherwise the caller always thinks no bitflip occured.
> > > 
> > > Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
> > > ---
> > >   drivers/mtd/nand/nand_omap_gpmc.c | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/mtd/nand/nand_omap_gpmc.c b/drivers/mtd/nand/nand_omap_gpmc.c
> > > index e18ce63..38f4960 100644
> > > --- a/drivers/mtd/nand/nand_omap_gpmc.c
> > > +++ b/drivers/mtd/nand/nand_omap_gpmc.c
> > > @@ -712,7 +712,7 @@ static int omap_gpmc_read_page_bch_rom_mode(struct mtd_info *mtd,
> > >   	else
> > >   		mtd->ecc_stats.corrected += stat;
> > > -	return 0;
> > > +	return stat;
> > >   }
> > I'm afraid this is not enough. read_page should return the maximum
> > number of bitflips in any ECC step. You first have to change
> > omap_correct_bch() so that it returns this number.
> ahh, we worked on this problem a half year ago and it seems like three
> patches are missing upstream:
> 
> http://lists.infradead.org/pipermail/barebox/2017-June/030385.html
> http://lists.infradead.org/pipermail/barebox/2017-June/030384.html
> http://lists.infradead.org/pipermail/barebox/2017-June/030355.html

Oh, I see. It seems I have either forgotten to merge them or I have
waited for feedback. Could you create a series for all missing patches
including your new patch and resend it, provided it works as expected of
course?

Sascha

-- 
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] drivers: mtd: nand: omap: Return stat value
  2018-02-16  7:56       ` Sascha Hauer
@ 2018-02-23 15:53         ` Daniel Schultz
  0 siblings, 0 replies; 9+ messages in thread
From: Daniel Schultz @ 2018-02-23 15:53 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox


On 02/16/2018 08:56 AM, Sascha Hauer wrote:
> On Thu, Feb 15, 2018 at 01:51:26PM +0100, Daniel Schultz wrote:
>> Hi Sascha,
>>
>>
>> On 01/30/2018 08:11 AM, Sascha Hauer wrote:
>>> On Mon, Jan 29, 2018 at 02:04:11PM +0100, Daniel Schultz wrote:
>>>> The read page function should return the total count of flipped bits,
>>>> otherwise the caller always thinks no bitflip occured.
>>>>
>>>> Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
>>>> ---
>>>>    drivers/mtd/nand/nand_omap_gpmc.c | 2 +-
>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/mtd/nand/nand_omap_gpmc.c b/drivers/mtd/nand/nand_omap_gpmc.c
>>>> index e18ce63..38f4960 100644
>>>> --- a/drivers/mtd/nand/nand_omap_gpmc.c
>>>> +++ b/drivers/mtd/nand/nand_omap_gpmc.c
>>>> @@ -712,7 +712,7 @@ static int omap_gpmc_read_page_bch_rom_mode(struct mtd_info *mtd,
>>>>    	else
>>>>    		mtd->ecc_stats.corrected += stat;
>>>> -	return 0;
>>>> +	return stat;
>>>>    }
>>> I'm afraid this is not enough. read_page should return the maximum
>>> number of bitflips in any ECC step. You first have to change
>>> omap_correct_bch() so that it returns this number.
>> ahh, we worked on this problem a half year ago and it seems like three
>> patches are missing upstream:
>>
>> http://lists.infradead.org/pipermail/barebox/2017-June/030385.html
>> http://lists.infradead.org/pipermail/barebox/2017-June/030384.html
>> http://lists.infradead.org/pipermail/barebox/2017-June/030355.html
> Oh, I see. It seems I have either forgotten to merge them or I have
> waited for feedback. Could you create a series for all missing patches
> including your new patch and resend it, provided it works as expected of
> course?
Yes, I will do this as soon as I have time for it.


-- 
Mit freundlichen Grüßen,
With best regards,
   Daniel Schultz



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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-02-23 15:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-29 13:04 [PATCH 1/3] commands: ubi: ubiupdatevol: Reduce error code to 0 or 1 Daniel Schultz
2018-01-29 13:04 ` [PATCH 2/3] ARM: configs: am335x_defconfig: Reorder configs Daniel Schultz
2018-01-29 13:04 ` [PATCH 3/3] drivers: mtd: nand: omap: Return stat value Daniel Schultz
2018-01-30  7:11   ` Sascha Hauer
2018-02-15 12:51     ` Daniel Schultz
2018-02-16  7:56       ` Sascha Hauer
2018-02-23 15:53         ` Daniel Schultz
2018-01-30  7:05 ` [PATCH 1/3] commands: ubi: ubiupdatevol: Reduce error code to 0 or 1 Sascha Hauer
2018-01-30  7:13   ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox