lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <29495897.RPkQXbJCt6@div_linux>
Date:   Wed, 07 Sep 2016 17:06:35 -0700
From:   divakar <divakar.chitturi@....com>
To:     linux-kernel@...r.kernel.org
Subject: Is multiple uio's for single device supported?

Hi 

My fpga device has multiple msi interrupts and I am trying to create an 
uio device for each msi interrupt. In the probe function of the pci 
device, I enable MSI for the pci device and allocate mem for uio info 
structures ( one for each msi ). First uio-info->irq is equal to the irq 
number in pdev->irq and It successfully creates /dev/uio-0 . For the 
second msi  i assign uio_info->irq = pdev->irq + 1 and different 
uio_info->name, but uio_register_device fails. When traced it fails at 
the devm_request_irq function. I am running on 3.19 kernel and after 
checking the latest 4.7 I noticed devm_request has changed to 
request_irq. I get the same error even with request_irq. 

- Does the uio framework support multiple uio's for the same pci device?
- if yes, is there something extra i need to do ?
 
Please let me know if I can provide any more information. Below is the 
log from my driver.
 
 103 fpga_uio_probe FPGA_PCI_UIO: probe
105 fpga_uio_probe FPGA_PCI_UIO: bar_base=183fffc00000
107 fpga_uio_probe FPGA_PCI_UIO: bar_len=1048576
125 fpga_uio_probe FPGA_PCI_UIO: pci_enable_device
132 fpga_uio_probe FPGA_PCI_UIO: pci_request_region
147 fpga_uio_probe FPGA_PCI_UIO: pci_iomap
153 fpga_uio_probe FPGA_PCI_UIO: base_add=ffffc90012a00000
169 fpga_uio_probe FPGA_PCI_UIO: nmsi_requested =8
211 fpga_uio_probe FPGA_PCI_UIO: irq_starting_indx =101
219 fpga_uio_probe FPGA_PCI_UIO: alloc mem for fpudev
226 fpga_uio_probe FPGA_PCI_UIO: alloc mem for uio_info
233 fpga_uio_probe FPGA_PCI_UIO: alloc mem for uio_priv_info
298 fpga_uio_probe FPGA_PCI_UIO: reg uio dev
__uio_register_device 805
__uio_register_device 813
__uio_register_device 819
__uio_register_device 821 get_minor ret=0
__uio_register_device 825
__uio_register_device 835
__uio_register_device 840
__uio_register_device 846 devm_request ret=0
__uio_register_device 851
311 fpga_uio_probe FPGA_PCI_UIO: Enable all INT

298 fpga_uio_probe FPGA_PCI_UIO: reg uio dev
__uio_register_device 805
__uio_register_device 813
__uio_register_device 819
__uio_register_device 821 get_minor ret=0
__uio_register_device 825
__uio_register_device 835
__uio_register_device 840
__uio_register_device 846 devm_request ret=-22
304 fpga_uio_probe FPGA_PCI_UIO: Failed to register uio devicefor 
msi=102, irq=1 ret=-22

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ