From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Weinberger Date: Mon, 21 May 2018 21:31:55 +0200 Subject: [U-Boot] UBI: regression since "mtd: ubi: Fix worker handling" In-Reply-To: <20114634.YJdGbKEMWP@blindfold> References: <0a34e4d0-7563-313f-ec09-e14ef8f27d58@st.com> <20114634.YJdGbKEMWP@blindfold> Message-ID: <2899268.ayio2GfFjU@blindfold> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de Patrice, Am Montag, 21. Mai 2018, 16:07:41 CEST schrieb Richard Weinberger: > > e->pnum =3D aeb->pnum; > > e->ec =3D aeb->ec; > > ubi->lookuptbl[e->pnum] =3D e; > > + ubi->thread_enabled =3D 1; >=20 > This is not correct. At this point the UBI thread is not ready. > I know, I know, U-Boot has no threads but some data structures might > not be ready. >=20 > Let me think how to work around this properly. The root cause seems to be that U-Boot misses this fix from Linux: commit 1cb8f9776c7dcadc57885c6653943511d282633b Author: Richard Weinberger Date: Tue Aug 11 23:27:44 2015 +0200 ubi: fastmap: Implement produce_free_peb() =20 If fastmap requests a free PEB for a pool and UBI is busy with erasing PEBs we need to offer a function to wait for one. We can reuse produce_free_peb() from the non-fastmap WL code but with different locking semantics. =20 Cc: stable at vger.kernel.org # 4.1.x- Reported-and-tested-by: J=C3=B6rg Krause Signed-off-by: Richard Weinberger