From patchwork Tue Jul 30 16:11:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyle Swenson X-Patchwork-Id: 13747595 X-Patchwork-Delegate: kuba@kernel.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2070.outbound.protection.outlook.com [40.107.20.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 56E4218E02C for ; Tue, 30 Jul 2024 16:11:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.70 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722355874; cv=fail; b=ZsRhEwHhSvgWpZhuZw/+b/mjKYmDRO3w0hxeIXvVarZ8Pji3qCp/BReroVhOCom+lioX2VQkoQnJw+VKofpAb7nkKpmLjkI+VZ9P8PZN7bIJJmmPMB/RF8Dwe8mSlS5gpHTI4yhQhOCWNjwadKtHcaKiCdgXgLaXIRhwaZSprhw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722355874; c=relaxed/simple; bh=uRauevvw28x06KZ5kQgsnEjO13GO6xfQeMFuh+YwA9M=; h=From:To:CC:Subject:Date:Message-ID:Content-Type:MIME-Version; b=vD5g1dcpSt5toPaOcLMPGEiocz0utwx4oRc74LqdTu7GLC7fmZPyptwflysJERfLW8je9yhFsxZkp1qY+jVIQVjFbOArElniCpYA2Ap9TX7EF4rgZjE91l7uy5LvKeFQKDKvLVtsIv4Wwx+ZYc12N1Q7J6F1v0SzDvEORp8B/p0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=est.tech; spf=pass smtp.mailfrom=est.tech; dkim=pass (1024-bit key) header.d=est.tech header.i=@est.tech header.b=BfROseZG; arc=fail smtp.client-ip=40.107.20.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=est.tech Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=est.tech Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=est.tech header.i=@est.tech header.b="BfROseZG" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NHUOAa/vuHTwKYu4At45LfmyA2muk7Rgy50P5N2Bw+Fx/ARy3/+erojcft7P8rvb95TxfupoxPe0fbE8R1Te3/K3zE9a9JHhldPdauYKP6IupzuiSLIvQzal/FHH5egXigSCzSke5QFtUyr6gU/fISgSCv7YTq7YjoznXj/Pj2GSxfgCmQy4uGlrOOBlA5gvJ3NJgvLET4OJlFCA3hP1CqhXrOU38zebiOFx1azDS/rtB+uszbMszRE03sbgnxlaONjrAp0V7vEEvRHIlVB2qOgKH5G+Tb/PufEx/X3H5pqZMrUcHevR/P+9MojMZ9ql91buQwsI9EgRA3plGDMncA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=70qoYuf0iV0VuAHBpmnYWsBuQDEsvsuNvJOaJuWxitI=; b=f+LTSi/w8E/8BYgQ9j1k/+H44aTX5nlZwhdy2UiiJcZ9Q34o3SToY/w/b3hDzqmydLENFi60AJ8UJGwT9grdoO8Q+Ib/lN5ONW2Pn2qUa14KeBl+P496JJLN8XUW4kuN7sXcO18r4TuTAIMmwEwLsWv7Pkzj/suw55CEMbPjXFL+VMeaCM43IYuKdC3t5S5EdefD1WfONPLaGDV+JFHhO287ytJp/meFyOuVgUb4h1b9Dy/YN0KcCMLnQc47GUfTS80fNUZViFTW5nPjT3/FC0Nu7FNxIECcZ4kKzOM0jaZc/js/yJzKA/8azGg0RPkFCtbvWvNiwkHPZLRjAOk0RQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=est.tech; dmarc=pass action=none header.from=est.tech; dkim=pass header.d=est.tech; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=est.tech; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=70qoYuf0iV0VuAHBpmnYWsBuQDEsvsuNvJOaJuWxitI=; b=BfROseZGo/MQYbXQ98PJIOzjGHkEf++6Rviy5t0bFRpfdIb6OLrft8LhZsfizlmLEbhlwKdTcQEw9sz4zsVV7mHMa+XaOr6N/EOoN0y+81KP3++bomee5Wc8/vfM7AV0hosJ5zs90dbUp28pCKtMXQIaaVDKmVYoWIzrhnXFyzE= Received: from AM7P189MB0807.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:115::19) by AS8P189MB2223.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:570::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.19; Tue, 30 Jul 2024 16:11:08 +0000 Received: from AM7P189MB0807.EURP189.PROD.OUTLOOK.COM ([fe80::53cd:a2f6:34be:7dab]) by AM7P189MB0807.EURP189.PROD.OUTLOOK.COM ([fe80::53cd:a2f6:34be:7dab%6]) with mapi id 15.20.7828.016; Tue, 30 Jul 2024 16:11:08 +0000 From: Kyle Swenson To: Kyle Swenson , "o.rempel@pengutronix.de" , "kory.maincent@bootlin.com" , "kuba@kernel.org" CC: "davem@davemloft.net" , "edumazet@google.com" , "pabeni@redhat.com" , "thomas.petazzoni@bootlin.com" , "netdev@vger.kernel.org" Subject: [PATCH net-next] net: pse-pd: tps23881: Fix the device ID check Thread-Topic: [PATCH net-next] net: pse-pd: tps23881: Fix the device ID check Thread-Index: AQHa4psWZOlh+SNemkOo5ar/c6pbhg== Date: Tue, 30 Jul 2024 16:11:08 +0000 Message-ID: <20240730161032.3616000-1-kyle.swenson@est.tech> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=est.tech; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AM7P189MB0807:EE_|AS8P189MB2223:EE_ x-ms-office365-filtering-correlation-id: 93346159-4fc6-49de-0a02-08dcb0b23911 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|1800799024|366016|376014|38070700018; x-microsoft-antispam-message-info: =?iso-8859-1?q?gjZ09bJw+ycbVJch4Jxv0i1XvE?= =?iso-8859-1?q?ZMVCBcBKqjIMq/VhDz4DWZif/GED8u8ScuOXWm1abU0NTAoIqI4CeFSfze0H?= =?iso-8859-1?q?3zRjVZEfVMNBoxKN7uj2SWfwKRlIHGaZDVnP972J2xU/q3+Ut/wXUNbUzWtb?= =?iso-8859-1?q?ep8MuXsFgKdIlJ4wCSyflC7GAFVkt2n2xnRjdn3LCAtB23JVpL4KWdmNbLuY?= =?iso-8859-1?q?DIH73iaFTy2OIoCFhNDkoSW2wvY3M2RNFVVMPeycaGea2QsIkkfBqapomDNU?= =?iso-8859-1?q?pfJx8T/VoJYgX5KXJQpnsQeHnyQVT5rw64xz2wzLZO3NufhA7wHiLNrqTJCr?= =?iso-8859-1?q?bUz6Ou+8Rq3lxcSX76T+rgOpEsKSHsvQIBkHnNOQtnu6XETikh+BVbPlV+Xk?= =?iso-8859-1?q?om9wwQGEGx+29l1PCjOomEay+9YlFIbmol5S24Zq5Jr0qDyrkXdjs+20BIcE?= =?iso-8859-1?q?+VY79UNX6N3F9sz+i/ls9Bc92AzDH831Zm0MP0Y/UbCkuV+vHm095pJQccMk?= =?iso-8859-1?q?v1YqjmT5s53T23HmTXgezmWtKGAOhhRRyuVLbf8UVhVGRq7g86507QW5Fc1K?= =?iso-8859-1?q?Axse2wZyJ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efront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7P189MB0807.EURP189.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(38070700018);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?+CpKVINOcNgvHJ2oQ7qXbQj?= =?iso-8859-1?q?FarMdb7pIMGkGPBJRBXxv3C1E2PFDalKL4CVbckyXsme+B/XHCQXy1AwOnW3?= =?iso-8859-1?q?8tkkRdAPqwyOJSbGtE5G4aPO2afG6MQ+qxAA2aMIpXG1IIM+kF667iroiDBT?= =?iso-8859-1?q?a8pA+qtxBjHt/Ee0bw6Rq8ZPYL/csei81eRMgQ1WjyBsVDXvbtA3uMRA8Uxj?= =?iso-8859-1?q?3kPJyvTYSSC3s0ZiGcY4jexjiLQ9jekhFT4ASgBQWPe6yoIs1SvEJJCCe6eL?= =?iso-8859-1?q?UeJ5uvRlgJIVGyxnKOgIzQVwFlDnkDPwrmSAdvTz/9bc5MjfiKzMgVl/aNG4?= =?iso-8859-1?q?VfnuVcqV1YERuyE0PPJXMPxioctLnoWaXyOBxvuDQi4yQRfKkI+0aLd/oFt+?= =?iso-8859-1?q?VrB69X8TlAyUpRO+8/FM06GSBeCGbJzqj3An81qsG7UaXl8/KrlxkTWlTrzv?= =?iso-8859-1?q?SPOFNtQfXI8Mi+pULPrcmLcxKvZaBzkNobhE+mWo5G5+6TVn0gnsJPNM09tP?= =?iso-8859-1?q?CDSfKCocSYf1D9r4NmxSmcU3wfdJnz3NkbnaVQurdXKUYRoxm8u9zda/+kyP?= =?iso-8859-1?q?iXHQAbtrvWiWF2HGwbJwClWclRwsV4N6LuN+XWN2UO2zWDouHKkVSR3UfHZG?= =?iso-8859-1?q?BxE6KJP8SaFUl7Eoww5JF+iIWKA67w+jn0hqFfKzice4VUcVvkFIc5iDNr16?= =?iso-8859-1?q?VVuFEvjVqlqUXEFCmtxjiHBglvb4mLk/8f8gUHBY2kGyt4xx9GBxggQy87C7?= =?iso-8859-1?q?bWYDUUAa6IV8iT2fSuCm/SgpPD0Z54jFS5SoCtfvu3VSFSt31LiM9NoTwM25?= =?iso-8859-1?q?xM1BP9RAjdVuBSwNqgzNj/evL1TjxRMkHkFQPSzkx2qhCG/0M+9gHFYUeUN2?= =?iso-8859-1?q?vAY22rvLvbN+NzdmKivCy6MDrRMvUWsZh3Fd6oP7RCkKsATSeRQxaYQiSmKa?= =?iso-8859-1?q?nD9GDgxEYWnaNEAcgCKQTEQJhhuMbyr0z2rYgM+BjvO6bfFMfpremjMjAgfD?= =?iso-8859-1?q?vuf9jeJ+h985GLnM1eYvTp3BQGPDACxtBTxp+NMX4pxqbo52OFsh+VbT8YdY?= =?iso-8859-1?q?wGGHgTRgwBu9bXsFc9bQLeFCgfyV2kRDGbuL37gTWiJaMIa/JgnyvC4uYMJt?= =?iso-8859-1?q?yQcyXIkBF6KZkK7XiVixFAeUNearab83lppjvqO6hGg+IvXm5yINoQA6+/q8?= =?iso-8859-1?q?bYkUcZuxvS8DHe3pgQojrEEdf/Sna+5TY6Tg8N8yO+JsqvWR2X7EGued+ext?= =?iso-8859-1?q?njTUB+jcRNiIpfLbh5L9ANHGA0nxuJOE9pj5a/MD35iwgdp1KTk8qofFGTcO?= =?iso-8859-1?q?SxhwPDljjSepRIaDgEcqBCxG+MmGkmaSH77WdeBKczDuFGuHjN3pgQreQcQY?= =?iso-8859-1?q?2aGO83la7owTeH9OZkNFkLRkFX0qKW0jRFEIhSatQHJOoAx5RY6hNFmjowyn?= =?iso-8859-1?q?MCUNolyxvjS8Ng8UNOtSOKgheQgZRXaGkMpvqmv6k6sXfUmz6v1GzlHoebee?= =?iso-8859-1?q?gputeHJV8N0s+G+kIWEyJGBaAPcWGmDrUvWAKyj26hyQVbUkLnl21WnxclEA?= =?iso-8859-1?q?XTtFBkbQiP8FwUP8YVIVu7+KUN3R9Yd1eZTI5ks2MXKLWvkM52JHVgj83AA9?= =?iso-8859-1?q?66fh5pVoJHhIAsRCu?= Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-OriginatorOrg: est.tech X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM7P189MB0807.EURP189.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 93346159-4fc6-49de-0a02-08dcb0b23911 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jul 2024 16:11:08.7333 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d2585e63-66b9-44b6-a76e-4f4b217d97fd X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: zScKow6pqlrPdShJe2ztcoPXuw7clxFuCosAsv5gjnj49CoWc2S2g2eLznovA8tN858ThO4uVQHkyz2Rh1u4Ug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8P189MB2223 X-Patchwork-Delegate: kuba@kernel.org The DEVID register contains two pieces of information: the device ID in the upper nibble, and the silicon revision number in the lower nibble. The driver should work fine with any silicon revision, so let's mask that out in the device ID check. Fixes: 20e6d190ffe1 ("net: pse-pd: Add TI TPS23881 PSE controller driver") Signed-off-by: Kyle Swenson --- drivers/net/pse-pd/tps23881.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/pse-pd/tps23881.c b/drivers/net/pse-pd/tps23881.c index 61f6ad9c1934..bff8402fb382 100644 --- a/drivers/net/pse-pd/tps23881.c +++ b/drivers/net/pse-pd/tps23881.c @@ -748,11 +748,11 @@ static int tps23881_i2c_probe(struct i2c_client *client) ret = i2c_smbus_read_byte_data(client, TPS23881_REG_DEVID); if (ret < 0) return ret; - if (ret != 0x22) { + if ((ret & 0xF0) != 0x20) { dev_err(dev, "Wrong device ID\n"); return -ENXIO; } ret = tps23881_flash_sram_fw(client);