Problem found by Jan Kriz during USB<->CAN converter support development.
ifneq ($(filter hms30c7202_can ns_dev_can,$(lincan_cards_SELECTED)),)
$(warning Not finished C_CAN support requested)
-lincan_cards_SOURCES += c_can.c c_can_irq.c
+lincan_cards_SOURCES += c_can.c c_can_irq.c
endif
ifneq ($(CONFIG_OC_LINCANRTL),y)
open.c close.c read.c write.c ioctl.c select.c fasync.c \
proc.c ioctl_query.c ioctl_remote.c \
$(lincan_cards_SOURCES) $(lincan_rtl_SOURCES)
-
+
endif #CONFIG_OC_LINCAN
case CANQUEUE_NOTIFY_PROC:
#ifndef CAN_WITH_RTL
/*wake_up(&qends->endinfo.chipinfo.daemonq);*/
- chip->chipspecops->wakeup_tx(chip, obj);
+ if(canque_fifo_test_fl(&qedge->fifo, READY)){
+ if ((chip) && (chip->flags & CHIP_ATTACHED))
+ chip->chipspecops->wakeup_tx(chip, obj);
+ }
#else /*CAN_WITH_RTL*/
can_msgobj_set_fl(obj,TX_REQUEST);
canqueue_wake_chip_worker(qends, chip, obj);
int i;
struct msgobj_t *obj;
- if(chip->flags & CHIP_ATTACHED)
+ if(chip->flags & CHIP_ATTACHED){
chip->chipspecops->release_chip(chip);
+ chip->flags &= ~CHIP_ATTACHED;
+ }
if((chip->hostdevice) && (chip->chip_idx>=0)) {
if(chip->hostdevice->chip[chip->chip_idx] == chip)