Skip to contentSkip to conversation

IPMI driver updates, part 4

PATCH In review Corey Minyard 2 participants 2 messages Feb 23, 2004 – Feb 26, 2004

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IPMI driver updates, part 4

It has been far too long since the last IPMI driver updates, but now all the planets have aligned and all the pieces I needed are in and all seem to be working. This update is coming as four parts that must be applied in order, but the later parts do not have to be applied for the former parts to work.

This fourth part is probably the most controversial and least important. It adds a socket interface to IPMI. IPMI is sort of a network, so it makes some sense to have a network interface to it. Since the kernel is out of numbers for socket interfaces, this also does some updates to increase the number range.

FYI, IPMI is a standard for monitoring and maintaining a system. It provides interfaces for detecting sensors (voltage, temperature, etc.) in the system and monitoring those sensors. Many systems have extended capabilities that allow IPMI to control the system, doing things like lighting leds and controlling hot-swap. This driver allows access to the IPMI system.

-Corey

Documentation/IPMI.txt +5 -0
diff -urN linux-a3/Documentation/IPMI.txt linux-a4/Documentation/IPMI.txt
@@ -105,10 +105,15 @@
 I2C kernel driver's SMBus interfaces to send and receive IPMI messages
 over the SMBus.
 
+af_ipmi - A network socket interface to IPMI.  This doesn't take up
+a character device in your system.
+
 
 Much documentation for the interface is in the include files.  The
 IPMI include files are:
 
+net/af_ipmi.h - Contains the socket interface.
+
 linux/ipmi.h - Contains the user interface and IOCTL interface for IPMI.
 
 linux/ipmi_smi.h - Contains the interface for system management interfaces
include/linux/net.h +1 -1
diff -urN linux-a3/include/linux/net.h linux-a4/include/linux/net.h
@@ -25,7 +25,7 @@
 struct poll_table_struct;
 struct inode;
 
-#define NPROTO		32		/* should be enough for now..	*/
+#define NPROTO		64		/* should be enough for now..	*/
 
 #define SYS_SOCKET	1		/* sys_socket(2)		*/
 #define SYS_BIND	2		/* sys_bind(2)			*/
include/linux/socket.h +3 -1
diff -urN linux-a3/include/linux/socket.h linux-a4/include/linux/socket.h
@@ -178,7 +178,8 @@
 #define AF_WANPIPE	25	/* Wanpipe API Sockets */
 #define AF_LLC		26	/* Linux LLC			*/
 #define AF_BLUETOOTH	31	/* Bluetooth sockets 		*/
-#define AF_MAX		32	/* For now.. */
+#define AF_IPMI		32	/* IPMI sockers 		*/
+#define AF_MAX		33	/* For now.. */
 
 /* Protocol families, same as address families. */
 #define PF_UNSPEC	AF_UNSPEC
@@ -210,6 +211,7 @@
 #define PF_WANPIPE	AF_WANPIPE
 #define PF_LLC		AF_LLC
 #define PF_BLUETOOTH	AF_BLUETOOTH
+#define PF_IPMI		AF_IPMI
 #define PF_MAX		AF_MAX
 
 /* Maximum queue length specifiable by listen.  */
include/net/af_ipmi.h +59 -0

59 lines not on this page · raw message

net/ipmi/af_ipmi.c +613 -0

613 lines not on this page · raw message

net/ipmi/Makefile +1 -0
diff -urN linux-a3/net/ipmi/Makefile linux-a4/net/ipmi/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_IPMI_SOCKET) = af_ipmi.o
net/Kconfig +11 -0
diff -urN linux-a3/net/Kconfig linux-a4/net/Kconfig
@@ -75,6 +75,17 @@
 
 	  Say Y unless you know what you are doing.
 
+config IPMI_SOCKET
+	tristate "IPMI sockets"
+	depends on IPMI_HANDLER
+	---help---
+	  If you say Y here, you will include support for IPMI sockets;
+	  This way you don't have to use devices to access IPMI.  You
+	  must also enable the IPMI message handler and a low-level
+	  driver in the Character Drivers if you enable this.
+	  
+	  If unsure, say N.
+
 config NET_KEY
 	tristate "PF_KEY sockets"
 	select XFRM
net/Makefile +1 -0
diff -urN linux-a3/net/Makefile linux-a4/net/Makefile
@@ -38,6 +38,7 @@
 obj-$(CONFIG_ECONET)		+= econet/
 obj-$(CONFIG_VLAN_8021Q)	+= 8021q/
 obj-$(CONFIG_IP_SCTP)		+= sctp/
+obj-$(CONFIG_IPMI_SOCKET)	+= ipmi/
 
 ifeq ($(CONFIG_NET),y)
 obj-$(CONFIG_SYSCTL)		+= sysctl_net.o
#1 lore raw

In message <[email protected]> you write:

net/ipmi/af_ipmi.c line 609

Quoted 3 lines
net/ipmi/af_ipmi.c +3 -0
+#ifdef CONFIG_DEBUG_KERNEL
+module_param(debug, int, 0);
+#endif

You don't want to change this at runtime? 0644 might be more appropriate...

Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.