diff options
author | Corey Minyard <minyard@acm.org> | 2006-10-01 02:27:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-01 03:39:23 -0400 |
commit | c69c31270c35a6b8421a8e4ba81de1247ac6df95 (patch) | |
tree | 5f46902faa683f32a69adbe53c8ec3ca4ed19466 /drivers/char/ipmi/ipmi_devintf.c | |
parent | 54f67f631dfc25ca7a8b19200e34013abc974337 (diff) |
[PATCH] IPMI: per-channel command registration
This patch adds the ability to register for a command per-channel in the
IPMI driver.
If your BMC supports multiple channels, incoming messages can be useful to
have the ability to register to receive commands on a specific channel
instead the current behaviour of all channels.
Signed-off-by: David Barksdale <amatus@ocgnet.org>
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/ipmi/ipmi_devintf.c')
-rw-r--r-- | drivers/char/ipmi/ipmi_devintf.c | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c index 68d7c61a864..81fcf0ce21d 100644 --- a/drivers/char/ipmi/ipmi_devintf.c +++ b/drivers/char/ipmi/ipmi_devintf.c | |||
@@ -377,7 +377,8 @@ static int ipmi_ioctl(struct inode *inode, | |||
377 | break; | 377 | break; |
378 | } | 378 | } |
379 | 379 | ||
380 | rv = ipmi_register_for_cmd(priv->user, val.netfn, val.cmd); | 380 | rv = ipmi_register_for_cmd(priv->user, val.netfn, val.cmd, |
381 | IPMI_CHAN_ALL); | ||
381 | break; | 382 | break; |
382 | } | 383 | } |
383 | 384 | ||
@@ -390,7 +391,36 @@ static int ipmi_ioctl(struct inode *inode, | |||
390 | break; | 391 | break; |
391 | } | 392 | } |
392 | 393 | ||
393 | rv = ipmi_unregister_for_cmd(priv->user, val.netfn, val.cmd); | 394 | rv = ipmi_unregister_for_cmd(priv->user, val.netfn, val.cmd, |
395 | IPMI_CHAN_ALL); | ||
396 | break; | ||
397 | } | ||
398 | |||
399 | case IPMICTL_REGISTER_FOR_CMD_CHANS: | ||
400 | { | ||
401 | struct ipmi_cmdspec_chans val; | ||
402 | |||
403 | if (copy_from_user(&val, arg, sizeof(val))) { | ||
404 | rv = -EFAULT; | ||
405 | break; | ||
406 | } | ||
407 | |||
408 | rv = ipmi_register_for_cmd(priv->user, val.netfn, val.cmd, | ||
409 | val.chans); | ||
410 | break; | ||
411 | } | ||
412 | |||
413 | case IPMICTL_UNREGISTER_FOR_CMD_CHANS: | ||
414 | { | ||
415 | struct ipmi_cmdspec_chans val; | ||
416 | |||
417 | if (copy_from_user(&val, arg, sizeof(val))) { | ||
418 | rv = -EFAULT; | ||
419 | break; | ||
420 | } | ||
421 | |||
422 | rv = ipmi_unregister_for_cmd(priv->user, val.netfn, val.cmd, | ||
423 | val.chans); | ||
394 | break; | 424 | break; |
395 | } | 425 | } |
396 | 426 | ||