Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp269190pxu; Thu, 22 Oct 2020 23:23:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxijwihc97b7B6PUdFonW1gBkazRMVaAGrbLETqm7j10+KRCFzco85icF0SEHa0IDfArZrs X-Received: by 2002:a17:906:7f05:: with SMTP id d5mr494450ejr.362.1603434211484; Thu, 22 Oct 2020 23:23:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603434211; cv=none; d=google.com; s=arc-20160816; b=fMds8+5OsmGyNo7RRg3C+LC8rQQrDgJjLFp5Px4Ceo0xUyh/sCo+LAa0mWdrul8xaj mOaiDG5FTRhw1H8JEIyvUf655L5nfrM1ejxOh0ZWLvAtDV+uqa04HY0INtApaIXYsmsp mQlB7ubgE+jsnhBPKRkOhxPcC3vZK3s1nRaxlKUHd5CpaK9DE5EDvJZYp3RnBjBYydsU F+fdG1xMY2ncweEQ3Y/4kz2hMjDPrZe2PlGGBQ63aqwLaWRFs7aH3wD6rRIkSBWsX1Op WiM+anvR7jujGyArvXOaIug8R7D57ulNGyF8K0ZlallEsOs5V3/RpaSZrERMl4RuGHkF dHQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=+enCxotH+kmc1TrTmn5Bz3JZSiOi3hjf0Ra5CEWhKy8=; b=w3rUL+edIs5pau2f9+AyXmeeFzI0a0X6G1cikHSrvpBhtLqXtGW+QkCReesZSSUgdK q/lBauPvXUVOOJICPsZQJ25PfXIrRK2dnyOwFaibLtZeTGb00/5qHZhBnGC5lel+3hdE eNVR49wxDPFogROU7QYpiwHdw9bXw5XumLNYabx4mgmAAR7iG6wJ2bQd9aF5xWGJjQm0 C2/Aa9PlH9C1uc5na2ztgZqw6x0u3xTQzEHr/sWXiNWffoPjN3CCe8V60faCP4QBOAeS Nm+Jefh4yzIt4tvU4KhvvpAAik4rgqb4A9WHcvGMgmIdO59ds0+MKONcmSbN0WcqGNZ6 frSA== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d21si263196ejz.214.2020.10.22.23.23.07; Thu, 22 Oct 2020 23:23:31 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S372680AbgJVWGq (ORCPT + 99 others); Thu, 22 Oct 2020 18:06:46 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:41110 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S368409AbgJVWGp (ORCPT ); Thu, 22 Oct 2020 18:06:45 -0400 Received: by mail-pl1-f196.google.com with SMTP id w11so1695843pll.8; Thu, 22 Oct 2020 15:06:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+enCxotH+kmc1TrTmn5Bz3JZSiOi3hjf0Ra5CEWhKy8=; b=p7blkZjyQEZUxhgYmSpxI2Cx496gT+M/Ot54kAqpeuJ/uDmYnPHIHVm0wUCaiDfffW 7QSHc59t2evmwd2NZlh07r74BDcGy4ECdKqVgXktpO4oXF0cnkvrLfgHbVnj80D8h4Wy YXkbyr7pWJoyJcLWHwzt6omSNfdCeSXfFJ6JxeJFfZwenW6o8mE33xJ/DPU+jo/H03km MTuqCXQswoFgQIrhPtEOlLkyOPExTMUFKmgNn3YHCmhExcgbFM8cCW8FAEb5UmTv3RWj gui0dFIzq0fIVLc712IQ1N2RbhflaL75yYzazPhVPCNxOe6TLnHyDmTAAgt2qHaSyT8e 2ijQ== X-Gm-Message-State: AOAM532ac3rSxVfWDucwbFpIjYcZav6rtLYgKReBmTJyWvE08auiU+Yr VvdnCjCDgFL0HLiydYGahah3CH4NP8o= X-Received: by 2002:a17:902:6942:b029:d6:18b0:8a with SMTP id k2-20020a1709026942b02900d618b0008amr2867632plt.23.1603404405042; Thu, 22 Oct 2020 15:06:45 -0700 (PDT) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id z73sm3348029pfc.75.2020.10.22.15.06.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Oct 2020 15:06:44 -0700 (PDT) From: Moritz Fischer To: netdev@vger.kernel.org Cc: davem@davemloft.net, linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, lucyyan@google.com, Moritz Fischer Subject: [PATCH/RFC net] net: dec: tulip: de2104x: Add shutdown handler to stop NIC Date: Thu, 22 Oct 2020 15:06:36 -0700 Message-Id: <20201022220636.609956-1-mdf@kernel.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The driver does not implement a shutdown handler which leads to issues when using kexec in certain scenarios. The NIC keeps on fetching descriptors which gets flagged by the IOMMU with errors like this: DMAR: DMAR:[DMA read] Request device [5e:00.0]fault addr fffff000 DMAR: DMAR:[DMA read] Request device [5e:00.0]fault addr fffff000 DMAR: DMAR:[DMA read] Request device [5e:00.0]fault addr fffff000 DMAR: DMAR:[DMA read] Request device [5e:00.0]fault addr fffff000 DMAR: DMAR:[DMA read] Request device [5e:00.0]fault addr fffff000 Signed-off-by: Moritz Fischer --- Hi all, I'm not sure if this is the proper way for a shutdown handler, I've tried to look at a bunch of examples and couldn't find a specific solution, in my tests on hardware this works, though. Open to suggestions. Thanks, Moritz --- drivers/net/ethernet/dec/tulip/de2104x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c b/drivers/net/ethernet/dec/tulip/de2104x.c index f1a2da15dd0a..372c62c7e60f 100644 --- a/drivers/net/ethernet/dec/tulip/de2104x.c +++ b/drivers/net/ethernet/dec/tulip/de2104x.c @@ -2185,6 +2185,7 @@ static struct pci_driver de_driver = { .id_table = de_pci_tbl, .probe = de_init_one, .remove = de_remove_one, + .shutdown = de_remove_one, #ifdef CONFIG_PM .suspend = de_suspend, .resume = de_resume, -- 2.28.0