Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Scott Wood <scottwood <at> freescale.com>
Subject: Re: [PATCH 1/1] Fix JFFS2 NOR sector size routine
Newsgroups: gmane.comp.boot-loaders.u-boot
Date: Wednesday 11th March 2009 18:29:29 UTC (over 8 years ago)
On Wed, Mar 11, 2009 at 09:54:20AM +0000, Mark Jackson wrote:
> diff --git a/common/cmd_jffs2.c b/common/cmd_jffs2.c
> index d0a7cea..2f3b3a9 100644
> --- a/common/cmd_jffs2.c
> +++ b/common/cmd_jffs2.c
> @@ -1814,7 +1814,12 @@ static inline u32 get_part_sector_size_nor(struct
> mtdids *id, struct part_info *
>   	flash = &flash_info[id->num];
> 
>   	start_phys = flash->start[0] + part->offset;
> -	end_phys = start_phys + part->size;
> +
> +	if (part->size == SIZE_REMAINING) {
> +		end_phys = start_phys + flash->size;
> +	} else {
> +		end_phys = start_phys + part->size;
> +	}

That looks wrong if part->offset != 0; shouldn't it be:

if (part->size == SIZE_REMAINING)
	end_phys = flash->start[0] + flash->size;
else
	end_phys = start_phys + part->size;

?

-Scott
 
CD: 4ms