aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_iba6110.c
diff options
context:
space:
mode:
authorMichael Albaugh <michael.albaugh@qlogic.com>2007-05-16 18:45:09 -0400
committerRoland Dreier <rolandd@cisco.com>2007-07-09 23:12:25 -0400
commit82466f00ec6ef0a5ca7ea8991c731af2ec561c7d (patch)
tree48fcc8f78e6df67130e8c70b160fea42aeff79ca /drivers/infiniband/hw/ipath/ipath_iba6110.c
parenta024291b367f98188f4da4a66a9f2f40a2163efb (diff)
IB/ipath: Support blinking LEDs with an led_override file
When we want to find an InfiniPath HCA in a rack of nodes, it is often expeditious to blink the status LEDs via a userspace /sys file. A write-only led_override "file" is published per device. Writes to this file are interpreted as (string form) numbers, and the resulting value sent to ipath_set_led_override(). The upper eight bits are interpretted as a 4.4 fixed-point "frequency in Hertz", and the bottom two 4-bit values are alternately (D0..3, then D4..7) used by the board-specific LED-setting function to override the normal state. Signed-off-by: Michael Albaugh <michael.albaugh@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_iba6110.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_iba6110.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_iba6110.c b/drivers/infiniband/hw/ipath/ipath_iba6110.c
index ba73dd0a06cd..4372c6c50ff6 100644
--- a/drivers/infiniband/hw/ipath/ipath_iba6110.c
+++ b/drivers/infiniband/hw/ipath/ipath_iba6110.c
@@ -1065,6 +1065,16 @@ static void ipath_setup_ht_setextled(struct ipath_devdata *dd,
1065 if (ipath_diag_inuse) 1065 if (ipath_diag_inuse)
1066 return; 1066 return;
1067 1067
1068 /* Allow override of LED display for, e.g. Locating system in rack */
1069 if (dd->ipath_led_override) {
1070 ltst = (dd->ipath_led_override & IPATH_LED_PHYS)
1071 ? INFINIPATH_IBCS_LT_STATE_LINKUP
1072 : INFINIPATH_IBCS_LT_STATE_DISABLED;
1073 lst = (dd->ipath_led_override & IPATH_LED_LOG)
1074 ? INFINIPATH_IBCS_L_STATE_ACTIVE
1075 : INFINIPATH_IBCS_L_STATE_DOWN;
1076 }
1077
1068 /* 1078 /*
1069 * start by setting both LED control bits to off, then turn 1079 * start by setting both LED control bits to off, then turn
1070 * on the appropriate bit(s). 1080 * on the appropriate bit(s).