Received: by 2002:a05:7412:e79e:b0:f3:1519:9f41 with SMTP id o30csp111839rdd; Wed, 22 Nov 2023 10:41:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IF1LpD7x3pvifq5cxSx0P1m3uLtKA4VZF11O6Tq+1KZjbVPRLel1g3PrwitQ6+FzTaOGP0u X-Received: by 2002:a17:90b:1bc5:b0:27d:10b1:5deb with SMTP id oa5-20020a17090b1bc500b0027d10b15debmr3223410pjb.31.1700678484722; Wed, 22 Nov 2023 10:41:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700678484; cv=none; d=google.com; s=arc-20160816; b=Qh2il5Gx2wNvLxEXmMXnCdXuIdGXwK5Z3mbJKV9mshf23AsIrSPr4twyTfrtapMrqv ZFuYk/120YZ82wZ6Y/2NWyVhEbdNZjIJ0VxeKz+0PyAWue+UPksyDxm3J84tYlQLsx/U O7POSOvaYzUEmdwLV04JK9yLwhJSsmupjrn2ZVw7U1XWC5/HSKJ+UH8uZg29uP2pgT8o oAcoqmYwtlITTJPv8jGmzfv4koRNL9XhpSuYZEjiAe6RMWcRaYIOkHiis5nv3NE3RaOZ eAK/mt2cDzBdbsBK+aZSOZB4GJPX14P9nHWZ4WIfu0Q7Nq6oW3HQ81TkR6WmB+ZTsb1i JLVQ== 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:subject:cc:to:from:date:message-id:dkim-signature; bh=YDjLfRk2WpjpKzC7NBxti8sskFBWWzZRE9jVKMLQcIQ=; fh=KNSY+C42AgSPiMqqk1cgQOIP+uSRLCsyGdmXEBNsaCE=; b=c1L8ZuFmQTPB8GPzueOQm9A6Rt4Lh472s5dysDcG440vzbPcqgtlG5EOn1XnFOw3lI YcBaXcv8WqludmON4iia/NvE2d7YVzycaF7ihBzVUAXcXvrag4mn5ocAbRFACOVzCiPA f7mk20wAKqOJ8GuV8BQ36whalBrpGnxZ6Ov8lAAUgZNAPlbFZ0Uh3gwVZ7JPu+6sMt5C KvuJvk9fHmvwd+QqKeH0T/lImz+jexdKyqQokBaHJuUSjgDOkej00oaNqWuA9Jde6xgw oM5LvbKuPs5X+HJmd+sqdjxmdf2TfKsTrVX0kAYruK4PRy29eVWlf/7iJ+jfMtHs6Aw4 vBSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=a2VxqY8A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id h1-20020a17090acf0100b00274df6d4c38si124908pju.89.2023.11.22.10.41.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 10:41:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=a2VxqY8A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 8BE18834010B; Wed, 22 Nov 2023 10:40:35 -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 S235270AbjKVSkI (ORCPT + 99 others); Wed, 22 Nov 2023 13:40:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235368AbjKVSjy (ORCPT ); Wed, 22 Nov 2023 13:39:54 -0500 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12F6D10C0; Wed, 22 Nov 2023 10:39:50 -0800 (PST) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40b2ad4953cso7028945e9.0; Wed, 22 Nov 2023 10:39:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700678388; x=1701283188; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=YDjLfRk2WpjpKzC7NBxti8sskFBWWzZRE9jVKMLQcIQ=; b=a2VxqY8AFbaZqVN/EzNNPCTNHVTEkWs0FTnjuFfqqZ+fTgIWNGW7kDjJH/sSdjRGOy rqX0eHCewNJ/G5xE08LppATj/KQP6/aYDJYN8bmxXCmAlGtA5JgrG75lp39xQDpmjXcy SAk7eH46ySz/RXoKtpjxnQHJBTSF+/Gf0E6XSu1WrSdso/8kw138kN5OxGj0UrDWvdM8 FajheAMITgZgX2vX10V6l/7/j1dpMTsBc4PQ8aqMKzSeyHqFi7CupLt9yxrN/l8CMmQi 7IxyiMtXx1uNY/71vhX3W7AgatN7d9BNaBusoCJ4iO1XyTvrI8a5BloIJqufi7cICHWX 3Ppg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700678388; x=1701283188; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=YDjLfRk2WpjpKzC7NBxti8sskFBWWzZRE9jVKMLQcIQ=; b=GY+prxma71JZUGNYmDoTcgo+Cqq0NqkwJc2mDNu6zeu1Sh63Gil8uRES9VJREMPiyj MMXqeoPRl0dd16a+UZPlM4CW8j87gaqBCi5TWDz5+goxO7n3kWNIBhTfqMlrnn6ulB/P gkIGzaS9YCvmkKXfJrU9aEe9Xglq4jwx800G8gZDE5wrVrAFTye4qvKOFgMAzAzslpF1 nZ+UUsDBaPH5CVAQxFaByli26vQeHs1AHaQn5LqGfxDPCe0JrqqkQaQ2lBx+lVd4GKjd YWc58EugfSg9u1tlEZwGKOPYRn8JdJWRBl1bausYaEpbVIRgvMxMfDJ+0AqKXrP7Qb9c oKOQ== X-Gm-Message-State: AOJu0Yy+SS+BvBgeD9IT/Z/5SNVWvHwmr0yCEinkR8Zr5ujvXfmxzl4/ 8RiTjlkvtaRRWXNMb0cpelU= X-Received: by 2002:a05:600c:274e:b0:406:5a14:5c1e with SMTP id 14-20020a05600c274e00b004065a145c1emr321071wmw.1.1700678387986; Wed, 22 Nov 2023 10:39:47 -0800 (PST) Received: from Ansuel-xps. (93-34-89-13.ip49.fastwebnet.it. [93.34.89.13]) by smtp.gmail.com with ESMTPSA id je20-20020a05600c1f9400b0040836519dd9sm208462wmb.25.2023.11.22.10.39.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 10:39:47 -0800 (PST) Message-ID: <655e4af3.050a0220.54c5a.113b@mx.google.com> X-Google-Original-Message-ID: Date: Wed, 22 Nov 2023 19:39:44 +0100 From: Christian Marangi To: Jakub Kicinski 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 References: <20231122170813.1222-1-ansuelsmth@gmail.com> <655e4025.df0a0220.50550.3d70@mx.google.com> <20231122102347.0bde86bb@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231122102347.0bde86bb@kernel.org> X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,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:40:35 -0800 (PST) On Wed, Nov 22, 2023 at 10:23:47AM -0800, Jakub Kicinski wrote: > 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. Ugh... If that is true this is bad... When get_unaligned was suggested, I checked if the thing was doing any kind of conversion and from [1] I tought it was just getting the pointer. I can't find the entry where the thing is done. Is this some kind of include magic with asm specific API? [1] https://elixir.bootlin.com/linux/latest/source/include/asm-generic/unaligned.h#L22 -- Ansuel