From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752035AbdJYVm3 (ORCPT ); Wed, 25 Oct 2017 17:42:29 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:37542 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751775AbdJYVm1 (ORCPT ); Wed, 25 Oct 2017 17:42:27 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7DE4E6055B Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org Subject: Re: [PATCH] PCI: rework error checking in the reset path To: Alex Williamson , Bjorn Helgaas Cc: linux-pci@vger.kernel.org, timur@codeaurora.org, linux-arm-msm@vger.kernel.org, Bjorn Helgaas , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <1508794608-15310-1-git-send-email-okaya@codeaurora.org> <20171025134511.GL21840@bhelgaas-glaptop.roam.corp.google.com> <20171025232805.163ccaad@t450s.home> From: Sinan Kaya Message-ID: <47146df8-b4e1-595d-9664-3830d770eecf@codeaurora.org> Date: Wed, 25 Oct 2017 17:42:24 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171025232805.163ccaad@t450s.home> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/25/2017 5:28 PM, Alex Williamson wrote: >> Previously, we only tried the next reset method if one method failed >> with -ENOTTY. With this patch, we'll try the next reset method if one >> method fails for any reason, not just -ENOTTY. > Hmm, I thought the return codes were pretty consistent. -ENOTTY means > that the reset callback doesn't handle the device, move on. Many > ioctls use the same return code to indicate an unknown ioctl. This > allows us to differentiate success vs error vs unhandled. In the code > below we lose the ability to, for instance, have a device specific > reset that returns -EINVAL to prevent the PCI core for triggering > further reset mechanisms which might be broken on the device. So, I > don't see that this patch specifically fixes anything, but it does > remove what seems like useful functionality... I'd veto it. Thanks, > OK, It was not obvious how the EINVAL and ENOTTY used by code inspection. Thank your very much for the clarification. I'm dropping the patch unless Bjorn has another idea. > Alex > -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.