From patchwork Wed Apr 9 10:30:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 28076 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 56C11202DD for ; Wed, 9 Apr 2014 10:31:55 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id w8sf5740391qac.0 for ; Wed, 09 Apr 2014 03:31: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:delivered-to:from:to:cc:subject:date:message-id :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=csFw/p3GRd+43tHWhZTa59RfqV1K+dvjYrWCbDh1nKf5O4DWh7QO7fJGuL1Wh0hUWF GYo+bZQDnDxu+ZK/eG7J2s1KLuJdRwtSmwq8RtBDvvlIFALdyfrxeQJw7q7hf1lTqk54 zuMunF6jZgn0yr9QHfDIRD2c9rS72s86X5SaH8tFrxo1wYHDOhzuJ0/dlADBGuDoOe4U MsUrvx/LO5z9Mjw7HuZmokThPHYaNmuqMWoOMXyoOvnNW4ViF4t4Wvu5IzpiGeJZ0Vd6 7pnv2L1ZlPlxB4PXGifvPG+0H/aQA8FNosEWsBOzgS8R2gSIdTRcDtwfTvGGXRtcQ9Xj +RFA== X-Gm-Message-State: ALoCoQl8MI+lUid7eCnC1GnSBy4zx1BGOn6bCpPnaI6PDeqPHTLUhhSlIe7lwPvwePC2BEPPkj8w X-Received: by 10.236.144.136 with SMTP id n8mr4156379yhj.22.1397039515110; Wed, 09 Apr 2014 03:31:55 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.82.16 with SMTP id g16ls611912qgd.25.gmail; Wed, 09 Apr 2014 03:31:54 -0700 (PDT) X-Received: by 10.58.202.133 with SMTP id ki5mr7790079vec.19.1397039514854; Wed, 09 Apr 2014 03:31:54 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id t1si67557vcj.202.2014.04.09.03.31.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Apr 2014 03:31:54 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id la4so1866465vcb.17 for ; Wed, 09 Apr 2014 03:31:54 -0700 (PDT) X-Received: by 10.52.142.10 with SMTP id rs10mr6766400vdb.3.1397039514766; Wed, 09 Apr 2014 03:31: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.220.12.8 with SMTP id v8csp317918vcv; Wed, 9 Apr 2014 03:31:54 -0700 (PDT) X-Received: by 10.68.196.226 with SMTP id ip2mr11010831pbc.106.1397039514051; Wed, 09 Apr 2014 03:31:54 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fd9si281364pad.224.2014.04.09.03.31.53; Wed, 09 Apr 2014 03:31:53 -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 S932945AbaDIKbf (ORCPT + 27 others); Wed, 9 Apr 2014 06:31:35 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:19707 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932887AbaDIKb2 (ORCPT ); Wed, 9 Apr 2014 06:31:28 -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 ANC34602; Wed, 09 Apr 2014 18:31:13 +0800 (CST) Received: from SZXEML419-HUB.china.huawei.com (10.82.67.158) by szxeml208-edg.china.huawei.com (172.24.2.57) with Microsoft SMTP Server (TLS) id 14.3.158.1; Wed, 9 Apr 2014 18:31:11 +0800 Received: from localhost (10.177.21.224) by szxeml419-hub.china.huawei.com (10.82.67.158) with Microsoft SMTP Server id 14.3.158.1; Wed, 9 Apr 2014 18:31:04 +0800 From: Kefeng Wang To: Tejun Heo CC: Hans de Goede , , , , Subject: [PATCH 1/2] ata: ahci: append new hflag AHCI_HFLAG_NO_FBS Date: Wed, 9 Apr 2014 18:30:18 +0800 Message-ID: <1397039419-9716-1-git-send-email-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 1.8.3.msysgit.0 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.220.172 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;