linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: divakar <divakar.chitturi@hpe.com>
To: linux-pci@vger.kernel.org
Subject: multiple uio support for single pci device
Date: Thu, 08 Sep 2016 10:30:19 -0700	[thread overview]
Message-ID: <2406414.7j1iKk5fDN@div_linux> (raw)

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 device for 
msi=102, irq=1 ret=-22

Thanks

                 reply	other threads:[~2016-09-08 17:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2406414.7j1iKk5fDN@div_linux \
    --to=divakar.chitturi@hpe.com \
    --cc=linux-pci@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).