Re: Universal Driver Interface spec available

Jes Sorensen (Jes.Sorensen@cern.ch)
02 Sep 1999 11:15:28 +0200


>>>>> "Jeff" == Jeff Garzik <jgarzik@pobox.com> writes:

Jeff> Alan Cox wrote:
>> Not sure why anyone thinks this is Linux relevant 8) - other than
>> it will help to make our drivers even faster than the competition
>> if they adopt it. Have a read, but keep a bucket handy

Jeff> In response to you and David: I agree :) But if vendors take
Jeff> this seriously, I have a feeling a UDI interface will eventually
Jeff> appear. Lack of UDI support may be an encouragement or a
Jeff> discouragement, depending on the complexity of the device
Jeff> driver.

Linux has proven so far to be able to get vendors to provide
documentation for real drivers - whether they only plan to provide
Lose9x/NT drivers or UDI ones is pretty irrelevant. If they want Linux
users as their customers they need to provide specs so we can get real
drivers, enough vendors got the clue so far, so buy from them.

Nice theory, useless in practice. I read about half the spec a year
ago and I can only say that unless they redid the whole thing it's
still nothing but a bad joke.

Jeff> On a related subject, I think Linux could use a much more
Jeff> coherent -- and documented -- device driver interface. Writing
Jeff> portable Linux device drivers requires very in-depth knowledge
Jeff> of the Linux 'arch' code; I find myself checking the Alpha or
Jeff> Sparc arch code a lot to make sure that the I/O routines and
Jeff> such that I call work as expected.

It's not too hard writing portable drivers as long as you don't do
stupid things like type casting pointers to integers and stop thinking
the world is little endian only and thus use bitops on char *
etc. (not trying to be promote myself as a guru on this, but I think
the AceNIC Gigabit Ethernet driver is a reasonable example of how this
can be done in a pretty clean way - drivers/net/acenic.[ch] - I am
going to submit a new and better version to Linus today I hope).

I agree that there are a few things that could use more documentation,
however we needed to sort out a thing like the behavior of
readl/writel first.

Jes

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/