Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2195476iof; Tue, 7 Jun 2022 22:51:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGCCYPpPlPPca471zGejkaF1AidL0+WpWO0mYVP7uXoVCaog+UnmWgVrCq+ckqlPt6SXA8 X-Received: by 2002:a17:90a:2f84:b0:1dd:940:50e7 with SMTP id t4-20020a17090a2f8400b001dd094050e7mr70280833pjd.210.1654667511681; Tue, 07 Jun 2022 22:51:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654667511; cv=none; d=google.com; s=arc-20160816; b=fey7dVlEBMIhHOBj3RPM/kBaAgwsx9FfGfqH+UjjkcdR+/2XWPtifVv0rpx4DBhPHn RZO2VBZlsBybHgJfL/S5ZR74wCXcrYvtzIfxjsS1LsuwpK1bTKGfL+vfkIMNHzO1JCj5 v05QN/sQbUOohrlc71IFoxMj1hBPSk1dWJ/P+tqWoEwiZy6kMEFs2Z+Y0ELwTGgM7S9t YC49PrrLDir0FtdcGxuCkFTSrqpPl60Q4zsAMDD8fg8ucbnrpdUVfm6RBgFwNjieuJvJ SRB9CgMYiE/8Jn0JF3WhEgVAgbxwmP1v/Cbfu+Tg1eJxqE5YkC3CGRMddtanyCOKZUqX KzcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=frxCxEgSRY8gPO3jB8LNa2q6eYiPtQ9xUJDdqPaPtbU=; b=K3YK8JTXIaaJ3S0OgT/0iEIj9f1t24g7QugAO0QEJdW7QJmi9GvWOW5QidRUJjmGeM nZaPjW2ipb+BrHjVpFONvMGuoMYGHFgZfmDfX/QV67hFvpvM6l2/1jx5Q/Q5otTGudJk j0adJ+NQnAbiXE3KzG285xaExPYSs0vnB/iOUEl5zU7aXnQyWFsAIG6F+WjTZPftHJV5 NgsXMxwBTaftbYn6C3d7wtjLzLg4xUyCTIsSLxoVhhTLPdGdgAZZaqp+A9h4hzRmGjos CiTyOdKDoh31wK05LRxWLEDLRG37jVKyzmdko+B43FH/aljgpeHPWsJZD+DY6J1/ZXZ/ TQJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uJBdxVLl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t17-20020a17090ad15100b001df458aec1bsi28627264pjw.93.2022.06.07.22.51.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:51:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uJBdxVLl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 091444A87AE; Tue, 7 Jun 2022 22:18:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387603AbiFHApj (ORCPT + 99 others); Tue, 7 Jun 2022 20:45:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378993AbiFGWGz (ORCPT ); Tue, 7 Jun 2022 18:06:55 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D616252C34; Tue, 7 Jun 2022 12:15:53 -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 ams.source.kernel.org (Postfix) with ESMTPS id 25F3EB82368; Tue, 7 Jun 2022 19:15:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C41EC385A2; Tue, 7 Jun 2022 19:15:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654629350; bh=01He/KFgvD4tNb1M5YjiCDrEOHhj2tr2PdBfy8O1o2U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uJBdxVLlHKjJPtsjcT7/nCGrRUodXg+r2TNgjU6Wvjz/X5eRPRd6OKKOq9tFAfZbl ks98MwZ6LY3NKDzaJ4B0oyUi5CXD9A8SCTmTxnZmmUA82IQaKtGBSVpc/4n4v7s46P JYsVcOZhwpLl2A6LtV3Gq+MHcPV7+dt3oSSc7gks= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ira Weiny , Jonathan Cameron , Dan Williams , Sasha Levin Subject: [PATCH 5.18 633/879] cxl/mem: Drop mem_enabled check from wait_for_media() Date: Tue, 7 Jun 2022 19:02:31 +0200 Message-Id: <20220607165021.221735935@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Dan Williams [ Upstream commit 2bcf3bbd348fc10260aa6243ff6a22a1882b5b35 ] Media ready is asserted by the device independent of whether mem_enabled was ever set. Drop this check to allow for dropping wait_for_media() in favor of ->wait_media_ready(). Fixes: 8dd2bc0f8e02 ("cxl/mem: Add the cxl_mem driver") Reviewed-by: Ira Weiny Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/165291685501.1426646.10372821863672431074.stgit@dwillia2-xfh Signed-off-by: Dan Williams Signed-off-by: Sasha Levin --- drivers/cxl/mem.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/cxl/mem.c b/drivers/cxl/mem.c index 49a4b1c47299..44e899f06094 100644 --- a/drivers/cxl/mem.c +++ b/drivers/cxl/mem.c @@ -27,12 +27,8 @@ static int wait_for_media(struct cxl_memdev *cxlmd) { struct cxl_dev_state *cxlds = cxlmd->cxlds; - struct cxl_endpoint_dvsec_info *info = &cxlds->info; int rc; - if (!info->mem_enabled) - return -EBUSY; - rc = cxlds->wait_media_ready(cxlds); if (rc) return rc; -- 2.35.1