From patchwork Mon Oct 29 15:23:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 195049 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 379DC2C0084 for ; Tue, 30 Oct 2012 02:32:22 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D6B634A2C9; Mon, 29 Oct 2012 16:28:46 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kxMkbyyNuuy3; Mon, 29 Oct 2012 16:28:46 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7BFBF4A0C5; Mon, 29 Oct 2012 16:25:19 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6D1074A092 for ; Mon, 29 Oct 2012 16:25:07 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KC1iI5VY6N4P for ; Mon, 29 Oct 2012 16:25:05 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-vc0-f202.google.com (mail-vc0-f202.google.com [209.85.220.202]) by theia.denx.de (Postfix) with ESMTPS id 53EA14A088 for ; Mon, 29 Oct 2012 16:24:25 +0100 (CET) Received: by mail-vc0-f202.google.com with SMTP id fy27so648036vcb.3 for ; Mon, 29 Oct 2012 08:24:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=bk5AgSX3HG4ostLmMa4YDbJ1i2Vkn5HgePI0NITHTpY=; b=bFziUufBaEoljBLIciSOweS80m+tSVzyDI5PRiIiy1auqEIl+8MMZGX8A5/8nbSGCm C1bWdOiUtZ9an+ZKiycDarXh43oEnPUDUWvSQMOf2sN4FuyjaOn9ichxWP0U/c77FR8W UcrI/uhB3SDJYCgHncv08b4oQ+1AzYq9ZMuH8M+QTyv5Tgtx3ET649/kTNTasfDRs28F BK8sHxIPDjhCWt+dcRJoD31FI2jWQho0BWdACkFleYBLNyLI4mG+pPoVheXn57rHzJEd KQrPmLrHp6VdSzzdqGcb2fZcyZt/D1TVgrw9LJgdweUEg6Ivss37NVOgJacTwaQjrGPq NkcA== Received: by 10.236.89.114 with SMTP id b78mr22255827yhf.16.1351524260339; Mon, 29 Oct 2012 08:24:20 -0700 (PDT) Received: from wpzn4.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id l20si713942yhi.2.2012.10.29.08.24.20 (version=TLSv1/SSLv3 cipher=AES128-SHA); Mon, 29 Oct 2012 08:24:20 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by wpzn4.hot.corp.google.com (Postfix) with ESMTP id 3E5C11E0043; Mon, 29 Oct 2012 08:24:20 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 1E225160E86; Mon, 29 Oct 2012 08:24:20 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 29 Oct 2012 08:23:52 -0700 Message-Id: <1351524245-19584-10-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1351524245-19584-1-git-send-email-sjg@chromium.org> References: <1351524245-19584-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQmeyGTAHL72B9Y0enXOTz6d6iXCs3AmmlKmbdA/98SqrBHZa4t+DTsiQxq4H4Gy8V9eCOF4ku6DHFTHoV+qt7at/5jEKSEBQ7qlb5i1EZlvpet78hFlQGnnW0wtnVszxK3Pm55dmhMUcXdE+2XCES/rc9CvlTHLfvWHWPuIlNUiM+CM6cxn0xH8ENTLuoNouZw04ZOr Cc: Tom Rini , Rob Herring , Taylor Hutt Subject: [U-Boot] [PATCH v3 09/22] ahci: Make sending the SETFEATURES_XFER command optional X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Gabe Black This command doesn't really do anything when talking to a SATA device, and sending it confuses some of them. This change makes sending the command optional, and defaults to not. The situations where it should be sent are not the common case. With the standard SSD in the machine, here are some times with the option turned off: 1. 8277 2. 8273 3. 8050 And turned on: 1. 8303 2. 8155 3. 8276 Sending that command seems to have no meaningful effect on performance. This fixes problems with an SSD marked Toshiba NV6424, Taiwan 11159AE P and TC58NVG5D2FTA10. Signed-off-by: Gabe Black Signed-off-by: Taylor Hutt Signed-off-by: Simon Glass --- Changes in v3: - Move missing #ifdef CONFIG_AHCI_SETFEATURES_XFER from later commit drivers/block/ahci.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c index 0a7ad81..2236321 100644 --- a/drivers/block/ahci.c +++ b/drivers/block/ahci.c @@ -373,6 +373,7 @@ static void ahci_fill_cmd_slot(struct ahci_ioports *pp, u32 opts) } +#ifdef CONFIG_AHCI_SETFEATURES_XFER static void ahci_set_feature(u8 port) { struct ahci_ioports *pp = &(probe_ent->port[port]); @@ -397,6 +398,7 @@ static void ahci_set_feature(u8 port) printf("set feature error on port %d!\n", port); } } +#endif static int ahci_port_start(u8 port) @@ -743,7 +745,9 @@ void scsi_low_level_init(int busdevfunc) printf("Can not start port %d\n", i); continue; } +#ifdef CONFIG_AHCI_SETFEATURES_XFER ahci_set_feature((u8) i); +#endif } } } @@ -784,7 +788,9 @@ int ahci_init(u32 base) printf("Can not start port %d\n", i); continue; } +#ifdef CONFIG_AHCI_SETFEATURES_XFER ahci_set_feature((u8) i); +#endif } } err_out: