unsigned int can_rtl_isr( unsigned int irq_num, struct pt_regs *r )
{
- struct chip_t *chip;
+ struct canchip_t *chip;
struct candevice_t *candev;
int board_nr;
int chip_nr;
void * can_chip_worker_thread(void *arg)
{
- struct chip_t *chip = (struct chip_t *) arg;
+ struct canchip_t *chip = (struct canchip_t *) arg;
struct msgobj_t *obj;
int ret, i;
int loop_cnt;
/*re-enable chip IRQ, I am not sure, if this is required,
but it seems to not work without that */
- if(chip->chip_irq>=0)
- can_enable_irq(chip->chip_irq);
+ if(chip->chip_irq>=0) {
+ if ((chip->flags & CHIP_IRQ_VME) == 0) can_enable_irq(chip->chip_irq);
+ #ifdef CAN_ENABLE_VME_SUPPORT
+ else tundra_rtl_enable_pci_irq();
+ /* FIXME: Bad practice. Doesn't work with more
+ * than one card. */
+ #endif /*CAN_ENABLE_VME_SUPPORT*/
+
+ }
RTL_MARK_SUSPENDED(pthread_self());
if(test_and_clear_bit(MSGOBJ_WORKER_WAKE_b,&chip->pend_flags)){
}
-int can_chip_setup_irq(struct chip_t *chip)
+int can_chip_setup_irq(struct canchip_t *chip)
{
int ret;
struct sched_param sched_param;
}
-void can_chip_free_irq(struct chip_t *chip)
+void can_chip_free_irq(struct canchip_t *chip)
{
if(chip->worker_thread)
pthread_delete_np(chip->worker_thread);