New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FS#1120 - Newifi D1 - Unable to reboot #6062
Comments
ningzichun: Hello, I find a solution that seems to work. But I don't know how to change the source code. http://m.blog.csdn.net/yubing_615/article/details/52649489 (Fix soft reset fail ,Chinese) |
SerCom-KC: I can confirm that both patches in this thread works: https://forum.lede-project.org/t/newifi-d1-unable-to-reboot/7910 Since I'm unsure about who to credit I'm not going to submit a pull request myself, but this needs to be fixed anyway. |
easyteacher:
@mkresin Now that a new flag in kernel 4.9/4.14 can be used to solve the soft reboot problem, what's the reason the patch mentioned in the LEDE forum will be rejected? |
mkresin: @easyteacher We are talking about different topics. Backporting 4-byte mode to 17.04. will be most likely not accepted. Furthermore, there was a "fix" which sets some register values for all SPI flash chips (was either exit 4-byte mode or a chip reset, can't remember). It is a no go as well. My NAK wasn't for your SPI_NOR_4B_READ_OP approach, which I obviously missed when I had a look at the forum topic. Nevertheless, I'm kind of surprised that SPI_NOR_4B_READ_OP is supposed to work with the MX25L25635E. The [[http://www.macronix.com/Lists/Datasheet/Attachments/6639/MX25L25635E,%203V,%20256Mb,%20v1.3.pdf|MX25L25635E datasheet]] doesn't mention a stateless 4-byte read command (see table 5 "command sets"), where the [[https://www.winbond.com/resource-files/w25q256fv_revg1_120214_qpi_website_rev_g.pdf|W25Q256 datasheet]] does (Read Data with 4-Byte Address [13h]). In fact, the MX25L25635E datasheet says:
Entering the 4-byte mode is stateful and exactly the reason for the reboot hang. Since support isn't mentioned in the datasheet, SPI_NOR_4B_READ_OP isn't enabled for the MX25L25635E. |
mkresin: One more thing, have you actually tried to write > 16 MB to the flash chip, read back the data and compared checksums of input and output? In case SPI_NOR_4B_READ_OP is enabled without support by the chip, you limit reading to the first 16 MB. And since the chip is never switched to 4-Byte mode during read (to read behind the 16 MB boundary), rebooting works fine. |
mkresin: Okay, I know what is going on. The Newifi D1 has most likely a MX25L25635F. But the MX25L25635E and MX25L25635F share the same "hardware id" 0xc22019, therefore can't be distinguished and are handled as MX25L25635E by the kernel. The MX25L25635F supports stateless 4-byte read and write (you can use SPI_NOR_4B_OPCODES). Where the MX25L25635E does not support any stateless 4-byte command. As it is very likely that we have in a big target like ramips boards with MX25L25635E and MX25L25635F, we can't enable SPI_NOR_4B_OPCODES, as it would break boards with MX25L25635E. The only solution I can think of would be a compatible string for the MX25L25635F in the dts. But that is something I would like to see accepted by the spi-nor kernel maintainers first. |
easyteacher: I uploaded a 17M file generated by dd from /dev/urandom on my phone to the router, and their sha256sum results are the same.
|
ningzichun:
Device: Newifi D1
LEDE Version: 17.0.x & Trunk
Flash: Macronix MX25L25635E @ 19MHz (32MB)
•Issue:
Unable to reboot. After run the command "Reboot", the device crash.
All the D1 is based on a 32M flash, and it may be the course of this bug.
•Similar Posts:
lede-project/source#620
https://forum.openwrt.org/viewtopic.php?id=460341
I hope that you can fix this problem which disturbs the player of this router a lot .
Thanks for your helping!
A faithful user
The text was updated successfully, but these errors were encountered: