for(i=0;i<chip->max_objects;i++){
if((obj=chip->msgobj[i])==NULL)
continue;
- if(!can_msgobj_test_and_clear_fl(obj,TX_REQUEST))
- continue;
- DEBUGMSG("Calling wakeup_tx\n");
- chip->chipspecops->wakeup_tx(chip, obj);
+ if(can_msgobj_test_fl(obj,TX_REQUEST)) {
+ DEBUGMSG("Calling wakeup_tx\n");
+ chip->chipspecops->wakeup_tx(chip, obj);
+ }
+ if(can_msgobj_test_fl(obj,FILTCH_REQUEST)) {
+ DEBUGMSG("Calling filtch_rq\n");
+ if(chip->chipspecops->filtch_rq)
+ chip->chipspecops->filtch_rq(chip, obj);
+ }
}
continue;
}
#include "../include/main.h"
#include "../include/devcommon.h"
+#ifdef CAN_WITH_RTL
+static inline
+void canqueue_wake_chip_worker(struct canque_ends_t *qends, struct chip_t *chip, struct msgobj_t *obj)
+{
+ if(qends->endinfo.chipinfo.worker_thread){
+ can_msgobj_set_fl(obj,WORKER_WAKE);
+ pthread_kill(qends->endinfo.chipinfo.worker_thread,RTL_SIGNAL_WAKEUP);
+ rtl_schedule();
+ } else {
+ set_bit(MSGOBJ_TX_REQUEST_b,&chip->pend_flags);
+ if(chip->worker_thread) {
+ set_bit(MSGOBJ_WORKER_WAKE_b,&chip->pend_flags);
+ pthread_kill(chip->worker_thread,RTL_SIGNAL_WAKEUP);
+ rtl_schedule();
+ }
+ }
+}
+
+#endif /*CAN_WITH_RTL*/
+
+
/**
* canqueue_notify_chip - notification callback handler for CAN chips ends of queues
* @qends: pointer to the callback side ends structure
chip->chipspecops->wakeup_tx(chip, obj);
#else /*CAN_WITH_RTL*/
can_msgobj_set_fl(obj,TX_REQUEST);
- if(qends->endinfo.chipinfo.worker_thread){
- can_msgobj_set_fl(obj,WORKER_WAKE);
- pthread_kill(qends->endinfo.chipinfo.worker_thread,RTL_SIGNAL_WAKEUP);
- rtl_schedule();
- } else {
- set_bit(MSGOBJ_TX_REQUEST_b,&chip->pend_flags);
-
- if(chip->worker_thread) {
- set_bit(MSGOBJ_WORKER_WAKE_b,&chip->pend_flags);
- pthread_kill(chip->worker_thread,RTL_SIGNAL_WAKEUP);
- rtl_schedule();
- }
- }
+ canqueue_wake_chip_worker(qends, chip, obj);
#endif /*CAN_WITH_RTL*/
break;
case CANQUEUE_NOTIFY_DEAD_WANTED:
#ifndef CAN_WITH_RTL
chip->chipspecops->filtch_rq(chip, obj);
#else /*CAN_WITH_RTL*/
+ can_msgobj_set_fl(obj,FILTCH_REQUEST);
+ canqueue_wake_chip_worker(qends, chip, obj);
#endif /*CAN_WITH_RTL*/
break;
wake_up(&rtr_search->rtr_wq);
}
+/**
+ * i82527_wakeup_tx: - wakeups TX processing
+ * @chip: pointer to chip state structure
+ * @obj: pointer to message object structure
+ *
+ * Function is responsible for initiating message transmition.
+ * It is responsible for clearing of object TX_REQUEST flag
+ *
+ * Return Value: negative value reports error.
+ * File: src/i82527.c
+ */
int i82527_wakeup_tx(struct chip_t *chip, struct msgobj_t *obj)
{
can_preempt_disable();
* @chip: pointer to chip state structure
* @obj: pointer to message object structure
*
+ * Function is responsible for initiating message transmition.
+ * It is responsible for clearing of object TX_REQUEST flag
+ *
* Return Value: negative value reports error.
* File: src/virtual.c
*/
struct canque_slot_t *slot;
int cmd;
+ can_msgobj_clear_fl(obj,TX_REQUEST);
+
#ifndef CAN_WITH_RTL
if(!virtual_bus_latency(obj)) {
#endif /*CAN_WITH_RTL*/