]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/can_devrtl.c
Changed SJA1000 chip IRQ handling to loop until all requests are served
[lincan.git] / lincan / src / can_devrtl.c
index 4557531d38dfa08e5a0bbfc177b04d634b1b7986..5bbc2c0ff2cf7230d32af9f71fce5bd2bb55a8f6 100644 (file)
@@ -172,7 +172,7 @@ int can_chip_setup_irq(struct canchip_t *chip)
                attrib_p=&attrib;
        }
        
-       if(chip->chipspecops->irq_handler){
+       if(chip->chipspecops->irq_handler && !(chip->flags & CHIP_IRQ_CUSTOM)){
                int (*my_request_irq)(unsigned int vector, unsigned int (*rtl_handler)(unsigned int irq, struct pt_regs *regs));
 #ifdef CAN_ENABLE_VME_SUPPORT
                if ((chip->flags & CHIP_IRQ_VME) != 0)
@@ -199,7 +199,8 @@ void can_chip_free_irq(struct canchip_t *chip)
 {
        if(chip->worker_thread)
                pthread_delete_np(chip->worker_thread);
-       if((chip->flags & CHIP_IRQ_SETUP) && (chip->chip_irq>=0)) {
+       if((chip->flags & CHIP_IRQ_SETUP) && (chip->chip_irq>=0)
+           && !(chip->flags & CHIP_IRQ_CUSTOM)) {
                int (*my_free_irq)(unsigned int vector);
 #ifdef CAN_ENABLE_VME_SUPPORT
                if ((chip->flags & CHIP_IRQ_VME) != 0)