Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6420501rwi; Mon, 24 Oct 2022 00:43:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7LtO34gWMBq5K6Whwyoff9AbyYjc2iwoCX2J0UQ4k5yN4Xyt4lMxBCh8Va8ZzOhfUm7Prv X-Received: by 2002:a17:90a:458d:b0:213:54f:ddd3 with SMTP id v13-20020a17090a458d00b00213054fddd3mr6268878pjg.232.1666597412814; Mon, 24 Oct 2022 00:43:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666597412; cv=none; d=google.com; s=arc-20160816; b=HTeOb+pJfeuN5NuZbNarcaFbxOPvxQkHMEqzRVM6rT4O1sgXIGxBmC/hrSKPSWaRk/ IFonY9JyLOuQwqouqRWuRYmX++xOT2+loC+gLggS00x0uxiYC8IkRT9ivEGE5pfod7WD xAXh9IvLsBRf368qaCDmAjIaO5nJalDZcMegO08PZ+83TqGO1MR5s94DNp9XFuuaksSA QWZytL02yNj9DmYUdCEDotb19fM5wxpE448nY+SpiOYxffjnE7Dm5hBgrsopFht66Vxa D4kjRWbpAlCXnr/ZQ3jyIKXEQO0rb34NvmZbT18qGBLZ22nvgbDySkonJrEJu8pL+AmM jlxA== 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=7csEvJLLWj1ZH43BE56g6RX3liHNNkiK/xxcwJFkh/Q=; b=O5Nl/ZcUC+4SWauq/zsrqIHvlfa17lM4xPJoE8Z89GW9eM9oiStErZ45iHkRr/ihYR u8Dj704+OAyoigPibHm/jogoco76yKIrL4tdacDD2v0tnL6LPsNWJKIhCkLi2DwXRhSK 7ycvURSglaW4t4B5onph/oji/GPSuWjpZg0S2ye2RFBaIDroIV+phWOqaTzz7EIJKwKk /1TCe3V94Kx3s7JegxE6HmjlV0LWOCV4WeSK9Eblj0NY4HX4h1MXqkrM2hX0SDVXP384 g/QGZl8nZeOU3I/8JbRRJ0r9jW6gnHNU8cTfC4/aKp7PZwdxOG8ah+Myy2e1auQWzWHZ yqDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=b02sZEcb; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j1-20020a170902690100b0017a034f7246si7011743plk.560.2022.10.24.00.43.20; Mon, 24 Oct 2022 00:43:32 -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=@microchip.com header.s=mchp header.b=b02sZEcb; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230488AbiJXHYn (ORCPT + 99 others); Mon, 24 Oct 2022 03:24:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231124AbiJXHYh (ORCPT ); Mon, 24 Oct 2022 03:24:37 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9DD4BE1F; Mon, 24 Oct 2022 00:24:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1666596270; x=1698132270; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=x2hdzbJFZkGSOjRme22bRLCPN3Dwe5K//vVXwOM7pNE=; b=b02sZEcbkA/LjNmkxPIXgQgc4/sO52p3MyjY0XWEDb18BM4PTWatOj4D U4H30qJUKkdaeMwtmQ0MF/TuQU+FlUy7vG37ZBX9/nL7UstU5u8QnQxhP Ylz0bvXTbqkdL2xTCoy6FG9fx9yc1i4FpoGDSxL1iGPoZ7TeYHt/epIoo AMPQusi44bXuoM7U1+fauTv31EjPT+RlRsS5FXxiAsR8C/tn+lkcxnAXZ 2NsMyssiB7fmkaFzxlUasWCCIK+J5Dc+R9fmyUD9Km0jsdABccbUqE2Et QjORoEAHLq980EgIjpeV+9Qk4lGUOZAwIWdfFSKkf2W0lRkRM6ZkfZWWi Q==; X-IronPort-AV: E=Sophos;i="5.95,207,1661842800"; d="scan'208";a="183588946" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 24 Oct 2022 00:24:27 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Mon, 24 Oct 2022 00:24:26 -0700 Received: from localhost (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Mon, 24 Oct 2022 00:24:22 -0700 Date: Mon, 24 Oct 2022 12:54:21 +0530 From: Raju Lakkaraju To: Andrew Lunn CC: , , , , , , , , , , Subject: Re: [PATCH net-next] net: phy: mxl-gpy: Add PHY Auto/MDI/MDI-X set driver for GPY211 chips Message-ID: <20221024072421.GB653394@raju-project-pc> References: <20221021100305.6576-1-Raju.Lakkaraju@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,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 Hi Andrew, Thank you for review comments. The 10/21/2022 16:01, Andrew Lunn wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > > +static void gpy_update_mdix(struct phy_device *phydev) > > +{ > > + int ret; > > + > > + ret = phy_read(phydev, PHY_CTL1); > > + if (ret < 0) { > > + phydev_err(phydev, "Error: MDIO register access failed: %d\n", > > + ret); > > + return; > > + } > > > @@ -413,6 +490,8 @@ static void gpy_update_interface(struct phy_device *phydev) > > > > if (phydev->speed == SPEED_2500 || phydev->speed == SPEED_1000) > > genphy_read_master_slave(phydev); > > + > > + gpy_update_mdix(phydev); > > Do you know why gpy_update_interface() is a void function? It is > called from gpy_read_status() which does return error codes. And it > seems like gpy_read_status() would benefit from returning -EINVAL, etc. Do you want me to change gpy_update_interface() return type ? Can I do those changes as part of this commit or need to fix on "net" branch ? > > Andrew -- -------- Thanks, Raju