From patchwork Mon Aug 3 15:16:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 6930261 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 591459F39D for ; Mon, 3 Aug 2015 15:16:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 800BD205BD for ; Mon, 3 Aug 2015 15:16:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A625B20504 for ; Mon, 3 Aug 2015 15:16:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752078AbbHCPQf (ORCPT ); Mon, 3 Aug 2015 11:16:35 -0400 Received: from mail-yk0-f179.google.com ([209.85.160.179]:33387 "EHLO mail-yk0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751637AbbHCPQe (ORCPT ); Mon, 3 Aug 2015 11:16:34 -0400 Received: by ykoo205 with SMTP id o205so22826218yko.0; Mon, 03 Aug 2015 08:16:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=1en6TbOoRYVxvAr3ygO8WKZtN8QIY962VZCiyPGCCwk=; b=mP7MzLErNXLKQBJGDEgNrrXRmros+oeNz/rqCftZnEwSfkAIls6PlY0vMeAx6SQZ/f iI3rKaIhCZNsy33BFl+RUMNCUcWf2eaPQ5prA7AASudaz1y/MQgIicuTh0dSK8VfP8/2 fGxcFzjo90x2nTR62DvwAKqnCMzrlkVx9YUJib/8B9DKkbYK2NdbItColYYe1fWbtboU rhmiDVOHWHGWnernuldXxLMlkPKnO2/oYehWmU+U0/jB6mCgqCgdlvsbThQalmgAS8ei 5y3780H5LIiRTW1sJQ86LoBURK6560GWNgzewNl04Ldynmy9TNqVVsQKFI3B+2oWPua/ ztKg== X-Received: by 10.13.219.198 with SMTP id d189mr21557739ywe.140.1438614994334; Mon, 03 Aug 2015 08:16:34 -0700 (PDT) Received: from mtj.duckdns.org ([2620:10d:c0a1:f80::1:aaa]) by smtp.gmail.com with ESMTPSA id d12sm14223532ywe.42.2015.08.03.08.16.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Aug 2015 08:16:23 -0700 (PDT) Date: Mon, 3 Aug 2015 11:16:21 -0400 From: Tejun Heo To: Hannes Reinecke Cc: linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, James Bottomley Subject: [PATCH libata/for-4.2-fixes] libata: disable NCQ autosense Message-ID: <20150803151621.GF32599@mtj.duckdns.org> References: <1438347728-106434-1-git-send-email-hare@suse.de> <1438347728-106434-2-git-send-email-hare@suse.de> <20150802154415.GA31100@mtj.duckdns.org> <55BF18ED.3000002@suse.de> <20150803150428.GE32599@mtj.duckdns.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150803150428.GE32599@mtj.duckdns.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From 8c0fa3e7ca99b0d6d96cb2cf194a912f643da7c5 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Mon, 3 Aug 2015 11:10:45 -0400 fe7173c206de ("libata: Implement support for sense data reporting") and subsequent patches enabled NCQ autosense reporting; unfortunately, this breaks libata EH behavior for devices which support the feature because it assumes that only ATAPI devices report sense data and that sense data trumps explicit device error indication. For now, disable NCQ autosense. Cc: stable@vger.kernel.org # v4.1+ Fixes: fe7173c206de ("libata: Implement support for sense data reporting") --- drivers/ata/libata-core.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index db5d9f7..32451ac 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -2151,6 +2151,13 @@ static void ata_dev_config_sense_reporting(struct ata_device *dev) { unsigned int err_mask; + /* + * FIXME: This makes ATA devices report sense data on failure which + * in turn makes libata EH ignore AC_ERR_DEV leading to incorrect + * error handling behaviors. + */ + return; + if (!ata_id_has_sense_reporting(dev->id)) return;