Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
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.

IOCTL failed

Altera_Forum
Honored Contributor II
938 Views

In alt_up_pci_lib.c I have an ioctl call. retval = ioctl(fd, ALT_UP_IOCTL_DMA_ADD, &handler) where fd is pointing to /dev/alt_up_pci0, ALT_UP_IOCTL_DMA_ADD is defined in alt_up_pci_ioctl.h as ALT_UP_IOCTL_DMA_ADD _IOWR(ALT_UP_IOC_MAGIC, 1, struct alt_up_ioctl_arg) (ALT_UP_IOC_MAGIC being 'A', alt_up_ioctl_arg has rw_bar_no,dma_controller_id, use_interrupt, *user_buffer_addr, dma_rw_slave_addr,dma_length_byte, to_device) and handler is providing device id, user buffer addr, dma id, dma rw slave addr, length of byte, to device to alt_up_ioctl_args. These codes are provided by altera. I am trying to run the test program which uses alt_up_pci_lib. It is failing because ioctl is returning -1. I have also checked the possible error situations of ioctl but I have no clue what is wrong in this program. Please help me to fix this issue.

0 Kudos
0 Replies
Reply