ipmi.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602
  1. /*
  2. * ipmi.h
  3. *
  4. * MontaVista IPMI interface
  5. *
  6. * Author: MontaVista Software, Inc.
  7. * Corey Minyard <minyard@mvista.com>
  8. * source@mvista.com
  9. *
  10. * Copyright 2002 MontaVista Software Inc.
  11. *
  12. * This program is free software; you can redistribute it and/or modify it
  13. * under the terms of the GNU General Public License as published by the
  14. * Free Software Foundation; either version 2 of the License, or (at your
  15. * option) any later version.
  16. *
  17. *
  18. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
  19. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  20. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  21. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  22. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  23. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  24. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  25. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
  26. * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
  27. * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28. *
  29. * You should have received a copy of the GNU General Public License along
  30. * with this program; if not, write to the Free Software Foundation, Inc.,
  31. * 675 Mass Ave, Cambridge, MA 02139, USA.
  32. */
  33. #ifndef __LINUX_IPMI_H
  34. #define __LINUX_IPMI_H
  35. #include <linux/ipmi_msgdefs.h>
  36. /*
  37. * This file describes an interface to an IPMI driver. You have to
  38. * have a fairly good understanding of IPMI to use this, so go read
  39. * the specs first before actually trying to do anything.
  40. *
  41. * With that said, this driver provides a multi-user interface to the
  42. * IPMI driver, and it allows multiple IPMI physical interfaces below
  43. * the driver. The physical interfaces bind as a lower layer on the
  44. * driver. They appear as interfaces to the application using this
  45. * interface.
  46. *
  47. * Multi-user means that multiple applications may use the driver,
  48. * send commands, receive responses, etc. The driver keeps track of
  49. * commands the user sends and tracks the responses. The responses
  50. * will go back to the application that send the command. If the
  51. * response doesn't come back in time, the driver will return a
  52. * timeout error response to the application. Asynchronous events
  53. * from the BMC event queue will go to all users bound to the driver.
  54. * The incoming event queue in the BMC will automatically be flushed
  55. * if it becomes full and it is queried once a second to see if
  56. * anything is in it. Incoming commands to the driver will get
  57. * delivered as commands.
  58. *
  59. * This driver provides two main interfaces: one for in-kernel
  60. * applications and another for userland applications. The
  61. * capabilities are basically the same for both interface, although
  62. * the interfaces are somewhat different. The stuff in the
  63. * #ifdef KERNEL below is the in-kernel interface. The userland
  64. * interface is defined later in the file. */
  65. /*
  66. * This is an overlay for all the address types, so it's easy to
  67. * determine the actual address type. This is kind of like addresses
  68. * work for sockets.
  69. */
  70. #define IPMI_MAX_ADDR_SIZE 32
  71. struct ipmi_addr
  72. {
  73. /* Try to take these from the "Channel Medium Type" table
  74. in section 6.5 of the IPMI 1.5 manual. */
  75. int addr_type;
  76. short channel;
  77. char data[IPMI_MAX_ADDR_SIZE];
  78. };
  79. /*
  80. * When the address is not used, the type will be set to this value.
  81. * The channel is the BMC's channel number for the channel (usually
  82. * 0), or IPMC_BMC_CHANNEL if communicating directly with the BMC.
  83. */
  84. #define IPMI_SYSTEM_INTERFACE_ADDR_TYPE 0x0c
  85. struct ipmi_system_interface_addr
  86. {
  87. int addr_type;
  88. short channel;
  89. unsigned char lun;
  90. };
  91. /* An IPMB Address. */
  92. #define IPMI_IPMB_ADDR_TYPE 0x01
  93. /* Used for broadcast get device id as described in section 17.9 of the
  94. IPMI 1.5 manual. */
  95. #define IPMI_IPMB_BROADCAST_ADDR_TYPE 0x41
  96. struct ipmi_ipmb_addr
  97. {
  98. int addr_type;
  99. short channel;
  100. unsigned char slave_addr;
  101. unsigned char lun;
  102. };
  103. /*
  104. * A LAN Address. This is an address to/from a LAN interface bridged
  105. * by the BMC, not an address actually out on the LAN.
  106. *
  107. * A concious decision was made here to deviate slightly from the IPMI
  108. * spec. We do not use rqSWID and rsSWID like it shows in the
  109. * message. Instead, we use remote_SWID and local_SWID. This means
  110. * that any message (a request or response) from another device will
  111. * always have exactly the same address. If you didn't do this,
  112. * requests and responses from the same device would have different
  113. * addresses, and that's not too cool.
  114. *
  115. * In this address, the remote_SWID is always the SWID the remote
  116. * message came from, or the SWID we are sending the message to.
  117. * local_SWID is always our SWID. Note that having our SWID in the
  118. * message is a little weird, but this is required.
  119. */
  120. #define IPMI_LAN_ADDR_TYPE 0x04
  121. struct ipmi_lan_addr
  122. {
  123. int addr_type;
  124. short channel;
  125. unsigned char privilege;
  126. unsigned char session_handle;
  127. unsigned char remote_SWID;
  128. unsigned char local_SWID;
  129. unsigned char lun;
  130. };
  131. /*
  132. * Channel for talking directly with the BMC. When using this
  133. * channel, This is for the system interface address type only. FIXME
  134. * - is this right, or should we use -1?
  135. */
  136. #define IPMI_BMC_CHANNEL 0xf
  137. #define IPMI_NUM_CHANNELS 0x10
  138. /*
  139. * A raw IPMI message without any addressing. This covers both
  140. * commands and responses. The completion code is always the first
  141. * byte of data in the response (as the spec shows the messages laid
  142. * out).
  143. */
  144. struct ipmi_msg
  145. {
  146. unsigned char netfn;
  147. unsigned char cmd;
  148. unsigned short data_len;
  149. unsigned char __user *data;
  150. };
  151. struct kernel_ipmi_msg
  152. {
  153. unsigned char netfn;
  154. unsigned char cmd;
  155. unsigned short data_len;
  156. unsigned char *data;
  157. };
  158. /*
  159. * Various defines that are useful for IPMI applications.
  160. */
  161. #define IPMI_INVALID_CMD_COMPLETION_CODE 0xC1
  162. #define IPMI_TIMEOUT_COMPLETION_CODE 0xC3
  163. #define IPMI_UNKNOWN_ERR_COMPLETION_CODE 0xff
  164. /*
  165. * Receive types for messages coming from the receive interface. This
  166. * is used for the receive in-kernel interface and in the receive
  167. * IOCTL.
  168. *
  169. * The "IPMI_RESPONSE_RESPNOSE_TYPE" is a little strange sounding, but
  170. * it allows you to get the message results when you send a response
  171. * message.
  172. */
  173. #define IPMI_RESPONSE_RECV_TYPE 1 /* A response to a command */
  174. #define IPMI_ASYNC_EVENT_RECV_TYPE 2 /* Something from the event queue */
  175. #define IPMI_CMD_RECV_TYPE 3 /* A command from somewhere else */
  176. #define IPMI_RESPONSE_RESPONSE_TYPE 4 /* The response for
  177. a sent response, giving any
  178. error status for sending the
  179. response. When you send a
  180. response message, this will
  181. be returned. */
  182. /* Note that async events and received commands do not have a completion
  183. code as the first byte of the incoming data, unlike a response. */
  184. #ifdef __KERNEL__
  185. /*
  186. * The in-kernel interface.
  187. */
  188. #include <linux/list.h>
  189. #include <linux/module.h>
  190. /* Opaque type for a IPMI message user. One of these is needed to
  191. send and receive messages. */
  192. typedef struct ipmi_user *ipmi_user_t;
  193. /*
  194. * Stuff coming from the receive interface comes as one of these.
  195. * They are allocated, the receiver must free them with
  196. * ipmi_free_recv_msg() when done with the message. The link is not
  197. * used after the message is delivered, so the upper layer may use the
  198. * link to build a linked list, if it likes.
  199. */
  200. struct ipmi_recv_msg
  201. {
  202. struct list_head link;
  203. /* The type of message as defined in the "Receive Types"
  204. defines above. */
  205. int recv_type;
  206. ipmi_user_t user;
  207. struct ipmi_addr addr;
  208. long msgid;
  209. struct kernel_ipmi_msg msg;
  210. /* The user_msg_data is the data supplied when a message was
  211. sent, if this is a response to a sent message. If this is
  212. not a response to a sent message, then user_msg_data will
  213. be NULL. */
  214. void *user_msg_data;
  215. /* Call this when done with the message. It will presumably free
  216. the message and do any other necessary cleanup. */
  217. void (*done)(struct ipmi_recv_msg *msg);
  218. /* Place-holder for the data, don't make any assumptions about
  219. the size or existance of this, since it may change. */
  220. unsigned char msg_data[IPMI_MAX_MSG_LENGTH];
  221. };
  222. /* Allocate and free the receive message. */
  223. static inline void ipmi_free_recv_msg(struct ipmi_recv_msg *msg)
  224. {
  225. msg->done(msg);
  226. }
  227. struct ipmi_user_hndl
  228. {
  229. /* Routine type to call when a message needs to be routed to
  230. the upper layer. This will be called with some locks held,
  231. the only IPMI routines that can be called are ipmi_request
  232. and the alloc/free operations. The handler_data is the
  233. variable supplied when the receive handler was registered. */
  234. void (*ipmi_recv_hndl)(struct ipmi_recv_msg *msg,
  235. void *user_msg_data);
  236. /* Called when the interface detects a watchdog pre-timeout. If
  237. this is NULL, it will be ignored for the user. */
  238. void (*ipmi_watchdog_pretimeout)(void *handler_data);
  239. };
  240. /* Create a new user of the IPMI layer on the given interface number. */
  241. int ipmi_create_user(unsigned int if_num,
  242. struct ipmi_user_hndl *handler,
  243. void *handler_data,
  244. ipmi_user_t *user);
  245. /* Destroy the given user of the IPMI layer. Note that after this
  246. function returns, the system is guaranteed to not call any
  247. callbacks for the user. Thus as long as you destroy all the users
  248. before you unload a module, you will be safe. And if you destroy
  249. the users before you destroy the callback structures, it should be
  250. safe, too. */
  251. int ipmi_destroy_user(ipmi_user_t user);
  252. /* Get the IPMI version of the BMC we are talking to. */
  253. void ipmi_get_version(ipmi_user_t user,
  254. unsigned char *major,
  255. unsigned char *minor);
  256. /* Set and get the slave address and LUN that we will use for our
  257. source messages. Note that this affects the interface, not just
  258. this user, so it will affect all users of this interface. This is
  259. so some initialization code can come in and do the OEM-specific
  260. things it takes to determine your address (if not the BMC) and set
  261. it for everyone else. */
  262. void ipmi_set_my_address(ipmi_user_t user,
  263. unsigned char address);
  264. unsigned char ipmi_get_my_address(ipmi_user_t user);
  265. void ipmi_set_my_LUN(ipmi_user_t user,
  266. unsigned char LUN);
  267. unsigned char ipmi_get_my_LUN(ipmi_user_t user);
  268. /*
  269. * Like ipmi_request, but lets you specify the number of retries and
  270. * the retry time. The retries is the number of times the message
  271. * will be resent if no reply is received. If set to -1, the default
  272. * value will be used. The retry time is the time in milliseconds
  273. * between retries. If set to zero, the default value will be
  274. * used.
  275. *
  276. * Don't use this unless you *really* have to. It's primarily for the
  277. * IPMI over LAN converter; since the LAN stuff does its own retries,
  278. * it makes no sense to do it here. However, this can be used if you
  279. * have unusual requirements.
  280. */
  281. int ipmi_request_settime(ipmi_user_t user,
  282. struct ipmi_addr *addr,
  283. long msgid,
  284. struct kernel_ipmi_msg *msg,
  285. void *user_msg_data,
  286. int priority,
  287. int max_retries,
  288. unsigned int retry_time_ms);
  289. /*
  290. * Like ipmi_request, but with messages supplied. This will not
  291. * allocate any memory, and the messages may be statically allocated
  292. * (just make sure to do the "done" handling on them). Note that this
  293. * is primarily for the watchdog timer, since it should be able to
  294. * send messages even if no memory is available. This is subject to
  295. * change as the system changes, so don't use it unless you REALLY
  296. * have to.
  297. */
  298. int ipmi_request_supply_msgs(ipmi_user_t user,
  299. struct ipmi_addr *addr,
  300. long msgid,
  301. struct kernel_ipmi_msg *msg,
  302. void *user_msg_data,
  303. void *supplied_smi,
  304. struct ipmi_recv_msg *supplied_recv,
  305. int priority);
  306. /*
  307. * When commands come in to the SMS, the user can register to receive
  308. * them. Only one user can be listening on a specific netfn/cmd pair
  309. * at a time, you will get an EBUSY error if the command is already
  310. * registered. If a command is received that does not have a user
  311. * registered, the driver will automatically return the proper
  312. * error.
  313. */
  314. int ipmi_register_for_cmd(ipmi_user_t user,
  315. unsigned char netfn,
  316. unsigned char cmd);
  317. int ipmi_unregister_for_cmd(ipmi_user_t user,
  318. unsigned char netfn,
  319. unsigned char cmd);
  320. /*
  321. * Allow run-to-completion mode to be set for the interface of
  322. * a specific user.
  323. */
  324. void ipmi_user_set_run_to_completion(ipmi_user_t user, int val);
  325. /*
  326. * When the user is created, it will not receive IPMI events by
  327. * default. The user must set this to TRUE to get incoming events.
  328. * The first user that sets this to TRUE will receive all events that
  329. * have been queued while no one was waiting for events.
  330. */
  331. int ipmi_set_gets_events(ipmi_user_t user, int val);
  332. /*
  333. * Called when a new SMI is registered. This will also be called on
  334. * every existing interface when a new watcher is registered with
  335. * ipmi_smi_watcher_register().
  336. */
  337. struct ipmi_smi_watcher
  338. {
  339. struct list_head link;
  340. /* You must set the owner to the current module, if you are in
  341. a module (generally just set it to "THIS_MODULE"). */
  342. struct module *owner;
  343. /* These two are called with read locks held for the interface
  344. the watcher list. So you can add and remove users from the
  345. IPMI interface, send messages, etc., but you cannot add
  346. or remove SMI watchers or SMI interfaces. */
  347. void (*new_smi)(int if_num);
  348. void (*smi_gone)(int if_num);
  349. };
  350. int ipmi_smi_watcher_register(struct ipmi_smi_watcher *watcher);
  351. int ipmi_smi_watcher_unregister(struct ipmi_smi_watcher *watcher);
  352. /* The following are various helper functions for dealing with IPMI
  353. addresses. */
  354. /* Return the maximum length of an IPMI address given it's type. */
  355. unsigned int ipmi_addr_length(int addr_type);
  356. /* Validate that the given IPMI address is valid. */
  357. int ipmi_validate_addr(struct ipmi_addr *addr, int len);
  358. #endif /* __KERNEL__ */
  359. /*
  360. * The userland interface
  361. */
  362. /*
  363. * The userland interface for the IPMI driver is a standard character
  364. * device, with each instance of an interface registered as a minor
  365. * number under the major character device.
  366. *
  367. * The read and write calls do not work, to get messages in and out
  368. * requires ioctl calls because of the complexity of the data. select
  369. * and poll do work, so you can wait for input using the file
  370. * descriptor, you just can use read to get it.
  371. *
  372. * In general, you send a command down to the interface and receive
  373. * responses back. You can use the msgid value to correlate commands
  374. * and responses, the driver will take care of figuring out which
  375. * incoming messages are for which command and find the proper msgid
  376. * value to report. You will only receive reponses for commands you
  377. * send. Asynchronous events, however, go to all open users, so you
  378. * must be ready to handle these (or ignore them if you don't care).
  379. *
  380. * The address type depends upon the channel type. When talking
  381. * directly to the BMC (IPMC_BMC_CHANNEL), the address is ignored
  382. * (IPMI_UNUSED_ADDR_TYPE). When talking to an IPMB channel, you must
  383. * supply a valid IPMB address with the addr_type set properly.
  384. *
  385. * When talking to normal channels, the driver takes care of the
  386. * details of formatting and sending messages on that channel. You do
  387. * not, for instance, have to format a send command, you just send
  388. * whatever command you want to the channel, the driver will create
  389. * the send command, automatically issue receive command and get even
  390. * commands, and pass those up to the proper user.
  391. */
  392. /* The magic IOCTL value for this interface. */
  393. #define IPMI_IOC_MAGIC 'i'
  394. /* Messages sent to the interface are this format. */
  395. struct ipmi_req
  396. {
  397. unsigned char __user *addr; /* Address to send the message to. */
  398. unsigned int addr_len;
  399. long msgid; /* The sequence number for the message. This
  400. exact value will be reported back in the
  401. response to this request if it is a command.
  402. If it is a response, this will be used as
  403. the sequence value for the response. */
  404. struct ipmi_msg msg;
  405. };
  406. /*
  407. * Send a message to the interfaces. error values are:
  408. * - EFAULT - an address supplied was invalid.
  409. * - EINVAL - The address supplied was not valid, or the command
  410. * was not allowed.
  411. * - EMSGSIZE - The message to was too large.
  412. * - ENOMEM - Buffers could not be allocated for the command.
  413. */
  414. #define IPMICTL_SEND_COMMAND _IOR(IPMI_IOC_MAGIC, 13, \
  415. struct ipmi_req)
  416. /* Messages sent to the interface with timing parameters are this
  417. format. */
  418. struct ipmi_req_settime
  419. {
  420. struct ipmi_req req;
  421. /* See ipmi_request_settime() above for details on these
  422. values. */
  423. int retries;
  424. unsigned int retry_time_ms;
  425. };
  426. /*
  427. * Send a message to the interfaces with timing parameters. error values
  428. * are:
  429. * - EFAULT - an address supplied was invalid.
  430. * - EINVAL - The address supplied was not valid, or the command
  431. * was not allowed.
  432. * - EMSGSIZE - The message to was too large.
  433. * - ENOMEM - Buffers could not be allocated for the command.
  434. */
  435. #define IPMICTL_SEND_COMMAND_SETTIME _IOR(IPMI_IOC_MAGIC, 21, \
  436. struct ipmi_req_settime)
  437. /* Messages received from the interface are this format. */
  438. struct ipmi_recv
  439. {
  440. int recv_type; /* Is this a command, response or an
  441. asyncronous event. */
  442. unsigned char __user *addr; /* Address the message was from is put
  443. here. The caller must supply the
  444. memory. */
  445. unsigned int addr_len; /* The size of the address buffer.
  446. The caller supplies the full buffer
  447. length, this value is updated to
  448. the actual message length when the
  449. message is received. */
  450. long msgid; /* The sequence number specified in the request
  451. if this is a response. If this is a command,
  452. this will be the sequence number from the
  453. command. */
  454. struct ipmi_msg msg; /* The data field must point to a buffer.
  455. The data_size field must be set to the
  456. size of the message buffer. The
  457. caller supplies the full buffer
  458. length, this value is updated to the
  459. actual message length when the message
  460. is received. */
  461. };
  462. /*
  463. * Receive a message. error values:
  464. * - EAGAIN - no messages in the queue.
  465. * - EFAULT - an address supplied was invalid.
  466. * - EINVAL - The address supplied was not valid.
  467. * - EMSGSIZE - The message to was too large to fit into the message buffer,
  468. * the message will be left in the buffer. */
  469. #define IPMICTL_RECEIVE_MSG _IOWR(IPMI_IOC_MAGIC, 12, \
  470. struct ipmi_recv)
  471. /*
  472. * Like RECEIVE_MSG, but if the message won't fit in the buffer, it
  473. * will truncate the contents instead of leaving the data in the
  474. * buffer.
  475. */
  476. #define IPMICTL_RECEIVE_MSG_TRUNC _IOWR(IPMI_IOC_MAGIC, 11, \
  477. struct ipmi_recv)
  478. /* Register to get commands from other entities on this interface. */
  479. struct ipmi_cmdspec
  480. {
  481. unsigned char netfn;
  482. unsigned char cmd;
  483. };
  484. /*
  485. * Register to receive a specific command. error values:
  486. * - EFAULT - an address supplied was invalid.
  487. * - EBUSY - The netfn/cmd supplied was already in use.
  488. * - ENOMEM - could not allocate memory for the entry.
  489. */
  490. #define IPMICTL_REGISTER_FOR_CMD _IOR(IPMI_IOC_MAGIC, 14, \
  491. struct ipmi_cmdspec)
  492. /*
  493. * Unregister a regsitered command. error values:
  494. * - EFAULT - an address supplied was invalid.
  495. * - ENOENT - The netfn/cmd was not found registered for this user.
  496. */
  497. #define IPMICTL_UNREGISTER_FOR_CMD _IOR(IPMI_IOC_MAGIC, 15, \
  498. struct ipmi_cmdspec)
  499. /*
  500. * Set whether this interface receives events. Note that the first
  501. * user registered for events will get all pending events for the
  502. * interface. error values:
  503. * - EFAULT - an address supplied was invalid.
  504. */
  505. #define IPMICTL_SET_GETS_EVENTS_CMD _IOR(IPMI_IOC_MAGIC, 16, int)
  506. /*
  507. * Set and get the slave address and LUN that we will use for our
  508. * source messages. Note that this affects the interface, not just
  509. * this user, so it will affect all users of this interface. This is
  510. * so some initialization code can come in and do the OEM-specific
  511. * things it takes to determine your address (if not the BMC) and set
  512. * it for everyone else. You should probably leave the LUN alone.
  513. */
  514. #define IPMICTL_SET_MY_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 17, unsigned int)
  515. #define IPMICTL_GET_MY_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC, 18, unsigned int)
  516. #define IPMICTL_SET_MY_LUN_CMD _IOR(IPMI_IOC_MAGIC, 19, unsigned int)
  517. #define IPMICTL_GET_MY_LUN_CMD _IOR(IPMI_IOC_MAGIC, 20, unsigned int)
  518. /*
  519. * Get/set the default timing values for an interface. You shouldn't
  520. * generally mess with these.
  521. */
  522. struct ipmi_timing_parms
  523. {
  524. int retries;
  525. unsigned int retry_time_ms;
  526. };
  527. #define IPMICTL_SET_TIMING_PARMS_CMD _IOR(IPMI_IOC_MAGIC, 22, \
  528. struct ipmi_timing_parms)
  529. #define IPMICTL_GET_TIMING_PARMS_CMD _IOR(IPMI_IOC_MAGIC, 23, \
  530. struct ipmi_timing_parms)
  531. #endif /* __LINUX_IPMI_H */