Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2227715imm; Thu, 27 Sep 2018 09:20:46 -0700 (PDT) X-Google-Smtp-Source: ACcGV61mLw+r1oI9nK9jFzyRZ2Dcnf/+CiJUP/hMuEKZ41T4b1iUgiFAtzvMEV0ky4krTtdTa7+O X-Received: by 2002:a17:902:a504:: with SMTP id s4-v6mr12198643plq.101.1538065246449; Thu, 27 Sep 2018 09:20:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538065246; cv=none; d=google.com; s=arc-20160816; b=VvXjCVNy9ikEYlzcLjH8GQV8Z2efW+hVJwK/qoi8VOeQHjHVRlHV+y30OsQi/g7wzj oTUgjL0ljH9SnV9/3elx6dkoXZjHY9rW32ZjUd0yNDn2adh6NUqSIKW8BfPgm173c2AN pRp53dlHhWlJBhpq7ft0bzl/htdXjCoikKFW68hHqWrxqwIBMY6QlKziNxCYB7w2I8ew pZLPm9YW8o7ZQ7KoJ2ssC6XihYSJDbtBi+jr99fVjBh3uwlvRYesUrFy1iND2EKgIKrJ sTPopUfceMVeH944KRYXLxzrIXdC+/dlCW6tJ1Elf3xtIvjMpRBqYfn/p/oqSiZF+K65 KPuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to; bh=Xc6xnEDTpNJj33BrsIR8UkpUfKrzISCsWBezcgkCaYs=; b=ueGg6BS/BeGwdfoidTJSTsb6KAVjQVnuc3vjppWdmoRwTyKzMZMPGhbGGM/7Jv5EnR 6cTXnIR1DNwbMkh6oTBd47pi84hY5W7sRRSRrqHlgvylzhrwCU6lX1AfUUlEtj0wzVi+ T5RIlAHlPpjWWW/0L4TGm1em4FHVGqZYaD1712hIswCyufL/nCVzwmmFS2b8zL7EtXAc 00mvniDPkMoBrSDCq6mD2wASeAvVjPVk0M9uaotyL/scgimhXgpnbff4toDPUkjAOFfm olbDMcfcoOO9iHiAehQnNVTY5vB+17XDRrZQMjdVuLpzcioma/IQzUuiYU8khqC6DNiU Apcw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b10-v6si2422505pfb.89.2018.09.27.09.20.23; Thu, 27 Sep 2018 09:20:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728195AbeI0Wig (ORCPT + 99 others); Thu, 27 Sep 2018 18:38:36 -0400 Received: from ale.deltatee.com ([207.54.116.67]:58006 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727282AbeI0Wig (ORCPT ); Thu, 27 Sep 2018 18:38:36 -0400 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1g5Z0m-0003OM-A3; Thu, 27 Sep 2018 10:19:33 -0600 To: Wesley.Sheng@microchip.com, kurt.schwemmer@microsemi.com, Kurt.Schwemmer@microchip.com, bhelgaas@google.com Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Kelvin.Cao@microchip.com References: From: Logan Gunthorpe Message-ID: Date: Thu, 27 Sep 2018 10:19:31 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: Kelvin.Cao@microchip.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, bhelgaas@google.com, Kurt.Schwemmer@microchip.com, kurt.schwemmer@microsemi.com, Wesley.Sheng@microchip.com X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE autolearn=ham autolearn_force=no version=3.4.1 Subject: Re: [PATCH 1/12 v2] switchtec: Remove immediate status check after submit a MRPC command X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Wesley, I'm going to suggest you send patches to me before sending them to the community until you have a better handle of the tools and process. The subject suggests you have 11 other patches in this series so you've mishandled the tools. On 2018-09-26 11:57 p.m., Wesley.Sheng@microchip.com wrote: > After submit a Firmware Download (Download sub-command) MRPC > command, Switchtec firmware refuses to response any management > EP's BAR access until current flash programming finished. > During this time, a READ TLP to the gas area in the BAR of the > management EP will complete with significant delay like more than > 10ms. > It's a Switchtec firmware limitation that READ requests cannot get > prompt service during firmware download. > The delayed completion of READ TLP would be a problem on some system > which is sensitive to READ timeout. > Current driver check status immediately after submit a MRPC command, > which triggers READ TLP to the gas area in the BAR of the management EP. > Also, other processes or functions, like NTB, would also trigger READ TLP by > accessing the GAS. > To avoid this, the immediate check of status is removed in this patch, and > driver delays the status check to the occurrence of MSIx or MRPC timeout. > In the meantime, user must not initiate any gas access during a firmware > download. > Also, any process that issues MRPC command will be affected by the delay > in this patch. > However, this is only a software workaround to the READ issue in firmware > download. A complete fix of this should happen in firmware. > > Note: For NTB function, the memory window access is handled by Switchtec > hardware. So it's not affected by this firmware limitation. But the other GAS > access which is handled by Switchtec firmware is are affected by this firmware > limitation. The commit message is poorly formatted/wrapped and with all due respect, I think the grammar needs a lot of work. > --- > drivers/pci/switch/switchtec.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c index 4591f15..b759228 100644 > --- a/drivers/pci/switch/switchtec.c > +++ b/drivers/pci/switch/switchtec.c > @@ -142,10 +142,6 @@ static void mrpc_cmd_submit(struct switchtec_dev *stdev) > stuser->data, stuser->data_len); > iowrite32(stuser->cmd, &stdev->mmio_mrpc->cmd); > > - stuser->status = ioread32(&stdev->mmio_mrpc->status); > - if (stuser->status != SWITCHTEC_MRPC_STATUS_INPROGRESS) > - mrpc_complete_cmd(stdev); > - > schedule_delayed_work(&stdev->mrpc_timeout, > msecs_to_jiffies(500)); > } The change itself looks good. Logan