Commit 842784e0 authored by Viswas G's avatar Viswas G Committed by James Bottomley

pm80xx: Update For Thermal Page Code

Thermal page code has been changed to 7 for the 12G controllers.
Signed-off-by: default avatarViswas G <Viswas.G@pmcs.com>
Reviewed-by: default avatarSuresh Thiagarajan <Suresh.Thiagarajan@pmcs.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Reviewed-by: default avatarJack Wang <jinpu.wang@profitbricks.com>
Reviewed-by: default avatarTomas Henzl <thenzl@redhat.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Odin.com>
parent 3a1ae967
...@@ -843,6 +843,7 @@ pm80xx_set_thermal_config(struct pm8001_hba_info *pm8001_ha) ...@@ -843,6 +843,7 @@ pm80xx_set_thermal_config(struct pm8001_hba_info *pm8001_ha)
int rc; int rc;
u32 tag; u32 tag;
u32 opc = OPC_INB_SET_CONTROLLER_CONFIG; u32 opc = OPC_INB_SET_CONTROLLER_CONFIG;
u32 page_code;
memset(&payload, 0, sizeof(struct set_ctrl_cfg_req)); memset(&payload, 0, sizeof(struct set_ctrl_cfg_req));
rc = pm8001_tag_alloc(pm8001_ha, &tag); rc = pm8001_tag_alloc(pm8001_ha, &tag);
...@@ -851,8 +852,14 @@ pm80xx_set_thermal_config(struct pm8001_hba_info *pm8001_ha) ...@@ -851,8 +852,14 @@ pm80xx_set_thermal_config(struct pm8001_hba_info *pm8001_ha)
circularQ = &pm8001_ha->inbnd_q_tbl[0]; circularQ = &pm8001_ha->inbnd_q_tbl[0];
payload.tag = cpu_to_le32(tag); payload.tag = cpu_to_le32(tag);
if (IS_SPCV_12G(pm8001_ha->pdev))
page_code = THERMAL_PAGE_CODE_7H;
else
page_code = THERMAL_PAGE_CODE_8H;
payload.cfg_pg[0] = (THERMAL_LOG_ENABLE << 9) | payload.cfg_pg[0] = (THERMAL_LOG_ENABLE << 9) |
(THERMAL_ENABLE << 8) | THERMAL_OP_CODE; (THERMAL_ENABLE << 8) | page_code;
payload.cfg_pg[1] = (LTEMPHIL << 24) | (RTEMPHIL << 8); payload.cfg_pg[1] = (LTEMPHIL << 24) | (RTEMPHIL << 8);
rc = pm8001_mpi_build_cmd(pm8001_ha, circularQ, opc, &payload, 0); rc = pm8001_mpi_build_cmd(pm8001_ha, circularQ, opc, &payload, 0);
......
...@@ -177,7 +177,8 @@ ...@@ -177,7 +177,8 @@
/* Thermal related */ /* Thermal related */
#define THERMAL_ENABLE 0x1 #define THERMAL_ENABLE 0x1
#define THERMAL_LOG_ENABLE 0x1 #define THERMAL_LOG_ENABLE 0x1
#define THERMAL_OP_CODE 0x6 #define THERMAL_PAGE_CODE_7H 0x6
#define THERMAL_PAGE_CODE_8H 0x7
#define LTEMPHIL 70 #define LTEMPHIL 70
#define RTEMPHIL 100 #define RTEMPHIL 100
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment