Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

deadlock of chained dma based design on rmmod of Linux driver

I encountered the deadlock problem of chained dma based design when doing rmmod of Linux driver module.

SignalTap shows that tx_sel_pcnt and tx_sel_slave signals (i.e. for altpcierd_rc_slave module) are asserted during rmmod and never de-asserted again unless reboot/reset of the system performed.

During rmmod usual things are performed like pci_release_regions(pdev) and pci_disable_device(pdev).

The suspicion is that this is because altpcierd_rc_slave does not handle correctly some type of transaction issued by CPU during rmmod (interrupt related ?).

Quartus version is 12.1sp1, Linux version is 2.6.32, FPGA is Arria V.

Any info helping to understand/resolve this issue would be appreciated.

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    It turned out to be a driver issue.

    Apparently, pci_disable_device() also disables bus mastering bit in pci config, which is enabled by default in Altera chaining DMA example.

    However, pci_enable_device() does not turned on bus mastering config bit, pci_set_master() should be called in the probe function, otherwise DMAs would not work.