diff options
-rw-r--r-- | drivers/scsi/qla2xxx/qla_dbg.c | 4 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_gbl.h | 3 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 38 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_nx.c | 40 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_nx.h | 1 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 13 |
6 files changed, 92 insertions, 7 deletions
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index 238bc9178219..9df4787715c0 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.c +++ b/drivers/scsi/qla2xxx/qla_dbg.c | |||
@@ -12,7 +12,7 @@ | |||
12 | * | Level | Last Value Used | Holes | | 12 | * | Level | Last Value Used | Holes | |
13 | * ---------------------------------------------------------------------- | 13 | * ---------------------------------------------------------------------- |
14 | * | Module Init and Probe | 0x0116 | | | 14 | * | Module Init and Probe | 0x0116 | | |
15 | * | Mailbox commands | 0x1126 | | | 15 | * | Mailbox commands | 0x1129 | | |
16 | * | Device Discovery | 0x2083 | | | 16 | * | Device Discovery | 0x2083 | | |
17 | * | Queue Command and IO tracing | 0x302e | 0x3008 | | 17 | * | Queue Command and IO tracing | 0x302e | 0x3008 | |
18 | * | DPC Thread | 0x401c | | | 18 | * | DPC Thread | 0x401c | | |
@@ -22,7 +22,7 @@ | |||
22 | * | Task Management | 0x8041 | | | 22 | * | Task Management | 0x8041 | | |
23 | * | AER/EEH | 0x900f | | | 23 | * | AER/EEH | 0x900f | | |
24 | * | Virtual Port | 0xa007 | | | 24 | * | Virtual Port | 0xa007 | | |
25 | * | ISP82XX Specific | 0xb04f | | | 25 | * | ISP82XX Specific | 0xb051 | | |
26 | * | MultiQ | 0xc00b | | | 26 | * | MultiQ | 0xc00b | | |
27 | * | Misc | 0xd00b | | | 27 | * | Misc | 0xd00b | | |
28 | * ---------------------------------------------------------------------- | 28 | * ---------------------------------------------------------------------- |
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index df58e2451781..e1aebae553a9 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h | |||
@@ -409,6 +409,8 @@ extern void qla2x00_beacon_blink(struct scsi_qla_host *); | |||
409 | extern int qla24xx_beacon_on(struct scsi_qla_host *); | 409 | extern int qla24xx_beacon_on(struct scsi_qla_host *); |
410 | extern int qla24xx_beacon_off(struct scsi_qla_host *); | 410 | extern int qla24xx_beacon_off(struct scsi_qla_host *); |
411 | extern void qla24xx_beacon_blink(struct scsi_qla_host *); | 411 | extern void qla24xx_beacon_blink(struct scsi_qla_host *); |
412 | extern int qla82xx_beacon_on(struct scsi_qla_host *); | ||
413 | extern int qla82xx_beacon_off(struct scsi_qla_host *); | ||
412 | 414 | ||
413 | extern uint8_t *qla2x00_read_optrom_data(struct scsi_qla_host *, uint8_t *, | 415 | extern uint8_t *qla2x00_read_optrom_data(struct scsi_qla_host *, uint8_t *, |
414 | uint32_t, uint32_t); | 416 | uint32_t, uint32_t); |
@@ -573,6 +575,7 @@ extern int qla82xx_mbx_intr_disable(scsi_qla_host_t *); | |||
573 | extern void qla82xx_start_iocbs(srb_t *); | 575 | extern void qla82xx_start_iocbs(srb_t *); |
574 | extern int qla82xx_fcoe_ctx_reset(scsi_qla_host_t *); | 576 | extern int qla82xx_fcoe_ctx_reset(scsi_qla_host_t *); |
575 | extern void qla82xx_chip_reset_cleanup(scsi_qla_host_t *); | 577 | extern void qla82xx_chip_reset_cleanup(scsi_qla_host_t *); |
578 | extern int qla82xx_mbx_beacon_ctl(scsi_qla_host_t *, int); | ||
576 | extern char *qdev_state(uint32_t); | 579 | extern char *qdev_state(uint32_t); |
577 | 580 | ||
578 | /* BSG related functions */ | 581 | /* BSG related functions */ |
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index a41137452c41..3b3cec9f6ac2 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -4275,3 +4275,41 @@ qla82xx_md_get_template(scsi_qla_host_t *vha) | |||
4275 | ql_dbg(ql_dbg_mbx, vha, 0x1126, "Done %s.\n", __func__); | 4275 | ql_dbg(ql_dbg_mbx, vha, 0x1126, "Done %s.\n", __func__); |
4276 | return rval; | 4276 | return rval; |
4277 | } | 4277 | } |
4278 | |||
4279 | int | ||
4280 | qla82xx_mbx_beacon_ctl(scsi_qla_host_t *vha, int enable) | ||
4281 | { | ||
4282 | int rval; | ||
4283 | struct qla_hw_data *ha = vha->hw; | ||
4284 | mbx_cmd_t mc; | ||
4285 | mbx_cmd_t *mcp = &mc; | ||
4286 | |||
4287 | if (!IS_QLA82XX(ha)) | ||
4288 | return QLA_FUNCTION_FAILED; | ||
4289 | |||
4290 | ql_dbg(ql_dbg_mbx, vha, 0x1127, | ||
4291 | "Entered %s.\n", __func__); | ||
4292 | |||
4293 | memset(mcp, 0, sizeof(mbx_cmd_t)); | ||
4294 | mcp->mb[0] = MBC_SET_LED_CONFIG; | ||
4295 | if (enable) | ||
4296 | mcp->mb[7] = 0xE; | ||
4297 | else | ||
4298 | mcp->mb[7] = 0xD; | ||
4299 | |||
4300 | mcp->out_mb = MBX_7|MBX_0; | ||
4301 | mcp->in_mb = MBX_0; | ||
4302 | mcp->tov = 30; | ||
4303 | mcp->flags = 0; | ||
4304 | |||
4305 | rval = qla2x00_mailbox_command(vha, mcp); | ||
4306 | if (rval != QLA_SUCCESS) { | ||
4307 | ql_dbg(ql_dbg_mbx, vha, 0x1128, | ||
4308 | "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); | ||
4309 | } else { | ||
4310 | ql_dbg(ql_dbg_mbx, vha, 0x1129, | ||
4311 | "Done %s.\n", __func__); | ||
4312 | } | ||
4313 | |||
4314 | return rval; | ||
4315 | } | ||
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 | } | ||
diff --git a/drivers/scsi/qla2xxx/qla_nx.h b/drivers/scsi/qla2xxx/qla_nx.h index 97ee250b63bb..57820c199bc2 100644 --- a/drivers/scsi/qla2xxx/qla_nx.h +++ b/drivers/scsi/qla2xxx/qla_nx.h | |||
@@ -888,6 +888,7 @@ struct ct6_dsd { | |||
888 | }; | 888 | }; |
889 | 889 | ||
890 | #define MBC_TOGGLE_INTERRUPT 0x10 | 890 | #define MBC_TOGGLE_INTERRUPT 0x10 |
891 | #define MBC_SET_LED_CONFIG 0x125 | ||
891 | 892 | ||
892 | /* Flash offset */ | 893 | /* Flash offset */ |
893 | #define FLT_REG_BOOTLOAD_82XX 0x72 | 894 | #define FLT_REG_BOOTLOAD_82XX 0x72 |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index e37556ce211f..ca9c76e0ff97 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -1762,9 +1762,9 @@ static struct isp_operations qla82xx_isp_ops = { | |||
1762 | .read_nvram = qla24xx_read_nvram_data, | 1762 | .read_nvram = qla24xx_read_nvram_data, |
1763 | .write_nvram = qla24xx_write_nvram_data, | 1763 | .write_nvram = qla24xx_write_nvram_data, |
1764 | .fw_dump = qla24xx_fw_dump, | 1764 | .fw_dump = qla24xx_fw_dump, |
1765 | .beacon_on = qla24xx_beacon_on, | 1765 | .beacon_on = qla82xx_beacon_on, |
1766 | .beacon_off = qla24xx_beacon_off, | 1766 | .beacon_off = qla82xx_beacon_off, |
1767 | .beacon_blink = qla24xx_beacon_blink, | 1767 | .beacon_blink = NULL, |
1768 | .read_optrom = qla82xx_read_optrom_data, | 1768 | .read_optrom = qla82xx_read_optrom_data, |
1769 | .write_optrom = qla82xx_write_optrom_data, | 1769 | .write_optrom = qla82xx_write_optrom_data, |
1770 | .get_flash_version = qla24xx_get_flash_version, | 1770 | .get_flash_version = qla24xx_get_flash_version, |
@@ -3917,8 +3917,11 @@ qla2x00_timer(scsi_qla_host_t *vha) | |||
3917 | 3917 | ||
3918 | /* Check if beacon LED needs to be blinked for physical host only */ | 3918 | /* Check if beacon LED needs to be blinked for physical host only */ |
3919 | if (!vha->vp_idx && (ha->beacon_blink_led == 1)) { | 3919 | if (!vha->vp_idx && (ha->beacon_blink_led == 1)) { |
3920 | set_bit(BEACON_BLINK_NEEDED, &vha->dpc_flags); | 3920 | /* There is no beacon_blink function for ISP82xx */ |
3921 | start_dpc++; | 3921 | if (!IS_QLA82XX(ha)) { |
3922 | set_bit(BEACON_BLINK_NEEDED, &vha->dpc_flags); | ||
3923 | start_dpc++; | ||
3924 | } | ||
3922 | } | 3925 | } |
3923 | 3926 | ||
3924 | /* Process any deferred work. */ | 3927 | /* Process any deferred work. */ |