From nobody Thu Oct 19 21:24:03 2023 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 4SBLLr1mcjz4xt36; Thu, 19 Oct 2023 21:24:04 +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 4SBLLr0Cn2z4LW9; Thu, 19 Oct 2023 21:24:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697750644; 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=+wqVbkE9GX95KNC4cr0kPjlWALYCCFDOQJWqpOAZWr0=; b=qM0IIEO4gCcUbP69p+5DCsJmiXqr0FEHYf+n/YJJ68+ucu+MOz+FoSeT7xNL1wTRwWta3E V8Jdj1AkacNm6ImPIV5U+oGXifHRdHZrGmpOskFVUf15xM2wkwSTsJKGoX/lcPEoqs0q9Y HUVe/VdVVjQ4WZ7A2uST2IQoE//UK/l49iTbBDhrNhH+Ehx+6iMnsKLB8i49eWbk2ByFMk rEVtina2CpEDyD+J+4nfHj8Eq4XkR822+zf4Jp95RB7eV3jAEK/TU+X+HJrUdpYvVQ7j63 E6c6HbGxfPe0wJz8Ccpj0xIEb5e3kxVXY+fz25zFfRv74aV8Q3zxEY3HK2yHVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697750644; a=rsa-sha256; cv=none; b=o9R8IwdFgJ+7BBsNES63CaXpqOy2xlEnY/nf2uNGayzTM5+5F4jwcz74juwuv1G7td1aP6 tZvVf7cNcXi2drRXI6F9FY4okDmji8XOhGjAAW2JE+obVshTVw8OjSV9hU1yfpKkU+F9vM lGUcDjRbT3Qqwn0C9FE5dIxoV6xAfyIBP4Kb3dv3lCKdI3J8hJ439JntbTEqUenx+Iv/AX iONGVD5Hup/AwU2G5d8SOdgXWkxFFBbP0yReIrAJtRLY9g5ajM64gs9kNxe6Si18/5ZwRa APegXzjV8YWz7x8C2eKtENgL/JgGpqMwZcd4b3LO//BzutWBybViRJi87OGJUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697750644; 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=+wqVbkE9GX95KNC4cr0kPjlWALYCCFDOQJWqpOAZWr0=; b=RPPo5IKMzB2PvKvnbRAy5D0ehkOxwIpKanqkERnkr5G1tQ/g0dhqs6lNQqcMhyXX7qU+U2 0MREBekgYemYSq2cRQmOIPN+B6o8rPzKxpzQGkzjI877AV0RXZkRyGGG5h6TXYxO/BfUFp NnWl9UZREScC5su0pwYLjY4470yKoyrhdoiyfRVPWNqYFPxNMdnqlBkDcpwYK03zxDgBoG shKt5JN9FhRhFbJp47goy5aBgzUlEKxAykDh+0YL6E48UUcRMcaD6BhEZah/0ui7I9d7BQ jlq79Epi0OZe8dIsHrWW3BrXN3hekcriCK/ec02/0KTQ7nXBoI4HkNcY6TXWpw== 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 4SBLLq6PQyz15f3; Thu, 19 Oct 2023 21:24:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39JLO3IP076740; Thu, 19 Oct 2023 21:24:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39JLO3bK076737; Thu, 19 Oct 2023 21:24:03 GMT (envelope-from git) Date: Thu, 19 Oct 2023 21:24:03 GMT Message-Id: <202310192124.39JLO3bK076737@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 01619a8fafcf - stable/14 - smartpqi: Change alignment for dma tags 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 01619a8fafcfd99d1811b2c14a92bac1a48c6d31 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=01619a8fafcfd99d1811b2c14a92bac1a48c6d31 commit 01619a8fafcfd99d1811b2c14a92bac1a48c6d31 Author: John Hall AuthorDate: 2023-10-19 03:25:32 +0000 Commit: Warner Losh CommitDate: 2023-10-19 21:21:11 +0000 smartpqi: Change alignment for dma tags Problem: Under certain I/O conditions, a program doing large block disk reads can cause a controller to crash. Root Cause: The SCSI read request and destination address in the BDMA descriptor is incorrect, causing the BDMA engine in the controller to assert. Fix: Change the alignment for creating bus_dma_tags in the driver from PAGE_SIZE (4k) to 1, which allows the controller to manage it's own address range for BDMA transactions. Risk: Medium Exposure: This reverts a change first made to support NVMe drives on Excalibur. At that time a 4k alignment was necessary. This no longer seems to be the case. PR: 259541 Reported by: Ka Ho Ng Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D41619 (cherry picked from commit f07b267d8cc87e88be3c78aa69504b5ebc6571ee) --- sys/dev/smartpqi/smartpqi_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/smartpqi/smartpqi_main.c b/sys/dev/smartpqi/smartpqi_main.c index e79a6f0a173f..402841bbf4d6 100644 --- a/sys/dev/smartpqi/smartpqi_main.c +++ b/sys/dev/smartpqi/smartpqi_main.c @@ -629,8 +629,8 @@ smartpqi_attach(device_t dev) * Create DMA tag for mapping buffers into controller-addressable space. */ if (bus_dma_tag_create(softs->os_specific.pqi_parent_dmat,/* parent */ - PAGE_SIZE, 0, /* algnmnt, boundary */ - BUS_SPACE_MAXADDR,/* lowaddr */ + 1, 0, /* algnmnt, boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ (bus_size_t)softs->pqi_cap.max_sg_elem*PAGE_SIZE,/* maxsize */