Did PCI/IRQ allocation change significantly after 4.2 kernel?

Rob Groner rgroner at rtd.com
Tue Mar 29 16:11:22 EDT 2016


On Tue, 2016-03-29 at 12:22 -0700, Greg KH wrote:
> On Tue, Mar 29, 2016 at 12:18:40PM -0700, Greg KH wrote:
> > > That is encouraging and persuasive.  I will make submitting the driver
> > > one of my pet projects.  I need to put a new coat of paint on it before
> > > I submit it for consideration, though.  Do I post to this mailing list
> > > when I'm ready?  Or is there a more pertinent one?
> > 
> > I can take it "as-is" through the staging tree (drivers/staging/) which
> > lets the community start to clean it up now, if you don't have the
> > time to do the work now.  Then you can work within the kernel
> > development process to polish up the remaining issues before we merge it
> > out of the staging tree into the "real" portion of the kernel.
> > 
> > If you are interested in this, just let me know.
> 
> In looking at your driver closer, what exactly is it doing?  At first
> glance, it seems to be just a bunch of ioctls to directly access the
> memory in the card, is that correct?  If so, why not just use the UIO
> layer instead?  If not, what is the driver trying to do?
> 
> thanks,
> 
> greg k-h

Your first glance is probably correct.  The driver handles reads and
writes to registers via IOCTLs from the user library, as well as
interrupts and DMA.  There are probably two main reasons the driver is
structured like that: 1) All "new" drivers here are essentially tailored
versions of previous drivers that have been around for a while, so this
wasn't built-from-scratch new.  While it means that any poor design
decisions made early on are perpetuated, it also means to us that we
aren't re-inventing the wheel and we're mostly using a driver that has
proven to work for quite a while.  2) The library code for the board is
shared (internally) with our Windows driver package, and in some cases
DOS too.  Since Windows uses IOCTLs, we can essentially share the exact
same library files, and only the IOCTL call itself is OS-specific.

I know #1 is not a good reason and I'd be happy to work towards
re-writing the driver in a more correct way, but probably not if it
would cause us to have to split into a Linux and Windows library
versions.  Keeping the library common at this point has saved us a lot
of development time.

I absolutely appreciate the feedback on driver design...I've never
really received any and all I know about Linux drivers is what I read
online, read in LDD, and what was in the drivers that existed when I
came to work here.  Is the current form of the driver just "bad" or
"intolerably bad"?

Thanks!

Rob





More information about the Kernelnewbies mailing list