leon, grcan: RTEMS_NO_TIMEOUT on tx_sem

This commit is contained in:
Martin Aberg
2017-04-13 14:08:50 +02:00
committed by Daniel Hellstrom
parent 2d3d8f96b2
commit 3a650d3b2c

View File

@@ -1051,7 +1051,7 @@ static int grcan_wait_txspace(struct grcan_priv *pDev, int min)
/* Wait for IRQ to fire only if it has been triggered */
if (wait) {
if (rtems_semaphore_obtain(pDev->tx_sem, RTEMS_WAIT, 100) ==
if (rtems_semaphore_obtain(pDev->tx_sem, RTEMS_WAIT, RTEMS_NO_TIMEOUT) ==
RTEMS_UNSATISFIED) {
/* Device driver has flushed us, this may be due to another thread has
* closed the device, this is to avoid deadlock */