From nobody Wed Sep 07 15:10:43 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MN5Kv6ZrWz4bPWQ; Wed, 7 Sep 2022 15:10:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MN5Kv5qmzz3bPF; Wed, 7 Sep 2022 15:10:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662563443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FxOeS6rsf9sqFZcqPMmnLxJYnS55WOkyqOV4t5yhBR0=; b=w9cLaPGEivaxj5UkY8lxHgqxCEE3NsWrUKjzZdCm/XdZMpFNaozLzhSncaDhHjV+8ggMDS bWdSC2qGrSUzp0IoeKx85BiQTi9PZ1b70VBJ1YtunzUn2X3fIE/xLl4HtR6BPNfGKuZWH0 9dMRJfAuvSxj8MnPOgJ+204UUNnOF1zomohX9Xw7U3hbahPicRb+Ryl2Qh8rl8oMefIoPz pgYzY/ff0B6KKDOHKKDOa34dXlQfcp65XZmyuieOXhe4UWZ51UlIYc72ANdwT4vEF6o4kG usrUOwRBxMdJ2r490sEY+++ZqbM+sjCGko3kEmmRZoGltsbzgCbl/SVb3FUdyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MN5Kv4lswzZ2Y; Wed, 7 Sep 2022 15:10:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 287FAhn7027935; Wed, 7 Sep 2022 15:10:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 287FAhpp027934; Wed, 7 Sep 2022 15:10:43 GMT (envelope-from git) Date: Wed, 7 Sep 2022 15:10:43 GMT Message-Id: <202209071510.287FAhpp027934@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: f22498bb4b48 - stable/13 - linuxkpi: i2c: Fix 7bit/8bit addressing List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f22498bb4b48ec4b8b8041367aa80099ec0caf26 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662563443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FxOeS6rsf9sqFZcqPMmnLxJYnS55WOkyqOV4t5yhBR0=; b=taLcSK56rW3Lht0JfViDjmO4ivtN1YKEjYdC/5tgOQyWHfZY7Kj9jGS92pwEgKtp6nFm9O Qn6ZjJnhdRKTWWO4tyviID/+b0TLtjf+7vJggShi7cbgylkJevmA9ATgsEez2tdkL69xcf tL0FAfuTrQ9YWLX/YmZsAy5YevmQWIoQWtG1atyFPpAY6Eveb6AKgcZNguQjFyQU5YwVqC pEg56fyGsqoo//xK/LiBsbD/NpO9tytU+NAFg4AQIOWgqh7UIt50n0Fa+R1iE3KcOnlM8y zKj7PRIKa6ZnpaDCCSsOEsJlvxleTIaKIPFBB6htB5pVWGioo3x3ETwroQ7rZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662563443; a=rsa-sha256; cv=none; b=O312yIKQKABac0+kndQn5iJW++jSD2KWDEhybIqy+QF8Qr5W+7tzaWC/huaKkGQ70wtgRD +NUXr06eR7KcH8e2QeWtMugZW5rlY4ecMryy5ccvGwiRhrLCO3rfCok93NbCcD57iZajxu MYAVEstF9MwxBuQBcgVNC5oqrfj7izx8i0xPxzGpnW+DNwr4Q2yjBdxxQWpLPTEFB/0tWN QhWji9uSkn/mloGbmn7UBn//N6icyYdZ864258aGcSKXUPxNhdFz6j6IbRRlbAMGE/ApSb bCHUk8t92Jk5K3m2NnK5B05QrOH2zRaMXmQ61TuC9Xiew429I2QFKtfzg/GOsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=f22498bb4b48ec4b8b8041367aa80099ec0caf26 commit f22498bb4b48ec4b8b8041367aa80099ec0caf26 Author: Emmanuel Vadot AuthorDate: 2022-08-19 12:37:05 +0000 Commit: Emmanuel Vadot CommitDate: 2022-09-07 15:09:06 +0000 linuxkpi: i2c: Fix 7bit/8bit addressing Linux is using 7 bit addressing while FreeBSD uses 8 bit addresses internally, but i2c(8) uses 7 bit address. This confused me when originally doing the code and I thought that 0x50 was the 8bit EDID address while it's the 7bit address and since I did all my testing using this I didn't noticed the problem. Reported by: avg PR: 265920 (somewhat) (cherry picked from commit 319a4bddb0b991377208293283a87946e4b5d055) --- sys/compat/linuxkpi/common/src/linux_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_i2c.c b/sys/compat/linuxkpi/common/src/linux_i2c.c index 80b47a74c2e5..a94ed630ab73 100644 --- a/sys/compat/linuxkpi/common/src/linux_i2c.c +++ b/sys/compat/linuxkpi/common/src/linux_i2c.c @@ -185,7 +185,7 @@ lkpi_i2c_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) M_DEVBUF, M_WAITOK | M_ZERO); for (i = 0; i < nmsgs; i++) { - linux_msgs[i].addr = msgs[i].slave; + linux_msgs[i].addr = msgs[i].slave >> 1; linux_msgs[i].len = msgs[i].len; linux_msgs[i].buf = msgs[i].buf; if (msgs[i].flags & IIC_M_RD) {