From patchwork Wed Apr 23 11:36:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 28868 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CC783203AC for ; Wed, 23 Apr 2014 11:37:27 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id oz11sf3220035veb.1 for ; Wed, 23 Apr 2014 04:37:25 -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=mspn84ILjFzkVHP/2FofxsE95h6bP6PwVp4Skf2benI=; b=IX9oQ0KJgvHty8kDLL8bhYSBkNg5gVSrTCdoKDhLVJOc8yhXi5vhQEIkM9Me/KC1+C 12kVa20REqDG6nHVbkDOaoCkDFuMekOo4DXWaxog1dKy+21vbUMeTCXC8pItSlEX8GHg DAINrHtI03DkfHduWdRTNWgilg9rbUoXe0fPZ/7r6aG/CBs7FkfmaqzIYaY0AH/bvp6E aqaBpC1jFVKQs5u68LgLzUThDUB1ciQbM1HtN9xkeBsBWPAFFj47LuH33J/X5HK2iXFy 9syzwZOFoQReUSTV4viXbi391LlWJsqCYOQUxAfjMU+S9FfaCSJ7HOdoVL3kbWhyqydT FBpg== X-Gm-Message-State: ALoCoQl/k6F5NTgYQuBY9CVNSs7+5itSBs71NgEYCaiVhPewOxAYp3UmrWByTPI6YrVLIJkGfKxR X-Received: by 10.224.167.8 with SMTP id o8mr23565108qay.0.1398253045588; Wed, 23 Apr 2014 04:37:25 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.101.213 with SMTP id u79ls562503qge.79.gmail; Wed, 23 Apr 2014 04:37:25 -0700 (PDT) X-Received: by 10.58.105.105 with SMTP id gl9mr45064228veb.3.1398253045445; Wed, 23 Apr 2014 04:37:25 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id ek16si114717vcb.101.2014.04.23.04.37.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Apr 2014 04:37:25 -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.169; Received: by mail-vc0-f169.google.com with SMTP id im17so1004812vcb.28 for ; Wed, 23 Apr 2014 04:37:25 -0700 (PDT) X-Received: by 10.52.99.168 with SMTP id er8mr12182020vdb.26.1398253045362; Wed, 23 Apr 2014 04:37:25 -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 ib8csp96546vcb; Wed, 23 Apr 2014 04:37:24 -0700 (PDT) X-Received: by 10.68.163.100 with SMTP id yh4mr19756306pbb.122.1398253043900; Wed, 23 Apr 2014 04:37:23 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id nj10si468793pbc.218.2014.04.23.04.37.23; Wed, 23 Apr 2014 04:37:23 -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 S1753005AbaDWLhN (ORCPT + 27 others); Wed, 23 Apr 2014 07:37:13 -0400 Received: from mail-pd0-f172.google.com ([209.85.192.172]:39002 "EHLO mail-pd0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752103AbaDWLhF (ORCPT ); Wed, 23 Apr 2014 07:37:05 -0400 Received: by mail-pd0-f172.google.com with SMTP id w10so688153pde.17 for ; Wed, 23 Apr 2014 04:37:05 -0700 (PDT) X-Received: by 10.68.248.7 with SMTP id yi7mr54665587pbc.31.1398253024936; Wed, 23 Apr 2014 04:37:04 -0700 (PDT) Received: from localhost.localdomain ([218.17.215.175]) by mx.google.com with ESMTPSA id qc8sm1892576pbc.68.2014.04.23.04.37.00 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Apr 2014 04:37:04 -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, Haojian Zhuang Subject: [PATCH v4 1/3] ata: ahci: append new hflag AHCI_HFLAG_NO_FBS Date: Wed, 23 Apr 2014 19:36:45 +0800 Message-Id: <1398253008-17059-2-git-send-email-kefeng.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398253008-17059-1-git-send-email-kefeng.wang@linaro.org> References: <1398253008-17059-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 51af275..60db49b 100644 --- a/drivers/ata/ahci.h +++ b/drivers/ata/ahci.h @@ -235,6 +235,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);