Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp21860556rwd; Fri, 30 Jun 2023 00:15:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5j4+mtglsbi+LwJSIvE4RQcM7q7bgXNSsD47uiV5FjiBRpUT7jHQKDwiYZQuJANpyM/hRi X-Received: by 2002:a05:6a20:4d89:b0:122:3b4c:9d0c with SMTP id gj9-20020a056a204d8900b001223b4c9d0cmr1631291pzb.45.1688109313226; Fri, 30 Jun 2023 00:15:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688109313; cv=none; d=google.com; s=arc-20160816; b=hb+31xIwB9e8PPZefICdPRODtTfTx3Z9LZi0O0mRBSzvtnzmNGorzl0cfQmHpHbsVk 9sQKaoknaeFx18eG0m2SJUXgKCllg4JkuwJ14b9Rh2zJ3pGt5P4mY4HYxuoQX90XEuSD keDPbtP5qYqUtFKDjprI7ljFzo0CrcLxM0ffA5siC3ffOneBOXRR0ntRJ3jpXkTdAFHP 6M3qgBOkPH/AWGNi1Ldy9uSOsuznSrkgvUDVIy0fPt9XTRfDVDaFGQxYPXyWonAXqguH OySzluEhmKrYvAqzXmQlgkLMzdL/YZ4z5ZyWad9uLcwbnX6fXScjYbpf11sA/HHGm8Yo h1uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=TcNkK7QhtQRZoNjiKnln1uOwjiN81JdIADWFEln4Gqs=; fh=FxfoYEnxDLA4Ppt6j/K2yrkaNHvpGkoh060FZBnTrso=; b=oTzF1n7kc2fgvm7mO+DGjMyg6i53FEy7S92GNWilcc7XgiqWAMMb+P6RJd7D2PCHNl aC4WvbFG7iHTD/azBjHmVG5iT5P5LaS2UP/gjJ58TQD8zu8ihhqb4DVC7lRQTy6b7qUK O3uE69WWjY6MU++GoTUejQ2ykn5Ivzx1HFcX+/mSZ9vtIzdyABP9okITYtZWFMQNX+qf 4pMYCrAveb4fvnZSn2J93VLhMUO13C3dPfwOIEHzTJ6rh/JJzluKrdFclxDsPcJFDHyM ESbGwckEr/Spxog2VSZGLx8dVpVUgz4LVowukJ7ApCynU8fTruB2LLY122JV/UjT3lkw ckPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="aSmIw/mI"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w29-20020a63161d000000b0053f23442f24si12164341pgl.502.2023.06.30.00.14.57; Fri, 30 Jun 2023 00:15:13 -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=@gmail.com header.s=20221208 header.b="aSmIw/mI"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231933AbjF3GrM (ORCPT + 99 others); Fri, 30 Jun 2023 02:47:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231961AbjF3GrF (ORCPT ); Fri, 30 Jun 2023 02:47:05 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80FA4171E; Thu, 29 Jun 2023 23:47:02 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2b69923a715so22507931fa.0; Thu, 29 Jun 2023 23:47:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688107621; x=1690699621; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=TcNkK7QhtQRZoNjiKnln1uOwjiN81JdIADWFEln4Gqs=; b=aSmIw/mI1MAA63imaZEWs1aayzhdfF/qzHVXPMXxDj2sfQL3hJb/GsXaOq6HzncTO0 YLISEBjling3H8gOJhbIJrAqiach3LgoGVTVK8WGoR2Po4cdRHTKLet614EZhJsJ3XCy sjzdMj+Oa+YDPxfXmyNghnc+5OvNYpB7Gq50QFnM/bavLpkb59dIEibUHLLzheEW3EAk zGzt77/vsjlFbmGZDs7SU/DnyClwDMElrmbq2WJ50/p/sIVj31524qz3IViiNw0/zLTA 57S6d7TYsDYmBKsBppOKaI7OCAbGzOrS3NFleI38h59CvQyi271RW+TzYzgbKjUXNgWq No5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688107621; x=1690699621; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TcNkK7QhtQRZoNjiKnln1uOwjiN81JdIADWFEln4Gqs=; b=SvJ4hlyfHLDOobYnSygGdWpbVQrqqTWVFyh6+Iag4oOMRJ53jxC95uZFp6jm3rd/pi mmmAG1/EXgpn/5lbdFi6R1o8tnLLHtSiGlS40lz8TZDjqzad+U6Ipx9UdpBJk2J7USP1 Ra4fjb1IExnAnRKqqAj6zDmB+oUlyvtJ9hsT5knVQIm7d1lJswD4RURRXbc/jwZ9P5f0 PZKvagnjhFemRQIgLS7BDPUf7/nLB82++kwsm6uBaNGAmHFObqKVhlJHbJ5DhIqZbgBa l1J6GSUtICGF4nxvVo5PUZNNySnZI/7DTgxU3NyIFSa6iplnPxKAZl/RMbZxEFMy2HQA SZoQ== X-Gm-Message-State: ABy/qLain6d3OszCyDL6AkQGpPWfhe2sV9wiH7ididyh5RwTpIb3bMoy 98EXtcgyVPvEEBqp8DeYQ5+BA9bjw1BCDgh2aWM= X-Received: by 2002:a2e:870f:0:b0:2b6:a682:9aaf with SMTP id m15-20020a2e870f000000b002b6a6829aafmr1741685lji.43.1688107620423; Thu, 29 Jun 2023 23:47:00 -0700 (PDT) MIME-Version: 1.0 References: <20230609115806.2625564-1-saikrishnag@marvell.com> <880d628e-18bf-44a1-a55f-ffbe1777dd2b@kadam.mountain> <3894dd38-377b-4691-907b-ec3d47fddffd@kadam.mountain> <5e222335-5baa-4ce8-a90b-69a865f29b1a@kadam.mountain> In-Reply-To: <5e222335-5baa-4ce8-a90b-69a865f29b1a@kadam.mountain> From: Sunil Kovvuri Date: Fri, 30 Jun 2023 12:16:49 +0530 Message-ID: Subject: Re: [net PATCH v2] octeontx2-af: Move validation of ptp pointer before its usage To: Dan Carpenter Cc: Sai Krishna Gajula , "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Sunil Kovvuri Goutham , "maciej.fijalkowski@intel.com" , Naveen Mamindlapalli Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 Fri, Jun 30, 2023 at 11:16=E2=80=AFAM Dan Carpenter wrote: > > On Fri, Jun 30, 2023 at 05:19:27AM +0000, Sai Krishna Gajula wrote: > > > > > -----Original Message----- > > > > As suggested, we will return error in ptp_probe in case of any > > failure conditions. In this case AF driver continues without PTP suppor= t. > > I'm concerned about the "AF driver continues without PTP support". > Yes, it doesn't make sense to proceed with AF driver if PTP driver probe has failed. PTP driver probe will fail upon memory alloc or ioremap failures, such fail= ures will most likely be encountered by AF driver as well. So better not continue with AF driver probe. > > When the AF driver is probed before PTP driver , we will defer the AF > > probe. Hope these changes are inline with your view. > > I will send a v3 patch with these changes. > > > > I don't really understand the situation. You have two drivers. > Normally, the relationship is very simple where you have to load one > before you can load the other. But here it sounds like the relationships > are very complicated and you are loading one in a degraded state for > some reason... > No, the relationship is simple. Idea is to defer AF driver probe until PTP driver is loaded. Once the above is fixed there won't be any degraded state. Thanks, Sunil.