From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com ([192.55.52.115]:5453 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727518AbeIESsZ (ORCPT ); Wed, 5 Sep 2018 14:48:25 -0400 Date: Wed, 5 Sep 2018 08:17:13 -0600 From: Keith Busch To: Lukas Wunner Cc: Sreekanth Reddy , Suganath Prabu Subramani , Andy Shevchenko , linux-scsi , Sathya Prakash , linux-pci@vger.kernel.org, Benjamin Herrenschmidt Subject: Re: [Patch v1 0/7] mpt3sas: Hot-Plug Surprise removal support on IOC. Message-ID: <20180905141712.GA19005@localhost.localdomain> References: <1535690081-16116-1-git-send-email-suganath-prabu.subramani@broadcom.com> <20180831085534.n6eikj5cw522ihhe@wunner.de> <20180904094234.jm5je5sfpagdf6dz@wunner.de> <20180905073816.jcrct2xcpucb6bkn@wunner.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20180905073816.jcrct2xcpucb6bkn@wunner.de> Sender: linux-pci-owner@vger.kernel.org List-ID: On Wed, Sep 05, 2018 at 09:38:16AM +0200, Lukas Wunner wrote: > On Wed, Sep 05, 2018 at 11:45:45AM +0530, Sreekanth Reddy wrote: > > On Tue, Sep 4, 2018 at 3:12 PM, Lukas Wunner wrote: > > > Many scsi drivers call pci_channel_offline() to detect inaccessibility > > > of the device due to a PCI error: > > > https://elixir.bootlin.com/linux/v4.19-rc2/ident/pci_channel_offline > > > > > > A patch is pending such that surprise removal can also be queried > > > with that same function: > > > https://www.spinics.net/lists/linux-pci/msg75722.html > > > > Lukas, thanks for pointing to this pci_dev_is_disconnected() API. So > > we can use this API directly instead of reading the vendor Id and > > checking for all one's once this patch get accepted? > > Yes, except pci_dev_is_disconnected() is private to the PCI core, > but dev->error_state and pci_channel_offline() is public. The exported function to call is pci_device_is_present().