uboot: fix the jz4775 ethernet driver - #1556
Merged
Merged
Conversation
Four patches against the 2013.07 tree, found by bringing netconsole up on an isvp_t31x board but independent of it -- they repair the driver for any network use in U-Boot. 0007 fixes the transmit and receive paths: a dozen defects including a zero-valued mask that could never select 10Mb/s, unaligned DMA descriptors sharing cache lines with data written through the cached alias, an untrackable four-deep transmit ring collapsed to a single descriptor, a transmit FIFO nobody ever flushed so the first send after every init jammed, latched CSR5 status never cleared so suspended engines ignored poll demands in both directions, a receive descriptor leaked on short frames, halt enabling the transmitter it meant to disable, and console output emitted from inside the init of the very interface carrying it. 0008 resolves link speed from the autonegotiation result (ANAR & ANLPAR) instead of a vendor status register that reads a constant on the fitted PHY, tests the real link bit instead of Extended Capability, and restarts autonegotiation only when the link is not already up and settled. 0009 releases the interface when NetLoop fails, as the success path already does; leaving it ETH_STATE_ACTIVE silenced netconsole input for good. 0010 reports the resolved link with the advertisement words behind it (adv/partner/common) and demotes the misleading BMCR readback line. All verified on a vanhua_fjz_t31x_gc4653_eth at 10 and 100Mb/s.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four patches against the 2013.07 tree, found by bringing netconsole up on an isvp_t31x board but independent of it -- they repair the driver for any network use in U-Boot.
0007 fixes the transmit and receive paths: a dozen defects including a zero-valued mask that could never select 10Mb/s, unaligned DMA descriptors sharing cache lines with data written through the cached alias, an untrackable four-deep transmit ring collapsed to a single descriptor, a transmit FIFO nobody ever flushed so the first send after every init jammed, latched CSR5 status never cleared so suspended engines ignored poll demands in both directions, a receive descriptor leaked on short frames, halt enabling the transmitter it meant to disable, and console output emitted from inside the init of the very interface carrying it.
0008 resolves link speed from the autonegotiation result (ANAR & ANLPAR) instead of a vendor status register that reads a constant on the fitted PHY, tests the real link bit instead of Extended Capability, and restarts autonegotiation only when the link is not already up and settled.
0009 releases the interface when NetLoop fails, as the success path already does; leaving it ETH_STATE_ACTIVE silenced netconsole input for good.
0010 reports the resolved link with the advertisement words behind it (adv/partner/common) and demotes the misleading BMCR readback line.
All verified on a vanhua_fjz_t31x_gc4653_eth at 10 and 100Mb/s.