FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
5875 Discussions

deadlock of chained dma based design on rmmod of Linux driver

Altera_Forum
Honored Contributor I
749 Views

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.
0 Kudos
1 Reply
Altera_Forum
Honored Contributor I
77 Views

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.
Reply