diff options
author | Saurav Kashyap <saurav.kashyap@qlogic.com> | 2011-08-16 14:31:45 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-08-29 03:14:55 -0400 |
commit | 999916dc59dc2fb0de221ad607d58cdc88fcbbe4 (patch) | |
tree | 6c4aa867e0bfaf31ea045578b5d04778cf8858f9 /drivers/scsi/qla2xxx/qla_nx.c | |
parent | 08de2844c626511cfd1db9c36e5e7d126707f780 (diff) |
[SCSI] qla2xxx: Implemeted beacon on/off for ISP82XX.
[jejb: fix up checkpatch.pl errors]
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_nx.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_nx.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c index 43a0a9a4556f..b03c86b7a989 100644 --- a/drivers/scsi/qla2xxx/qla_nx.c +++ b/drivers/scsi/qla2xxx/qla_nx.c | |||
@@ -4874,3 +4874,43 @@ qla82xx_md_prep(scsi_qla_host_t *vha) | |||
4874 | } | 4874 | } |
4875 | } | 4875 | } |
4876 | } | 4876 | } |
4877 | |||
4878 | int | ||
4879 | qla82xx_beacon_on(struct scsi_qla_host *vha) | ||
4880 | { | ||
4881 | |||
4882 | int rval; | ||
4883 | struct qla_hw_data *ha = vha->hw; | ||
4884 | qla82xx_idc_lock(ha); | ||
4885 | rval = qla82xx_mbx_beacon_ctl(vha, 1); | ||
4886 | |||
4887 | if (rval) { | ||
4888 | ql_log(ql_log_warn, vha, 0xb050, | ||
4889 | "mbx set led config failed in %s\n", __func__); | ||
4890 | goto exit; | ||
4891 | } | ||
4892 | ha->beacon_blink_led = 1; | ||
4893 | exit: | ||
4894 | qla82xx_idc_unlock(ha); | ||
4895 | return rval; | ||
4896 | } | ||
4897 | |||
4898 | int | ||
4899 | qla82xx_beacon_off(struct scsi_qla_host *vha) | ||
4900 | { | ||
4901 | |||
4902 | int rval; | ||
4903 | struct qla_hw_data *ha = vha->hw; | ||
4904 | qla82xx_idc_lock(ha); | ||
4905 | rval = qla82xx_mbx_beacon_ctl(vha, 0); | ||
4906 | |||
4907 | if (rval) { | ||
4908 | ql_log(ql_log_warn, vha, 0xb051, | ||
4909 | "mbx set led config failed in %s\n", __func__); | ||
4910 | goto exit; | ||
4911 | } | ||
4912 | ha->beacon_blink_led = 0; | ||
4913 | exit: | ||
4914 | qla82xx_idc_unlock(ha); | ||
4915 | return rval; | ||
4916 | } | ||