[net-next,0/6] net: dsa: microchip: regmap range validation and ksz_pwrite status check for lan937x and irq and error checking updates for ksz series
Message ID | 20221102041058.128779-1-rakesh.sankaranarayanan@microchip.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3386556wru; Tue, 1 Nov 2022 21:19:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4PdydSKhfcKFbINbcV/KTi+RaJ1xy6pJSlrAlvkK+sonHmBNqglCEIbduJJV92JEIE1Y8K X-Received: by 2002:a05:6402:b56:b0:461:91aa:11b7 with SMTP id bx22-20020a0564020b5600b0046191aa11b7mr22999514edb.220.1667362781532; Tue, 01 Nov 2022 21:19:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667362781; cv=none; d=google.com; s=arc-20160816; b=SqB+jfkPeOThr/AgCxbEAHpAoVqMtWK9NDa7YsnZSNf9Qg5DWkQfclejfTKw3WxMjp kR34IxiA3V7zToHiL+1uY2V865K/JM/VnLxXEMLgc2F9iwO0J09UKgQz4dP23fzdwgeB r4WMBc/za169s8jCf36Uvx0q7Oe4rdbrOnvckLMmxdCD8wYaBhpk+gL/cQJd9MhRQpKj VQoEFtCUpvZh8W3YMPhhHw6R4lzegcluylMnQcK/UbrjWKXSfXcrmTtjdjYMV3tCrDKK 5AsTYw0sKb9vMSjmG27V1LhIb/rBgflRRpOjLHbCw5xs01outj1bSQxdoStrrcZHDhpn mhTQ== 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=+lPoKYx971f///pdXJJJFh641Mgk8DgJ/Cr5g+6OapQ=; b=XoHqA39gnMqozK3bz8Gbnr3uZtp0r9x1ebiOq1uut3B6QKeFPgsmIWVUikHSvmOtej IM4m9fziDjWexTlMuDBPk5JhWsSl7QnJBO5Gmll2nvQkQ92W9L+uWqq3koJq05lGPvR2 MdW3dSeefmOPN7//snzepiinoQdh6wr4qp4PA4HTyuRvJIdigtkDkSL5xkeG2F03ujjg R5ZbmggeDrKZ33cChcWVTufzP+FixaNbq52uBOtSbqzbQU2YPcll+vsh+0wWedtbtJ8a FlQV7VPGoLqO7xEfMDoRbIbbf+dv6XaXbi83agutiTT3Zyr9BqaQL74ujdZqm8BbkW7d Qb5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=NGdzOck6; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sc20-20020a1709078a1400b00770534b5a71si15600770ejc.858.2022.11.01.21.19.18; Tue, 01 Nov 2022 21:19:41 -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=NGdzOck6; 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 S229700AbiKBEOX (ORCPT <rfc822;rua109.linux@gmail.com> + 99 others); Wed, 2 Nov 2022 00:14:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbiKBEOV (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 2 Nov 2022 00:14:21 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B309E2316F; Tue, 1 Nov 2022 21:14:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1667362460; x=1698898460; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=08W5rKKIlMXbts2FT16e7Bj9/VESAyQ7decV9eV/k4A=; b=NGdzOck6yCcD/I1pnC4CkAF2uumlx8j9jkMfS09/rlvK2sxCaNel3bYe l9otSYq1rrTgE62ADAZyiZHohcqkcyEHX8cOJzKmngiwI1+m4roUEsYkD qoYEF5LYUZhyQOPD0PC/CHoliFsNo9zIE/moritUtJv7fZjIp/hOUBk5P 2V1XNFPX1A4cfQqbL0eSXLoZtcrLnYwjCLAXEnQTijngXFFp/dRV2wmE/ ormcyuaDz4VaYupUHDvdi8luBnP+RQ9OyiUFj9OGZU35zfJMUH0D4Dkfc tzq1Vgn+Q0n8t+3kk8qfnR+l3dp3Z/IaSxp5EhTfJqOMn85UIaCE35GIS A==; X-IronPort-AV: E=Sophos;i="5.95,232,1661842800"; d="scan'208";a="184948846" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 01 Nov 2022 21:14:17 -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; Tue, 1 Nov 2022 21:14:17 -0700 Received: from che-lt-i67786lx.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; Tue, 1 Nov 2022 21:14:13 -0700 From: Rakesh Sankaranarayanan <rakesh.sankaranarayanan@microchip.com> To: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org> CC: <woojung.huh@microchip.com>, <UNGLinuxDriver@microchip.com>, <andrew@lunn.ch>, <vivien.didelot@gmail.com>, <f.fainelli@gmail.com>, <olteanv@gmail.com>, <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com> Subject: [PATCH net-next 0/6] net: dsa: microchip: regmap range validation and ksz_pwrite status check for lan937x and irq and error checking updates for ksz series Date: Wed, 2 Nov 2022 09:40:52 +0530 Message-ID: <20221102041058.128779-1-rakesh.sankaranarayanan@microchip.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-5.5 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748356595661373056?= X-GMAIL-MSGID: =?utf-8?q?1748356595661373056?= |
Series |
net: dsa: microchip: regmap range validation and ksz_pwrite status check for lan937x and irq and error checking updates for ksz series
|
|
Message
Rakesh Sankaranarayanan
Nov. 2, 2022, 4:10 a.m. UTC
This patch series include following changes, - add regmap range validation support for lan937x series switches, which will help to avoid access to unused register addresses. - Add KSZ9563 inside ksz_switch_chips. As per current structure, KSZ9893 is reused inside ksz_switch_chips structure, but since there is a mismatch in number of irq's, new member added for KSZ9563 and sku detected based on Global Chip ID 4 Register. Compatible string from device tree mapped to KSZ9563 for spi and i2c mode probes. - Assign device interrupt during i2c probe operation. - Add error checking for ksz_pwrite inside lan937x_change_mtu. After v6.0, ksz_pwrite updated to have return type int instead of void, and lan937x_change_mtu still uses ksz_pwrite without status verification. - Add port_nirq as 3 for KSZ8563 switch family. - Use dev_err_probe() instead of dev_err() to have more standardized error formatting and logging. Rakesh Sankaranarayanan (6): net: dsa: microchip: lan937x: add regmap range validation net: dsa: microchip: add ksz9563 in ksz_switch_ops and select based on compatible string net: dsa: microchip: add irq in i2c probe net: dsa: microchip: add error checking for ksz_pwrite net: dsa: microchip: ksz8563: Add number of port irq net: dsa: microchip: add dev_err_probe in probe functions drivers/net/dsa/microchip/ksz8863_smi.c | 9 +- drivers/net/dsa/microchip/ksz9477.c | 3 +- drivers/net/dsa/microchip/ksz9477_i2c.c | 12 +- drivers/net/dsa/microchip/ksz_common.c | 1794 +++++++++++++++++++++- drivers/net/dsa/microchip/ksz_common.h | 3 + drivers/net/dsa/microchip/ksz_spi.c | 10 +- drivers/net/dsa/microchip/lan937x_main.c | 6 +- 7 files changed, 1816 insertions(+), 21 deletions(-)