X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/b34a548a5dfd2f0b068fd835a4cd51680d851068..2827b727d2910a3b48f9de7d67b3a67f59e256c7:/lincan/src/virtual.c diff --git a/lincan/src/virtual.c b/lincan/src/virtual.c index 80ce0fb..05a12f9 100644 --- a/lincan/src/virtual.c +++ b/lincan/src/virtual.c @@ -302,7 +302,7 @@ void virtual_schedule_next(struct msgobj_t *obj) if(cmd>=0) { mod_timer(&obj->tx_timeout, jiffies+virtual_bus_latency(obj)); - CANMSG("virtual: scheduled delivery\n"); + DEBUGMSG("virtual: scheduled delivery\n"); } else can_msgobj_clear_fl(obj,TX_LOCK); @@ -325,7 +325,7 @@ void virtual_do_tx_timeout(unsigned long data) /* Free transmitted slot */ canque_free_outslot(obj->qends, obj->tx_qedge, obj->tx_slot); obj->tx_slot=NULL; - CANMSG("virtual: delayed delivery\n"); + DEBUGMSG("virtual: delayed delivery\n"); } can_msgobj_clear_fl(obj,TX_LOCK); @@ -337,6 +337,9 @@ void virtual_do_tx_timeout(unsigned long data) * @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 */ @@ -348,6 +351,8 @@ int virtual_wakeup_tx(struct chip_t *chip, struct msgobj_t *obj) 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*/ @@ -355,7 +360,7 @@ int virtual_wakeup_tx(struct chip_t *chip, struct msgobj_t *obj) while((cmd=canque_test_outslot(obj->qends, &qedge, &slot)) >= 0){ if(cmd==0) { canque_filter_msg2edges(obj->qends, &slot->msg); - CANMSG("virtual: direct delivery\n"); + DEBUGMSG("virtual: direct delivery\n"); } canque_free_outslot(obj->qends, qedge, slot); }