Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6333413rdb; Mon, 1 Jan 2024 19:55:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IGAuyBhWc1sf4GYYFXHRq1VpAd3zEkgoixhk4/avq23H5M/aNTz//IvsZhAcWMjxtsp/ZHJ X-Received: by 2002:a05:6214:d4f:b0:680:b719:8e2f with SMTP id 15-20020a0562140d4f00b00680b7198e2fmr3941960qvr.33.1704167736884; Mon, 01 Jan 2024 19:55:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704167736; cv=none; d=google.com; s=arc-20160816; b=g/0f3roxNgMpsY9vJRsPZI/MVkko4++LkmnAWQPu8MgmPg4ujNKc6tHY2vF0YWPST0 2Cp0YdK9KxKlXiYO19+5sExVCryzTbSCR9WdyrnM4ViLRyV4uGVDg7+PTIn/BIBC3H62 YcuopO6ZQ5onMZ/RCafiWraK/ZX4SBZt6rNMX096szdxSnUx8Ee0kWEfgUfKW5jnWQoJ 3Mgel+7QwajwFL4YoybLAx42OjmYsco9zgHJeFq3EpGjsp+jSpCo5mOuUjHGJuxnnInR TiL9xPCmHng1cVFdD2IzVyTFrgCuWTlOF2vyHA3zdDhFipWsd7aYl9Fe4Ht97l+SpE9m 1J/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:mail-followup-to :message-id:subject:cc:to:from:date:feedback-id:dkim-signature :dkim-signature; bh=xtu5fnYjiNRMAjboSlP/RYM4DJQBVcWuSfRSYWtS7Ig=; fh=QrpNPI4LgsyI2prqT+G5GwLDQYjwQazakBU8JqTdIBY=; b=QzMUaGrJ7M5HqumrtD2Wf7874u8AjfOl8XMvr1RasbhXmm7k0w9K+LS/g2/Lr3R18H rtoXy3V+IS/j+buS7IArNiUluaG62R6+EnmXLPgHVg1XFALhkUi18qH7Hzd8ErRYJRNi iikptxmPDdkfRLkVVdgwqN8CMQv/L5ks3tR+Q0HRMqocaEricNAwBQmryrTCtYRHlrr/ N/5eHPzYduPCV6yEADXAPvxXfBxlRAYxgCdeODJdk/RmKm4KrAlqBPACul/US0v5L4ip IWEOixrlLUtO28nukA9KYsIhbxkmZDCx0qJMRufsFO5VWkAedlZbudWpVC5397wr61Jk Drww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm2 header.b=M+hlsmwV; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=4mzICWGb; spf=pass (google.com: domain of linux-kernel+bounces-14005-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14005-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sakamocchi.jp Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id p11-20020a0ccb8b000000b0067f95d02028si23147889qvk.248.2024.01.01.19.55.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jan 2024 19:55:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14005-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm2 header.b=M+hlsmwV; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=4mzICWGb; spf=pass (google.com: domain of linux-kernel+bounces-14005-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14005-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sakamocchi.jp Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 967251C2108D for ; Tue, 2 Jan 2024 03:55:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A38A3ED6; Tue, 2 Jan 2024 03:55:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sakamocchi.jp header.i=@sakamocchi.jp header.b="M+hlsmwV"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="4mzICWGb" X-Original-To: linux-kernel@vger.kernel.org Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3BB4120F9; Tue, 2 Jan 2024 03:55:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sakamocchi.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sakamocchi.jp Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.west.internal (Postfix) with ESMTP id BD4A33200CCA; Mon, 1 Jan 2024 22:55:25 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Mon, 01 Jan 2024 22:55:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm2; t=1704167725; x= 1704254125; bh=xtu5fnYjiNRMAjboSlP/RYM4DJQBVcWuSfRSYWtS7Ig=; b=M +hlsmwV6Ot1lbuzgVo8WDSd/F690g+htk9q9v8KRFns1RQXKO29KsA0TStUK2kkQ LBBi4NTqtgy8ELWYKsOggEPez9yqErfrHs293FtFJhcxIWHlKUA5NfR/7W1FKM/t DSIun06sCHDBaqyd9yM6AHnH9qyQ3zn9paRUi7KzoMz0Yt3yOsXOGLFkgxSCDuL/ dLs7hFOef0z9PhJD9RcMT7wKzrT659QPdpFwNZuMi9hie9jtWh3gB/XI2O/6RfCB PTWimKDosgkI0LB8Njv3LURoWKgz21nKZgvD/5uxQto0ylUTxElrcpkI9nvQXEWD dWIGdu6V7Jovab2qTzITg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1704167725; x=1704254125; bh=xtu5fnYjiNRMAjboSlP/RYM4DJQB VcWuSfRSYWtS7Ig=; b=4mzICWGbr2/Ghz4dtdjxN3mXUqAF9gKenc/1zZwJHtPB mHQtoeb+AgGS6LTzs0qKH0IIB3sXVHbRbi9K153gvwbXKHdVPtq7wVC6uDOc/Oje FIy2yijP2yNwXZgapE7qrJqZzBu8wZdOLFzNrsnC8KAdZXEkhRBCdpAWbVh+NyRt PvNv9DqcQV/3Ltsv8XqW8o8dNVN02fzm4x/D1lzB1Z157aTj3pqIgDVoV4zKx4Hs m874+pEaetrGbrJiP98bfQeJgxBUt2OyI5ET4UZVYG7IZN+g//LuG/b+ankDz5dA 1od7EuUdBCcGSmi7cmou5TacKt0G/knDQRNmGaos4Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeguddgieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepvfgrkhgr shhhihcuufgrkhgrmhhothhouceoohdqthgrkhgrshhhihesshgrkhgrmhhotggthhhird hjpheqnecuggftrfgrthhtvghrnhephefhhfettefgkedvieeuffevveeufedtlefhjeei ieetvdelfedtgfefuedukeeunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepohdqthgrkhgrshhhihesshgrkhgrmhhotggthhhirdhjph X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 1 Jan 2024 22:55:22 -0500 (EST) Date: Tue, 2 Jan 2024 12:55:19 +0900 From: Takashi Sakamoto To: Mario Limonciello Cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, adamg@pobox.com, stable@vger.kernel.org, Jiri Slaby , Tobias Gruetzmacher Subject: Re: [PATCH] firewire: ohci: suppress unexpected system reboot in AMD Ryzen machines and ASM108x/VT630x PCIe cards Message-ID: <20240102035519.GA46261@workstation.local> Mail-Followup-To: Mario Limonciello , linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, adamg@pobox.com, stable@vger.kernel.org, Jiri Slaby , Tobias Gruetzmacher References: <20231229035735.11127-1-o-takashi@sakamocchi.jp> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi Mario, On Fri, Dec 29, 2023 at 08:30:00PM -0600, Mario Limonciello wrote: > On 12/28/2023 21:57, Takashi Sakamoto wrote: > > @@ -3527,6 +3534,45 @@ static const struct fw_card_driver ohci_driver = { > > .stop_iso = ohci_stop_iso, > > }; > > +// On PCI Express Root Complex in any type of AMD Ryzen machine, VIA VT6306/6307/6308 with Asmedia > > +// ASM1083/1085 brings an inconvenience that read accesses to 'Isochronous Cycle Timer' register > > +// (at offset 0xf0 in PCI I/O space) often causes unexpected system reboot. The mechanism is not > > +// clear, since the read access to the other registers is enough safe; e.g. 'Node ID' register, > > +// while it is probable due to detection of any type of PCIe error. > > +#if IS_ENABLED(CONFIG_X86) > > + > > +#define PCI_DEVICE_ID_ASMEDIA_ASM108X 0x1080 > > + > > +static bool detect_vt630x_with_asm1083_on_amd_ryzen_machine(const struct pci_dev *pdev, > > + struct fw_ohci *ohci) > > +{ > > + const struct pci_dev *pcie_to_pci_bridge; > > + const struct cpuinfo_x86 *cinfo = &cpu_data(0); > > + > > + // Detect any type of AMD Ryzen machine. > > + if (cinfo->x86_vendor != X86_VENDOR_AMD || cinfo->x86 < 0x17) > > + return false; > > Maybe it's better to use X86_FEATURE_ZEN? Indeed. We can use it under the condition branch for CONFIG_X86, like: + // Detect any type of AMD Ryzen machine. + if (!static_cpu_has(X86_FEATURE_ZEN)) + return false; Thanks Takashi Sakamoto