From nobody Fri Aug 19 12:39:30 2022 X-Original-To: dev-commits-src-main@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 4M8LtB4H7wz4Z22M; Fri, 19 Aug 2022 12:39:30 +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 4M8LtB3r4Lz42CF; Fri, 19 Aug 2022 12:39:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660912770; 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=YNVGG2FEfglKuIKvwLSIO4xaWoOiJTKyBpdZvmzrBVA=; b=VO4nCuwoYy8L9jq63BKhtTQI4JdOYgazo1qPoZq86rkktr2uU3Y3uzrPT+JWHyem01VI1P jnVIdkX+9uKxNCAGfebegp9A23sRqFi6Eo5HFk9rueJ11r2g5iA1S4RksApki+olcRMW/X nv3KZA7PJ3tFi5ZcJub9yM+z1MpRyrsCkoz+x45Xjqlewj8XNYyvlyrNZlhBukA2NjHH7I ty9ROKC9iuIRjJXZ9s6ZB077x5mEwjP0nnt9OJ90FL+ONbTNiRIUy+NhO44ExlYrhTzgG6 Mu8F+b7kSopJn5gB0ySOTPgdmqp2Hr5sJ9nYW0WiF6WgU1EEk5B7A73QkWahbg== 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 4M8LtB2qp0ztBM; Fri, 19 Aug 2022 12:39:30 +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 27JCdUcp038082; Fri, 19 Aug 2022 12:39:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27JCdUc8038081; Fri, 19 Aug 2022 12:39:30 GMT (envelope-from git) Date: Fri, 19 Aug 2022 12:39:30 GMT Message-Id: <202208191239.27JCdUc8038081@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 319a4bddb0b9 - main - linuxkpi: i2c: Fix 7bit/8bit addressing List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 319a4bddb0b991377208293283a87946e4b5d055 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660912770; 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=YNVGG2FEfglKuIKvwLSIO4xaWoOiJTKyBpdZvmzrBVA=; b=AxeGXOcz98rLIGkoW8bZjKRqiJkJGcSMzCuWGVv3u451f8yvPea79bjJ8S0RFXZlgrJx2R P+rx3eovcmzRMiIIOeDVdPkMm3XZHw1F6dcMlAu8gKkmyHZZy3s9hNrFZJe/EQlPqhyhXe zzipChtdoAq+PALfrTnZ2qp5gnYW79LZwVriL6Bx5XNTISf6qv/qF9rT1i2yk/5SsD3W1i VCCwqUZ2D7eP/TEgODLXVSFDq0lFKsQDtqfUNpRzKaOe+iprrUVZIZFtPuDWWur6+8PH+u j7QYIctyEer/4zYg9kQlmNOiRQXSNgtrZuXq8UwDZKjstRg3X1heSOA3+8MhEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660912770; a=rsa-sha256; cv=none; b=SWKWNf+EAkLio7/4cl56+oB0RZDH4RJupQWGcMvq6dpFLUbKjXobR+0gwM6v10eGRSLJXj uyHRNg1BQTqxaMrQ1YdtcEwcpO9SxyhMvzQ5KIhVNzf9yQfD3w/aB6tZnSSIKRfrjypTkS bDH8d2uVopklftcTHqXFrxq6mDblXeNj29Lgdm+zWe2z3WlN6dFDTJI0EiMTxvP3ml2qTT zUA/jTFEJ1XVMp98/MjBRD2VLy/1xk9YNB4oOb4nmuA9zHQUwXijBrSvTRnUwiXqrWHOHp EvEVeIwQ0/HS0nrOo2izs6ylW4IlZJoXqcYmbA5E7oKRTZ4AvuwCaEaA0zXe1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=319a4bddb0b991377208293283a87946e4b5d055 commit 319a4bddb0b991377208293283a87946e4b5d055 Author: Emmanuel Vadot AuthorDate: 2022-08-19 12:37:05 +0000 Commit: Emmanuel Vadot CommitDate: 2022-08-19 12:39:16 +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) --- 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 bdf381f8a032..72ad37919d7f 100644 --- a/sys/compat/linuxkpi/common/src/linux_i2c.c +++ b/sys/compat/linuxkpi/common/src/linux_i2c.c @@ -183,7 +183,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) {