From patchwork Mon Nov 20 19:35:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 167413 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp252734vqb; Mon, 20 Nov 2023 14:21:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IHGqIkC2UB48PKRd0Kbzz41FqGe1AS3AXgtZw4wH+paRHTIbIG7bPqmqzduKU+7y2ey/gO7 X-Received: by 2002:a05:6808:302a:b0:3b6:dc6f:2741 with SMTP id ay42-20020a056808302a00b003b6dc6f2741mr3791391oib.19.1700518899295; Mon, 20 Nov 2023 14:21:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700518899; cv=none; d=google.com; s=arc-20160816; b=hZncwSOFIgn0r+rnodHgdVORDb95LPnWecyX+qJjy2OFB165ILh4wl/EkjMHXcB7Kb ywtwn52tMB704+lFDoEG0i3tX0DNRCaHD4K17ZSe6XOls33ccN2i6JDeWD19Ox7pM9WM SZ0EIh92hEuHsSI1BWiISjeqVm/1jpPKj268jKR+IHuCqvtfqCbvF4qKAWan3XWVARlB Bxg544pvT+NPHSi1ngsvi4HZpdNduaQx0e+ZQm1vLur8K76sTBMor0jXGju4QdjeiBbR anE6lUPJGFEHIUTfovQx7sKVvjZ4cAKMmc0+IBkZGL8ljgRmrMf0HoUfwZFkNGphy+6v UhLg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=+WAcz7z2EchyAwpWIM7/dxS2+rVeXdmwsl1o0TskhuM=; fh=TLP31TsvNjXfybFHjyS0ptdGep1co6SEP/v6lxPO++U=; b=QFN4QvJJQTezGBjxLeFyA5Pa9UFsQ/lae+s7OJd5bwCb8Cne7mxXu8BZjtVfD93pvX up0nKV5yo89ypomqLqXFFgwAqNqKKQmqOhd/eGt2ABuC63eMeajebK8SZOhwJNhG67aF XPsCGa5EtN4Kl6XuYymrnfAWnbkr2ygvVQOMKmnMn9iEIShrBBMCQzZhsGTD9ZucmXEp nu6OBDet9eAzj27BASI5xawNg/xj6wN45+AUgdcZZCH2OhIUN+//oBqUSGtKg5Q9rGBu UE3a4CVjVAhv+6DVwmemydfQO6AIazHh8/x0K/pM3k1JotiFwSoxwJrEp/mXnD00f/zO UL5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bSkcjujV; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id l189-20020a6388c6000000b0059ccb99a2eesi9422131pgd.173.2023.11.20.14.21.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 14:21:39 -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=@gmail.com header.s=20230601 header.b=bSkcjujV; 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=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 645A18080E12; Mon, 20 Nov 2023 14:20:42 -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 S232729AbjKTWUc (ORCPT + 27 others); Mon, 20 Nov 2023 17:20:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232733AbjKTWUM (ORCPT ); Mon, 20 Nov 2023 17:20:12 -0500 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E1AD12A; Mon, 20 Nov 2023 14:20:08 -0800 (PST) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40b26d700a1so2531985e9.0; Mon, 20 Nov 2023 14:20:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700518806; x=1701123606; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+WAcz7z2EchyAwpWIM7/dxS2+rVeXdmwsl1o0TskhuM=; b=bSkcjujVEc+Hy/rmqa/TY6sKbAeO2Dv9mO9+cjLo0Js6D8Kca4I0+KYddHK1E+/d4x f/ILLqlo4EqzWyqrWSKOTyYr6+A9tqf3fueGrYVTKWluwxrUat/XGSSGruybzJUSvH0g YCpZNJW1A/8vi18WkABgokoXHU5l49W2Wzqxwmpgi+I5fN/2teMqmWG9mzpJPutQK+4/ KMHfTwH9CX74uOIojxMbF0ftNWVw3oZL96NrE4Jls6oU6PVB8ioxOTt4LVFRdZeYSVSl PeNXM9yXEczt5KoL6wj1OFBFWgNm3JIF+xbqALh7hlv0IFeeKm1A3dY4jvFCV6DZrKZe LWdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700518806; x=1701123606; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+WAcz7z2EchyAwpWIM7/dxS2+rVeXdmwsl1o0TskhuM=; b=BMv6KvGnZwnvsctvDQw3mJbUqFWzVZ4j09fyOmXBoqw78Ljg/KEA/8TYS9lxc0/z4Q hlCKcWzJYyjjC4uQkWAbg5Igd83/qGPfp4JER6Rgy9e/T4FXSs7cfkl0sU0KQGeXhbqt IbjVP4oknPOpJewimStCv5ipYO/yXNGxmrSj4INxeQyIDoyuPTBKdnyAuULt+22GhD9L 9tivD8slOaS81SnVRHlOtLc2gw3uX76AQxuOEemjmnq+dukwIXPj4bgdb+x7C0d9lSya 3g4FQpQ0FUdSlnm7nfsTewnW4X1rlwDMUgsDUGKCkpMVJZ4+yA65nABdQsAIE6iRwMfS mU+A== X-Gm-Message-State: AOJu0YxnojhRK0tit5aMzLnikdHLFQ7nmh+Dpis3HrWKNNwLtawmpwMO SnBJinrEnrdsBOhTbjGa12w= X-Received: by 2002:a5d:688e:0:b0:317:6ea5:ab71 with SMTP id h14-20020a5d688e000000b003176ea5ab71mr5078027wru.30.1700518806281; Mon, 20 Nov 2023 14:20:06 -0800 (PST) Received: from localhost.localdomain (93-34-89-13.ip49.fastwebnet.it. [93.34.89.13]) by smtp.googlemail.com with ESMTPSA id f18-20020adfdb52000000b00332cbda1970sm1739089wrj.30.2023.11.20.14.20.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 14:20:05 -0800 (PST) From: Christian Marangi To: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Christian Marangi , Robert Marko , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: kernel test robot Subject: [net-next PATCH] net: phy: aquantia: make mailbox interface4 lsw addr mask more specific Date: Mon, 20 Nov 2023 20:35:04 +0100 Message-Id: <20231120193504.5922-1-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 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]); Mon, 20 Nov 2023 14:20:42 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783123305341709385 X-GMAIL-MSGID: 1783123305341709385 It seems some arch (s390) require a more specific mask for FIELD_PREP and doesn't like using GENMASK(15, 2) for u16 values. Fix the compilation error by adding the additional mask for the BITS that the PHY ignore and AND the passed addr with the real mask that the PHY will parse for the mailbox interface 4 addr to make sure extra values are correctly removed. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311210414.sEJZjlcD-lkp@intel.com/ Fixes: e93984ebc1c8 ("net: phy: aquantia: add firmware load support") Signed-off-by: Christian Marangi --- drivers/net/phy/aquantia/aquantia.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/aquantia/aquantia.h b/drivers/net/phy/aquantia/aquantia.h index 9ed38972abdb..7685bfaf0b07 100644 --- a/drivers/net/phy/aquantia/aquantia.h +++ b/drivers/net/phy/aquantia/aquantia.h @@ -30,7 +30,10 @@ #define VEND1_GLOBAL_MAILBOX_INTERFACE3_MSW_ADDR(x) FIELD_PREP(VEND1_GLOBAL_MAILBOX_INTERFACE3_MSW_ADDR_MASK, (u16)((x) >> 16)) #define VEND1_GLOBAL_MAILBOX_INTERFACE4 0x0203 #define VEND1_GLOBAL_MAILBOX_INTERFACE4_LSW_ADDR_MASK GENMASK(15, 2) -#define VEND1_GLOBAL_MAILBOX_INTERFACE4_LSW_ADDR(x) FIELD_PREP(VEND1_GLOBAL_MAILBOX_INTERFACE4_LSW_ADDR_MASK, (u16)(x)) +#define VEND1_GLOBAL_MAILBOX_INTERFACE4_LSW_ADDR_DONT_CARE_MASK GENMASK(1, 0) +#define VEND1_GLOBAL_MAILBOX_INTERFACE4_LSW_ADDR(x) FIELD_PREP(VEND1_GLOBAL_MAILBOX_INTERFACE4_LSW_ADDR_MASK | \ + VEND1_GLOBAL_MAILBOX_INTERFACE4_LSW_ADDR_DONT_CARE_MASK, \ + (u16)((x) & VEND1_GLOBAL_MAILBOX_INTERFACE4_LSW_ADDR_MASK)) #define VEND1_GLOBAL_MAILBOX_INTERFACE5 0x0204 #define VEND1_GLOBAL_MAILBOX_INTERFACE5_MSW_DATA_MASK GENMASK(15, 0)