Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6639633rwb; Tue, 15 Nov 2022 01:16:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf4nrQwZSyhKZ/vIIZ1E0C6a0EC3I2SHumCAthJL9XXRhtZXCJBW0I1FmqTXwcjfYgIOckTI X-Received: by 2002:a05:6a00:26f7:b0:572:149c:e1ba with SMTP id p55-20020a056a0026f700b00572149ce1bamr8455689pfw.19.1668503807010; Tue, 15 Nov 2022 01:16:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668503807; cv=none; d=google.com; s=arc-20160816; b=GYhE1lvIq02Uo9nH8WGYGf4AENdvpzDPnxaOyBDx9SdTa81BkId3EVqfpqRZMwO1Hb 4cINmesr5sbhLif2ec9Rc8VSZZHDwgPM5ypLt2f+bzurn8G7CxYH4wOPSeWngTdivFYc HihdBlmakDoSNIdSx03DVZ3Z/FcBY/PGYLTvoJsB9l4zUqv6sf++3CK/9VCN1tpCt20C F4N2ZR/cy7kkEwdrV9w8f13XG+v7E0VUjy94OLcrftN3iQRrcX2HA3jGANvRxOcy8YPL fxylVfv3WKbWgGSO/W0AoKx1cPFq7zYA2cSFBzZNzOuTE+VCk/qhnXEgDTtgU8PbhDBB E80g== 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 :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qLtLbPz+9VcA4Gy8j/ZfVvU2ZC8Mtf3mKDBMnYinywo=; b=QRTb98pMPj0yuLyz76bW28y+LFyO5O8mKiVTKz9aGUxKG4tUZPmtMrvfEGEQOasfIr n5u4ajVTlFEjhmm2yb6dCYTtSID0aJfMf1bbAZnCaFJz3ER56Xw6Bf+VwztSoHmLZOCj RZP2DQMCIG0iJ0mWG8OsirKaI+AFpkRfS2oBNu1Ws3S2DJ6eIa52AkknitOiULvUI62C ujbdojTIeOB5vch2sBU9QenmKDPoJDUJEkIzgG0njy9V00Ix7MSeoQNDNXZp5SugNWB0 k7FwY1V2gJqmfNbXVehHYNFml87wfN5dS0GI+L1DgGBbEelcBDDqBIL04jrnMWS9wzZF o62w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WgPXICec; 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 cp12-20020a056a00348c00b0056e48944843si11361944pfb.355.2022.11.15.01.16.33; Tue, 15 Nov 2022 01:16:46 -0800 (PST) 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=WgPXICec; 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 S237247AbiKOJE7 (ORCPT + 89 others); Tue, 15 Nov 2022 04:04:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229545AbiKOJE5 (ORCPT ); Tue, 15 Nov 2022 04:04:57 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E78110C4; Tue, 15 Nov 2022 01:04:56 -0800 (PST) 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 0541DB81707; Tue, 15 Nov 2022 09:04:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0E74C433C1; Tue, 15 Nov 2022 09:04:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668503093; bh=l+6lv6fSCW8Nf1v8EJEoRri4jO0Md/OxDKQaEU4bFBM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WgPXICecysl5i7ERxIDs1FQ3gc0/tm54Etck+yVsN8qxOrtalpWUlXA1N95tkxYrH 0oQlr4Qb8K3ZsRlr6AwAy4qJOljw0CLYPaQZQmsQNggMwFfjf6IF20RwNvRt5VG0i6 G1p4uJYHM0KEFFhn6dzn3+LOqSx18L5IBHz7j4r+4Og21dlL5g98VPoIWYgIFW7MaZ ThYFdeEqccDYhZ9daCiMotBtV83D665Iiev8Vi8gMgfJlFKabpSZFvVARUZqsNdlXO Ih/H+GAlUaKXJ6NKwAeqpit8QReyOYQZNeQtCrYfVOZbgx9IHBnaY4Oa4ejLdXCYzU S6bdNJDnsZh9g== Date: Tue, 15 Nov 2022 11:04:49 +0200 From: Leon Romanovsky To: Veerasenareddy Burru Cc: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Liron Himi , Abhijit Ayarekar , Sathesh B Edara , Satananda Burla , "linux-doc@vger.kernel.org" , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Subject: Re: [EXT] Re: [PATCH net-next 1/9] octeon_ep: wait for firmware ready Message-ID: References: <20221107072524.9485-1-vburru@marvell.com> <20221107072524.9485-2-vburru@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Mon, Nov 14, 2022 at 08:47:42PM +0000, Veerasenareddy Burru wrote: > > > > -----Original Message----- > > From: Leon Romanovsky > > Sent: Monday, November 7, 2022 12:19 AM > > To: Veerasenareddy Burru > > Cc: netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Liron Himi > > ; Abhijit Ayarekar ; Sathesh > > B Edara ; Satananda Burla ; > > linux-doc@vger.kernel.org; David S. Miller ; Eric > > Dumazet ; Jakub Kicinski ; > > Paolo Abeni > > Subject: [EXT] Re: [PATCH net-next 1/9] octeon_ep: wait for firmware ready > > > > External Email > > > > ---------------------------------------------------------------------- > > On Sun, Nov 06, 2022 at 11:25:15PM -0800, Veerasenareddy Burru wrote: > > > Make driver initialize the device only after firmware is ready > > > - add async device setup routine. > > > - poll firmware status register. > > > - once firmware is ready, call async device setup routine. > > > > Please don't do it. It is extremely hard to do it right. The proposed code that > > has combination of atomics used as a locks together with absence of proper > > locking from PCI and driver cores supports my claim. > > > > Thanks > Leon > What is the alternate approach you suggest here ? Are you suggesting usage of deferred probe ? the driver initialization cannot proceed till firmware ready is set by firmware. This is what I initially thought. Thanks > Thanks