From patchwork Wed Jul 29 06:27:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viswas.G@pmcs.com X-Patchwork-Id: 6889351 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 83AD59F39D for ; Wed, 29 Jul 2015 06:26:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AB334207B1 for ; Wed, 29 Jul 2015 06:26:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C114D207AE for ; Wed, 29 Jul 2015 06:26:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752115AbbG2G0O (ORCPT ); Wed, 29 Jul 2015 02:26:14 -0400 Received: from bby1mta02.pmc-sierra.com ([216.241.235.117]:43879 "EHLO bby1mta02.pmc-sierra.bc.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751790AbbG2G0N (ORCPT ); Wed, 29 Jul 2015 02:26:13 -0400 Received: from bby1mta02.pmc-sierra.bc.ca (localhost.pmc-sierra.bc.ca [127.0.0.1]) by localhost (Postfix) with SMTP id 32D018E038E; Tue, 28 Jul 2015 23:26:13 -0700 (PDT) Received: from smtp.pmcs.com (bby1cas01.pmc-sierra.internal [216.241.227.142]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by bby1mta02.pmc-sierra.bc.ca (Postfix) with ESMTP id 21DBC8E0380; Tue, 28 Jul 2015 23:26:13 -0700 (PDT) Received: from localhost (216.241.227.4) by bby1cas01.pmc-sierra.internal (216.241.227.142) with Microsoft SMTP Server (TLS) id 14.3.123.3; Tue, 28 Jul 2015 23:26:12 -0700 From: To: CC: , , Tomas Henzl , , Subject: [PATCH 3/8] pm80xx: Update For Thermal Page Code Date: Wed, 29 Jul 2015 11:57:15 +0530 Message-ID: <1438151240-4097-4-git-send-email-Viswas.G@pmcs.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1438151240-4097-1-git-send-email-Viswas.G@pmcs.com> References: <1438151240-4097-1-git-send-email-Viswas.G@pmcs.com> MIME-Version: 1.0 X-Originating-IP: [216.241.227.4] DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pmcs.com; h=from:to:cc:subject:date:message-id:in-reply-to:references:mime-version:content-type; s=default; bh=hfklZnPJTb017oCdNkWk1X3kzjKt2lX2gJqtQ6yT1xU=; b=Y0zfwuyCFGwA75ZDT2V2zZUs5En2MN6fXx4fDIugkmkdBXjzy1NHZikLxMsDMBuh/IhBxjxs7HTuWg1UCGJZy0GvGuFN2zhx01Km8g24vLl9TSYZSQjmTdTzYNHJXnEhupXMlP0MsGz9PtnKhnC71fEAUgTmFA3WNBsaw2igy0s= Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Viswas G Thermal page code has been changed to 7 for the 12G controllers. Signed-off-by: Viswas G Signed-off-by: Suresh Thiagarajan Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl --- drivers/scsi/pm8001/pm80xx_hwi.c | 9 ++++++++- drivers/scsi/pm8001/pm80xx_hwi.h | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c index 05cce46..dced9f7 100644 --- a/drivers/scsi/pm8001/pm80xx_hwi.c +++ b/drivers/scsi/pm8001/pm80xx_hwi.c @@ -843,6 +843,7 @@ pm80xx_set_thermal_config(struct pm8001_hba_info *pm8001_ha) int rc; u32 tag; u32 opc = OPC_INB_SET_CONTROLLER_CONFIG; + u32 page_code; memset(&payload, 0, sizeof(struct set_ctrl_cfg_req)); rc = pm8001_tag_alloc(pm8001_ha, &tag); @@ -851,8 +852,14 @@ pm80xx_set_thermal_config(struct pm8001_hba_info *pm8001_ha) circularQ = &pm8001_ha->inbnd_q_tbl[0]; 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) | - (THERMAL_ENABLE << 8) | THERMAL_OP_CODE; + (THERMAL_ENABLE << 8) | page_code; payload.cfg_pg[1] = (LTEMPHIL << 24) | (RTEMPHIL << 8); rc = pm8001_mpi_build_cmd(pm8001_ha, circularQ, opc, &payload, 0); diff --git a/drivers/scsi/pm8001/pm80xx_hwi.h b/drivers/scsi/pm8001/pm80xx_hwi.h index 9970a38..a083cc6 100644 --- a/drivers/scsi/pm8001/pm80xx_hwi.h +++ b/drivers/scsi/pm8001/pm80xx_hwi.h @@ -177,7 +177,8 @@ /* Thermal related */ #define THERMAL_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 RTEMPHIL 100