]> rtime.felk.cvut.cz Git - lincan.git/commitdiff
Merge: Fixed bug message objects indexing introduced by previous driver changes.
authorppisa <pisa@cmp.felk.cvut.cz>
Tue, 30 Aug 2005 20:42:00 +0000 (22:42 +0200)
committerppisa <pisa@cmp.felk.cvut.cz>
Tue, 30 Aug 2005 20:42:00 +0000 (22:42 +0200)
Merge commit 'remotes/sf-ocera-lincan/master'

lincan/src/i82527.c

index 60096c5820f5277ee26a4d3cb23637c29d199a1a..5ef9d8f108b3fa838aea2b37271b91ffcc009cd1 100644 (file)
@@ -248,7 +248,7 @@ int i82527_clear_objects(struct canchip_t *chip)
 
        DEBUGMSG("Cleared all message objects on chip\n");
 
-       for (i=1; i<=15; i++) {
+       for (i=0; i<chip->max_objects; i++) {
                obj=chip->msgobj[i];
                canobj_write_reg(chip,obj,(INTPD_RES|RXIE_RES|TXIE_RES|MVAL_RES),iMSGCTL0);
                canobj_write_reg(chip,obj,(NEWD_RES|MLST_RES|TXRQ_RES|RMPD_RES), iMSGCTL1);
@@ -665,7 +665,7 @@ int i82527_irq_handler(int irq, struct canchip_t *chip)
                
                if (irq_register == 0x02)
                        object = 14;
-               else if(irq_register < 14)
+               else if(irq_register <= 13+3)
                        object = irq_register-3;
                else
                        return CANCHIP_IRQ_NONE;