From patchwork Thu Mar 1 19:40:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 10252323 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 963EB60365 for ; Thu, 1 Mar 2018 19:40:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 869D928521 for ; Thu, 1 Mar 2018 19:40:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B35A28534; Thu, 1 Mar 2018 19:40:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FF6C28521 for ; Thu, 1 Mar 2018 19:40:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161380AbeCATkd (ORCPT ); Thu, 1 Mar 2018 14:40:33 -0500 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:18668 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161362AbeCATkb (ORCPT ); Thu, 1 Mar 2018 14:40:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1519933232; x=1551469232; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=d8bZ4goCDJpxmlxbS5Cdy4D6FAjU23nxdcNNigKVxN4=; b=GTmyaWFlwxsrFy9lNE+KKtRI+Onx/m6gk9oW6OaL3dC5lXUavscoFzfX cEeE9ZohlXnueNEbb689zsyvjhR4JlP3SJkAckhgMWw1EddhZ2sddqi39 H62mggS0COUbcaJhB0Q5di14I7fz3nE8wN4xqiyHKIGMBFgsu5sYRUlDA uJD2/u7P/MTJhZA/LSh7gTfzM/kG4ji4xWkGjGsP0FYOcB4NyZPx40c/x kzukB97KlgC+ZG9YrCE4UcRUiR+y8GUTq7p+pUTFLLx5ReFIG3l+4Lvp5 IZeEn39NleaLELWM44vWGBSk0canLymlnsS5xc8EvZ3SWaZ58Jv47cFpT g==; X-IronPort-AV: E=Sophos;i="5.47,409,1515427200"; d="scan'208";a="72555668" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 02 Mar 2018 03:40:31 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP; 01 Mar 2018 11:33:53 -0800 Received: from washi.fujisawa.hgst.com ([10.149.53.254]) by uls-op-cesaip01.wdc.com with ESMTP; 01 Mar 2018 11:40:31 -0800 From: Damien Le Moal To: linux-scsi@vger.kernel.org, "Martin K . Petersen" , linux-ata@vger.kernel.org, Tejun Heo Cc: Bart Van Assche , Hannes Reinecke Subject: [PATCH 4/6] libata: Fix ata_err_string() Date: Fri, 2 Mar 2018 04:40:22 +0900 Message-Id: <20180301194024.25532-5-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180301194024.25532-1-damien.lemoal@wdc.com> References: <20180301194024.25532-1-damien.lemoal@wdc.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add proper error string output for ATA_ERR_NCQ and ATA_ERR_NODEV_HINT instead of returning "unknown error". Signed-off-by: Damien Le Moal Reviewed-by: Hannes Reinecke --- drivers/ata/libata-eh.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index d6264235c3d7..006ea1507dcf 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -1482,6 +1482,10 @@ static const char *ata_err_string(unsigned int err_mask) return "invalid argument"; if (err_mask & AC_ERR_DEV) return "device error"; + if (err_mask & AC_ERR_NCQ) + return "NCQ error"; + if (err_mask & AC_ERR_NODEV_HINT) + return "Polling detection error"; return "unknown error"; }