Message ID | 20190805190326.28772-2-ikegami.t@gmail.com |
---|---|
State | Accepted |
Delegated to: | Vignesh R |
Headers | show |
Series | mtd: cfi_cmdset_0002: Fix flash write issue for OpenWrt Project | expand |
Hi, [This is an automated email] This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all The bot has tested the following trees: v5.2.6, v4.19.64, v4.14.136, v4.9.187, v4.4.187. v5.2.6: Failed to apply! Possible dependencies: 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling status register") v4.19.64: Failed to apply! Possible dependencies: 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling status register") d9b8a67b3b95 ("mtd: cfi: fix deadloop in cfi_cmdset_0002.c do_write_buffer") v4.14.136: Failed to apply! Possible dependencies: 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling status register") c64d4419a17c ("mtd: cfi_cmdset_0002: Change erase one block to enable XIP once") d9b8a67b3b95 ("mtd: cfi: fix deadloop in cfi_cmdset_0002.c do_write_buffer") ea092fb3ce66 ("mtd: cfi_cmdset_0002: Fix coding style issues") v4.9.187: Failed to apply! Possible dependencies: 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling status register") c64d4419a17c ("mtd: cfi_cmdset_0002: Change erase one block to enable XIP once") d9b8a67b3b95 ("mtd: cfi: fix deadloop in cfi_cmdset_0002.c do_write_buffer") ea092fb3ce66 ("mtd: cfi_cmdset_0002: Fix coding style issues") v4.4.187: Failed to apply! Possible dependencies: 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling status register") c64d4419a17c ("mtd: cfi_cmdset_0002: Change erase one block to enable XIP once") d9b8a67b3b95 ("mtd: cfi: fix deadloop in cfi_cmdset_0002.c do_write_buffer") ea092fb3ce66 ("mtd: cfi_cmdset_0002: Fix coding style issues") NOTE: The patch will not be queued to stable trees until it is upstream. How should we proceed with this patch? -- Thanks, Sasha
Hi, Thanks for the mail. On 2019/08/06 9:43, Sasha Levin wrote: > Hi, > > [This is an automated email] > > This commit has been processed because it contains a -stable tag. > The stable tag indicates that it's relevant for the following trees: all > > The bot has tested the following trees: v5.2.6, v4.19.64, v4.14.136, v4.9.187, v4.4.187. > > v5.2.6: Failed to apply! Possible dependencies: > 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling status register") > > v4.19.64: Failed to apply! Possible dependencies: > 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling status register") > d9b8a67b3b95 ("mtd: cfi: fix deadloop in cfi_cmdset_0002.c do_write_buffer") > > v4.14.136: Failed to apply! Possible dependencies: > 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling status register") > c64d4419a17c ("mtd: cfi_cmdset_0002: Change erase one block to enable XIP once") > d9b8a67b3b95 ("mtd: cfi: fix deadloop in cfi_cmdset_0002.c do_write_buffer") > ea092fb3ce66 ("mtd: cfi_cmdset_0002: Fix coding style issues") > > v4.9.187: Failed to apply! Possible dependencies: > 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling status register") > c64d4419a17c ("mtd: cfi_cmdset_0002: Change erase one block to enable XIP once") > d9b8a67b3b95 ("mtd: cfi: fix deadloop in cfi_cmdset_0002.c do_write_buffer") > ea092fb3ce66 ("mtd: cfi_cmdset_0002: Fix coding style issues") > > v4.4.187: Failed to apply! Possible dependencies: > 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling status register") > c64d4419a17c ("mtd: cfi_cmdset_0002: Change erase one block to enable XIP once") > d9b8a67b3b95 ("mtd: cfi: fix deadloop in cfi_cmdset_0002.c do_write_buffer") > ea092fb3ce66 ("mtd: cfi_cmdset_0002: Fix coding style issues") > > > NOTE: The patch will not be queued to stable trees until it is upstream. > > How should we proceed with this patch? Yes I will do fix the patch for the trees failed to apply if it was upstream. Regards, Ikegami > > -- > Thanks, > Sasha
Hi, The patch has been merged into git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next for v5.4-rc1. So I have just sent patches for v5.2.y, v4.19.y, v4.14.y, v4.9.y and v.4.4.y separately. Regards, Ikegami On 2019/08/06 23:30, Tokunori Ikegami wrote: > Hi, > > Thanks for the mail. > > On 2019/08/06 9:43, Sasha Levin wrote: >> Hi, >> >> [This is an automated email] >> >> This commit has been processed because it contains a -stable tag. >> The stable tag indicates that it's relevant for the following trees: all >> >> The bot has tested the following trees: v5.2.6, v4.19.64, v4.14.136, >> v4.9.187, v4.4.187. >> >> v5.2.6: Failed to apply! Possible dependencies: >> 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling >> status register") >> >> v4.19.64: Failed to apply! Possible dependencies: >> 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling >> status register") >> d9b8a67b3b95 ("mtd: cfi: fix deadloop in cfi_cmdset_0002.c >> do_write_buffer") >> >> v4.14.136: Failed to apply! Possible dependencies: >> 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling >> status register") >> c64d4419a17c ("mtd: cfi_cmdset_0002: Change erase one block to >> enable XIP once") >> d9b8a67b3b95 ("mtd: cfi: fix deadloop in cfi_cmdset_0002.c >> do_write_buffer") >> ea092fb3ce66 ("mtd: cfi_cmdset_0002: Fix coding style issues") >> >> v4.9.187: Failed to apply! Possible dependencies: >> 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling >> status register") >> c64d4419a17c ("mtd: cfi_cmdset_0002: Change erase one block to >> enable XIP once") >> d9b8a67b3b95 ("mtd: cfi: fix deadloop in cfi_cmdset_0002.c >> do_write_buffer") >> ea092fb3ce66 ("mtd: cfi_cmdset_0002: Fix coding style issues") >> >> v4.4.187: Failed to apply! Possible dependencies: >> 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling >> status register") >> c64d4419a17c ("mtd: cfi_cmdset_0002: Change erase one block to >> enable XIP once") >> d9b8a67b3b95 ("mtd: cfi: fix deadloop in cfi_cmdset_0002.c >> do_write_buffer") >> ea092fb3ce66 ("mtd: cfi_cmdset_0002: Fix coding style issues") >> >> >> NOTE: The patch will not be queued to stable trees until it is upstream. >> >> How should we proceed with this patch? > > Yes I will do fix the patch for the trees failed to apply if it was > upstream. > > Regards, > Ikegami > >> >> -- >> Thanks, >> Sasha > > ______________________________________________________ > Linux MTD discussion mailing list > http://lists.infradead.org/mailman/listinfo/linux-mtd/ >
Hi, On 17/09/19 11:34 PM, Tokunori Ikegami wrote: > Hi, > > The patch has been merged into > git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next for > v5.4-rc1. > So I have just sent patches for v5.2.y, v4.19.y, v4.14.y, v4.9.y and > v.4.4.y separately. > Normal flow is to wait until patch goes into Linus's tree. So please wait until then. Regards Vignesh > Regards, > Ikegami > > On 2019/08/06 23:30, Tokunori Ikegami wrote: >> Hi, >> >> Thanks for the mail. >> >> On 2019/08/06 9:43, Sasha Levin wrote: >>> Hi, >>> >>> [This is an automated email] >>> >>> This commit has been processed because it contains a -stable tag. >>> The stable tag indicates that it's relevant for the following trees: all >>> >>> The bot has tested the following trees: v5.2.6, v4.19.64, v4.14.136, >>> v4.9.187, v4.4.187. >>> >>> v5.2.6: Failed to apply! Possible dependencies: >>> 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling >>> status register") >>> >>> v4.19.64: Failed to apply! Possible dependencies: >>> 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling >>> status register") >>> d9b8a67b3b95 ("mtd: cfi: fix deadloop in cfi_cmdset_0002.c >>> do_write_buffer") >>> >>> v4.14.136: Failed to apply! Possible dependencies: >>> 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling >>> status register") >>> c64d4419a17c ("mtd: cfi_cmdset_0002: Change erase one block to >>> enable XIP once") >>> d9b8a67b3b95 ("mtd: cfi: fix deadloop in cfi_cmdset_0002.c >>> do_write_buffer") >>> ea092fb3ce66 ("mtd: cfi_cmdset_0002: Fix coding style issues") >>> >>> v4.9.187: Failed to apply! Possible dependencies: >>> 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling >>> status register") >>> c64d4419a17c ("mtd: cfi_cmdset_0002: Change erase one block to >>> enable XIP once") >>> d9b8a67b3b95 ("mtd: cfi: fix deadloop in cfi_cmdset_0002.c >>> do_write_buffer") >>> ea092fb3ce66 ("mtd: cfi_cmdset_0002: Fix coding style issues") >>> >>> v4.4.187: Failed to apply! Possible dependencies: >>> 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling >>> status register") >>> c64d4419a17c ("mtd: cfi_cmdset_0002: Change erase one block to >>> enable XIP once") >>> d9b8a67b3b95 ("mtd: cfi: fix deadloop in cfi_cmdset_0002.c >>> do_write_buffer") >>> ea092fb3ce66 ("mtd: cfi_cmdset_0002: Fix coding style issues") >>> >>> >>> NOTE: The patch will not be queued to stable trees until it is upstream. >>> >>> How should we proceed with this patch? >> >> Yes I will do fix the patch for the trees failed to apply if it was >> upstream. >> >> Regards, >> Ikegami >> >>> >>> -- >>> Thanks, >>> Sasha >> >> ______________________________________________________ >> Linux MTD discussion mailing list >> http://lists.infradead.org/mailman/listinfo/linux-mtd/ >>
Hi, On 2019/09/18 14:29, Vignesh Raghavendra wrote: > Hi, > > On 17/09/19 11:34 PM, Tokunori Ikegami wrote: >> Hi, >> >> The patch has been merged into >> git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next for >> v5.4-rc1. >> So I have just sent patches for v5.2.y, v4.19.y, v4.14.y, v4.9.y and >> v.4.4.y separately. >> > Normal flow is to wait until patch goes into Linus's tree. So please > wait until then. Thank you for your advice. Noted it so I will do that. Regards, Ikegami > > Regards > Vignesh > >> Regards, >> Ikegami >> >> On 2019/08/06 23:30, Tokunori Ikegami wrote: >>> Hi, >>> >>> Thanks for the mail. >>> >>> On 2019/08/06 9:43, Sasha Levin wrote: >>>> Hi, >>>> >>>> [This is an automated email] >>>> >>>> This commit has been processed because it contains a -stable tag. >>>> The stable tag indicates that it's relevant for the following trees: all >>>> >>>> The bot has tested the following trees: v5.2.6, v4.19.64, v4.14.136, >>>> v4.9.187, v4.4.187. >>>> >>>> v5.2.6: Failed to apply! Possible dependencies: >>>> 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling >>>> status register") >>>> >>>> v4.19.64: Failed to apply! Possible dependencies: >>>> 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling >>>> status register") >>>> d9b8a67b3b95 ("mtd: cfi: fix deadloop in cfi_cmdset_0002.c >>>> do_write_buffer") >>>> >>>> v4.14.136: Failed to apply! Possible dependencies: >>>> 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling >>>> status register") >>>> c64d4419a17c ("mtd: cfi_cmdset_0002: Change erase one block to >>>> enable XIP once") >>>> d9b8a67b3b95 ("mtd: cfi: fix deadloop in cfi_cmdset_0002.c >>>> do_write_buffer") >>>> ea092fb3ce66 ("mtd: cfi_cmdset_0002: Fix coding style issues") >>>> >>>> v4.9.187: Failed to apply! Possible dependencies: >>>> 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling >>>> status register") >>>> c64d4419a17c ("mtd: cfi_cmdset_0002: Change erase one block to >>>> enable XIP once") >>>> d9b8a67b3b95 ("mtd: cfi: fix deadloop in cfi_cmdset_0002.c >>>> do_write_buffer") >>>> ea092fb3ce66 ("mtd: cfi_cmdset_0002: Fix coding style issues") >>>> >>>> v4.4.187: Failed to apply! Possible dependencies: >>>> 4844ef80305d ("mtd: cfi_cmdset_0002: Add support for polling >>>> status register") >>>> c64d4419a17c ("mtd: cfi_cmdset_0002: Change erase one block to >>>> enable XIP once") >>>> d9b8a67b3b95 ("mtd: cfi: fix deadloop in cfi_cmdset_0002.c >>>> do_write_buffer") >>>> ea092fb3ce66 ("mtd: cfi_cmdset_0002: Fix coding style issues") >>>> >>>> >>>> NOTE: The patch will not be queued to stable trees until it is upstream. >>>> >>>> How should we proceed with this patch? >>> Yes I will do fix the patch for the trees failed to apply if it was >>> upstream. >>> >>> Regards, >>> Ikegami >>> >>>> -- >>>> Thanks, >>>> Sasha >>> ______________________________________________________ >>> Linux MTD discussion mailing list >>> http://lists.infradead.org/mailman/listinfo/linux-mtd/ >>>
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c index f4da7bd552e9..19787a14350b 100644 --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c @@ -1717,31 +1717,36 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip, continue; } - if (time_after(jiffies, timeo) && - !chip_ready(map, chip, adr)) { + /* + * We check "time_after" and "!chip_good" before checking + * "chip_good" to avoid the failure due to scheduling. + */ + if (time_after(jiffies, timeo) && !chip_good(map, chip, adr, datum)) { xip_enable(map, chip, adr); printk(KERN_WARNING "MTD %s(): software timeout\n", __func__); xip_disable(map, chip, adr); + ret = -EIO; break; } - if (chip_ready(map, chip, adr)) + if (chip_good(map, chip, adr, datum)) break; /* Latency issues. Drop the lock, wait a while and retry */ UDELAY(map, chip, adr, 1); } + /* Did we succeed? */ - if (!chip_good(map, chip, adr, datum)) { + if (ret) { /* reset on all failures. */ cfi_check_err_status(map, chip, adr); map_write(map, CMD(0xF0), chip->start); /* FIXME - should have reset delay before continuing */ - if (++retry_cnt <= MAX_RETRIES) + if (++retry_cnt <= MAX_RETRIES) { + ret = 0; goto retry; - - ret = -EIO; + } } xip_enable(map, chip, adr); op_done: