From patchwork Thu Apr 10 05:24:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 28122 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f72.google.com (mail-qa0-f72.google.com [209.85.216.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 99F082145A for ; Thu, 10 Apr 2014 05:26:16 +0000 (UTC) Received: by mail-qa0-f72.google.com with SMTP id hw13sf8738893qab.3 for ; Wed, 09 Apr 2014 22:26:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=+QKwh2sTYTlrZBkWmAKsOeK3iJQvnVgcUeA4Z9H/94o=; b=jufazPZi20a72IISdE0rsMBdRnN+yPRvZLlHr86MaVr6z2KYu5WvHOUrmuJuOUSfjJ 1fZv+OGfAlplfyVFr5/RGqi/Ht9A4121BdoWBtM049hStHJwWL6H6yLyg0Mkx7Hf6qKp LgyNnnXE5zwmwpPsDX7PDhdlt2SDN5kD5nFA4vcdt0FuulOauk9paqAqLvwXJlm3uJR4 VXe/k1U1mMkODr81wvVrMzaQefFhmkmDOfEpaRUOiaY8iWKhpouPdQZ0X1YukFGx91ai BeYk2t58j7Sa06swsI9XjRRhuWkgoNSPorgBECp8gV4hMGo9Ixk7aJd9px6DnjO1S6Vx C25g== X-Gm-Message-State: ALoCoQmryTyGqJKEAkA/2cYSQ2biBEWPLTFkOWmN0zv168FXGdv+0xWkpmXM4JX4V9UIMSD8BF0U X-Received: by 10.236.39.99 with SMTP id c63mr6662465yhb.31.1397107576086; Wed, 09 Apr 2014 22:26:16 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.25.144 with SMTP id 16ls342206qgt.62.gmail; Wed, 09 Apr 2014 22:26:15 -0700 (PDT) X-Received: by 10.220.170.202 with SMTP id e10mr12674813vcz.20.1397107575942; Wed, 09 Apr 2014 22:26:15 -0700 (PDT) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id ww7si518660vec.156.2014.04.09.22.26.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Apr 2014 22:26:15 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.170; Received: by mail-ve0-f170.google.com with SMTP id pa12so3013885veb.15 for ; Wed, 09 Apr 2014 22:26:15 -0700 (PDT) X-Received: by 10.52.69.146 with SMTP id e18mr10528078vdu.15.1397107575840; Wed, 09 Apr 2014 22:26:15 -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 ib8csp29659vcb; Wed, 9 Apr 2014 22:26:15 -0700 (PDT) X-Received: by 10.69.2.2 with SMTP id bk2mr17052405pbd.75.1397107574584; Wed, 09 Apr 2014 22:26:14 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bi5si1505422pbb.19.2014.04.09.22.26.13; Wed, 09 Apr 2014 22:26:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752357AbaDJFZz (ORCPT + 27 others); Thu, 10 Apr 2014 01:25:55 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:46581 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750920AbaDJFZu (ORCPT ); Thu, 10 Apr 2014 01:25:50 -0400 Received: from 172.24.2.119 (EHLO szxeml208-edg.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id AND34491; Thu, 10 Apr 2014 13:25:42 +0800 (CST) Received: from SZXEML401-HUB.china.huawei.com (10.82.67.31) by szxeml208-edg.china.huawei.com (172.24.2.57) with Microsoft SMTP Server (TLS) id 14.3.158.1; Thu, 10 Apr 2014 13:25:39 +0800 Received: from localhost (10.177.21.224) by szxeml401-hub.china.huawei.com (10.82.67.31) with Microsoft SMTP Server id 14.3.158.1; Thu, 10 Apr 2014 13:25:31 +0800 From: Kefeng Wang To: Tejun Heo CC: Hans de Goede , , , , Kefeng Wang , Haojian Zhuang Subject: [PATCH V2 1/2] ata: ahci: append new hflag AHCI_HFLAG_NO_FBS Date: Thu, 10 Apr 2014 13:24:27 +0800 Message-ID: <1397107468-640-2-git-send-email-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 1.8.3.msysgit.0 In-Reply-To: <1397107468-640-1-git-send-email-wangkefeng.wang@huawei.com> References: <1397107468-640-1-git-send-email-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.21.224] X-CFilter-Loop: Reflected 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: wangkefeng.wang@huawei.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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: , From: Kefeng Wang 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(+), 0 deletions(-) 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..573edb3 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c @@ -452,6 +452,11 @@ void ahci_save_initial_config(struct device *dev, cap &= ~HOST_CAP_SNTF; } + 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 (!(cap & HOST_CAP_FBS) && (hpriv->flags & AHCI_HFLAG_YES_FBS)) { dev_info(dev, "controller can do FBS, turning on CAP_FBS\n"); cap |= HOST_CAP_FBS;