Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp156645pxf; Wed, 10 Mar 2021 03:07:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJzf06l1SZG4l093AKeOEXOJcwtjGv6xrpGBm1gcnrW9Z0uUrbQIrrOW+LgS0xY0VJAerCuI X-Received: by 2002:a17:907:77d4:: with SMTP id kz20mr3022875ejc.93.1615374439809; Wed, 10 Mar 2021 03:07:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615374439; cv=none; d=google.com; s=arc-20160816; b=CfpZf7bB8JyTcjzpm5oEpI/N85rVv7spGQ9XBUIQTzonVxnwmacuu52rLnLg+K/F6v UL2iM+BMDq5+B8OxgyGlFCK1jmMMX1i5Hoe4affqzp1nrxI/EegTPdNCBihCYde5KUJ9 mNw3i11/sZD2QDEvVo6YM7RNe/SvYiyOefD5v72ROVKIuMGf829rKvXhvYLv8xrvYAkg ejyh9cZ19lbsqe9iT2mRHAVVpGI/CKreXwYlkQ/3VfT4n3/toPhX9e7qK4TOOzdWh2nU B+3hQUp7W45XV5Jwb3loy9WpTfGyhK/8d8wzu9C+ZHz9af8IXiRZY1SUQIVLga0m338n x56w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:content-disposition:mime-version :message-id:subject:to:from:date:dkim-signature; bh=250n1SIL81Lob3W2vemslcjdvU/uN2/HJ6ayL4zyAdg=; b=EVTzKdEVxEJKvFurKN0Yl3N+aMS+jNgS2hYrSGuVENGuqpwDY5rkUYedlpv71yEHSr 8p+41GfhylTYaB1j1myvaIqoxtdVJIydHDFSuSQFKOeKDN71ZwxYBAws/KZoMvEqDPCA RMPdNsSM83O8CPq7+hlNXTQohr37pDS36PQmAfM1V7+B2p8tmb96y1l1ESnjCR43bg3Y NNcS1PT0wb1fDhaCIz5AiqiYT/yeUtnhGnFMSgHZDetxfpJMMaAMcpdH7f09bQUj0G8x 5pdGVSh3aHLkzVor7EyYhvVyo7bwk6F0k+uH5Ku1t+vfAWTtek8W1y+u9NTrvBOFVPcw zkKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bxadrJ8d; 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 e7si7253138ejd.658.2021.03.10.03.06.57; Wed, 10 Mar 2021 03:07:19 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bxadrJ8d; 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 S229948AbhCJLGB (ORCPT + 99 others); Wed, 10 Mar 2021 06:06:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:47594 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232670AbhCJLFi (ORCPT ); Wed, 10 Mar 2021 06:05:38 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8A05164FE4; Wed, 10 Mar 2021 11:05:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615374337; bh=250n1SIL81Lob3W2vemslcjdvU/uN2/HJ6ayL4zyAdg=; h=Date:From:To:Subject:From; b=bxadrJ8dKI0MtUl/3oZdJqcTMiCFuxi3pl2rfz+6uMEVcOjrajdFcIEFsGdzmzvNB egtiP8g8GkEYQs14JzMqWhK8T0Xsnc9O0Q48Uj2Kl/tvvBZr1Bh8ik6UEm7ZpD8bU9 QVjZL7FlD0i0Ct2j/B09eH5FT7Q0zcb9opfbOiMATJTT08pz15U1rEmXy0WpsL1OaQ TAUMm9u463LP3W/bMk1t1qsncTrnpQ3t1sOxadpFihfKtjlgnvfzLMZX2pXvB3isH5 YiGNVnGBjvnYUdJ/1RR7F87Sbd4CjG2sQu4jvBuf/+uVseorVeIvJgHdoOqW4b0dZr BLRnzVP8bYn7A== Received: by pali.im (Postfix) id 36836A83; Wed, 10 Mar 2021 12:05:35 +0100 (CET) Date: Wed, 10 Mar 2021 12:05:35 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Alex Williamson , Bjorn Helgaas , Lorenzo Pieralisi , Amey Narkhede , Marek =?utf-8?B?QmVow7pu?= , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: How long should be PCIe card in Warm Reset state? Message-ID: <20210310110535.zh4pnn4vpmvzwl5q@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello! I would like to open a question about PCIe Warm Reset. Warm Reset of PCIe card is triggered by asserting PERST# signal and in most cases PERST# signal is controlled by GPIO. Basically every native Linux PCIe controller driver is doing this Warm Reset of connected PCIe card during native driver initialization procedure. And now the important question is: How long should be PCIe card in Warm Reset state? After which timeout can be PERST# signal de-asserted by Linux controller driver? Lorenzo and Rob already expressed concerns [1] [2] that this Warm Reset timeout should not be driver specific and I agree with them. I have done investigation which timeout is using which native PCIe driver [3] and basically every driver is using different timeout. I have tried to find timeouts in PCIe specifications, I was not able to understand and deduce correct timeout value for Warm Reset from PCIe specifications. What I have found is written in my email [4]. Alex (as a "reset expert"), could you look at this issue? Or is there somebody else who understand PCIe specifications and PCIe diagrams to figure out what is the minimal timeout for de-asserting PERST# signal? There are still some issues with WiFi cards (e.g. Compex one) which sometimes do not appear on PCIe bus. And based on these "reset timeout differences" in Linux PCIe controller drivers, I suspect that it is not (only) the problems in WiFi cards but also in Linux PCIe controller drivers. In my email [3] I have written that I figured out that WLE1216 card needs to be in Warm Reset state for at least 10ms, otherwise card is not detected. [1] - https://lore.kernel.org/linux-pci/20200513115940.fiemtnxfqcyqo6ik@pali/ [2] - https://lore.kernel.org/linux-pci/20200507212002.GA32182@bogus/ [3] - https://lore.kernel.org/linux-pci/20200424092546.25p3hdtkehohe3xw@pali/ [4] - https://lore.kernel.org/linux-pci/20200430082245.xblvb7xeamm4e336@pali/