From nobody Mon Jun 26 09:35:48 2023 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 4QqN4h4Tfmz4jpsd; Mon, 26 Jun 2023 09:35:48 +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 4QqN4h4336z4dGT; Mon, 26 Jun 2023 09:35:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687772148; 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=3GWs4lMLGmI7VtcyS8HFF0d4yW3vn6hN6SwRJdWvFS8=; b=TSHFkB6kiA9rD+02ZUNyncBB9TEN6kYkA0xuqi0BEfkRnn1L16KOViCwEI+3xfLtSDjQRO XkYyjGByKOiLtkSpK1IkAYF7VKlJ8UmweqsLu/TgfmdsMgd4exw8rylW7V86asQqXYtRnR nTlz/Z1lkNTVoH/k6Dvwr3gP/dKl1KPZxuekXv25THiONxl9XeOsmiRyPe/ZAV7OQUeoa3 96TJO+gfCilXLijBVulBVQUY/63lz4nxtxThpsoICwBMwTgbDv1tfWsYlWGay6BAtwCs3W 2EGp1cmLFazcu0jigb4dH/yvXvgMwGm0zMX+hmhtCRzICH0xVXqGZ/EyrMmL1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687772148; 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=3GWs4lMLGmI7VtcyS8HFF0d4yW3vn6hN6SwRJdWvFS8=; b=iug21uR8jMzSOV/jyR/hE/eCX9kjN+udLDghEAI7brU+8SG/svWTptvKVtulDV2e/imcPs dVmi4fHHoLObKP17A1nkmZBfQm+uGHO2xbP2RsVLN/mwRgi78R/uK0AwHqNT3FmHahNR6p sMiFsV7S4bWZw3Gy40lQ4M01IJBNCeTF3I5WKMr/ZsacX4OUvXk2oc6Bv6sgxJ/OtydmML 2auC9gu+bgptJnSW1T7BW/YJsuaWeeFpcrBp89EYfn1UWXdcRAuxZoz7ZulR5s+WvovkVs z2PNCFIxNgxkkho/+P/zDtMPkDDhuqi8ETggFwMPTRH3vtzsYvTEskfI3BY5Dw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687772148; a=rsa-sha256; cv=none; b=imgthNgSPN4mzu2JtyjRqbxOK7syIvX5yFZHTeCox8qTsIlgjHLqeKf77hyEpPzEZCLblM f8lx/BInKh+52oADAZgwNohHMReE5WLVA1YqflJLVhPKffogEF+X6TCDz/ZDbIQxIL4yLJ Iy5ATliDq0/r2bmWUXwy72lyGqnizZFO8MClpFNFRxKD0yrAVJDLpNIumZHzgiirtjDBeK YGshqeM6YbgH2vlc7DJKuSYx15LVHHILT4w5B9dgbCQuw10atj9L0rLwJkrzpyA1UjN1Nq gI5UYdPLpiiPPPueM7meXvRHqb/yGa87dw3w4/W1Uw1Io/+MTlfURpDFd83ksw== 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 4QqN4h2rWLz14l8; Mon, 26 Jun 2023 09:35:48 +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 35Q9Zm0X033875; Mon, 26 Jun 2023 09:35:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35Q9ZmdT033874; Mon, 26 Jun 2023 09:35:48 GMT (envelope-from git) Date: Mon, 26 Jun 2023 09:35:48 GMT Message-Id: <202306260935.35Q9ZmdT033874@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: f0c97033018b - main - sys/dev/ichsmb: Silence unhandled SMBALERT device_printfs 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f0c97033018b0741aa832bf1b79430ed73ceb0da Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f0c97033018b0741aa832bf1b79430ed73ceb0da commit f0c97033018b0741aa832bf1b79430ed73ceb0da Author: Reid Linnemann AuthorDate: 2023-06-26 08:25:26 +0000 Commit: Kristof Provost CommitDate: 2023-06-26 08:29:34 +0000 sys/dev/ichsmb: Silence unhandled SMBALERT device_printfs The ichsmb driver does not actually handle SMBALERT, other than by logging the first 16 occurences of the ICH_HST_STA_SMBALERT_STS_SMBALERT status flag. Because the SMBALERT is not acknowledged by the host, clearing it in the host status register does not appear to work as long as some slave device is pulling the SMBALERT line low, at least for C2000 chips. As a result, if a slave device does pull SMBALERT low the interrupt handler will always loop its maximum of 16 times attempting to clear all status register flags and device_printf the status register. The result is the kernel message buffer is littered with these device_printfs at every interrupt. To remedy the problem, the ICH_HST_STA_SMBALERT_STS flag is zeroed in the read host status register value, just as with ICH_HST_STA_INUSE_STS and ICH_HST_STA_HOST_BUSY. This allows the loop to break when no other flags that must be handled are set in the host status register. Additionally, because the SMBALERT is not actually handled the SMBALERT logging is omitted as it has no actual function at this time. Reviewed by: imp Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D39966 --- sys/dev/ichsmb/ichsmb.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/sys/dev/ichsmb/ichsmb.c b/sys/dev/ichsmb/ichsmb.c index ba2d993ffe5a..d5950f056c0d 100644 --- a/sys/dev/ichsmb/ichsmb.c +++ b/sys/dev/ichsmb/ichsmb.c @@ -510,7 +510,8 @@ ichsmb_device_intr(void *cookie) DBG("%d stat=0x%02x\n", count, status); } #endif - status &= ~(ICH_HST_STA_INUSE_STS | ICH_HST_STA_HOST_BUSY); + status &= ~(ICH_HST_STA_INUSE_STS | ICH_HST_STA_HOST_BUSY | + ICH_HST_STA_SMBALERT_STS); if (status == 0) break; @@ -531,18 +532,6 @@ ichsmb_device_intr(void *cookie) continue; } - /* Handle SMBALERT interrupt */ - if (status & ICH_HST_STA_SMBALERT_STS) { - static int smbalert_count = 16; - if (smbalert_count > 0) { - device_printf(dev, "SMBALERT# rec'd\n"); - if (--smbalert_count == 0) { - device_printf(dev, - "not logging anymore\n"); - } - } - } - /* Check for bus error */ if (status & ICH_HST_STA_BUS_ERR) { sc->smb_error = SMB_ECOLLI; /* XXX SMB_EBUSERR? */