From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 576BEC433EF for ; Mon, 29 Nov 2021 21:08:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231329AbhK2VLk (ORCPT ); Mon, 29 Nov 2021 16:11:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbhK2VJk (ORCPT ); Mon, 29 Nov 2021 16:09:40 -0500 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAF45C214FE4 for ; Mon, 29 Nov 2021 11:37:39 -0800 (PST) Received: by mail-pj1-x102a.google.com with SMTP id w33-20020a17090a6ba400b001a722a06212so12365267pjj.0 for ; Mon, 29 Nov 2021 11:37:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Y57dLs12KYOjEguyKsDB0gIGYTL2paAzcRcVxaXn2oo=; b=r5u6OKTR8lVUXIMCr531D3Yg6CBADkWid6ozW3oE7IVursYcy0DG/mg2M2vodGrhQp UbUYSFequ4/C6m05MiqI35a7dg+YfcSlogIVtvUHAaOspZgPG1LK10Rum7tp8F9dxVI+ 4OXHkBU9tRrkraUTfRF0o+UYXh89DbDsi4VSF61Sh6VBU5xiFrTwkNI2lvoScGnTZlsc 0viUW9enwY2dw8PyuCmKeDSl5f9WFRMiwtilYaZlYs+9UN7pay0nWoybJBiqw9fYPu3W iwRrlk/JF645UQSNr3iuR5cV11muM7gYOvL3E6l+plD8yPcm/EDA0TvsiFs49UIk3hvs j2vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Y57dLs12KYOjEguyKsDB0gIGYTL2paAzcRcVxaXn2oo=; b=Byuy9D/TJRzqUn9qMNeiGNBu5OZMH+1b47z7Zrjn4nMvp4AuU0UJ40vtgBGIe4eERl jtYZ2gIFv2Gg5x3tcnDzYMlgX2alh0w8v2lVc5SqCcMLTQ6PRAI+klHgVX1h5C9M+V61 cu9RXtEoaQT+1SuRqYJnkjRmhY5rEs3y1qvQxVYZwrtPkxCobUoQ/QgUPrUnoWrD9GUG NeEcml3pxaRZ+qnpuTdxe4p+xbJZRjX3ucXomgafO6RIjHlq8NnEY9YQ7ckTaZOCaCXN 5AShqPzUv41+WE4kWoRYLr5p1U6nfAZBdd9FEGFr+1Y/qgLZ4+Pr2Fw8qND5pYPwDv3i 6xxw== X-Gm-Message-State: AOAM532+jUQ/NHIeXvGgiSIgRrNbBwdf3r127VZqyoxEbOTszbAPDD2D TH+ue3/2PRWHjvkHNwHaeikWcyiTS8v/Rrsl3eiJrg== X-Google-Smtp-Source: ABdhPJwsdoXDfCBVNW5BkZLN8ABu/S9KNhziapIOp8Po/ehEWog/GfaVWWX6dcv5+ONBYQh8g1jNRC8HJ2934pmI42E= X-Received: by 2002:a17:902:6acb:b0:142:76c3:d35f with SMTP id i11-20020a1709026acb00b0014276c3d35fmr62152271plt.89.1638214659265; Mon, 29 Nov 2021 11:37:39 -0800 (PST) MIME-Version: 1.0 References: <20211120000250.1663391-1-ben.widawsky@intel.com> <20211120000250.1663391-6-ben.widawsky@intel.com> <20211129183330.svptvcystceazgwc@intel.com> <20211129191146.vhiwkf5jsegil4aa@intel.com> <20211129193156.wtm7p7cdpn7iedqa@intel.com> In-Reply-To: <20211129193156.wtm7p7cdpn7iedqa@intel.com> From: Dan Williams Date: Mon, 29 Nov 2021 11:37:34 -0800 Message-ID: Subject: Re: [PATCH 05/23] cxl/pci: Don't poll doorbell for mailbox access To: Ben Widawsky Cc: linux-cxl@vger.kernel.org, Linux PCI , Alison Schofield , Ira Weiny , Jonathan Cameron , Vishal Verma Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org On Mon, Nov 29, 2021 at 11:32 AM Ben Widawsky wrote: [..] > > > > Right, there's no harm in the check, it just seems overly paranoid to > > me if it was already checked once. Until a doorbell timeout happens > > it's an extra MMIO cycle that can saved for a "what happened?" check > > after a timeout. > > Well I suspect we're just rearranging the deck chairs on the Titanic now, but... Not so much, just trying to get this driver in line with other error handling designs. > I see doorbell timeouts as disconnected from whether or not the mailbox > interface is ready. If they were the same, we wouldn't need both bits and we > could just wait extra long for the doorbell when probing. > > In other words, I expect if the interface goes unready, doorbell timeout will > occur, but I don't think we should assume if doorbell timeout occurs, the > interface is no longer ready. I don't purport to know why a doorbell timeout > might occur while the interface remains available (likely a firmware bug, I > presume). > > It does seem interesting to check if the interface is no longer ready on timeout > though. So I'm just modeling this off of NVME error handling where there is a Controller Fatal Status bit that could be checked every transaction, but instead the driver waits until a command timeout to collect if the device went fatal / not-ready.