From nobody Fri May 13 17:58:40 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 7375C1AE8E38; Fri, 13 May 2022 17:58:40 +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 4L0Gbh2nS6z4Ws1; Fri, 13 May 2022 17:58:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652464720; 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=to3qFnPTeMSVL+wTuJ55/KtBl3fdJSzO9xuEXbplrmA=; b=bv9TPf77PMYBHkS9yz3CUKlyM/bQZgdrkEGu4nhb1npLVZBVUIWtHJ4IZO7vPIYPHLaGvq TfS/reqq7Dig+CiYiAF5zDjKK1+yFKFhy1HlLkNC3t4sxeK4jvc3QYXYJ3oD3GD70UF525 QD/tMelFcGUGRANzUDq3X0Fy8sTy17rFgARL9Kz+2jKzTa0E1Vf+TD1Fk/gmUfS4eIVW5+ gi2bNHpxSnwhrVvFiuO5TlgFlIpdAkoh3Ke7r/urhQO7RpsMrQikjag4vT+f9G6zFRH22L BmpdZS6NbiOLwKDPTYuVfR4VDNGtQVHZ+gJTzccIUUv0SnJKhiQ9Z32vhuKC1Q== 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 3F9F4271E9; Fri, 13 May 2022 17:58:40 +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 24DHweJf069369; Fri, 13 May 2022 17:58:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24DHweU3069368; Fri, 13 May 2022 17:58:40 GMT (envelope-from git) Date: Fri, 13 May 2022 17:58:40 GMT Message-Id: <202205131758.24DHweU3069368@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: ad17102e4edf - stable/13 - isci: Propagate error from bus_dma_tag_create. 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ad17102e4edf46140f4a0b874803097c9a5839af Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652464720; 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=to3qFnPTeMSVL+wTuJ55/KtBl3fdJSzO9xuEXbplrmA=; b=k+JCCpeiEC9sK/InpXrQz1+DOyIY/2akK7ZhvbS1D94dm3FT51I0vU4AMaclXnJae7OLKo ZjHOuSZH95EPr1NIbaGo2pfkAsl65lN2RsW6w9INa4M/VsKvQtJ3u64etlmDetoy+MguXu 6XgCHO9WK+Pap04/L9hM9dv3GYCxDh/ooRW8tDYS1B78XYaOH1nuIWd6YUup4w4yxrGOD+ sdAjvcdLJ8TBMyvBS0n3IBYvY5dOkO/2Ug1njVjfYx9A1q2l9PYnxhS/cukbeA9THhEME1 skd/Kgx5VZ2oPiFEJDW1mYfRDQZyyZXNG5UD3aGXQAbYfTBJzbhHjar1vpDMjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652464720; a=rsa-sha256; cv=none; b=GqGDL5rbJdoh9DKiB7juUx6392Gq9NGz6vLDaOk8uFhmo32sWjZRnuc4iCSL7AXAb3AaND 8nGTo+9MGaSuIY3kHGO4gG8p312ihAgnB5v9PtJIw+DiVp/Ej8+a7SFoKhGKdo7bGwzzOX P9zm+0vvXQjcvF262Do9QgqOtssPTIyClrmhsbM4tGg7hPXZfmqPexioivKHZJRMmuTSnI 4c1iowzEKgqiQZ8CpL0XNpnmo9HAY0UbK6V/U2d9dq7zur26YapWbbnkUabauoP4O7CRT4 JtLmJpLYrdZ/vf+O3Joi1E+CgjwUsiiiEOki7ogT1bJ8riu1aFUhXiDMwTnkFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ad17102e4edf46140f4a0b874803097c9a5839af commit ad17102e4edf46140f4a0b874803097c9a5839af Author: John Baldwin AuthorDate: 2022-04-06 23:45:28 +0000 Commit: John Baldwin CommitDate: 2022-05-13 17:43:02 +0000 isci: Propagate error from bus_dma_tag_create. Return error from isci_controller_allocate_memory if bus_dma_tag_create fails instead of ignoring the error. (cherry picked from commit bbfec32d156cec4c004f6f5148a074ba5f0a294d) --- sys/dev/isci/isci_controller.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/isci/isci_controller.c b/sys/dev/isci/isci_controller.c index 9848f1bc8302..0c4773193e45 100644 --- a/sys/dev/isci/isci_controller.c +++ b/sys/dev/isci/isci_controller.c @@ -412,7 +412,6 @@ int isci_controller_allocate_memory(struct ISCI_CONTROLLER *controller) int error; device_t device = controller->isci->device; uint32_t max_segment_size = isci_io_request_get_max_io_size(); - uint32_t status = 0; struct ISCI_MEMORY *uncached_controller_memory = &controller->uncached_controller_memory; struct ISCI_MEMORY *cached_controller_memory = @@ -477,13 +476,16 @@ int isci_controller_allocate_memory(struct ISCI_CONTROLLER *controller) * will enable better performance than creating the DMA maps every time we get * an I/O. */ - status = bus_dma_tag_create(bus_get_dma_tag(device), 0x1, + error = bus_dma_tag_create(bus_get_dma_tag(device), 0x1, ISCI_DMA_BOUNDARY, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, isci_io_request_get_max_io_size(), SCI_MAX_SCATTER_GATHER_ELEMENTS, max_segment_size, 0, busdma_lock_mutex, &controller->lock, &controller->buffer_dma_tag); + if (error != 0) + return (error); + sci_pool_initialize(controller->request_pool); virtual_address = request_memory->virtual_address;