Skip to contentSkip to conversation

Version 2 of the Linux IPMI driver

PATCH Matthew Wilcox 3 participants 4 messages Sep 6, 2002 – Sep 9, 2002

lore
Share & tools
lore
#0 lore raw
Quoted 4 lines

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.

Signature · 1 line
Revolutions do not require corporate support.
#1 lore raw
Quoted 10 lines · Matthew Wilcox
Quoted 5 lines

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:

Quoted 8 lines

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

#2 lore raw
Quoted 4 lines · Corey Minyard

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.

The point is to get away from using character devices where we don't need them (and we really don't need them in most places). Plus, there's no dependency on devfs with this approach.

Quoted 1 line

Plus, your patch misses a lot of places where IPMI is going.

Oh, I'm quite aware of the limitations of my driver. I just don't want to see yet another character device + ioctl interface going into the kernel when it's really not necessary.

Quoted 2 lines

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).

Right, but it should probably be addressed as /dev/ipmi since what we're doing is sending IPMI messages.

Signature · 1 line
Revolutions do not require corporate support.
#3 lore raw
In reply to Corey Minyard
Quoted 1 line · Corey Minyard

You access a device as a filesystem? That's bizarre.

Why? There's lots of precedent for this model (usbfs, pcihpfs, etc.)

Quoted 4 lines

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.

devfs did not make the device numbering problem go away at all, you still need to have a registered major/minor number with Lanana to use devfs. Yes, you can ask for a dynamic misc number, but that is very difficult to support.

thanks,

greg k-h