From nobody Tue Jun 04 23:02:49 2024 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 4Vv5j80Fkpz5MsZf; Tue, 04 Jun 2024 23:02:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vv5j74fWMz49Bk; Tue, 4 Jun 2024 23:02:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717542171; 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=93BQRk5Gps423jPmFG8YcOunAbqSxCtDPTnT1sOvQ34=; b=evnhdDqlwaT7zUrxAf9N+YmlyNXpHvC1JRD74btmVrEI0ntuOmaf/FhdnqVB4QOgQWv8EP y3cRsTZWD/+GCAPMDrxh4HRgGV46+FVGiIsFMaFD18a1fLhWvkCDs9PWMl6ILadBYHfEcY mOhCXzch8Vj5sgJWpDKsAuieR1UNA//1hVyg10BT24Kvbge2jppDGovjouHe9vYk4Khtmy o/u/3EnsTqHO/9MwLlqva6qYFuRc1MKo6e4eKc50mpnOjEW7dT6ytxM3H+43BnqkhN0lq+ adFTfpnR6ZbwGVYYfJTIbjfkyO7SbkUr1TGvDbjo3AnBehcROp31aUV8zNbYeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717542171; a=rsa-sha256; cv=none; b=hDEM6vNs9nNQUFZYDIgO4s8LlYczSDNRCzaDTcoAfUeO9Z8vpX2bfXsGojqxt6rLU5E+XD 2pYfk3s4pabBbTbpw14VILIDAFjoehgW+5gOr3as46AOPv8S6ekX8ZRZAcnc+g03I0z5U3 Doq6exVFqh+q+mI6ut1/4ZQS2UBvePB7f5MM13tXbV91Hn+62A68cThHOtDBTeGtwzqYJV NSTH6OL1XbQBd0ouKxjwXmPchy+EPs1zX8k7nd+hKUeDMI1adgq1YKocXxCUB5HO75lN2h jP3IsT0uvwopVKpXmqy86haIDIhfIddHqgFrx0ssg5I3QvpwzJDGGHTSJVQqaw== 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=1717542171; 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=93BQRk5Gps423jPmFG8YcOunAbqSxCtDPTnT1sOvQ34=; b=LkGRVfrL9aztvC7z+K9KRn+mGaT00GYO2qEG8aUjW2vfCKpThrajAjFJ6KBYSUIHGrn5/J WLkaAUsTbkiBEdQtusJwe47ljvhKfL/h0rVT3APwIipmQQ++r7JOtOaQ6oH3pFow5rcthL vjTYqV/bmy1HASWC+oWJBGnlLCM7QmT8vjAzhBylClYOw/WnNxZovxIn/n5KT55M4ca8nV mpk+txjSkSP7T9+ZmepnFaBruI0NzWkRKq+sXaRLMngm/O/rFr/W5fhTzyuO8VTXItYXeT VKo6I+bI/3EcnvL7ZUuTTzDDyWOSmAsLRXg5mvErZ20/6cCTVy/p2NrEDvXjtQ== Received: from [IPV6:2601:644:937f:4c50:e0fb:ab3b:bf07:f04] (unknown [IPv6:2601:644:937f:4c50:e0fb:ab3b:bf07:f04]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Vv5j71FnjzNsc; Tue, 4 Jun 2024 23:02:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <1ade77c1-f15a-4e20-a8ea-29ac3a86e85e@FreeBSD.org> Date: Tue, 4 Jun 2024 16:02:49 -0700 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 1c45a62a2f66 - main - qlnxe: Fix multiple locking issues Content-Language: en-US To: Kevin Bowling , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202405280643.44S6hBkh054482@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202405280643.44S6hBkh054482@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/28/24 2:43 AM, Kevin Bowling wrote: > The branch main has been updated by kbowling: > > URL: https://cgit.FreeBSD.org/src/commit/?id=1c45a62a2f667b45ec10a92ad58ff5a34e68b569 > > commit 1c45a62a2f667b45ec10a92ad58ff5a34e68b569 > Author: Keith Reynolds > AuthorDate: 2024-05-28 06:41:05 +0000 > Commit: Kevin Bowling > CommitDate: 2024-05-28 06:41:05 +0000 > > qlnxe: Fix multiple locking issues > > Multiple issues are reported with WITNESS and code inspection of the > locking and lock initialization. > > PR: 278084 > MFC after: 1 week > --- > sys/dev/qlnx/qlnxe/bcm_osal.h | 8 +++---- > sys/dev/qlnx/qlnxe/ecore.h | 1 + > sys/dev/qlnx/qlnxe/ecore_mcp.c | 48 +++++++++++++++++++++--------------------- > sys/dev/qlnx/qlnxe/ecore_mcp.h | 6 +++--- > sys/dev/qlnx/qlnxe/qlnx_def.h | 2 +- > sys/dev/qlnx/qlnxe/qlnx_os.c | 9 ++++---- > sys/dev/qlnx/qlnxe/qlnx_os.h | 4 ++-- > 7 files changed, 40 insertions(+), 38 deletions(-) > > diff --git a/sys/dev/qlnx/qlnxe/bcm_osal.h b/sys/dev/qlnx/qlnxe/bcm_osal.h > index 5d940d3272d6..c820532c9e0a 100644 > --- a/sys/dev/qlnx/qlnxe/bcm_osal.h > +++ b/sys/dev/qlnx/qlnxe/bcm_osal.h > @@ -72,7 +72,7 @@ extern void qlnx_dma_free_coherent(void *ecore_dev, void *v_addr, > bus_addr_t phys, uint32_t size); > > extern void qlnx_link_update(void *p_hwfn); > -extern void qlnx_barrier(void *p_hwfn); > +extern void qlnx_barrier(void *p_dev); > > extern void *qlnx_zalloc(uint32_t size); > > @@ -213,14 +213,14 @@ typedef struct osal_list_t > #define OSAL_SPIN_LOCK_ALLOC(p_hwfn, mutex) > #define OSAL_SPIN_LOCK_DEALLOC(mutex) mtx_destroy(mutex) > #define OSAL_SPIN_LOCK_INIT(lock) {\ > - mtx_init(lock, __func__, MTX_NETWORK_LOCK, MTX_SPIN); \ > + mtx_init(lock, __func__, "OSAL spin lock", MTX_SPIN); \ > } > Do you really need MTX_SPIN here? Device drivers rarely need spin locks. The equivalent to a Linux spin lock in drivers is generally a MTX_DEF mutex. -- John Baldwin