From nobody Fri Nov 26 14:25:02 2021 X-Original-To: bugs@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 D154A18A4B85 for ; Fri, 26 Nov 2021 14:25:03 +0000 (UTC) (envelope-from bugzilla-noreply@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 4J0xpl0FG4z4cyQ for ; Fri, 26 Nov 2021 14:25:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 089CD1E51 for ; Fri, 26 Nov 2021 14:25:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 1AQEP1sW080546 for ; Fri, 26 Nov 2021 14:25:01 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1AQEP1tb080545 for bugs@FreeBSD.org; Fri, 26 Nov 2021 14:25:01 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 258994] iic(4): Panics on Nanopi Neo when using 16-bit device addressing width: panic: Assertion strlen(description) < MAX_W_NAME failed at ... sys/kern/subr_witness.c:1914 Date: Fri, 26 Nov 2021 14:25:02 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.2-RELEASE X-Bugzilla-Keywords: crash, needs-qa X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? mfc-stable13? mfc-stable12? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1637936703; 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: in-reply-to:in-reply-to:references:references; bh=Ehrms2vVklEwXwTEcnR7T30570CdAndnflxvPTcG8Tw=; b=Wbl5koWw+G8zEyGKf+ODubyHepqwFVvCcmqjjpnft/UJ1bsRomTJGZJ3NFJyxklCYdFaFT MRN4bVdmtz1gKHDf8d8cLi20sjecqYpdYTmIXLYeOhE4AcwXAkrQ7cUhlkeHMX8J4uAav2 RBEkNU3Tt5g8hK8+IGQ0qPq/qhB34ysB0gakLcGxtxqu5U7al4S3E+ASkUwYoD0E+D8tnE 5CcNFtfINYf8+fj1eayGy/I7NnsVrU0perZdmsC2SpnxCdHe/8Hr9neCRkoXcjmFz/EHlV yz9WR3cR2PY2RCxZadr5nwiCu1Faj+JPEwhamhQJ5lylidI0NOL2qP4bzVsttw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1637936703; a=rsa-sha256; cv=none; b=IZ7Rk9NVy2L+5tdPhKwZ3WDZwHEqI5BMkodCTPxgOIlQIcdrc0/VwntAQRAkeh4IQtOM78 j/oTmLqygc0DyXk7zoxji3zYeJzzzjFM7FxGZ9P2y7PmySO5bO312iSI1p+rUtchKCbMOk RJnI/KOtmXtra++NMU7X1XDhREe4XPRgJOzYbrEE2Q+mShvsMf4jZiqhB5KpauPNUrxl1s BAKEsY4Yr8ratHUzfki4HoEl6mpS6sOaBKB1FCZAdIB5CxiJQMx/wuIWmP6YEcH0/IkNsO Ye9NWMr1Gggll7mvkyQyKj4P3klPcttvg2DFyX5nYaAz/KzgPbtqvBGjLORwhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258994 --- Comment #18 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3Dff1e8581806f70e54fecddf8a6a23488d= c7b968a commit ff1e8581806f70e54fecddf8a6a23488dc7b968a Author: Andriy Gapon AuthorDate: 2021-11-26 09:48:21 +0000 Commit: Andriy Gapon CommitDate: 2021-11-26 14:20:27 +0000 twsi: support more message combinations in transfers Most prominently, add support for a transfer where a write with no-stop flag is followed by a write with no-start flag. Logically, it's a single larger write, but consumers may want to split it like that because one part can be a register ID and the other part can be data to be written to (or starting at) that register. Such a transfer can be created by i2c tool and iic(4) driver, e.g., for an EEPROM write at specific offset: i2c -m tr -a 0x50 -d w -w 16 -o 0 -c 8 -v < /dev/random This should be fixed by new code that handles the end of data transfer for both reads and writes. It handles two existing conditions and one new. Namely: - the last message has been completed -- end of transfer; - a message has been completed and the next one requires the start condition; - a message has been completed and the next one should be sent without the start condition. In the last case we simply switch to the next message and start sending its data. Reads without the start condition are not supported yet, though. That's because we NACK the last byte of the previous message, so the device stops sending data. To fix this we will need to add a look-ahead at the next message when handling the penultimate byte of the current one. This change also fixed a bug where msg_idx was not incremented after a read message. Apparently, typically a read message is a last message in a transfer, so the bug did not cause much trouble. PR: 258994 MFC after: 3 weeks sys/dev/iicbus/twsi/twsi.c | 85 +++++++++++++++++++++++++++++-------------= ---- 1 file changed, 53 insertions(+), 32 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=