Received: by 2002:a05:7412:e79e:b0:f3:1519:9f41 with SMTP id o30csp101520rdd; Wed, 22 Nov 2023 10:24:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IF9sxulQYV3Qd3nPIr2ZPVzIYhqYF91/vw/H7YBwq6XZE3RidJJ93PGF/iyF1+hegIDkO3t X-Received: by 2002:a05:6a20:d90b:b0:18b:3571:ef12 with SMTP id jd11-20020a056a20d90b00b0018b3571ef12mr3590298pzb.16.1700677444558; Wed, 22 Nov 2023 10:24:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700677444; cv=none; d=google.com; s=arc-20160816; b=ToDb66YewOH/hQ5KdXSgkmLTiS2ETxZOmS1dwp861HDYaAczc+poe2e6zEIVidX2vr 5xVDW4c/GGg0OGbp8TU2bXvHIHyF4cS2uKjitDgNoRrHeTHCcjG38YTrxDGmAubIR1Cp Gi9+1esQwYLsJxjx0+T32v6/b5SvmxbwM2oHIs11WsfNwm2BhjWHn6cl8MUbcCH5ItP9 ge6pqeYe+Xc/qM7pemQkuVsUcMKqKW7Xq5evur6j6faBR7cmrVJwT7kE1NvJYhZ0xjsE GMtlRezjB71GKZds7iftVa4T6XDzMkaxKxOB/6R+1z4dyRlz0XHMtVZodNlozNlq+62f KF+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=6lCNsBgN3viZMbqEfeefcFrS6J1x2ivkye9L7EwEaTM=; fh=FKyHVzy671yAVeh7hssIgSb+BoTV3inHuisR8VwrR8g=; b=xah9YJ1DYzFXWh9XW0gCRQXU4O/hxrb351MiBlEZur6Efvp85V6hz4e63cFgfh18+3 I++9adFLGn3vyTl7KMsADfYIdrlpUjWl1jwceXKIqmv4zqnmKTGFkF3Kl41GphKKPzr2 D7TK6DeepKBPTS7RogR5WfE1WjDAV1HekWAP7d3G3GXy/2lb3q5LLA9NRp4420sAAzfW h3k+/OhkPW2UBez+FD4CplN3YF/18ClTFdR050kBxgqZfqZNZFgC5e+AlTJqY8z9qu0s 04z4hxiENk0ZD1uR28Las6ucKuaxl7RNnS0JzTi2r+9RAAMKRYh1gPwurgM77Cn/9AF8 yUdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cfx7RL1y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id o4-20020a635d44000000b005bd42f65dc5si12581661pgm.285.2023.11.22.10.24.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 10:24:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cfx7RL1y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 2192B83417F1; Wed, 22 Nov 2023 10:24:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344081AbjKVSXy (ORCPT + 99 others); Wed, 22 Nov 2023 13:23:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231470AbjKVSXw (ORCPT ); Wed, 22 Nov 2023 13:23:52 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 507F51AB for ; Wed, 22 Nov 2023 10:23:49 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41197C433C7; Wed, 22 Nov 2023 18:23:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700677428; bh=yZFggWdceu7rn7hUogOUO9F9Pf31Wzul4TPKXAC/3U0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=cfx7RL1y4ISdbaje+SGuou7CtcmZrlVSo+mA0tr2l4eyuKze0qLS9FLGsH/Uvv546 s7lFQoD9HyEbwfoxy4Cvr6kIYavw/xkIhD5Bn5iNAQKfzXemwOgQb3bplHnFm5BIg7 w5kgoNaYBleytc03xf9iMLLT8dpedTeV5o0w4OEXK1C+iS0AJ4kNeMn1VzMRH5PHgQ U4MvOpuzoVT+CffnRb3OADnazbboACsZBf0jhbD2rj8OQrhsqR4YB24oNzNd2p9IGm gmTmjf9ABiSuJpyWpqzQ0LvRp116ghdK8gRzUr9Sq4s4P6kzIC1GKYmZwcBH5PdgmM +k9NrEe+MlV+g== Date: Wed, 22 Nov 2023 10:23:47 -0800 From: Jakub Kicinski To: Christian Marangi Cc: "Russell King (Oracle)" , Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Paolo Abeni , Robert Marko , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel test robot Subject: Re: [net-next PATCH] net: phy: aquantia: drop wrong endianness conversion for addr and CRC Message-ID: <20231122102347.0bde86bb@kernel.org> In-Reply-To: <655e4025.df0a0220.50550.3d70@mx.google.com> References: <20231122170813.1222-1-ansuelsmth@gmail.com> <655e4025.df0a0220.50550.3d70@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 22 Nov 2023 10:24:02 -0800 (PST) On Wed, 22 Nov 2023 18:53:39 +0100 Christian Marangi wrote: > So they DO get converted to the HOST endian on reading the firmware from > an nvmem cell or a filesystem? They don't get converted when "reading from nvmem / fs". They get converted when you do: word = get_unaligned((const u32 *)(data + pos)); get_unaligned() is basically: #if BIGENDIAN #define get_unaligned get_unaligned_be32 #else #define get_unaligned get_unaligned_le32 #endif so you'll get different behavior here depending on the CPU.