From patchwork Fri Apr 25 08:59:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 29035 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7C054202E6 for ; Fri, 25 Apr 2014 09:00:59 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id to1sf20502775ieb.1 for ; Fri, 25 Apr 2014 02:00:58 -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:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=0VdVw2GTxRrlb0wgWdjTgM8+hBV25suPS6HM8ye9TJI=; b=fJ1TyE1zQJWp19zaGk0T+3cR9OfBGt8mh5nSNecLwPhfJHPjb+epB1M9LG2aLH8aRy Naism6HoySsyHLfoGVrLjZ+yEVWP6a/BczYVAw27LtPyfKGH7z4dn3A3ZO7zd7FzZydc m/cG/zIR0D+UDcj8cH/b/Kh272HAbQ8SCB+//7QqRNqrUW5ctM16tk7JUp3UMIslfAm+ FDm8jWlQJ53N56aXPXCf0r1F4AVpm5pNvcTqLR0ba35uX/GbCLM+o+QG/xzj7HEfh75f zcwZ94fF75SKrzpHFmn9SnpRJ7RTWBv7yta3JBIm8L+9SvA5YWH+H0mOdpVvbr6alGJH le7g== X-Gm-Message-State: ALoCoQn75hG0CvURnUf2kSOFHs6XOr9/bNXCBrhVtceDUp8fX8ofG+Rh/0i7NE/fZpPTNHaSC3p3 X-Received: by 10.182.28.36 with SMTP id y4mr3918283obg.46.1398416458741; Fri, 25 Apr 2014 02:00:58 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.34.233 with SMTP id l96ls1409947qgl.90.gmail; Fri, 25 Apr 2014 02:00:58 -0700 (PDT) X-Received: by 10.52.37.130 with SMTP id y2mr154887vdj.38.1398416458583; Fri, 25 Apr 2014 02:00:58 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id q1si1561243ves.9.2014.04.25.02.00.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 25 Apr 2014 02:00:58 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id id10so4312239vcb.26 for ; Fri, 25 Apr 2014 02:00:58 -0700 (PDT) X-Received: by 10.52.249.105 with SMTP id yt9mr403973vdc.34.1398416458468; Fri, 25 Apr 2014 02:00:58 -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.220.221.72 with SMTP id ib8csp81392vcb; Fri, 25 Apr 2014 02:00:58 -0700 (PDT) X-Received: by 10.66.142.201 with SMTP id ry9mr6350704pab.14.1398416456302; Fri, 25 Apr 2014 02:00:56 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ke1si4357554pad.419.2014.04.25.02.00.55 for ; Fri, 25 Apr 2014 02:00:55 -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 S1752564AbaDYJA3 (ORCPT + 28 others); Fri, 25 Apr 2014 05:00:29 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:47624 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752370AbaDYJAZ (ORCPT ); Fri, 25 Apr 2014 05:00:25 -0400 Received: by mail-pa0-f41.google.com with SMTP id fa1so2945899pad.28 for ; Fri, 25 Apr 2014 02:00:25 -0700 (PDT) X-Received: by 10.66.153.80 with SMTP id ve16mr6337406pab.143.1398416425150; Fri, 25 Apr 2014 02:00:25 -0700 (PDT) Received: from localhost.localdomain ([218.17.215.175]) by mx.google.com with ESMTPSA id ko10sm14443967pbd.0.2014.04.25.02.00.19 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 25 Apr 2014 02:00:24 -0700 (PDT) From: Kefeng Wang To: Tejun Heo , Hans de Goede , Maxime Ripard , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Cc: wangkefeng.wang@huawei.com, kefeng.wang@linaro.org, xuwei5@hisilicon.com Subject: [PATCH v6 1/3] ata: ahci: append new hflag AHCI_HFLAG_NO_FBS Date: Fri, 25 Apr 2014 16:59:09 +0800 Message-Id: <1398416351-30567-2-git-send-email-kefeng.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398416351-30567-1-git-send-email-kefeng.wang@linaro.org> References: <1398416351-30567-1-git-send-email-kefeng.wang@linaro.org> 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: kefeng.wang@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) 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: , Append AHCI_HFLAG_NO_FBS to force turning off FBS flag. Signed-off-by: Haojian Zhuang Signed-off-by: Kefeng Wang --- drivers/ata/ahci.h | 1 + drivers/ata/libahci.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h index b5eb886..48073ef 100644 --- a/drivers/ata/ahci.h +++ b/drivers/ata/ahci.h @@ -236,6 +236,7 @@ enum { port start (wait until error-handling stage) */ AHCI_HFLAG_MULTI_MSI = (1 << 16), /* multiple PCI MSIs */ + AHCI_HFLAG_NO_FBS = (1 << 17), /* no FBS */ /* ap->flags bits */ diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index 6bd4f66..e1cf859 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c @@ -457,6 +457,11 @@ void ahci_save_initial_config(struct device *dev, cap |= HOST_CAP_FBS; } + if ((cap & HOST_CAP_FBS) && (hpriv->flags & AHCI_HFLAG_NO_FBS)) { + dev_info(dev, "controller can't do FBS, turning off CAP_FBS\n"); + cap &= ~HOST_CAP_FBS; + } + if (force_port_map && port_map != force_port_map) { dev_info(dev, "forcing port_map 0x%x -> 0x%x\n", port_map, force_port_map);