Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp368109rwb; Thu, 22 Sep 2022 00:12:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM63GRu/PhxExpFluz1SSJQUAkhWDrzcuAPqxHGavfH1uuO9mHRBEoxG83QEmsZITsr9BB5r X-Received: by 2002:a17:907:2c77:b0:77b:4445:a852 with SMTP id ib23-20020a1709072c7700b0077b4445a852mr1575291ejc.582.1663830778802; Thu, 22 Sep 2022 00:12:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663830778; cv=none; d=google.com; s=arc-20160816; b=FAfI0vpXM98OzRNq3SbxYVpvN+54Kw0fJXdxf2YmL6pj6AqLw+f9Kb+F/wcOX+EPFe sHt6asfAQKhd2mhQIWWyIMWRnGJBlps2z8vCLBDxrE22YcoAi7OUj3YkaAh8awp8cuVm /nGx+TW1matghjY/41XNEmVu/asK4qSMkBNJZUKN4qs6bWr2AVeUA3N8EGMKfA/ynOQN VEmrh/VBTyJbzFJHX5KSt0vsTpgZWrncvWuFa5Dl1QZRisW6uC9vCZJuF2lctfV9kku1 jbHdhH+4ruhYVZZfshf0esfYpu/BlV0EfixEiyYzMqGZtNZrRdy6LD1UmWzIkL13PmNa BGIw== 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=UaJOokhTPLHooqOTvrOgbSAWXawJ/yo+aNWxKCdPdTs=; b=XmH36QR1ZZskZkF7MeIBjfTmYECQKIZ6XcS3EClyR88AtNHFMoKrR+fuwG6TONvRuW vrqcRGRIeH4yFjgR8MJVZ3wlX54eR4ti7k2sItZOIaNSPnCSEETrtsxhCtDDMgPnVO7m Fvf7YC0SfSY/u2nHjmNEL1RLcdZe9qXYJi3DtssJ8eqq5Zj1nFGnUF825UgACxG0BA1a 3T7DXUBS74BvForOtIuwcL/6DK1W7K10OtO8uVmtY8sKoI8fXG+P+90iVN3dJEVAIKNU x8xjgxFYU9+5uMTDCGhX8elgbBIsxxEVu6FIEUb4WCKVQ0WvDVFFsIH8BlzClOElbpN2 5GXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=hta3Xz2G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a3-20020a170906468300b00780f607444asi4323870ejr.868.2022.09.22.00.12.27; Thu, 22 Sep 2022 00:12:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=hta3Xz2G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230188AbiIVHLL (ORCPT + 99 others); Thu, 22 Sep 2022 03:11:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229570AbiIVHLH (ORCPT ); Thu, 22 Sep 2022 03:11:07 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1C8A98D01; Thu, 22 Sep 2022 00:11:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1663830663; x=1695366663; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=AaF/adrnSmLVJ38c7CTc0hQa7F9kDTXh+ROH6ZvZgfs=; b=hta3Xz2G+ja+nnpU77LDiPIZ5R14LWc6i6cIlP9WMxCWW6oMGTUZGOci gYXMomMkRpiwq8uzcUXUU4ubq9jPQrS2YW56FAA+ELql/bR78rLLRDEey s72Fe5EX8SdKfarJXJpbb1a2gmo0PBcrSy3jnZGBO0m/M4yZ9bEupKqoj +of0459BU82X1OnbSEcs+8Vxf9QyaS8io/HMM3LgwOq8fA7JWU0sbR5Ny tFxwaLyi0q2JTU4/YdJ7Mwq3TaIbIHCngofI9j4k1c2alKOOEjH7KnJin 0tneQDbK8sxYvrG5FJwZji4r1AvSvknIDz5njstyTEqyHCza9miY8gYEg Q==; X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="181581741" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 22 Sep 2022 00:11:02 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Thu, 22 Sep 2022 00:11:00 -0700 Received: from CHE-LT-I17769U.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Thu, 22 Sep 2022 00:10:54 -0700 From: Arun Ramadoss To: , CC: , , , , , , , , , , , , , , Subject: [Patch net-next v4 0/6] net: dsa: microchip: ksz9477: enable interrupt for internal phy link detection Date: Thu, 22 Sep 2022 12:40:22 +0530 Message-ID: <20220922071028.18012-1-arun.ramadoss@microchip.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series implements the common interrupt handling for ksz9477 based switches and lan937x. The ksz9477 and lan937x has similar interrupt registers except ksz9477 has 4 port based interrupts whereas lan937x has 6 interrupts. The patch moves the phy interrupt hanler implemented in lan937x_main.c to ksz_common.c, along with the mdio_register functionality. v3 -> v4 - Rebased the code to latest net-next v2 -> v3 - Added the common interrupt routines for girq and pirq v1 -> v2 - Added the .port_nirqs = 2 for ksz9896 Changes in RFC -> v1 - modified the return -ENODEV to 0 if mdio node not present Arun Ramadoss (6): net: dsa: microchip: determine number of port irq based on switch type net: dsa: microchip: enable phy interrupts only if interrupt enabled in dts net: dsa: microchip: lan937x: return zero if mdio node not present net: dsa: microchip: move interrupt handling logic from lan937x to ksz_common net: dsa: microchip: use common irq routines for girq and pirq net: phy: micrel: enable interrupt for ksz9477 phy drivers/net/dsa/microchip/ksz_common.c | 320 +++++++++++++++++ drivers/net/dsa/microchip/ksz_common.h | 15 +- drivers/net/dsa/microchip/lan937x_main.c | 427 ----------------------- drivers/net/phy/micrel.c | 2 + 4 files changed, 336 insertions(+), 428 deletions(-) base-commit: 7a5d48c4463e6ef896ea2190a97d9e90b37c38da -- 2.36.1