Re: [patch] Version 2 of the Linux IPMI driver

From: Corey Minyard (minyard@acm.org)
Date: Fri Sep 06 2002 - 15:25:18 EST


Matthew Wilcox wrote:

>>The lanana guy is not available for a while, so I'm not getting a device
>>number in the near future, but I think it's ready for the 2.5 release.
>>Does this need more time, or is it ready for inclusion?
>>
>>
>
>I don't think you should be using a device number at all. ioctl is Evil
>(TM) and it's perfectly possible to write an IPMI driver which uses
>neither an ioctl nor a chaacter device. Voila:
>
>http://ftp.linux.org.uk/pub/linux/willy/patches/bmc.diff
>
>yes, it was stupid to call it BMC instead of IPMI. i was handed a pile
>of junk that'd been half-heartedly ported from windows. however, the
>principle is sound, you don't need ioctl, nor a character device.
>
>
>
You access a device as a filesystem? That's bizarre. It's a device,
and they call them "devices" in the kernel for a reason. Why would you
want to do this? Especially with devfs, the whole device numbering
problem goes away. You could easily make it a misc device.

Plus, your patch misses a lot of places where IPMI is going. Many cards
have multiple IPMI interfaces (I have one that has three). In
multi-card systems, IPMI is used for transport for a lot of
configuration and control information between cards that may be going to
different applications both inside the kernel and in userland, so a
straight BMC interface is not going to get you there. You really need a
message handler in the kernel. You could do a message handler in
userland, but then it makes implementing watchdog timers and I2C
interfaces kernel interfaces over IPMI much more difficult, and it's a
message router hooked directly to a device and it makes some sense to
put it in the kernel.

I toyed with the idea of making it a network interface, since you have
addressing that is separate from messaging. However, it probably wasn't
worth the work for that.

And it wasn't stupid to call your "driver" BMC. That's exactly what it
is. It's not IPMI, it's a KCS BMC interface (hooked in as a filesystem).

-Corey

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



This archive was generated by hypermail 2b29 : Sat Sep 07 2002 - 22:00:30 EST