Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1370475rwb; Mon, 7 Nov 2022 00:28:14 -0800 (PST) X-Google-Smtp-Source: AMsMyM4VJtRxn/GnfS2bJZEZtzVDz1WRABDc6xDFlW99zoUc1x/A41qUM8Kzbgsd5QlYKvt6voSI X-Received: by 2002:a17:907:7805:b0:780:24fd:c4e8 with SMTP id la5-20020a170907780500b0078024fdc4e8mr47309098ejc.78.1667809693876; Mon, 07 Nov 2022 00:28:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667809693; cv=none; d=google.com; s=arc-20160816; b=YHjQM09w0pMuqKzDlAnjTVHNwfWTp1TXqbM6rwwIQP1gS1gbp5KrxNtjoaH0MUIMqy CXvPs9jOeXpvk6qBA+cjPyEi3UEDrmuCPghdAp8wJOhX/DrXUpM1rFUFcmTG/HrFT9hN AKi1P5RULzc1RzsYyqjZ2YmNgV4iG7PvsMpcM3CcLOZdysLJwh07wWQ3TB4rM2qEfFZ9 LUphlSa4SEUMcJUjLOzGEwBiQCKdSiXO6atHxUqGbzfP3IG3FKjoHups9jrcyzmnxG66 DAiDMyPgtuyjuhJ9kS9P4PKAhGQiWcxXUj8IHOVkKkdt7cCJ07S1TAoxQYXF8+BWlIrj huBA== 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=xm/qqesuJf/qPswIFM4FFeY+z+8Pcb4w2hHh4k36GHw=; b=PmUWr2OEJr5kqh+vydx2F6bKwjYDGlRbLcFf7T5HjbMc7tIfweq1c1ZDI8whctFlWF 3zrj4qRCV/5StBDebV+Apkh/WsRmUe2a3PKv9nAklpw69P7aXLUq4JToq+LIheYbj28R wxH8hi9wXwRTpxnQ73OHkynsEcqDZRGkvT7nc5NVV4TLmoCXbdd9DMGOPnsveEbiJXMO gmE+BXakNGVckELEQG/rwNlYxUnO9ltEspTsq/yALori8uTiVIBdv9H6wKHyOaIxqyxQ r644SdtlX8quYcM2gbbd46CYeXnYOcPpuqxBIS1LMCCPjw7b8P2O41Lq8gYSgvcEnghs v1vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aMJ5ZGb5; 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 sz15-20020a1709078b0f00b007919fc02ce8si5766632ejc.971.2022.11.07.00.27.50; Mon, 07 Nov 2022 00:28:13 -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=aMJ5ZGb5; 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 S230460AbiKGITA (ORCPT + 96 others); Mon, 7 Nov 2022 03:19:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230304AbiKGIS7 (ORCPT ); Mon, 7 Nov 2022 03:18:59 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB59CBCD; Mon, 7 Nov 2022 00:18:58 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 8842460F2A; Mon, 7 Nov 2022 08:18:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62522C433D7; Mon, 7 Nov 2022 08:18:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667809138; bh=3dF2QAjPMfoUQc5YaxUYmnqWeYAkdfF2bIY7ZZsXg2A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aMJ5ZGb5OuAqEChpPrsX/OlVBsRQIeCVT/pMh0OcbLoIKLwgHY0b+Ic+OX+LbcI6z 8GcPGi2t63iQV/nw6FcBcjnhReunsBVTFKc5ZFBDPB9DDjnuACeimIZX97c/Wacm5M aF3BK3v7OooCi1NnzkBxUsLlfgawWZSaX5hg90DqmdOVMiuCRhwG7nEt6i6FbGoqHY sdzYMmAPFD5egSyrOSXLErRQUkeotN5OD3mk1BoSdqQ173xZrZnNvl+ch+/S7vW5hq FaLCG40nhKpy7IgwavlOSmUh0uKCfC9tbJphyjc55Xk8mZMf2rQ/kRSvMRjo5E9idR Xdwg0c7IpoP0g== Date: Mon, 7 Nov 2022 10:18:53 +0200 From: Leon Romanovsky To: Veerasenareddy Burru Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lironh@marvell.com, aayarekar@marvell.com, sedara@marvell.com, sburla@marvell.com, linux-doc@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Subject: 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: <20221107072524.9485-2-vburru@marvell.com> 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 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