From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754371AbdEQMjZ (ORCPT ); Wed, 17 May 2017 08:39:25 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:6336 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752067AbdEQMjU (ORCPT ); Wed, 17 May 2017 08:39:20 -0400 Subject: Re: [PATCH 20/22] scsi: hisi_sas: Add v3 code to support ECC and AXI bus fatal error To: Arnd Bergmann References: <1495018197-120535-1-git-send-email-john.garry@huawei.com> <1495018197-120535-21-git-send-email-john.garry@huawei.com> CC: "James E.J. Bottomley" , "Martin K. Petersen" , John Garry , , , "Linux Kernel Mailing List" , Xiang Chen From: John Garry Message-ID: <438a97a7-b424-a599-0c65-1e79dcdf8e86@huawei.com> Date: Wed, 17 May 2017 13:38:27 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.203.181.157] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.591C4451.00A9,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 49cf5ff1da65f1133661263e21b4dc90 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/05/2017 13:27, Arnd Bergmann wrote: > On Wed, May 17, 2017 at 12:49 PM, John Garry wrote: >> > From: Xiang Chen >> > >> > For ECC 1bit error, logic can recover it, so we only print a warning. >> > For ECC multi-bit and AXI bus fatal error, we panic. >> > >> > Signed-off-by: John Garry >> > Signed-off-by: Xiang Chen > This one is tricky as there are conflicting requirements: > > - For debugging purposes, you want to continue running the system > to figure out what exactly went wrong. Often enough, having the > kernel panic means you don't get to see the panic message because > console access is unavailable and you cannot log in any more > > - For data consistency purposes you want to stop the system as > soon as there is any uncorrectable data error > > I see that most scsi drivers don't ever call panic or BUG(), though > you already do so for v1 and v2 hw. > > Maybe the SCSI maintainers can provide some more guidance here. > > Arnd > > . > Hi Arnd, Actually latest code for v2 has been updated to do a controller reset, and not panic, for unrecoverable error: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c?h=v4.12-rc1#n2926 We never got around to implementing controller reset for v1 as this platform (hip05) is not used much anymore. As for v3, we will change to to do same once controller reset is implemented. I should have added this to the commit log. Thanks, John From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Garry Subject: Re: [PATCH 20/22] scsi: hisi_sas: Add v3 code to support ECC and AXI bus fatal error Date: Wed, 17 May 2017 13:38:27 +0100 Message-ID: <438a97a7-b424-a599-0c65-1e79dcdf8e86@huawei.com> References: <1495018197-120535-1-git-send-email-john.garry@huawei.com> <1495018197-120535-21-git-send-email-john.garry@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from szxga02-in.huawei.com ([45.249.212.188]:6336 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752067AbdEQMjU (ORCPT ); Wed, 17 May 2017 08:39:20 -0400 In-Reply-To: Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Arnd Bergmann Cc: "James E.J. Bottomley" , "Martin K. Petersen" , John Garry , linuxarm@huawei.com, linux-scsi@vger.kernel.org, Linux Kernel Mailing List , Xiang Chen On 17/05/2017 13:27, Arnd Bergmann wrote: > On Wed, May 17, 2017 at 12:49 PM, John Garry wrote: >> > From: Xiang Chen >> > >> > For ECC 1bit error, logic can recover it, so we only print a warning. >> > For ECC multi-bit and AXI bus fatal error, we panic. >> > >> > Signed-off-by: John Garry >> > Signed-off-by: Xiang Chen > This one is tricky as there are conflicting requirements: > > - For debugging purposes, you want to continue running the system > to figure out what exactly went wrong. Often enough, having the > kernel panic means you don't get to see the panic message because > console access is unavailable and you cannot log in any more > > - For data consistency purposes you want to stop the system as > soon as there is any uncorrectable data error > > I see that most scsi drivers don't ever call panic or BUG(), though > you already do so for v1 and v2 hw. > > Maybe the SCSI maintainers can provide some more guidance here. > > Arnd > > . > Hi Arnd, Actually latest code for v2 has been updated to do a controller reset, and not panic, for unrecoverable error: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c?h=v4.12-rc1#n2926 We never got around to implementing controller reset for v1 as this platform (hip05) is not used much anymore. As for v3, we will change to to do same once controller reset is implemented. I should have added this to the commit log. Thanks, John