From patchwork Thu Jul 17 17:38:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Salter X-Patchwork-Id: 33799 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f70.google.com (mail-pa0-f70.google.com [209.85.220.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9135820969 for ; Thu, 17 Jul 2014 17:38:40 +0000 (UTC) Received: by mail-pa0-f70.google.com with SMTP id lf10sf19254251pab.1 for ; Thu, 17 Jul 2014 10:38:39 -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:message-id:subject:from:to:cc:date :organization: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 :content-transfer-encoding; bh=x738ppEtAmN+LmSs0VRHxBfSkBFUsVrgfPAXzO5NkFw=; b=kPgZFFDGN5/mnbWsVdoi39FLpnAeJQDHnGKQFNQFNLRpQKm2iFNIQtK1F2F3Wnery9 4oDMlR7T3Fp0Zr/eyCSG0Xs8GkCB8n/qElO95apIpDPeqkRxkkSIFTItsio/h7le18jH GJXxzfQigZdN5jN8rTutUcJQeW5BONjdHNqsLe8d1XIpD2noSDwtJbyx15gyiwccgikn 5xeLQV9fJVISEGdZJJY0b8gnxf+ubG0lf1dditsDFPhJwyO+fEc47/Mm2RyL2jVHrbnt 0JVh9SeLA/wmvs/jYkuGgC286JyaPDk2JpQxEoXvjZfurIcB9fnnQ03N+JPa+EiC+sVc L4tQ== X-Gm-Message-State: ALoCoQl+KPUKHDBBVTFcdbVzR2T3UvIZV7sJaGZpsvC5XoArR4qL+oPWf7MoxLa1nqQRR0dduFe5 X-Received: by 10.66.235.66 with SMTP id uk2mr14246549pac.39.1405618719656; Thu, 17 Jul 2014 10:38:39 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.37.142 with SMTP id r14ls753618qgr.16.gmail; Thu, 17 Jul 2014 10:38:39 -0700 (PDT) X-Received: by 10.236.7.198 with SMTP id 46mr63966880yhp.43.1405618719515; Thu, 17 Jul 2014 10:38:39 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id e80si8402661yhi.62.2014.07.17.10.38.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Jul 2014 10:38:39 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id hq11so3657978vcb.38 for ; Thu, 17 Jul 2014 10:38:39 -0700 (PDT) X-Received: by 10.220.15.8 with SMTP id i8mr20384454vca.45.1405618719312; Thu, 17 Jul 2014 10:38:39 -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.221.37.5 with SMTP id tc5csp55011vcb; Thu, 17 Jul 2014 10:38:38 -0700 (PDT) X-Received: by 10.70.95.196 with SMTP id dm4mr4496963pdb.158.1405618718499; Thu, 17 Jul 2014 10:38:38 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id au5si3082775pbc.93.2014.07.17.10.38.38; Thu, 17 Jul 2014 10:38:38 -0700 (PDT) Received-SPF: none (google.com: linux-scsi-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 S1751314AbaGQRig (ORCPT ); Thu, 17 Jul 2014 13:38:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22059 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751308AbaGQRif (ORCPT ); Thu, 17 Jul 2014 13:38:35 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6HHcWeB017399 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 17 Jul 2014 13:38:32 -0400 Received: from [10.3.113.32] (ovpn-113-32.phx2.redhat.com [10.3.113.32]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s6HHcV8o001483; Thu, 17 Jul 2014 13:38:31 -0400 Message-ID: <1405618711.25580.120.camel@deneb.redhat.com> Subject: [PATCH] ahci_xgene: add errata workaround for ATA_CMD_SMART From: Mark Salter To: stripathi@apm.com Cc: lho@apm.com, Jon Masters , linux-scsi@vger.kernel.org Date: Thu, 17 Jul 2014 13:38:31 -0400 Organization: Red Hat, Inc Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: linux-scsi-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: msalter@redhat.com 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.179 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: , commit 2a0bdff6b958d1b2: ahci_xgene: fix the dma state machine lockup for the IDENTIFY DEVICE PIO mode command. added a workaround for X-Gene AHCI controller errata. This was done for all ATA_CMD_ID_ATA commands. The errata also appears to affect ATA_CMD_SMART commands as well. This was discovered when running smartd or just smartctl -x. This patch adds a dma engine restart for ATA_CMD_SMART commands which clears up the issues seen with smartd. Signed-off-by: Mark Salter --- drivers/ata/ahci_xgene.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c index ee3a365..f9431b4 100644 --- a/drivers/ata/ahci_xgene.c +++ b/drivers/ata/ahci_xgene.c @@ -131,7 +131,8 @@ static unsigned int xgene_ahci_qc_issue(struct ata_queued_cmd *qc) struct xgene_ahci_context *ctx = hpriv->plat_data; int rc = 0; - if (unlikely(ctx->last_cmd[ap->port_no] == ATA_CMD_ID_ATA)) + if (unlikely(ctx->last_cmd[ap->port_no] == ATA_CMD_ID_ATA || + ctx->last_cmd[ap->port_no] == ATA_CMD_SMART)) xgene_ahci_restart_engine(ap); rc = ahci_qc_issue(qc);