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 3FDABE7D0A9 for ; Thu, 21 Sep 2023 20:32:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231913AbjIUUcn (ORCPT ); Thu, 21 Sep 2023 16:32:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231879AbjIUUcU (ORCPT ); Thu, 21 Sep 2023 16:32:20 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 286F8AF95C; Thu, 21 Sep 2023 11:07:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=ZcZ6CvS508r428h2XRFuIkYdLum6Ry+D8UPk9663CHc=; b=KV924Ig6YmYwVQ7iLK5PibHLuv 8L+EQdN/eVu9JmB+e6x1uTdtJy58t9qTdEm8pI6JBorWubxwzIZHT9pa03LPTxXkY5f6Jv9q1gVa3 aBs6DfDiLXgkvGVWjxTfYX9bsGY9iNFAOKqMyUnMaTK18/2Cvf1WrpgKZGw21wkxnaF4=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qjMbP-0076ay-2H; Thu, 21 Sep 2023 18:32:31 +0200 Date: Thu, 21 Sep 2023 18:32:31 +0200 From: Andrew Lunn To: Roger Quadros Cc: MD Danish Anwar , Vignesh Raghavendra , Richard Cochran , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , vladimir.oltean@nxp.com, Simon Horman , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, srk@ti.com, r-gunasekaran@ti.com, Roger Quadros Subject: Re: [PATCH net-next v2] net: ti: icssg_prueth: add TAPRIO offload support Message-ID: References: <20230921070031.795788-1-danishanwar@ti.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: linux-kernel@vger.kernel.org > > + if (!netif_running(ndev)) { > > + netdev_err(ndev, "interface is down, link speed unknown\n"); > > + return -ENETDOWN; > > + } > > Do we really need this? The error message suggests it is wrong anyway. netif_running() being true means it is admin up. But the carrier might be down, and so the link speed is unknown. So maybe this should be using netif_carrier_ok() ? Andrew