Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1635938rwd; Thu, 25 May 2023 16:00:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5gsMXNeyIIW59bgX/uGcBxaYr2OhOY31p1VBF/nAZctIujLrNbKmShOJmzQESpjsBsTuhn X-Received: by 2002:a17:90a:c683:b0:24d:f1a5:e279 with SMTP id n3-20020a17090ac68300b0024df1a5e279mr328578pjt.12.1685055648078; Thu, 25 May 2023 16:00:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685055648; cv=none; d=google.com; s=arc-20160816; b=cxxEu34qbpxVT75O3aW1NWVB6i+BQQAz5rWohnaqBZnfNdC9AGJPQm32HujrJ5uAQv SQIb9hS48INLT/j5m3oiUT5lVq940pCkyByQAy8J3LYPAMNd5vGNDrfALr6tPP1zSSF4 V7xkVLTR9MNNn/pG1eycjFtYra/Fme7Sa9o3qPDBcjqLw5At7O8g44Wx6UaRjSE9ADi5 FAePZWMJfGZvz+0TuU76FlMQBRUE4+h8yjukmW67ehM1Ut5hFw4+/3i62nuE4iMno6Lk f8irE2twB0OB5+ISQTad7gtutkB+ad4dpJ4ERmeKL5UWbKsDB2L2EROROLGKZtsjDFF5 A3qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=gLVBfAXaALuQw6bqQZpZE315jwG9drAyBHxO+c1RJrw=; b=LcV9kvWOZFnVgVeNJCtL21PA6E3PBsNqKDtN8QR0eCbN1JUWFVMpa14LjlyFSKQhFv aMnOtfl46xa7syTLausCc9cht96XSMH1TvwEo7AeBh0OIpw93TFxzlqWLRkYCWxm9w4h Zs3zC8OWL/aZ8DLF+QpNOZcM93yztO3g3RmY50g1tToFn9sERFgl31nPy1aG6MakdM0J kwZ+YqtOW29KPtABW8Qt7szUCTwVEmPLTpzi91Cxdd9v5PmMBbfSZ3LXHynXz+HSLG2l 8uD59X552oD+rEL0Yrp/cZ0IPZWpt/O6mhlcKvxpv27apSt5puUG01vgnRjaL/YGS++6 4gng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ObXl45Xu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s1-20020a17090a13c100b00250c15dbed0si4590100pjf.84.2023.05.25.16.00.35; Thu, 25 May 2023 16:00:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ObXl45Xu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S242086AbjEYWKj (ORCPT + 99 others); Thu, 25 May 2023 18:10:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231776AbjEYWKf (ORCPT ); Thu, 25 May 2023 18:10:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16D3C12F; Thu, 25 May 2023 15:10:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A109D64B8D; Thu, 25 May 2023 22:10:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D109CC433D2; Thu, 25 May 2023 22:10:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685052633; bh=GICPxmeMSLHJJ2bS0drEJtpZ8BdqsvczeM+s9pyEXR4=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=ObXl45XugUdH+acc1ChFRJxlBJT11kmUi30HaoOtvZAX6uhkh0XzGrAvL+7Q0OTbf Jrss0NqKDneQSsVAersnFSGMbwt0aGQnX7Ns5dYDwzacOEGw7+OBdogccAwn1fhj3r XMP6JJdEIeYF9jsfNSqHkJsjG6EV/IHLb4OAgv/2XYQbUqheBr2giAp4ThrCo3JgGk 2H1xfSavlCdAW4U02FCdX9G3sr1GoSE8RzJGxSsYBaoEh9TX+wpCjCCRM0XjEQiI6W 6qql+YjuW8CkA9ZOCcrXppEW6KhzwMEJ4YwcdVtcyEP5AZWJZ7pkZl4f43TtRLHdVA q1YGxj76k5fuA== Date: Thu, 25 May 2023 17:10:31 -0500 From: Bjorn Helgaas To: Owen Yang Cc: LKML , Bob Moragues , Abner Yen , Doug Anderson , Matthias Kaehlcke , Stephen Boyd , Harvey , Gavin Lee , Bjorn Helgaas , linux-pci@vger.kernel.org Subject: Re: [PATCH v1] drivers: pci: quirks: Add suspend fixup for SSD on sc7280 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230525163448.v1.1.Id388e4e2aa48fc56f9cd2d413aabd461ff81d615@changeid> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 25, 2023 at 04:35:12PM +0800, Owen Yang wrote: > Implement this workaround until Qualcomm fixed the > correct NVMe suspend process. Thanks for the patch. Before I can do anything, this needs: - Subject line in style of the file (use "git log --oneline drivers/pci/quirks.c"). - Format commit log correctly (fill 75 columns, no leading spaces). - Description of incorrect behavior. What does the user see? If there's a bug report, include a link to it. - Multi-line code comments in style of the file (look at existing comments in the file). - Details of "the correct ASPM state". ASPM may be enabled or disabled by the user, so you can't assume any particular ASPM configuration. - Details on the Qualcomm sc7280 connection. This quirk would affect Phison SSDs on *all* platforms, not just sc7280. I don't want to slow down suspend on all platforms just for a sc7280 issue. - Drop the "until Qualcomm fixes NVMe suspend" text. Even if Qualcomm fixes something, we can't just drop this quirk because there will be platforms in the field that don't have the Qualcomm fix. Bjorn > Signed-off-by: Owen Yang > --- > > drivers/pci/quirks.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c > index f4e2a88729fd..b57876dc2624 100644 > --- a/drivers/pci/quirks.c > +++ b/drivers/pci/quirks.c > @@ -5945,6 +5945,16 @@ static void nvidia_ion_ahci_fixup(struct pci_dev *pdev) > } > DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, 0x0ab8, nvidia_ion_ahci_fixup); > > +/* In Qualcomm 7c gen 3 sc7280 platform. Some of the SSD won't enter > + * the correct ASPM state properly. Therefore. Implement this workaround > + * until Qualcomm fixed the correct NVMe suspend process*/ > +static void phison_suspend_fixup(struct pci_dev *pdev) > +{ > + msleep(30); > +} > +DECLARE_PCI_FIXUP_SUSPEND(0x1987, 0x5013, phison_suspend_fixup); > +DECLARE_PCI_FIXUP_SUSPEND(0x1987, 0x5015, phison_suspend_fixup); > + > static void rom_bar_overlap_defect(struct pci_dev *dev) > { > pci_info(dev, "working around ROM BAR overlap defect\n"); > -- > 2.17.1 >