From 5832e754fbf502a7d2f2d7bee054eae1b6ad0520 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@openwrt.org>
Date: Wed, 25 Jul 2012 17:28:32 +0000
Subject: mtd: fix trx_fixup

With the BRCM47xx image I have built (Linksys E3000), there are additional
writes following the completion of "mtd_replace_jffs2" which invalidate the
'trx_fixup' performed by 'mtd_replace_jffs2'.  Moving the 'trx_fixup' to somewhere
after all writes have completed fixes the problem.  I also noticed that 'erasesize'
used to compute 'block_offset' in 'mtd_fixtrx' is used before it is computed by
'mtd_check_open'; moving the call to 'mtd_check_open' up a few lines fixes this.

Unlike 'mtd_fixtrx', 'trx_fixup' appears to assume that the TRX header is always at
offset 0; which may be the cause of the problem described in Ticket #8960.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>

SVN-Revision: 32866
---
 package/mtd/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'package/mtd/Makefile')

diff --git a/package/mtd/Makefile b/package/mtd/Makefile
index 27338d783b..7ca6b0e625 100644
--- a/package/mtd/Makefile
+++ b/package/mtd/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=mtd
-PKG_RELEASE:=17
+PKG_RELEASE:=18
 
 PKG_BUILD_DIR := $(KERNEL_BUILD_DIR)/$(PKG_NAME)
 STAMP_PREPARED := $(STAMP_PREPARED)_$(call confvar,CONFIG_MTD_REDBOOT_PARTS)
-- 
cgit v1.2.3