CAN driver: Removing call to can_xmit() from can_txready() in a previous commit was a mistake. This commit restores the call to can_xmit(), but does the call in a safer environment on the work thread.

This commit is contained in:
Gregory Nutt
2015-11-14 10:33:02 -06:00
parent 4a7fb2cbc1
commit 81ab270a96
3 changed files with 146 additions and 17 deletions
+17
View File
@@ -128,6 +128,7 @@ config CAN_NPENDINGRTR
config CAN_TXREADY
bool "can_txready interface"
default n
select SCHED_WORKQUEUE
---help---
This selection enables the can_txready() interface. This interface
is needed only for CAN hardware that supports queing of outgoing
@@ -173,6 +174,22 @@ config CAN_TXREADY
no longer full. can_txready() will then awaken the
can_write() logic and the hang condition is avoided.
choice
prompt "TX Ready Work Queue"
default CAN_TXREADY_LOPRI if SCHED_LPWORK
default CAN_TXREADY_HIPRI if !SCHED_LPWORK
depends on CAN_TXREADY
config CAN_TXREADY_LOPRI
bool "Low-priority work queue"
select SCHED_LPWORK
config CAN_TXREADY_HIPRI
bool "High-priority work queue"
select SCHED_HPWORK
endchoice # TX Ready Work Queue
config CAN_LOOPBACK
bool "CAN loopback mode"
default n