From patchwork Thu Aug 28 13:59:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 36206 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8985F2054F for ; Thu, 28 Aug 2014 14:00:55 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id eb12sf8041712oac.9 for ; Thu, 28 Aug 2014 07:00:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=rBBrFI3Q4bGxFPElLB1Ez7s0VyORhLS7+Qc2rGneYzU=; b=SIf0BDK8GPYamX+yc4sugFdGwkPNXy78bAnVFDptX/zWttEZtUUKNTDvVdtwI8l/n3 g2uMTZU2oayhK4FC5YvA4wIC7M28vxslTrPzoP+o7zf3eijJ+tU21RBBSO8YIeNHdOm7 wEuD5NVZUy/Hhbw7/uUWZeF92eHhax6Hh7z8I3Ivgfyj+EYJ16se0hnM6MnJ+otwKQFc q8rEVGrIIY9PhPlfxpO4+vtgnKsSpJCNl3LIB8247Cc27W5BAPbeGFPfhodK0Snmvfvg iiBPPcNw1+aHXIxpuFqOIAo29N8/tq6Fci3Gr6DH0JTUDO+dIdZSFrO2F4dDJFvlXOVk cjHA== X-Gm-Message-State: ALoCoQlPuLqrUZhufHPvR1MOB+Tt4+hKP+SnL5G1pO/W6R/5qyuGecKOCMX4S7x9DT1jjXK7A0BF X-Received: by 10.42.188.84 with SMTP id cz20mr2732952icb.1.1409234455137; Thu, 28 Aug 2014 07:00:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.95.182 with SMTP id i51ls588517qge.20.gmail; Thu, 28 Aug 2014 07:00:55 -0700 (PDT) X-Received: by 10.221.28.67 with SMTP id rt3mr395030vcb.78.1409234455051; Thu, 28 Aug 2014 07:00:55 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id n3si3482355vcj.92.2014.08.28.07.00.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Aug 2014 07:00:55 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id hy4so851335vcb.10 for ; Thu, 28 Aug 2014 07:00:54 -0700 (PDT) X-Received: by 10.52.129.200 with SMTP id ny8mr2697961vdb.27.1409234454891; Thu, 28 Aug 2014 07:00:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp241130vcb; Thu, 28 Aug 2014 07:00:54 -0700 (PDT) X-Received: by 10.68.193.194 with SMTP id hq2mr4382513pbc.169.1409234453834; Thu, 28 Aug 2014 07:00:53 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hp2si6981003pac.5.2014.08.28.07.00.48 for ; Thu, 28 Aug 2014 07:00:49 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750930AbaH1OAg (ORCPT + 26 others); Thu, 28 Aug 2014 10:00:36 -0400 Received: from mail-qg0-f53.google.com ([209.85.192.53]:34366 "EHLO mail-qg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750788AbaH1OAe (ORCPT ); Thu, 28 Aug 2014 10:00:34 -0400 Received: by mail-qg0-f53.google.com with SMTP id z107so753872qgd.40 for ; Thu, 28 Aug 2014 07:00:34 -0700 (PDT) X-Received: by 10.140.108.200 with SMTP id j66mr6418491qgf.43.1409234434169; Thu, 28 Aug 2014 07:00:34 -0700 (PDT) Received: from localhost.localdomain (host86-152-0-170.range86-152.btcentralplus.com. [86.152.0.170]) by mx.google.com with ESMTPSA id h9sm11821222qai.30.2014.08.28.07.00.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Aug 2014 07:00:33 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: lee.jones@linaro.org, kernel@stlinux.com, kishon@ti.com, Alexandre Torgue Subject: [PATCH] phy: miphy365x: Fix off-by-one error Date: Thu, 28 Aug 2014 14:59:50 +0100 Message-Id: <1409234390-20168-1-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , We index the RX/TX speed select values in the following way: rx_tx_spd[miphy_phy->sata_gen]; However rx_tx_spd[] starts at index zero and the SATA_GENx's start at one. In this patch we pad out the first element in rx_tx_spd[] in an attempt to realign the values. Cc: Alexandre Torgue Reported-by: Gabriel Fernandez Signed-off-by: Lee Jones --- drivers/phy/phy-miphy365x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/phy/phy-miphy365x.c b/drivers/phy/phy-miphy365x.c index e111baf..e0fb7a1 100644 --- a/drivers/phy/phy-miphy365x.c +++ b/drivers/phy/phy-miphy365x.c @@ -163,6 +163,7 @@ enum miphy_sata_gen { }; static u8 rx_tx_spd[] = { + 0, /* GEN0 doesn't exist. */ TX_SPDSEL_GEN1_VAL | RX_SPDSEL_GEN1_VAL, TX_SPDSEL_GEN2_VAL | RX_SPDSEL_GEN2_VAL, TX_SPDSEL_GEN3_VAL | RX_SPDSEL_GEN3_VAL