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 CF2C2C43334 for ; Fri, 10 Jun 2022 15:39:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346006AbiFJPjb (ORCPT ); Fri, 10 Jun 2022 11:39:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345199AbiFJPjR (ORCPT ); Fri, 10 Jun 2022 11:39:17 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7763D28D694 for ; Fri, 10 Jun 2022 08:39:13 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id h19so35846032edj.0 for ; Fri, 10 Jun 2022 08:39:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pqrs.dk; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ttBUCbYGFLdzm2aXxZ1IGyfndCTrcRAN4ru0azsH/58=; b=cZYmDUDy0wu5c9j6ewi0ELxc7qQdw0DCbocteP7SGDeSU/o89n1z5e1aVYndYZuLf8 vcmhpeWbwh5y1mYzyOM22ClVplmgYc831kwVHywjMRjHAgsz3d28u3WIXtmfaxFYWNyU e16JsDO1awPiuGSta1Vrs/klJXTKa0bU9VpMc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ttBUCbYGFLdzm2aXxZ1IGyfndCTrcRAN4ru0azsH/58=; b=GtLI08BW0e2/fVz0Ea1u0XPaRvSOfoXiNmLdJy/qzY4tonGGdO+FObIPkLAo5uSIqB H9SFx164GoGKoV1Lmbh7qF96WkopSrlLBwxGacDREQDbL10d8eZ0NQmqOKDBFSBZ9DUJ rcrVsXvhL/zSYhi/3IjQ4SkkqiTzY49SJ8d9aBTvtagKezDtzu9Qc0b/Q2TpdmpZpmui G5yGW6ODOrmCxjFav2xWwLXbkJBY1sE5cvFtccP5xcRCYOoeP1OCfrh9uoa1MbksP8Cd +Pe6gt8p9LbBOhPM3lwgFVLA9ECeXHsa5+kSDpHykkc2exWA9i8+D/malpIIvOpvjth4 NwOw== X-Gm-Message-State: AOAM533hBbdVglpIWlsGkGlOKMM0bf7XERD2FekTxCyUu6kj0cQBHYdf PwwjydA/dHxwBT4ML2noF2NqPg== X-Google-Smtp-Source: ABdhPJyspXoMrwetgWUuQuUkvvnhDg0orQX5YpJax1xZh6BFYrS78uu1TShKsDkAnTFa3pXF0usKJA== X-Received: by 2002:a05:6402:22eb:b0:42d:d578:25d9 with SMTP id dn11-20020a05640222eb00b0042dd57825d9mr52318904edb.310.1654875552048; Fri, 10 Jun 2022 08:39:12 -0700 (PDT) Received: from localhost.localdomain (80.71.142.18.ipv4.parknet.dk. [80.71.142.18]) by smtp.gmail.com with ESMTPSA id h24-20020a170906829800b0070f7d1c5a18sm9783857ejx.55.2022.06.10.08.39.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jun 2022 08:39:10 -0700 (PDT) From: =?UTF-8?q?Alvin=20=C5=A0ipraga?= To: hauke@hauke-m.de, Linus Walleij , =?UTF-8?q?Alvin=20=C5=A0ipraga?= , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v2 0/5] net: dsa: realtek: rtl8365mb: improve handling of PHY modes Date: Fri, 10 Jun 2022 17:38:24 +0200 Message-Id: <20220610153829.446516-1-alvin@pqrs.dk> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alvin Šipraga This series introduces some minor cleanup of the driver and improves the handling of PHY interface modes to break the assumption that CPU ports are always over an external interface, and the assumption that user ports are always using an internal PHY. Changes v1 -> v2: - patches 1-4: no code change - add Luiz' reviewed-by to some of the patches - patch 5: put the chip_infos into a static array and get rid of the switch in the detect function; also remove the macros for various chip ID/versions and embed them directly into the array - patch 5: use array of size 3 rather than flexible array for extints in the chip_info struct; gcc complained about initialization of flexible array members in a nested context, and anyway, we know that the max number of external interfaces is 3 Alvin Šipraga (5): net: dsa: realtek: rtl8365mb: rename macro RTL8367RB -> RTL8367RB_VB net: dsa: realtek: rtl8365mb: remove port_mask private data member net: dsa: realtek: rtl8365mb: correct the max number of ports net: dsa: realtek: rtl8365mb: remove learn_limit_max private data member net: dsa: realtek: rtl8365mb: handle PHY interface modes correctly drivers/net/dsa/realtek/rtl8365mb.c | 299 ++++++++++++++++------------ 1 file changed, 177 insertions(+), 122 deletions(-) -- 2.36.1