[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1507109956.2603.5.camel@iis-extern.fraunhofer.de>
Date: Wed, 4 Oct 2017 09:39:18 +0000
From: "Stahl, Manuel" <manuel.stahl@...-extern.fraunhofer.de>
To: "dan.carpenter@...cle.com" <dan.carpenter@...cle.com>
CC: "hjk@...utronix.de" <hjk@...utronix.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"sojkam1@....cvut.cz" <sojkam1@....cvut.cz>
Subject: Re: [PATCH] Add new uio device for PCI with dynamic memory allocation
On Mi, 2017-10-04 at 10:59 +0300, Dan Carpenter wrote:
> On Wed, Oct 04, 2017 at 07:24:49AM +0000, Stahl, Manuel wrote:
> > Hi Dan. Thanks for your comments. I can fix all of those.
> > Probably there is also some upgrade needed for the MSI stuff.
> > pci_disable_msi() is not there anymore, so I have to use
> > pci_alloc_irq_vectors(). Doing tests with my PCIe HW I had some
> > problems with masking the legacy IRQs. Probably uio_pci_generic
> > suffers from the same problems.
> >
> > Can someone tell me how to properly handle legacy and MSI
> > interrupts in irqhandler()? Or should I implement a irqcontrol()
> > function?
> >
>
> These questions about above my pay grade. I've never used the code, I
> just do mechanical reviews. I'm not certain who to ask either...
>
Alright. I checked again your comments. Some are copy&paste from the
other drivers, but I can improve this. Some cannot be changed:
1) continue instead of break:
Actually size=0 makes no sense for the maps, so open() and release()
take this as abort condition (see also uio_dmem_genirq.c). The parser
continues in that case, but we could break there as well.
2) char * const buf = kstrdup(uio_dmem_sizes, GFP_KERNEL);
Since buf is a const pointer, it has to be set during declaration.
Also I'd like to keep it const.
I will post another patch set without MSI (just the same functionality
as in uio_pci_generic) and then try to add MSI(X) support to both.
Regards,
Manuel
Powered by blists - more mailing lists