summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rdma/hfi1/mad.c
diff options
context:
space:
mode:
authorEaswar Hariharan2016-02-03 23:35:57 +0100
committerDoug Ledford2016-03-11 02:37:57 +0100
commit91ab4ed334d0ea2f6c720ecb6204c3de350aaa08 (patch)
tree5209268c0a5b13dadae8de852c686e87af4cfba5 /drivers/staging/rdma/hfi1/mad.c
parentstaging/rdma/hfi1: Split last 8 bytes of copy to user buffer (diff)
downloadkernel-qcow2-linux-91ab4ed334d0ea2f6c720ecb6204c3de350aaa08.tar.gz
kernel-qcow2-linux-91ab4ed334d0ea2f6c720ecb6204c3de350aaa08.tar.xz
kernel-qcow2-linux-91ab4ed334d0ea2f6c720ecb6204c3de350aaa08.zip
staging/rdma/hfi1: Implement LED beaconing for maintenance
This patch implements LED beaconing for maintenance. A MAD packet with the LEDInfo attribute set to 1 will enable LED beaconing with a duty cycle of 2s on and 1.5s off. A MAD packet with the LEDInfo attribute set to 0 will disable beaconing and return the LED to normal operation. Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Easwar Hariharan <easwar.hariharan@intel.com> Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com> Signed-off-by: Jubin John <jubin.john@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/staging/rdma/hfi1/mad.c')
-rw-r--r--drivers/staging/rdma/hfi1/mad.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/staging/rdma/hfi1/mad.c b/drivers/staging/rdma/hfi1/mad.c
index 5146f5df7a10..6976f93bd36f 100644
--- a/drivers/staging/rdma/hfi1/mad.c
+++ b/drivers/staging/rdma/hfi1/mad.c
@@ -5,7 +5,7 @@
*
* GPL LICENSE SUMMARY
*
- * Copyright(c) 2015 Intel Corporation.
+ * Copyright(c) 2015, 2016 Intel Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of version 2 of the GNU General Public License as
@@ -18,7 +18,7 @@
*
* BSD LICENSE
*
- * Copyright(c) 2015 Intel Corporation.
+ * Copyright(c) 2015, 2016 Intel Corporation.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -3449,7 +3449,10 @@ static int __subn_set_opa_led_info(struct opa_smp *smp, u32 am, u8 *data,
return reply((struct ib_mad_hdr *)smp);
}
- setextled(dd, on);
+ if (on)
+ hfi1_set_led_override(dd->pport, 2000, 1500);
+ else
+ hfi1_set_led_override(dd->pport, 0, 0);
return __subn_get_opa_led_info(smp, am, data, ibdev, port, resp_len);
}