Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3490627pxp; Tue, 8 Mar 2022 15:48:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJyQMI0q3mQyX6tzE/KtmvS6pCD2/zrmuU5GTJ0Lg3jHV+7+YLnn40LzO6+KLKmlE3gjTE5v X-Received: by 2002:a17:902:7b8d:b0:14f:f1c2:9ff4 with SMTP id w13-20020a1709027b8d00b0014ff1c29ff4mr19738830pll.54.1646783315866; Tue, 08 Mar 2022 15:48:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646783315; cv=none; d=google.com; s=arc-20160816; b=o7vq4NrQMflLSTdJW33kJxfldUSmQ8as8/QO6bS73GWwbkR8mwbNx1rgrIxYkVe0VJ Flil6klcqic6Uf52B3LcUf8o39X1YSNofxW3cc4P378BEkYg9e1E59jBFpMBcT6FE2A4 DWc76hsy5wFNc4+fnW6g8/DFqUR70JJ8tPVe8xTEKG+BMvnemDHtW6AhHP6vFlbPEYJ7 Ztk9zUrkOgUO9PcGg+eLM+J14NQyzs/lBNWXqKtbixRUNGhmW4+C9780KqLkkHiBUznI EpICGsj6G6nGnBYtXqEQ3x11zDH1Xv00Z59E2YIJo0FfZYD//6wYA8yULIEMQ9yVwMi6 q2oA== 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=rkGH2sBkGyY6TpLoMwkCXXjxamBGnz0Ub9pyMHsFg5Q=; b=rdoA3lxplyhnjmI9UOdMlrQ4cwfeT2VMaQ6mzwhM4Jq2ovMgRzrcKBGOkgemJIMu7U SMKezeNjK7EQAG6qW8WzNfJGgl+oaFt8ogclPpNe2wAWHzKFvhr3SWQuLxezHnaHwL2n izV26yqmtKxIykpfVrzPL3wtNeO4IaB6tI+cm/JuuBr8lVjW2Ez+9c9Pf40184eyc9Vl 9mq11HeyWen8YU2I0d1ewcqbhbR+uUkyPeLR2zcexlBo5dgjRZvWiPBMdym7Vba5tn6s D/rRPDm0NmUdBe4vXIjbHg2VHzZnMS34zJ5WQndp/EAxCCTIPY3hD5SMaibdIY93k0+v P6kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=BRVJwWwb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id w2-20020a1709029a8200b0014f0b917878si336166plp.215.2022.03.08.15.48.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 15:48:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=BRVJwWwb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E44DB985A5; Tue, 8 Mar 2022 15:28:57 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239095AbiCHW2J (ORCPT + 99 others); Tue, 8 Mar 2022 17:28:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350822AbiCHW2F (ORCPT ); Tue, 8 Mar 2022 17:28:05 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4014F583B8; Tue, 8 Mar 2022 14:27:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1646778428; x=1678314428; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=7l6jxbKbZmfdRAwe6nmc8SY4mZKw+uHcQDJK850rraA=; b=BRVJwWwbiEWNDfB3L/yAaGn9clgPfU9STD6kDGrH+AzQlkuMl7ojV7tq vC3us92cLSu773/f2naMMepVo5vOY8Lhf8p33z9mB2xS8gzbKugpEmCp4 Ebk3p2vUjzeJ6T4TYwZaQoGQv2Dz3oaJ4WrikEMugY2Jx/BdhKM98b/bH gN/mBj/RJXDkeY+5KHKCHEhEjSlExJ/rRfIH7Que5SsvjT10gj1bTf6S7 88kAnFXe+k8OsFyvAQI+an8vMci8x0yEiToAepaLEXEuMXlVIE93OYxdF ghPDw4sbb65MvGCcIYZTfeUrkdiG7o7qnxobwWs2CX9dx2MCR9fC9D2dY w==; X-IronPort-AV: E=Sophos;i="5.90,165,1643698800"; d="scan'208";a="156181155" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 08 Mar 2022 15:27:07 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) 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.2375.17; Tue, 8 Mar 2022 15:27:07 -0700 Received: from localhost (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 8 Mar 2022 15:27:07 -0700 Date: Tue, 8 Mar 2022 23:30:00 +0100 From: Horatiu Vultur To: Andrew Lunn CC: , , , , Subject: Re: [PATCH net-next] net: lan966x: Improve the CPU TX bitrate. Message-ID: <20220308223000.vwdc6tk6wa53x64c@soft-dev3-1.localhost> References: <20220308165727.4088656-1-horatiu.vultur@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 The 03/08/2022 22:36, Andrew Lunn wrote: > > > static int lan966x_port_inj_ready(struct lan966x *lan966x, u8 grp) > > { > > - u32 val; > > + unsigned long time = jiffies + usecs_to_jiffies(READL_TIMEOUT_US); > > + int ret = 0; > > > > - return readx_poll_timeout_atomic(lan966x_port_inj_status, lan966x, val, > > - QS_INJ_STATUS_FIFO_RDY_GET(val) & BIT(grp), > > - READL_SLEEP_US, READL_TIMEOUT_US); > > + while (!(lan_rd(lan966x, QS_INJ_STATUS) & > > + QS_INJ_STATUS_FIFO_RDY_SET(BIT(grp)))) { > > + if (time_after(jiffies, time)) { > > + ret = -ETIMEDOUT; > > + break; > > + } > > Did you try setting READL_SLEEP_US to 0? readx_poll_timeout_atomic() > explicitly supports that. I have tried but it didn't improve. It was the same as before. > > Andrew -- /Horatiu