diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-01-27 16:44:42 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-01-27 16:44:42 -0600 |
commit | a67f1112b12c9b44a5c816f8a8a3884f900ae8c8 (patch) | |
tree | d25dcf9b2f54b5bffd2f3436721f9ee1301a159c /nuttx | |
parent | 61b664d452327affda4bc18e01aa97f8e9f1dcc1 (diff) | |
parent | 695f0f3d313d3174f58424f8580431535d955d83 (diff) | |
download | px4-nuttx-a67f1112b12c9b44a5c816f8a8a3884f900ae8c8.tar.gz px4-nuttx-a67f1112b12c9b44a5c816f8a8a3884f900ae8c8.tar.bz2 px4-nuttx-a67f1112b12c9b44a5c816f8a8a3884f900ae8c8.zip |
Merge remote-tracking branch 'origin/master' into afunix
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/arch/arm/src/tiva/tm4c_ethernet.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/nuttx/arch/arm/src/tiva/tm4c_ethernet.c b/nuttx/arch/arm/src/tiva/tm4c_ethernet.c index 93d6df9cb..7f63144d8 100644 --- a/nuttx/arch/arm/src/tiva/tm4c_ethernet.c +++ b/nuttx/arch/arm/src/tiva/tm4c_ethernet.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/tiva/tm4c_ethernet.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -2127,22 +2127,24 @@ static int tiva_interrupt(int irq, FAR void *context) #ifdef CONFIG_NET_NOINTS uint32_t dmaris; - /* Disable further Ethernet interrupts. Because Ethernet interrupts are - * also disabled if the TX timeout event occurs, there can be no race - * condition here. - */ - - up_disable_irq(TIVA_IRQ_ETHCON); - - /* Check if a packet transmission just completed. */ + /* Get the raw interrupt status. */ dmaris = tiva_getreg(TIVA_EMAC_DMARIS); if (dmaris != 0) { + /* Disable further Ethernet interrupts. Because Ethernet interrupts + * are also disabled if the TX timeout event occurs, there can be no + * race condition here. + */ + + up_disable_irq(TIVA_IRQ_ETHCON); + + /* Check if a packet transmission just completed. */ + if ((dmaris & EMAC_DMAINT_TI) != 0) { /* If a TX transfer just completed, then cancel the TX timeout so - * there will be do race condition between any subsequent timeout + * there will be no race condition between any subsequent timeout * expiration and the deferred interrupt processing. */ |