From patchwork Tue Aug 11 09:36:27 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: 6990131 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 36341C05AC for ; Tue, 11 Aug 2015 09:34:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4961D20582 for ; Tue, 11 Aug 2015 09:34:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 63EDC2057F for ; Tue, 11 Aug 2015 09:34:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933823AbbHKJeo (ORCPT ); Tue, 11 Aug 2015 05:34:44 -0400 Received: from bby1mta03.pmc-sierra.com ([216.241.235.118]:37382 "EHLO bby1mta03.pmc-sierra.bc.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933709AbbHKJen (ORCPT ); Tue, 11 Aug 2015 05:34:43 -0400 Received: from bby1mta03.pmc-sierra.bc.ca (localhost.pmc-sierra.bc.ca [127.0.0.1]) by localhost (Postfix) with SMTP id 5D4B410708A3; Tue, 11 Aug 2015 02:34:43 -0700 (PDT) Received: from smtp.pmcs.com (bby1cas03.pmc-sierra.internal [216.241.227.144]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by bby1mta03.pmc-sierra.bc.ca (Postfix) with ESMTP id 468871070782; Tue, 11 Aug 2015 02:34:43 -0700 (PDT) Received: from localhost (216.241.227.4) by bby1cas03.pmc-sierra.internal (216.241.227.144) with Microsoft SMTP Server (TLS) id 14.3.123.3; Tue, 11 Aug 2015 02:34:42 -0700 From: To: CC: Jack Wang , , Tomas Henzl , , , Hannes Reinecke Subject: [PATCH V2 3/8] pm80xx: Update For Thermal Page Code Date: Tue, 11 Aug 2015 15:06:27 +0530 Message-ID: <1439285792-12030-4-git-send-email-Viswas.G@pmcs.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1439285792-12030-1-git-send-email-Viswas.G@pmcs.com> References: <1439285792-12030-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=Uvtb29Y1lWffKl58Wlo9tzJwccLTHV6jqtkDfB6v2po=; b=ZJUoQKONNjtKbH4Kn+FbLYo5FM07I6cRF2l5uyTXfANsvcJlrJQ5TMkNDfzhKmYB89VNk/w+VYcBtu3lufVLktlPQe/gke6pNtpcyTf8x8zl877nwnHMMRZcPpu24YoDPsVvSivMxqRBMDR2F3qaTbpAtLBz3nJVkQQoae3/pkU= Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.0 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. Changes From V1: None Signed-off-by: Viswas G Reviewed-by: Suresh Thiagarajan Reviewed-by: Hannes Reinecke Reviewed-by: Jack Wang 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