Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5101840pxu; Thu, 10 Dec 2020 13:01:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+s8joVu4A5iOfYZhzFuMuHH5PRnaCsoyzNbFSUfSzA+3r07Vxe9GzX9v4YIWWTag05+PG X-Received: by 2002:aa7:d6d8:: with SMTP id x24mr8872446edr.105.1607634094057; Thu, 10 Dec 2020 13:01:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607634094; cv=none; d=google.com; s=arc-20160816; b=IGhQ5PjDpKC3J8yC0kDjJ7jwUfJggrxorxKl+XBH3/5wWRE2hqZobOVeSDbedww+dW h13/DU+usseUDeLvJs7pmHebk28lSFSUa6KD+PYaxdryDjvTAQ6zkWUNJg1d6LG9kEDj z4+hB3Why3JGgvVCcJz5xb21JAY0H+BVHz7Inpv2GWlB/gaFsYcfkjAzxG5eyyPz0vKH OHKHkVDTkBfmWt9OUdcQDE+4huC8WhgKFV67zNfv7slvO9MczlCZ9UCHrCmjS9QQSAZC lge24KJrceJSbpqcxPnllYLxfvrdbGN8L59VoEpRBCaDnH8xTWtieJtyIFDkUEr22rMg yL0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=VcQxYjQexF8lTm4lDoNxNQvAUqvGr2WCHChNqk/B+Jk=; b=Gev5i5TfRjFZbyI/f7zrXu1TQgsxa/ovQqN9RZWeuuT16+VZ++58QH23KD5gLeVYa8 HIRiC13yFChR9aguZCdpbjeC3pGf0jg/MRskCrR2mIAlCVpUd8M23OUddrQEzcTzS4jZ 8af0QEt1AjTj8hnzLZ/+3dh7o2AXM+67XW2vJp9yR1cL/3Mq72BSonmS3eyoJ2D+CPO2 WCKUzL/xAK0OPJa/fhS8zKeRjxNTb79g7fw1jTQVLgVl4dh+TETUiLLCaqiudqZKVi6f nJBYOG06c7B7yELDqNNcxrA7uJq1UXiQ0ZwXKNIl1GYZ1xR26QquF6p8N3ZFbxJpRKzk kJfg== 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 z23si3821642edl.270.2020.12.10.13.01.11; Thu, 10 Dec 2020 13:01:34 -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; 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 S2393881AbgLJU64 (ORCPT + 99 others); Thu, 10 Dec 2020 15:58:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389614AbgLJU6o (ORCPT ); Thu, 10 Dec 2020 15:58:44 -0500 Received: from bmailout1.hostsharing.net (bmailout1.hostsharing.net [IPv6:2a01:37:1000::53df:5f64:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B05E8C0613CF for ; Thu, 10 Dec 2020 12:58:03 -0800 (PST) Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout1.hostsharing.net (Postfix) with ESMTPS id AB5B93000629E; Thu, 10 Dec 2020 21:56:44 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id EBBF310692; Thu, 10 Dec 2020 21:57:19 +0100 (CET) Date: Thu, 10 Dec 2020 21:57:19 +0100 From: Lukas Wunner To: "Raj, Ashok" Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, Sathyanarayanan Kuppuswamy , linux-kernel@vger.kernel.org Subject: Re: [Patch v2 1/1] PCI: pciehp: Add support for handling MRL events Message-ID: <20201210205719.GA25769@wunner.de> References: <20201122014203.4706-1-ashok.raj@intel.com> <20201122090852.GA29616@wunner.de> <20201203225124.GA72369@otc-nc-03> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201203225124.GA72369@otc-nc-03> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 03, 2020 at 02:51:24PM -0800, Raj, Ashok wrote: > - Press ATTN, > - Slot is empty > - After 5 seconds synthetic PDC arrives. > but since no presence and no link active, we leave slot in > BLINKINGON_STATE, and led keeps blinking > > if someone were to add a card after the 5 seconds, no hot-add is processed > since we don't get notifications for PDC events when ATTN exists. > > Can we automatically cancel the blinking and return slot back to OFF_STATE? Yes. > If the operation initiated by the attention button fails for any reason, it > is recommended that system software present an error message explaining > failure via a software user interface, or add the error message to system > log. Ah so we're supposed to log a message if the slot is empty. That needs to be added then to the code snippet I sent you yesterday in response to your off-list e-mail. > Alternately we can also choose to subscribe to PDC, but ignore if slot is > in OFF_STATE. So we let ATTN drive the add. But if PDC happens and we are > in BLINKINGON_STATE, then we can process the hot-add? Spec says a software > recommendation, but i think the cancel after 5 seconds seems better? That approach seems more complicated. It's better to stop blinking and return to OFF_STATE if after the 5 second interval the slot is found to be empty. Thanks, Lukas