From patchwork Tue Oct 22 07:43:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avri Altman X-Patchwork-Id: 838024 Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) (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 D374936124; Tue, 22 Oct 2024 07:45:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=216.71.154.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729583142; cv=none; b=L6dOGN9PxKtzqykdxEfAjlv6BP7kO/E9D6bTYiOksXtKvvCU75jAPzCU/9Yc+2dT3IaAIXdqTcz2p1JAR6KQzPwPbGQeK0tWqZxe1Vg6JH086jgTEl3ytwBOr2FfN/ZIQ1imR2QpRn00lnUXytoWZ0AzlXTJg8T1evvoUpa37U0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729583142; c=relaxed/simple; bh=cIh3TOoCr8Vpu8u8J5nmz829eCRHULPA3N2J4cliIr8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=XAo3sjT/qaN4tkREAwHxPUP76YoukZSHGseT2tz5qyyVj++EvcLqPKvp6Zg9DgARm/wQvW6ImicH7myRccanWuDnWYs066XzX9yvObYbeoLhIz7/kd/mTwemAhxk7jD9tXssyjIFVZAuxFJ7FlQznf5kQqMpq0dtFCg3D4CcNdU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wdc.com; spf=pass smtp.mailfrom=wdc.com; dkim=pass (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b=BeYIQMeI; arc=none smtp.client-ip=216.71.154.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wdc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wdc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="BeYIQMeI" DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1729583140; x=1761119140; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cIh3TOoCr8Vpu8u8J5nmz829eCRHULPA3N2J4cliIr8=; b=BeYIQMeI8433NN8grR3HRof6zHaecJsS99VDbC1giQTEl6HgVcXkfhVk qcEOEnMJFXuaYUZ6iJNKfMcb+DtRZq57xoEYsC2Fh/ElgTJaRNRVqkVJc KZK3T4TvEgxsFuqCdW2ePRWoYRE9y737unZ7Iey8xgXFuXLgbA8obHh8Y wyMLvqpkePN4m32CL3TPNiBJN/Eha0kEM4OX7cz1meTUCaDEhZx9vJ2mz 9Xn3uPigDsKj9TRt1rmDvytH2bqisonoivnfgLL6kTn7PSnBzgkYiqCkQ w97yAu9bF/3sPP/owZ0XIgivdxBcrSX4dQmwa/qDrvwTfqKKRzyFu+bke Q==; X-CSE-ConnectionGUID: ZSE40qeLQi270E1pKv7jDw== X-CSE-MsgGUID: 18Uw2Yk8TIu2zOMacxOEHQ== X-IronPort-AV: E=Sophos;i="6.11,222,1725292800"; d="scan'208";a="29564290" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 22 Oct 2024 15:45:33 +0800 IronPort-SDR: 671749ae_2vr7/pFedV+1IJuPCvFNkeB7OJFluhHSOuyFRF+TFB14DBr K7GgQTDaJ7rqcTyoXYuPK8THGi0oiyAxdNKU93w== Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 21 Oct 2024 23:43:59 -0700 WDCIronportException: Internal Received: from avri-office.ad.shared (HELO avri-office.sdcorp.global.sandisk.com) ([10.45.31.142]) by uls-op-cesaip01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 22 Oct 2024 00:45:32 -0700 From: Avri Altman To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Bart Van Assche , Avri Altman Subject: [PATCH v2 1/3] scsi: ufs: core: Remove redundant host_lock calls around UTMRLDBR. Date: Tue, 22 Oct 2024 10:43:17 +0300 Message-Id: <20241022074319.512127-2-avri.altman@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241022074319.512127-1-avri.altman@wdc.com> References: <20241022074319.512127-1-avri.altman@wdc.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There is no need to serialize single read/write calls to the host controller registers. Remove the redundant host_lock calls that protect access to the task management doorbell register: UTMRLDBR. Signed-off-by: Avri Altman --- drivers/ufs/core/ufshcd.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 9e6d008f4ea4..29f1cd3375bd 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -1245,11 +1245,13 @@ static bool ufshcd_is_devfreq_scaling_required(struct ufs_hba *hba, static u32 ufshcd_pending_cmds(struct ufs_hba *hba) { const struct scsi_device *sdev; + unsigned long flags; u32 pending = 0; - lockdep_assert_held(hba->host->host_lock); + spin_lock_irqsave(hba->host->host_lock, flags); __shost_for_each_device(sdev, hba->host) pending += sbitmap_weight(&sdev->budget_map); + spin_unlock_irqrestore(hba->host->host_lock, flags); return pending; } @@ -1263,7 +1265,6 @@ static u32 ufshcd_pending_cmds(struct ufs_hba *hba) static int ufshcd_wait_for_doorbell_clr(struct ufs_hba *hba, u64 wait_timeout_us) { - unsigned long flags; int ret = 0; u32 tm_doorbell; u32 tr_pending; @@ -1271,7 +1272,6 @@ static int ufshcd_wait_for_doorbell_clr(struct ufs_hba *hba, ktime_t start; ufshcd_hold(hba); - spin_lock_irqsave(hba->host->host_lock, flags); /* * Wait for all the outstanding tasks/transfer requests. * Verify by checking the doorbell registers are clear. @@ -1292,7 +1292,6 @@ static int ufshcd_wait_for_doorbell_clr(struct ufs_hba *hba, break; } - spin_unlock_irqrestore(hba->host->host_lock, flags); io_schedule_timeout(msecs_to_jiffies(20)); if (ktime_to_us(ktime_sub(ktime_get(), start)) > wait_timeout_us) { @@ -1304,7 +1303,6 @@ static int ufshcd_wait_for_doorbell_clr(struct ufs_hba *hba, */ do_last_check = true; } - spin_lock_irqsave(hba->host->host_lock, flags); } while (tm_doorbell || tr_pending); if (timeout) { @@ -1314,7 +1312,6 @@ static int ufshcd_wait_for_doorbell_clr(struct ufs_hba *hba, ret = -EBUSY; } out: - spin_unlock_irqrestore(hba->host->host_lock, flags); ufshcd_release(hba); return ret; } @@ -6877,13 +6874,13 @@ static irqreturn_t ufshcd_check_errors(struct ufs_hba *hba, u32 intr_status) */ static irqreturn_t ufshcd_tmc_handler(struct ufs_hba *hba) { - unsigned long flags, pending, issued; + unsigned long flags; + unsigned long pending = ufshcd_readl(hba, REG_UTP_TASK_REQ_DOOR_BELL); + unsigned long issued = hba->outstanding_tasks & ~pending; irqreturn_t ret = IRQ_NONE; int tag; spin_lock_irqsave(hba->host->host_lock, flags); - pending = ufshcd_readl(hba, REG_UTP_TASK_REQ_DOOR_BELL); - issued = hba->outstanding_tasks & ~pending; for_each_set_bit(tag, &issued, hba->nutmrs) { struct request *req = hba->tmf_rqs[tag]; struct completion *c = req->end_io_data; @@ -7065,12 +7062,13 @@ static int __ufshcd_issue_tm_cmd(struct ufs_hba *hba, memcpy(hba->utmrdl_base_addr + task_tag, treq, sizeof(*treq)); ufshcd_vops_setup_task_mgmt(hba, task_tag, tm_function); - /* send command to the controller */ __set_bit(task_tag, &hba->outstanding_tasks); - ufshcd_writel(hba, 1 << task_tag, REG_UTP_TASK_REQ_DOOR_BELL); spin_unlock_irqrestore(host->host_lock, flags); + /* send command to the controller */ + ufshcd_writel(hba, 1 << task_tag, REG_UTP_TASK_REQ_DOOR_BELL); + ufshcd_add_tm_upiu_trace(hba, task_tag, UFS_TM_SEND); /* wait until the task management command is completed */ From patchwork Tue Oct 22 07:43:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avri Altman X-Patchwork-Id: 837757 Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) (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 BCBD6149E0E; Tue, 22 Oct 2024 07:45:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=216.71.153.141 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729583149; cv=none; b=D+U0dzGLhQKV4IFCX4VwSBLu9UD1o06soAE4d8jiUrkN12nrquA/58ck5Ww9HCaDRLwF1S1joZTtj4X4ycBSzAP5X+nVAvSz9KtFMTO55hn+pXO5Go/zpw80f2JY/Imz7lhH0WgQAQ0J9amNybJzPF/z28K+iQjSzJzi72cYp8U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729583149; c=relaxed/simple; bh=UxZ6bvbCb77ujMYVMZzCYzvRlOwMevxBML19GKt+ack=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pfVErhsTLbVqwl3KPnngXoatE0Evx25zDWC49ToqPoKp6XgQcsbcqrIivnlLtENijSHXMQN5L7uDyq9bJk7rHMy5J5OewicKIUKg3w73OP14yY8nzQbFevcEdupkrUx/BIDlvLMpyZtjCUBHg3KhJB+TZElyixwLke1XQ0jASZE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wdc.com; spf=pass smtp.mailfrom=wdc.com; dkim=pass (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b=nAjwo/rq; arc=none smtp.client-ip=216.71.153.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wdc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wdc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="nAjwo/rq" DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1729583148; x=1761119148; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UxZ6bvbCb77ujMYVMZzCYzvRlOwMevxBML19GKt+ack=; b=nAjwo/rq2xDj73YtrHbiEdgp+QVwqOUaNsvb1yXD1A3SmllkxogrziFF xknegau/BEWQhUenfeiydggvQdL8oBT0OomdNYqQt1KBsFyoK7njQzYEc 8S4V8jn+BNd2EqGdB24vaq8hKCQO7B2q4Rk6q+z5GkfXQuuNbBidEUfKg Y4MKrnCpbqPjmEF88U/2BtnPDzY2/fPcxPyZHCdf0pjBH94gRyriYhQ92 fGnOAub5BYTBUzi6ywFmp/iXOuOSRQHxxvcEae1eR2AzSXwUTcTSPOlyb NdTZOkFNLK1o1MughutwLWYgoM+banLJhx2WR9Hbw9r09jChb4iKpDxNx Q==; X-CSE-ConnectionGUID: 5I4qgx3JS5yvYaIyMDs2eg== X-CSE-MsgGUID: ipM/o746QH6O+9i1d6wwbQ== X-IronPort-AV: E=Sophos;i="6.11,222,1725292800"; d="scan'208";a="29679844" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 22 Oct 2024 15:45:41 +0800 IronPort-SDR: 671749b5_vh8y220RFFrJcI8fmHiIOC2MRlXLQj7qv6o/9CEiqIRP0hM z5M/Yj1N4LNSfhO83Tr7X0iqlJCtBMLjKy6407g== Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 21 Oct 2024 23:44:06 -0700 WDCIronportException: Internal Received: from avri-office.ad.shared (HELO avri-office.sdcorp.global.sandisk.com) ([10.45.31.142]) by uls-op-cesaip01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 22 Oct 2024 00:45:39 -0700 From: Avri Altman To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Bart Van Assche , Avri Altman Subject: [PATCH v2 2/3] scsi: ufs: core: Remove redundant host_lock calls around UTMRLCLR Date: Tue, 22 Oct 2024 10:43:18 +0300 Message-Id: <20241022074319.512127-3-avri.altman@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241022074319.512127-1-avri.altman@wdc.com> References: <20241022074319.512127-1-avri.altman@wdc.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There is no need to serialize single read/write calls to the host controller registers. Remove the redundant host_lock calls that protect access to the task management request List cLear register: UTMRLCLR. Signed-off-by: Avri Altman Reviewed-by: Bart Van Assche --- drivers/ufs/core/ufshcd.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 29f1cd3375bd..ca6b6df797fd 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -7012,14 +7012,11 @@ static int ufshcd_clear_tm_cmd(struct ufs_hba *hba, int tag) { int err = 0; u32 mask = 1 << tag; - unsigned long flags; if (!test_bit(tag, &hba->outstanding_tasks)) goto out; - spin_lock_irqsave(hba->host->host_lock, flags); ufshcd_utmrl_clear(hba, tag); - spin_unlock_irqrestore(hba->host->host_lock, flags); /* poll for max. 1 sec to clear door bell register by h/w */ err = ufshcd_wait_for_register(hba, From patchwork Tue Oct 22 07:43:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avri Altman X-Patchwork-Id: 838023 Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) (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 706B41547C0; Tue, 22 Oct 2024 07:45:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=216.71.153.141 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729583151; cv=none; b=f/lZy0VjUOHLRfX849XTkY2OrZXzSDzNfkwAyi1xdTc5c7wxdEU7iaX0SUMb/HhstWbd4eHLAH/FSkcz8XZDVH9j3+kS4DLv4rkeoRcoBx0dcYHITAFAHQ2Qvn/eJp7thTRLoTkqB146wT3fx2S04Xcp2EUjgTmISFv1vYz5HtU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729583151; c=relaxed/simple; bh=4ULmdBK/TnzmFDAmE0RfGEK1+83dXek4IBvihsRxxdM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=KQ+YXL/UguNsxEAd5KVSKbdUdI1uKdQLRQYdqKtntn4J2jShmKfg2KsTH19ZLP4ywbH0puFMX1saI2PcC2IT2Oi0Wd4KntyGVl7Wj37sdfXix+5svab2kNLf3svx1baQw19qX71htISiqK2Ow4KiwdGj+1Mn83J8HSCfMYJSJj4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wdc.com; spf=pass smtp.mailfrom=wdc.com; dkim=pass (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b=SGMrlucA; arc=none smtp.client-ip=216.71.153.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wdc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wdc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="SGMrlucA" DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1729583150; x=1761119150; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4ULmdBK/TnzmFDAmE0RfGEK1+83dXek4IBvihsRxxdM=; b=SGMrlucAj+hDEvG1P4WdIFJZKJkD/Dd85QSu9ZmwGIK2yIV+I04GJLyD ZFyAm81A5XJ9fzp8EE+8UWRAQtXfXNpgA7lNmf2+Eze9MRX5gRACKXjFt Fbs5Ti04ssLMQ5f+QjrnGygqMVl2KfJilF1mTtKfN8OY84WGEomc68pDE n+fruUN12iP970OtHGwlC0HHJULTw4qkLCd1G11WN9v5dlMymqwzQOKkg iJQdV+Hp+1QSywIFKutk5yRgmkoSlX5d9XWHeqt6M7YR+xDTjH1mRGcbx ndLWmJwu2QlUssVoIyWVM000TaWG7BN1iR8z5K+0WIXb3cwN3h8ATfi64 g==; X-CSE-ConnectionGUID: d0xFrv30SvGXoMtGudjZXA== X-CSE-MsgGUID: CFFVpHvoRgCaILJKFBxRqA== X-IronPort-AV: E=Sophos;i="6.11,222,1725292800"; d="scan'208";a="29679851" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 22 Oct 2024 15:45:46 +0800 IronPort-SDR: 671749ba_jEV0qG8mVWXtoocC6tYbXCgd/PCUAQ9LibRAFREEFyQiaon wPiLRYmVAFjfRixazLjUnpioHjqCp6c+8yjoDIA== Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 21 Oct 2024 23:44:11 -0700 WDCIronportException: Internal Received: from avri-office.ad.shared (HELO avri-office.sdcorp.global.sandisk.com) ([10.45.31.142]) by uls-op-cesaip01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 22 Oct 2024 00:45:44 -0700 From: Avri Altman To: "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Bart Van Assche , Avri Altman Subject: [PATCH v2 3/3] scsi: ufs: core: Remove redundant host_lock calls around UTRLCLR. Date: Tue, 22 Oct 2024 10:43:19 +0300 Message-Id: <20241022074319.512127-4-avri.altman@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241022074319.512127-1-avri.altman@wdc.com> References: <20241022074319.512127-1-avri.altman@wdc.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There is no need to serialize single read/write calls to the host controller registers. Remove the redundant host_lock calls that protect access to the request list cLear register: UTRLCLR. Signed-off-by: Avri Altman --- drivers/ufs/core/ufshcd.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index ca6b6df797fd..d9b547d8f958 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -3076,7 +3076,6 @@ bool ufshcd_cmd_inflight(struct scsi_cmnd *cmd) static int ufshcd_clear_cmd(struct ufs_hba *hba, u32 task_tag) { u32 mask; - unsigned long flags; int err; if (hba->mcq_enabled) { @@ -3096,9 +3095,7 @@ static int ufshcd_clear_cmd(struct ufs_hba *hba, u32 task_tag) mask = 1U << task_tag; /* clear outstanding transaction before retry */ - spin_lock_irqsave(hba->host->host_lock, flags); ufshcd_utrl_clear(hba, mask); - spin_unlock_irqrestore(hba->host->host_lock, flags); /* * wait for h/w to clear corresponding bit in door-bell.