Received: by 2002:a05:7208:2202:b0:86:316c:7444 with SMTP id s2csp677833rbb; Fri, 31 May 2024 14:38:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUxrQz81KHAKh9TGrN5lua/JvgjlXJpt5YXdI02aKgXkRTzvyG9kH7rKHF1qC/u+ci/JnC0STDGLBlx/+NmvXhpBI/1ehb40/lxf9PslA== X-Google-Smtp-Source: AGHT+IGtpdOCKoPrlyl+L6HcN+tmQ1/JQ3ZZkgp2WoG1DFC7VQt1DW//rUkr8bW3ZqIzF3CzTyUY X-Received: by 2002:a17:903:2b0d:b0:1f2:f5a3:9c98 with SMTP id d9443c01a7336-1f636ffe94fmr38089485ad.1.1717191501644; Fri, 31 May 2024 14:38:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717191501; cv=pass; d=google.com; s=arc-20160816; b=lvY2JzpO5MMlitBdZw4m8rS65SmGQSVEQRYGgVafBNDNpAIhCd68/9u/YSXDbHdhCC lYUkU2vxcrrJ0TWeUP1tA44+Ql+vXpo1pg/6ujm/+xKtW9cSgZqSYiTZYZvaces8t2kZ 5FWDAg58RJWMRIuRuX+WBQabTexEILj3VjhnHcCpo1ANtuTEyO7gpuOTRzM4KM+m9lYp qpPK3uS2kCmTjFJGb8U5a6+PJ2V0ew7NiIBVNgn6w1VGxdt/Pfxy4EtUArvRrXwY7Tz7 1L7PV1lylyrf1BKhbK6uVJRl5guKeLNEYvMxEgUckOLj0p+UDYeI6rYCaCeXVucAdC/x s8Xg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:dlp-filter:cms-type:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=4UCeOpS2gxGOtZ2m/Twam0+uQamLCIEw8CzQlgjVKts=; fh=d1Z0/gPqsOB/iNFBH3aWaO73QtKRDfBo2XS9G+3+VTo=; b=i19gFNZGqWt9olm68FUutpTMmq2akbH/MJlibn0bXRYFTCGsqQ4DxQnyARGMgc2FBd zNp+9TdIkQCr1ATwaBBTsq+aU89up8TIgSEb9DO1OUook2MkCuJIUPaGDOOMOqeZkD74 T6vle1EvD9kYYBem7XSA3ksAjV/5Xr2hrW75IJgTqcFCiMRJUCfeB8jamnOn4LQbP5Cl sgc91d9Yvc+8WkNv+HlbnF6zc5BobLZFRoVAnIlTP2p3OaKeHL3JkjOg92cxqmZIhrzf VjgU9JKjHUm2mS1jjJo+3/KsCZ4zHQUR6lLn3yYknTFjUZAltink+KIo1INsNfMHILG6 YJ9A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="tEJLx/Cj"; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-197512-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197512-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f632416a29si21954695ad.564.2024.05.31.14.38.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 14:38:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197512-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="tEJLx/Cj"; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-197512-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197512-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id DCAFBB25F4F for ; Fri, 31 May 2024 21:34:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 62CE680626; Fri, 31 May 2024 21:34:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="tEJLx/Cj" Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB24378C90 for ; Fri, 31 May 2024 21:34:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.24 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717191272; cv=none; b=Wmh/tRcZEfBfEn5ZGyB9Or4EaIBuo3VV9AHQYZOlNM18Z8ayMUmZCjap/KR97Vu4+/92Z6Sn/shx44xcmEeK4Hrwh7mNSXfAIqFSSrplESDe52rErXREMRmvDi174UEfmbS/Vjwjw6OOAlIe9+e6D8R6DKbmxy2L26IACnBMKoY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717191272; c=relaxed/simple; bh=Y7uG4pwdtEkmmnK3J+jlUy6sLyQYuEF3zOYH+EVSXTg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type: References; b=aYjegEHVWG1auym9d4ePEs/RzoOcLxj2gKMAH6LpPEAOxZBqnCJxgD3QbtK/YnDZZnQSvG4V94HFd2lvPwI/fmNXGe07Esmf3glu8xaSCdsL7CkzWyMEgSJXvXCB73/MQD1QOGrrMe/FadfQ2PGTDivQCwDiIsLM/xfnbuCLKCc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=tEJLx/Cj; arc=none smtp.client-ip=203.254.224.24 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20240531213428epoutp018b72f473e56b41d259342f5a3ae7613c~UsFw5p5X32372223722epoutp01f for ; Fri, 31 May 2024 21:34:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20240531213428epoutp018b72f473e56b41d259342f5a3ae7613c~UsFw5p5X32372223722epoutp01f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1717191268; bh=4UCeOpS2gxGOtZ2m/Twam0+uQamLCIEw8CzQlgjVKts=; h=From:To:Cc:Subject:Date:References:From; b=tEJLx/CjtPh421bp7xcbwpwM7KBoD7UMjHnCmGlBKTPAHdND/DX6oNqHG9VbpWIH1 sLYWV/X46c4FlCc7RitzOFEx0stlIAlv/va61Vr9VcNgfRMz0ZYLbxAYBJ6YAP9+qe RaBSqWsMwv0c544vQt+oVXw4FjC+NYLPQjdln5Ik= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20240531213426epcas2p45e00bc21be45a7c255f109d8351b3f61~UsFvzXVGn2198821988epcas2p4D; Fri, 31 May 2024 21:34:26 +0000 (GMT) Received: from epsmgec2p1-new.samsung.com (unknown [182.195.36.90]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4Vrbwy128pz4x9Pp; Fri, 31 May 2024 21:34:26 +0000 (GMT) Received: from epcas2p2.samsung.com ( [182.195.41.54]) by epsmgec2p1-new.samsung.com (Symantec Messaging Gateway) with SMTP id 8E.63.18956.1624A566; Sat, 1 Jun 2024 06:34:26 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p1.samsung.com (KnoxPortal) with ESMTPA id 20240531213424epcas2p16d7360e12d310c9f299d449e66af07b3~UsFt8gW2M0661106611epcas2p1m; Fri, 31 May 2024 21:34:24 +0000 (GMT) Received: from epsmgmc1p1new.samsung.com (unknown [182.195.42.40]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240531213424epsmtrp12e4929d5edf65f4217a98411789c6df0~UsFt7wCIA0490304903epsmtrp1h; Fri, 31 May 2024 21:34:24 +0000 (GMT) X-AuditID: b6c32a4d-247ff70000004a0c-d6-665a4261e3ca Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmc1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 67.F6.07412.0624A566; Sat, 1 Jun 2024 06:34:24 +0900 (KST) Received: from localhost.dsn.sec.samsung.com (unknown [10.229.54.230]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240531213424epsmtip2add19db3793fafde8f2204283eb68324~UsFtucPsp1505315053epsmtip2s; Fri, 31 May 2024 21:34:24 +0000 (GMT) From: Minwoo Im To: "James E . J . Bottomley" , "Martin K . Petersen" , Bart Van Assche Cc: Alim Akhtar , Avri Altman , Minwoo Im , gost.dev@samsung.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Jeuk Kim Subject: [PATCH v2 0/2] ufs: pci: Add support UFSHCI 4.0 MCQ Date: Sat, 1 Jun 2024 06:22:42 +0900 Message-Id: <20240531212244.1593535-1-minwoo.im@samsung.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprCJsWRmVeSWpSXmKPExsWy7bCmmW6SU1SaQcdeZosH87axWbz8eZXN YtqHn8wWNw/sZLLY2M9hcX/rNUaLy7vmsFl0X9/BZrH8+D8mi2enDzA7cHlcvuLtMW3SKTaP j09vsXj0bVnF6PF5k5xH+4FupgC2qGybjNTElNQihdS85PyUzLx0WyXv4HjneFMzA0NdQ0sL cyWFvMTcVFslF58AXbfMHKDDlBTKEnNKgUIBicXFSvp2NkX5pSWpChn5xSW2SqkFKTkF5gV6 xYm5xaV56Xp5qSVWhgYGRqZAhQnZGW1bFzIVvOasWL/8KHsD4xf2LkZODgkBE4mrl3YwdzFy cQgJ7GGUWHN/GSOE84lRYsWy9awQzjdGiSvtJ9hgWrpXvIaq2ssoce5UP9gsIYHfjBJXt3OB 2GwC6hINU1+xgNgiAosZJeau5gNpYBZ4wSjxbeE8JpCEsICNxJS226wgNouAqsTn581gcV6g +IeF06G2yUvsP3iWGSIuKHFy5hOwocxA8eats8EOlxB4yy6x7NxSqAYXiWlPzrNC2MISr45v gfpUSuJlfxuUXS7x880kRgi7QuLgrNtAvRxAtr3EtecpICazgKbE+l36EFFliSO3oLbySXQc /ssOEeaV6GgTgpihLPHx0CFmCFtSYvml11C3eEi0nu1ngoROrMTZRx1MExjlZyH5ZRaSX2Yh 7F3AyLyKUSq1oDg3PTXZqMBQNy+1HB6vyfm5mxjByVPLdwfj6/V/9Q4xMnEwHmKU4GBWEuH9 lR6RJsSbklhZlVqUH19UmpNafIjRFBjCE5mlRJPzgek7ryTe0MTSwMTMzNDcyNTAXEmc917r 3BQhgfTEktTs1NSC1CKYPiYOTqkGpgQTm8ovk7V+fMu3t1JdXNM1ZfPN4qJ9XPv3BBr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VMMzc9mfX47O 974s0tvEf2jXwb4UzYpU/RvyUq78bxhur1jL3Hyq+tmuQ90B59vfd12dfc1IUaX6Q+S3eXP7 ZM/cCFhT1dilVJx/KrDRW3nz5GsVsyRrlh+Zs3vDQ4ULhis+n9z8P3fenQzBM5Mj8jknP+w+ XR56+dLTIFf2F3M4Z/xymMTLuyslwfN5Uuz7VgaO5ZmrbgWk7lFiKc5INNRiLipOBAD95WYI 1gIAAA== X-CMS-MailID: 20240531213424epcas2p16d7360e12d310c9f299d449e66af07b3 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20240531213424epcas2p16d7360e12d310c9f299d449e66af07b3 References: This patchset introduces add support for MCQ introduced in UFSHCI 4.0. The first patch adds a simple helper to get the address of MCQ queue config registers. The second one enables MCQ feature by adding mandatory vops callback functions required at MCQ initialization phase. The last one is to prevent a case where number of MCQ is given 1 since driver allocates poll_queues first rather than I/O queues to handle device commands. Instead of causing exception handlers due to no I/O queue, failfast during the initialization time. --- v2: - https://lore.kernel.org/linux-scsi/20240531103821.1583934-1-minwoo.im@samsung.com/T/#t - Not separate the newly introduced function from the actuall caller in the other patch by squash the second patch to the first one (Bart). - Rename ufs_redhat_* in ufshcd-pci.c to ufs_qemu_* to represent that it's for QEMU UFS PCI device (Bart). Minwoo Im (2): ufs: pci: Add support MCQ for QEMU-based UFS ufs: mcq: Prevent no I/O queue case for MCQ drivers/ufs/core/ufs-mcq.c | 23 +++++++++++++++++ drivers/ufs/host/ufshcd-pci.c | 48 ++++++++++++++++++++++++++++++++++- include/ufs/ufshcd.h | 1 + 3 files changed, 71 insertions(+), 1 deletion(-) -- 2.34.1