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 AC595C433FE for ; Fri, 21 Oct 2022 14:40:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230339AbiJUOj7 (ORCPT ); Fri, 21 Oct 2022 10:39:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230351AbiJUOj4 (ORCPT ); Fri, 21 Oct 2022 10:39:56 -0400 Received: from vps0.lunn.ch (unknown [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28CEC4B0E1; Fri, 21 Oct 2022 07:39:49 -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=D9L9gWEpqVSBkoML8PsO+P3x7+AWH1EUh92SK7KY3pI=; b=49jIcLnMiwuJE4tD9XSbawbmB/ FlTXGg0PNbhAHZtw7MLLHh7r4VhO/o6+PWH/z73jgqoIE0pY4PhHvueaHneuKFtTddu3hl5oK5iar AgDV+G9JDLgWMxdCjOqupEEib4aZOPKg5M3/yKyrTZC1oZUnwag5TOHtsK4gVgvEeudc=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oltBU-000F8B-6x; Fri, 21 Oct 2022 16:39:40 +0200 Date: Fri, 21 Oct 2022 16:39:40 +0200 From: Andrew Lunn To: Maxime Chevallier Cc: davem@davemloft.net, Rob Herring , Krzysztof Kozlowski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, thomas.petazzoni@bootlin.com, Florian Fainelli , Heiner Kallweit , Russell King , linux-arm-kernel@lists.infradead.org, Vladimir Oltean , Luka Perkov , Robert Marko Subject: Re: [PATCH net-next v5 2/5] net: ipqess: introduce the Qualcomm IPQESS driver Message-ID: References: <20221021124556.100445-1-maxime.chevallier@bootlin.com> <20221021124556.100445-3-maxime.chevallier@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221021124556.100445-3-maxime.chevallier@bootlin.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org > +static int ipqess_axi_remove(struct platform_device *pdev) > +{ > + const struct net_device *netdev = platform_get_drvdata(pdev); > + struct ipqess *ess = netdev_priv(netdev); > + > + ipqess_hw_stop(ess); > + unregister_netdev(ess->netdev); Should the unregister come first? What happens if the network stack tries to use the interface during/after ipqess_hw_stop()? It just seems like it would be safer to first unregister the interface, and then stop it? > +struct ipqess_tx_desc { > + __le16 len; > + __le16 svlan_tag; > + __le32 word1; > + __le32 addr; > + __le32 word3; > +} __aligned(16) __packed; > + > +struct ipqess_rx_desc { > + u16 rrd0; > + u16 rrd1; > + u16 rrd2; > + u16 rrd3; > + u16 rrd4; > + u16 rrd5; > + u16 rrd6; > + u16 rrd7; > +} __aligned(16) __packed; The TX descriptor is little endian, but the RX descriptor is host endian? Andrew