From patchwork Wed May 14 06:13:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 30146 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f200.google.com (mail-ie0-f200.google.com [209.85.223.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 989C920446 for ; Wed, 14 May 2014 06:15:07 +0000 (UTC) Received: by mail-ie0-f200.google.com with SMTP id rd18sf6929661iec.11 for ; Tue, 13 May 2014 23:15:07 -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=HqbEMzKNhqV6Jk0oZjqNAHhGNthXlj2YcEm+e/wBwgQ=; b=J843S6f6RF26x+UBq/9pq0NyhlysPm5Fy48xFWqaTjDrX4r6WunU1GXpkuPYpD5W0Q A6iKy/KZlRph5cWrZvLvQWaKrbKi3JC8VKTbAPG50VKPiMeQbIMydcWlvMcVCq5aaOxH JvX5PqpE/1fDu9ki9hbRpBgBfVsYq54rYwkPhq77PWKBPil4JX9qQi6hPhOKb2ZyS8nB PEa1hHIjQGBBjGwaOavIlGdcSh/aQJnQXAe67vEPGDOPOIYaizrWVOe8MnDBrj4JVjOJ 9OQZ+mWZEtVEWfSEHA0LK01EspbLPeqBY7P/ufUB8J5zMhOUO1P9SDLKuCa30SrftQgP tweQ== X-Gm-Message-State: ALoCoQkV2/AVZcsz0ytrlSprOw56IbdYMApX5K/YvcweHnXTlUaob7zpUvOwTydXypyTW3rr4hbB X-Received: by 10.182.97.165 with SMTP id eb5mr750748obb.43.1400048107079; Tue, 13 May 2014 23:15:07 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.29.4 with SMTP id a4ls2323312qga.45.gmail; Tue, 13 May 2014 23:15:07 -0700 (PDT) X-Received: by 10.58.18.198 with SMTP id y6mr1380541ved.31.1400048106965; Tue, 13 May 2014 23:15:06 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id gu9si153062vdc.160.2014.05.13.23.15.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 May 2014 23:15:06 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id lf12so1824241vcb.15 for ; Tue, 13 May 2014 23:15:06 -0700 (PDT) X-Received: by 10.58.96.36 with SMTP id dp4mr1376792veb.21.1400048106887; Tue, 13 May 2014 23:15:06 -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 ib8csp208968vcb; Tue, 13 May 2014 23:15:05 -0700 (PDT) X-Received: by 10.68.202.194 with SMTP id kk2mr1947469pbc.156.1400048105522; Tue, 13 May 2014 23:15:05 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gm2si452348pbb.34.2014.05.13.23.15.04; Tue, 13 May 2014 23:15:04 -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 S1753977AbaENGOx (ORCPT + 27 others); Wed, 14 May 2014 02:14:53 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:63499 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753705AbaENGOu (ORCPT ); Wed, 14 May 2014 02:14:50 -0400 Received: by mail-pa0-f51.google.com with SMTP id kq14so1263372pab.38 for ; Tue, 13 May 2014 23:14:50 -0700 (PDT) X-Received: by 10.68.211.233 with SMTP id nf9mr1916356pbc.29.1400048089955; Tue, 13 May 2014 23:14:49 -0700 (PDT) Received: from localhost.localdomain ([218.17.215.175]) by mx.google.com with ESMTPSA id ba5sm1438111pbc.61.2014.05.13.23.14.42 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 13 May 2014 23:14:49 -0700 (PDT) From: Kefeng Wang To: tj@kernel.org Cc: hdegoede@redhat.com, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, wangkefeng.wang@huawei.com, xuwei5@hisilicon.com, kefeng.wang@linaro.org Subject: [PATCH v7 1/3] ata: ahci: append new hflag AHCI_HFLAG_NO_FBS Date: Wed, 14 May 2014 14:13:40 +0800 Message-Id: <1400048022-15795-2-git-send-email-kefeng.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1400048022-15795-1-git-send-email-kefeng.wang@linaro.org> References: <1400048022-15795-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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) 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. Reviewed-by: Hans de Goede 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);