Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4180798pxv; Mon, 5 Jul 2021 16:19:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzg07qDai04FMzRekivNA7BA+AyHdrYtCAHHrScSnq2F4M4VECJYTEzt8vSrkjaklEWRtGR X-Received: by 2002:a17:906:551:: with SMTP id k17mr15280886eja.435.1625527194603; Mon, 05 Jul 2021 16:19:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625527194; cv=none; d=google.com; s=arc-20160816; b=sBqMtwyTBJi+tw+kU7lqsK2F6ScYXEvWICDCrpaRw8/uYAbuysiy5pnPw+BDGnZjKy AvJ81gQXlQkGVgjzlUiMqGy33fhaFkYz/TjSfCzTf+Lz+bK5Xdpax8bJEC7BC2v47HNF HW6PZo4PojBtdh3XrSofpvmAYQAWwO0df5h+xYa/jIF4Lj8iafLX5u6tef6PUaQMdFJV uLA8AzCsc1vxSXgVIiGTmJnpuKVPK9ZdOVEfofmO0Y6i7b58QiIIXblkiwsHboVY843H 3rBxPkD41raWpNXv51b90VdzBGFDI92lAyYhbakZIt2+61qPgOrt8jExG54YR+ipLmWY qkcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=opgV/1dSlT5CgMY/0CX/nuPAXjFoizd2I+M4agkbai8=; b=cl1+6fToplQgi0zWRQhgkclvpA+EQ684aRQ1iZc3yoTnIYTAJ9WVILT/smu2hUHBVS G8Knd04sq4IupX9h2xGvqDWDnruMKwxQHKVPsVioShtaqcur7WFkQ08mg2yiA2DApRF/ VbvPNuqM5ZZtX7kF8E1pWk/JS8t20dAXOuPn47IIsJXdpLahFNdcR/GT0ojk7OgdsfLI SY5xK+buNO7i1obETwc9kXKCQn9ECeg9SAKqYWAnzAMwpxLERDsMB9nmv7h6kh56QOyE lDHur3VfBNoNguXV6cBR8l5HCaEY7LomdlIqOYfm+Xe8N/rONGp7yWFfXfWnIBew+y5H 5YUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 8si14382466ejx.753.2021.07.05.16.19.10; Mon, 05 Jul 2021 16:19:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231895AbhGEXEy (ORCPT + 99 others); Mon, 5 Jul 2021 19:04:54 -0400 Received: from mail-lf1-f50.google.com ([209.85.167.50]:40918 "EHLO mail-lf1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230086AbhGEXEx (ORCPT ); Mon, 5 Jul 2021 19:04:53 -0400 Received: by mail-lf1-f50.google.com with SMTP id q18so34888760lfc.7; Mon, 05 Jul 2021 16:02:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=opgV/1dSlT5CgMY/0CX/nuPAXjFoizd2I+M4agkbai8=; b=aacaY3uXF9YeLBtCIsBw+EklE1UXjgU7ft83ao55sRJvTxglzxZcO9SOVDeCmYuaxJ mPOX6GqdbTV4VqC08F8vOV3bnxK752515yU/kHKhC9+nZ2JOqPr/Zo0S5wl9GJ4zyKgb F4mB10nm3zGffjLZsno9SOIHk9mgLoikhM+VC8AwGwD9uRHXVgdHY2X/0JLm2iDhUog8 PVsvAG88REDJIEndk/u5zFtWsl6kdp/i1mbfCNQzYgho27DHF6H7eNvVzF4Ulp3+dfq9 XLsLaE34DYM4Xk02kPBgsrTOJl4E2SHSEuqrD8Bwk0kvTb7BAZaHayNgqCnwZRqOS3Et JbUA== X-Gm-Message-State: AOAM530bs74MrMh+1NYg6EZcq7jR6WwB899OSY8gSaF81fPca6pJlpWw AnjcdgDBMXmEw1slyaF1b1M= X-Received: by 2002:a05:6512:238b:: with SMTP id c11mr4669725lfv.548.1625526133811; Mon, 05 Jul 2021 16:02:13 -0700 (PDT) Received: from rocinante ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id s21sm1208097lfc.249.2021.07.05.16.02.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jul 2021 16:02:13 -0700 (PDT) Date: Tue, 6 Jul 2021 01:02:12 +0200 From: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= To: Pali =?utf-8?B?Um9ow6Fy?= Cc: Aaron Ma , Bjorn Helgaas , jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com, davem@davemloft.net, kuba@kernel.org, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Marek =?utf-8?B?QmVow7pu?= Subject: Re: [PATCH 1/2] igc: don't rd/wr iomem when PCI is removed Message-ID: <20210705230212.GC142312@rocinante> References: <20210702045120.22855-1-aaron.ma@canonical.com> <20210704142808.f43jbcufk37hundo@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210704142808.f43jbcufk37hundo@pali> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Pali, [...] > Aaron: can you check if pci_dev_is_disconnected() is really something > which should be used and it helps you? While having a closer look, I've noticed that quite a few of the network drivers handle this somewhat, as I see that a lot of them have some sort of I/O error handles set where a check for "pci_channel_io_perm_failure" seem to be having place. This is also true for this driver looking at the igc_io_error_detected(). Is this not working for the igc driver? Or is this for something completely different? Having said all that, I am not an expert in network drivers, so pardon me if I am asking about something completely different, and I apologise if that is the case. > Bjorn, Krzysztof: what do you think about lifting helper function > pci_dev_is_disconnected() to be available to all drivers and not only in > PCI subsystem? No objections from me, if we believe it's useful and that it might encourage people to use a common API. Currently, I can see at least five potential users of this helper. Krzysztof