Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp69208pxt; Wed, 4 Aug 2021 06:10:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykSFoKguoXxjCpwfKB4oHtm+SbEYRdi7/K1G6O4sgnQYR3A5a0aIl7FEaSoLrBG8dpluMT X-Received: by 2002:a05:6402:274f:: with SMTP id z15mr32747756edd.21.1628082652473; Wed, 04 Aug 2021 06:10:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628082652; cv=none; d=google.com; s=arc-20160816; b=p+Md37TMbwUcwd05bpmTGbPrJJk5HnYCWR7DVGnvt2KnAZqUHwUbuAnWkACYQ2DDQA fQ47NZamgeWwz1QpTHdm0pwzD/q/CgbW3CxJwlesFgmjAbuGucE9ZrmQnOM7LYRpNHH2 IE5WbKFRvX/xnwAfD6jaECsoPgFkGOmpIaFEDwW2OC+JBR+Y4lW+N8G+iY6qBEjvTKLh +3WrUpWYrXC8fR+u9jvBngV8QO5pEiRQvicF854UTQ5EIU9nuLFDgline0VK+dL1NG+4 Xg+upMN8vvsJy08OBCMJe2PHqTxNivinynYAC2V+ISjJ2/ndlCGxKXtTerNjC09Qa/VB 7Ofg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject; bh=xjD/nYMuY2Qr8m/ZEH31XNtAGdHnX+w6QVOMRs8fFPo=; b=F0Yw43BpniiOjnNJqgyo82ZDTrc7k5AXvTKps+tf4yPG5PG20VKr2k8wjjy2pvtWoF HMHLxgzeXhXu/AbSR/KJq2GIvPffRzaOmhmDuDg+33jvX3rtuqaJcs1KNS52oJ0qGadk f5yA+DoSIPfH9uvsV4GsChMAdXwYDT4hmwvjhpv9i6zUy2P0ka+FTCnO2uKcdukBzN+a jZ3t3INUsYli8xYzP4OaNHj8zIW3aycZyLZHfcAi6iE4S4vPoB410NhCNaTl5Mp98+7n Chw+v7Zi32D531CmE0+SCEcfctxOOkRP7xN0vnRJQoH9yrDBR8JomWacDSrTzC2JChb9 +YGg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l10si2215864edb.184.2021.08.04.06.10.00; Wed, 04 Aug 2021 06:10:52 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237970AbhHDMHK (ORCPT + 99 others); Wed, 4 Aug 2021 08:07:10 -0400 Received: from mga06.intel.com ([134.134.136.31]:49804 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234765AbhHDMHJ (ORCPT ); Wed, 4 Aug 2021 08:07:09 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10065"; a="274958502" X-IronPort-AV: E=Sophos;i="5.84,294,1620716400"; d="scan'208";a="274958502" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2021 05:06:56 -0700 X-IronPort-AV: E=Sophos;i="5.84,294,1620716400"; d="scan'208";a="511886792" Received: from dfuxbrum-mobl.ger.corp.intel.com (HELO [10.251.175.67]) ([10.251.175.67]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2021 05:06:53 -0700 Subject: Re: [Intel-wired-lan] [PATCH v2] igc: fix page fault when thunderbolt is unplugged To: Aaron Ma , 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 References: <20210702045120.22855-1-aaron.ma@canonical.com> <20210713130036.741188-1-aaron.ma@canonical.com> From: "Fuxbrumer, Dvora" Message-ID: <567b12f8-359a-5268-e020-edcf2dd46937@linux.intel.com> Date: Wed, 4 Aug 2021 15:06:44 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210713130036.741188-1-aaron.ma@canonical.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/13/2021 16:00, Aaron Ma wrote: > After unplug thunerbolt dock with i225, pciehp interrupt is triggered, > remove call will read/write mmio address which is already disconnected, > then cause page fault and make system hang. > > Check PCI state to remove device safely. > > Trace: > BUG: unable to handle page fault for address: 000000000000b604 > Oops: 0000 [#1] SMP NOPTI > RIP: 0010:igc_rd32+0x1c/0x90 [igc] > Call Trace: > igc_ptp_suspend+0x6c/0xa0 [igc] > igc_ptp_stop+0x12/0x50 [igc] > igc_remove+0x7f/0x1c0 [igc] > pci_device_remove+0x3e/0xb0 > __device_release_driver+0x181/0x240 > > Signed-off-by: Aaron Ma > --- > drivers/net/ethernet/intel/igc/igc_main.c | 32 ++++++++++++++--------- > drivers/net/ethernet/intel/igc/igc_ptp.c | 3 ++- > 2 files changed, 21 insertions(+), 14 deletions(-) > Tested-by: Dvora Fuxbrumer