From patchwork Tue Oct 12 19:46:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 12553621 X-Patchwork-Delegate: kuba@kernel.org 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 901ECC433EF for ; Tue, 12 Oct 2021 19:48:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5FEA660C40 for ; Tue, 12 Oct 2021 19:48:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233803AbhJLTuK (ORCPT ); Tue, 12 Oct 2021 15:50:10 -0400 Received: from mail-vi1eur05on2087.outbound.protection.outlook.com ([40.107.21.87]:55521 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232145AbhJLTuJ (ORCPT ); Tue, 12 Oct 2021 15:50:09 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eYoDbN7ON5+YIE9Tktc/WeFq1Y51WS25P0UgIoHRbnpXR1E1/IuRg2Yw70UGPEYjTfog9mPw8dfG/7R2Mus4tQLyKHSVwzAugjrbn+JkZAVGYoi6EnxkJ0Hy/n4/rNa8+Cqqqhdyema6hf4aDaNuY5iVvye6t1AVuARYCPFVwwZe4SnWqXRamVXEOoEL7cHCdTOXnK4M4vf1OvYYO4EnrLzKKOKqcSdNiG29WvZkWeKnoYwJsVRXauQl/yrhZdFybn43QQqhQ/+/mog45e1Ejsn/I1kSVWWGULpethqEsBEauR5/PdzXWijF73NASRzksyNo9Lcb5jj2gghfUqHzGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=38tFKZKxE/lndsWX5QV1DW4NOSCtd9vlmeTTyLRutbU=; b=L9yohJNNAbq72jMGmTF8EyxJEO3hZ1+HENZHiDiVF2R2rCPjzHN3ypcfqVR3quPLNUXVx9/0xiGsczeY7QLGUa4IiyVZg9Y0h2f0BSJ79kGDaMe/jItFGE2SVL9E+1cATlkyo+TxJVSCbmX1iY+YagNnz9dQQkPf04PM0VbD6eUIl+87dmwHE+ZuOBVe9Q6hemffONCEAflLABOINDcsBbKeAp+UFAFMvzbF2pZW09Gb0Wne3kFZewhENrjyveLWOSZYzLLtmlZLK9P0UFI76pZ3hMzGDpk8crTAibIjChCw9/MDMR9ygoIlBvHlBsLkx5EF/6ZhlDFoaFx2JMsPIg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=seco.com; dmarc=pass action=none header.from=seco.com; dkim=pass header.d=seco.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secospa.onmicrosoft.com; s=selector2-secospa-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=38tFKZKxE/lndsWX5QV1DW4NOSCtd9vlmeTTyLRutbU=; b=AIRzq7xUfs7xUUMBXvaR1F6qi+56GmgxsClt6yp3MvyEaLC3cx1arg2w0of3BK07cTPP+xqoZ4vIFyAjFOhfUD2E5zlxnrFWR1uu9shurOMcAqhxl61ixFrVOZ7O1u1mgqn1gK6cvv0BKxjvyhUH4ENj6Lr2sxIn+6bnoSVuAZ8= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=seco.com; Received: from DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) by DB9PR03MB7513.eurprd03.prod.outlook.com (2603:10a6:10:22a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Tue, 12 Oct 2021 19:48:05 +0000 Received: from DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::a9aa:f363:66e:fadf]) by DB7PR03MB4523.eurprd03.prod.outlook.com ([fe80::a9aa:f363:66e:fadf%6]) with mapi id 15.20.4587.026; Tue, 12 Oct 2021 19:48:05 +0000 From: Sean Anderson To: netdev@vger.kernel.org, "David S . Miller" , Jakub Kicinski Cc: Claudiu Beznea , Nicolas Ferre , Antoine Tenart , Russell King , Sean Anderson Subject: [PATCH v3 1/2] net: macb: Allow SGMII only if we are a GEM in mac_validate Date: Tue, 12 Oct 2021 15:46:43 -0400 Message-Id: <20211012194644.3182475-1-sean.anderson@seco.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: MN2PR19CA0021.namprd19.prod.outlook.com (2603:10b6:208:178::34) To DB7PR03MB4523.eurprd03.prod.outlook.com (2603:10a6:10:19::27) MIME-Version: 1.0 Received: from plantagenet.inhand.com (50.195.82.171) by MN2PR19CA0021.namprd19.prod.outlook.com (2603:10b6:208:178::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.24 via Frontend Transport; Tue, 12 Oct 2021 19:48:04 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b992d5fb-6baa-4c05-fb6f-08d98db93573 X-MS-TrafficTypeDiagnostic: DB9PR03MB7513: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: H8IWpxPFRdv4pLsoeLvmEPwDKiq8PiLQXgccyVTV5FQefKba/0lUrzmMZYu7fcETCJlR+/sSU8aPAAuKj+4I9aVtyu5oyRQAaLgkXiJVt7OjejP4vr/uGPYJ7G89yhX+ldavqlWUfYjjrV6IFSFiF0MrJVZJUzbbfI+u99orqkofHN0VI6PDrKegGvCTHPMaI7ME46UdEUzIATf52a97E6oQuiQzd86j8I5L6DPxPcyN/lYhHsP4nI7JL4XLJgKl7LIWlu77h6WkJ+Y3oV4LuJ9ZFhQsNSx/lY9zuiVWl0cUkRQzJLwQpCn+tH0EUkQsqetULSJ+8esqdhuJIeLCfR4QAtHsOF+uq2Vw8FIuxHC9BrQ9TUDMjObThBHqHvSJ5nWcKuGpYXvgE07vJ1ZbllXDog6hg+/wZWIXhiXJHv0mq4vKGh2dR8n9CBli85BIfMSexymwXiE7coBcfPUfH8tTp805jlCxsEl1dLzuWePZz4RHjblG79fAtoonZwhWm5xNgUnl8FD3NtxK8YGrVhLrilSmLLywj3GoqNX7FqjHLGlUOCxXFxM28U5o9UxMs8RNuPDqJaT2bXZSJ3Q+jqlEWd/EE6XeupUKv6FSuGrJT8A5Q9JiT1ANy40IGXhdZ0Y+uAPO2e7tlUg2vzHnxEFpXH2XBjEaKLJpDY5CScsgQKk6y7fzmP8Kz2NpTJv67MO9sWyJWfQaiBZffvxkKQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR03MB4523.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(4744005)(44832011)(2906002)(2616005)(5660300002)(107886003)(83380400001)(38100700002)(38350700002)(86362001)(956004)(508600001)(4326008)(6486002)(66946007)(6506007)(6512007)(110136005)(36756003)(26005)(8936002)(8676002)(186003)(52116002)(316002)(6666004)(1076003)(66556008)(66476007)(54906003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: LrMz+ETweoDKe3nlQ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NBCCUi8uXr56dvk5yRmCLuEEc9M43ktzp5cT591FFdWbvMiqZ6RoGMWM5hqhUf1LUDVF+1Al1lU5Ppty93UXJ5gH+Vmltj+mRnQNRzk2FrF3QxLxGeWsS/tDiLuWTtZcE7/tSlelmRRU4/5HkX6RBK7TzpQSFLmmR5UPwlMJbU+cFt6QEJ40ofqxSohqNQ2FFwY1CAdderWWpcYckkH7DHx5jiBOnbJn9aW+7wHY9pdAE/VL2YjpwlB9dtIYaR X-OriginatorOrg: seco.com X-MS-Exchange-CrossTenant-Network-Message-Id: b992d5fb-6baa-4c05-fb6f-08d98db93573 X-MS-Exchange-CrossTenant-AuthSource: DB7PR03MB4523.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2021 19:48:05.6944 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bebe97c3-6438-442e-ade3-ff17aa50e733 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: sftPyiV7xuh3l8OoWTE46Jr5UZrcjmdexHQFzD9IlMM/AKTtY69o1ylabgDnSbOoj9Nd4hH3Q/EgTPugulT8UA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR03MB7513 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org This aligns mac_validate with mac_config. In mac_config, SGMII is only enabled if macb_is_gem. Validate should care if the mac is a gem as well. Fixes: 7897b071ac3b ("net: macb: convert to phylink") Signed-off-by: Sean Anderson --- Changes in v3: - Order bugfix patch first Changes in v2: - New drivers/net/ethernet/cadence/macb_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index 683f14665c2c..cb0f86544955 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -528,6 +528,7 @@ static void macb_validate(struct phylink_config *config, if (!macb_is_gem(bp) && (state->interface == PHY_INTERFACE_MODE_GMII || + state->interface == PHY_INTERFACE_MODE_SGMII || phy_interface_mode_is_rgmii(state->interface))) { bitmap_zero(supported, __ETHTOOL_LINK_MODE_MASK_NBITS); return;