From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761930AbcINMsV (ORCPT ); Wed, 14 Sep 2016 08:48:21 -0400 Received: from mx2.suse.de ([195.135.220.15]:54781 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756072AbcINMsT (ORCPT ); Wed, 14 Sep 2016 08:48:19 -0400 Subject: Re: [PATCH 08/15] hisi_sas: fix a potential warning for sata disk ejection To: John Garry , jejb@linux.vnet.ibm.com, martin.petersen@oracle.com References: <1473176185-217808-1-git-send-email-john.garry@huawei.com> <1473176185-217808-9-git-send-email-john.garry@huawei.com> Cc: linuxarm@huawei.com, zhangfei.gao@linaro.org, xuwei5@hisilicon.com, john.garry2@mail.dcu.ie, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Xiang Chen From: Hannes Reinecke Message-ID: Date: Wed, 14 Sep 2016 14:48:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: <1473176185-217808-9-git-send-email-john.garry@huawei.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/06/2016 05:36 PM, John Garry wrote: > If hisi_sas_task_prep() fails for a SATA device due to PHY > down, we return a failure to libata and also call task_done(), > which will cause ata_qc_complete() to be called twice: > - first call from hisi_sas_task_prep(), which will clear flag > ATA_QCFLAG_ACTIVE > - ata_qc_complete() called from libata > The warning call trace is as follows: > > [ 117.070206] [] __ata_qc_complete+0xf4/0x11c > [ 117.070208] [] ata_qc_complete+0x180/0x200 > [ 117.070210] [] ata_qc_issue+0x110/0x354 > [ 117.070212] [] ata_exec_internal_sg+0x240/0x4d0 > [ 117.070214] [] ata_exec_internal+0x60/0xa0 > [ 117.070217] [] ata_read_log_page+0x188/0x1b4 > [ 117.070218] [] ata_eh_analyze_ncq_error+0xa8/0x274 > [ 117.070220] [] ata_eh_link_autopsy+0x94/0x8c8 > [ 117.070222] [] ata_eh_autopsy+0x34/0xe8 > [ 117.070223] [] ata_do_eh+0x28/0xc0 > [ 117.070225] [] ata_std_error_handler+0x3c/0x84 > [ 117.070227] [] ata_scsi_port_error_handler+0x480/0x674 > [ 117.070230] [] async_sas_ata_eh+0x44/0x78 > [ 117.070231] [] async_run_entry_fn+0x40/0x104 > [ 117.070234] [] process_one_work+0x128/0x2f0 > [ 117.070235] [] worker_thread+0x58/0x434 > [ 117.070237] [] kthread+0xd4/0xe8 > [ 117.070240] [] ret_from_fork+0x10/0x40 > > The issue is resolved by simply returning a failure status > code to the upper layer. > > Signed-off-by: Xiang Chen > Signed-off-by: John Garry > --- > drivers/scsi/hisi_sas/hisi_sas_main.c | 26 ++++++-------------------- > 1 file changed, 6 insertions(+), 20 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)