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 848D0C433FE for ; Tue, 15 Nov 2022 09:04:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232752AbiKOJE5 (ORCPT ); Tue, 15 Nov 2022 04:04:57 -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: Precedence: bulk List-ID: X-Mailing-List: netdev@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