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

K64F Ethernet: avoid using NULL thread during init #5745

Merged
merged 1 commit into from Dec 22, 2017

Conversation

Projects
None yet
5 participants
@kjbracey-arm
Contributor

kjbracey-arm commented Dec 21, 2017

The K64F Ethernet driver installs an interrupt handler that sets thread
flags, and this could be called before the thread was initialised, so it
would use a NULL thread ID.

This triggers an RTX error-checking trap in debug builds, and could also
lead to other problems with received packets not being processed.

Adjusted so the RX interrupt handler does nothing if the thread isn't
initialised yet, and manually trigger a RX event flag after initialising
the thread in case any interrupts were ignored.

An alternative would have been to implement eth_arch_enable_interrupts,
but this mechanism is not present in the EMAC world - drivers will have
to start returning interrupts in their power up.

Fixes #5680

K64F Ethernet: avoid using NULL thread during init
The K64F Ethernet driver installs an interrupt handler that sets thread
flags, and this could be called before the thread was initialised, so it
would use a NULL thread ID.

This triggers an RTX error-checking trap in debug builds, and could also
lead to other problems with received packets not being processed.

Adjusted so the RX interrupt handler does nothing if the thread isn't
initialised yet, and manually trigger a RX event flag after initialising
the thread in case any interrupts were ignored.

An alternative would have been to implement eth_arch_enable_interrupts,
but this mechanism is not present in the EMAC world - drivers will have
to start returning interrupts in their power up.

Fixes #5680
@0xc0170

This comment has been minimized.

Member

0xc0170 commented Dec 21, 2017

/morph build

@0xc0170 0xc0170 requested a review from mikaleppanen Dec 21, 2017

@0xc0170 0xc0170 added the needs: CI label Dec 21, 2017

@mbed-ci

This comment has been minimized.

mbed-ci commented Dec 21, 2017

Build : SUCCESS

Build number : 739
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5745/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@studavekar

This comment has been minimized.

Collaborator

studavekar commented Dec 21, 2017

/morph export-build

@mbed-ci

This comment has been minimized.

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Dec 21, 2017

@0xc0170 0xc0170 merged commit 9cce4d2 into ARMmbed:master Dec 22, 2017

17 checks passed

AWS-CI uVisor Build & Test Verification build successful.
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Local events testing has passed
Details
travis-ci/littlefs Local littlefs testing has passed
Details
travis-ci/mbed2-ATMEL Local mbed2-ATMEL testing has passed
Details
travis-ci/mbed2-MAXIM Local mbed2-MAXIM testing has passed
Details
travis-ci/mbed2-NORDIC Local mbed2-NORDIC testing has passed
Details
travis-ci/mbed2-NUVOTON Local mbed2-NUVOTON testing has passed
Details
travis-ci/mbed2-NXP Local mbed2-NXP testing has passed
Details
travis-ci/mbed2-SILICON_LABS Local mbed2-SILICON_LABS testing has passed
Details
travis-ci/mbed2-STM Local mbed2-STM testing has passed
Details
travis-ci/tools Local tools testing has passed
Details

@cmonr cmonr removed the ready for merge label Dec 28, 2017

@kjbracey-arm kjbracey-arm deleted the kjbracey-arm:k64f_init_order branch Jan 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment