From patchwork Wed Apr 23 12:36:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 28876 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 89FB5203AC for ; Wed, 23 Apr 2014 12:37:22 +0000 (UTC) Received: by mail-ob0-f197.google.com with SMTP id wp4sf5224307obc.8 for ; Wed, 23 Apr 2014 05:37:22 -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=llDflMWDMd1siAj47IaIQhrMNxtHArvyzOxX701MjnGzmAETr1nUm+xaQJUyWNjoRL 8P2yZ7YhHzxB8bAHULNKt4pAkXTOcI1QwyQ9QIs0xB2oz/xys5ouZjQxu0px4EbRhIhe hlysTRqNOVlNg3jVZOFUL+jIfNGh5FLk8QFpH9jxApYAPHlBoeLWqnMeQnXXzDnF8ce0 CrQYZoGfUWZXbutQS7ZaI0w5JMByUeD4Dj/jHCcVuFYnDSnSADNTPJd18L9glYD8k0sC GejjvtSwduNmMJNPx5Z4wyiR6XumqFeVAlZZhteGu/hkJl/eg43vhv3NqZJInrPTO/9F JJJw== X-Gm-Message-State: ALoCoQkMGqfK7fpKHGB4mIMkl7Vpv++iR7Ey3ok4oq3m6omUP1vF1mCIwrA1fPyiufShkZz3plG3 X-Received: by 10.50.70.66 with SMTP id k2mr1094183igu.7.1398256642015; Wed, 23 Apr 2014 05:37:22 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.38.72 with SMTP id s66ls594361qgs.85.gmail; Wed, 23 Apr 2014 05:37:21 -0700 (PDT) X-Received: by 10.58.132.2 with SMTP id oq2mr57044veb.76.1398256641800; Wed, 23 Apr 2014 05:37:21 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id tm8si141052vdc.80.2014.04.23.05.37.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Apr 2014 05:37:21 -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.180; Received: by mail-vc0-f180.google.com with SMTP id hy4so1023829vcb.39 for ; Wed, 23 Apr 2014 05:37:21 -0700 (PDT) X-Received: by 10.58.216.163 with SMTP id or3mr18101vec.80.1398256641720; Wed, 23 Apr 2014 05:37:21 -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 ib8csp100490vcb; Wed, 23 Apr 2014 05:37:21 -0700 (PDT) X-Received: by 10.50.49.44 with SMTP id r12mr2070938ign.41.1398256641141; Wed, 23 Apr 2014 05:37:21 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pc9si538199pac.394.2014.04.23.05.37.20; Wed, 23 Apr 2014 05:37:20 -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 S932069AbaDWMhJ (ORCPT + 27 others); Wed, 23 Apr 2014 08:37:09 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:35088 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754212AbaDWMhH (ORCPT ); Wed, 23 Apr 2014 08:37:07 -0400 Received: by mail-pa0-f48.google.com with SMTP id hz1so729087pad.7 for ; Wed, 23 Apr 2014 05:37:06 -0700 (PDT) X-Received: by 10.68.159.228 with SMTP id xf4mr54583439pbb.74.1398256626716; Wed, 23 Apr 2014 05:37:06 -0700 (PDT) Received: from localhost.localdomain ([218.17.215.175]) by mx.google.com with ESMTPSA id ha11sm2297548pbd.17.2014.04.23.05.37.01 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Apr 2014 05:37:06 -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 Subject: [PATCH v5 1/3] ata: ahci: append new hflag AHCI_HFLAG_NO_FBS Date: Wed, 23 Apr 2014 20:36:41 +0800 Message-Id: <1398256603-20160-2-git-send-email-kefeng.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398256603-20160-1-git-send-email-kefeng.wang@linaro.org> References: <1398256603-20160-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);