From patchwork Sun Nov 26 05:31:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandrakanth Patil X-Patchwork-Id: 13468770 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="fZUjDeNX" Received: from mail-oo1-xc2d.google.com (mail-oo1-xc2d.google.com [IPv6:2607:f8b0:4864:20::c2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02D9ECE for ; Sat, 25 Nov 2023 21:30:53 -0800 (PST) Received: by mail-oo1-xc2d.google.com with SMTP id 006d021491bc7-58ceabd7cdeso1715378eaf.3 for ; Sat, 25 Nov 2023 21:30:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1700976652; x=1701581452; darn=vger.kernel.org; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=0o97w/apf9FMudiVPsRkblL5mhd5TbaH+umllEFatXU=; b=fZUjDeNXsYNBlfjMrtTdXewd1yq42w5qlnB8LmCg7zwuc+A2WVHH9jNVceRpLZyRqW bzshJOUdQ2n8Y5mzUuIAMhOhovpWK96us/gFuJ+3ANIOGw9wAVSipbo5PDXnuhS04l7N JHkOrGYnk8LD6kS14rDiEqR0CiL+H0R8wZK64= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700976652; x=1701581452; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0o97w/apf9FMudiVPsRkblL5mhd5TbaH+umllEFatXU=; b=bSYVESECqox8A9X8nXCSnDMhP7GomM0LtOrpy8cm8LKCGf49JCU79wvtCVwhAwRw7k MZ/Di+LZwavAGvEv7Dmy2GMt33TSxwYsnf+oiFOoUAi/mgNP7e3sp0MUQU5/qVEF3DmA aSnpCwzUcMgdBD/wcuFl6uPhOBrMCVc49oMk6YpR6XTOVuWciHxOYS96z3RR/6GAkE1X T/N83OCoX3yw0VIYt3Eyc8HcaBqjASrlUhJs8ftOpuY4XQZ3z/1dCtYnfcNGyp34A/ch kUeXtEk5wEfX8cBmV4wiF1wP4nlCRHmW4TeIthRxBCuVxAT6hk6o6vG7SeDpBR0D0N6U Ehxw== X-Gm-Message-State: AOJu0Yx0K7UfJWWlOz/g92Q0IarBrLRXnBtx12nAW3Exak3jTFMSaHN8 24QflqLLfDlp6vONyfSgR3v+pQhEuxgy8I/oEsmk7UD/SqQGnYtVnmmfRa6WgcMe5dKB8xdjy/x dF9n8p3EC8Xe6GgPsSY4JLASwGDwz1Qa1L73X46zOtYik8ICsLC2ZdTjJuIGlI0hQBlptTfolkv ZQI4NQEgnODkZH3myfDg== X-Google-Smtp-Source: AGHT+IHecPuosQSwZzQvYcFR0SrjTVNgpbEHvbLHmY96arQfsY20sFM9X/RpeIiq6RaGCjXpogehFA== X-Received: by 2002:a05:6358:998a:b0:16d:e923:573 with SMTP id j10-20020a056358998a00b0016de9230573mr7692608rwb.15.1700976651816; Sat, 25 Nov 2023 21:30:51 -0800 (PST) Received: from dhcp-10-123-20-35.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id s78-20020a632c51000000b00578b8fab907sm5516166pgs.73.2023.11.25.21.30.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 21:30:51 -0800 (PST) From: Chandrakanth patil To: linux-scsi@vger.kernel.org, sathya.prakash@broadcom.com, sumit.saxena@broadcom.com, ranjan.kumar@broadcom.com, prayas.patel@broadcom.com Cc: Chandrakanth patil , stable@vger.kernel.org Subject: [PATCH 1/4] mpi3mr: Refresh sdev queue depth after controller reset Date: Sun, 26 Nov 2023 11:01:31 +0530 Message-Id: <20231126053134.10133-2-chandrakanth.patil@broadcom.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20231126053134.10133-1-chandrakanth.patil@broadcom.com> References: <20231126053134.10133-1-chandrakanth.patil@broadcom.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 After a controller reset, the firmware may modify the device queue depth. Therefore, update the device queue depth accordingly. Cc: # v5.15+ Signed-off-by: Sathya Prakash Signed-off-by: Chandrakanth patil --- drivers/scsi/mpi3mr/mpi3mr_os.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c index 91a22e6e5c3f..561fe0857bc0 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -1070,8 +1070,14 @@ void mpi3mr_rfresh_tgtdevs(struct mpi3mr_ioc *mrioc) tgtdev = NULL; list_for_each_entry(tgtdev, &mrioc->tgtdev_list, list) { if ((tgtdev->dev_handle != MPI3MR_INVALID_DEV_HANDLE) && - !tgtdev->is_hidden && !tgtdev->host_exposed) - mpi3mr_report_tgtdev_to_host(mrioc, tgtdev->perst_id); + !tgtdev->is_hidden) { + if (!tgtdev->host_exposed) + mpi3mr_report_tgtdev_to_host(mrioc, + tgtdev->perst_id); + else if (tgtdev->starget) + starget_for_each_device(tgtdev->starget, + (void *)tgtdev, mpi3mr_update_sdev); + } } } From patchwork Sun Nov 26 05:31:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandrakanth Patil X-Patchwork-Id: 13468771 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="VJO1jbvM" Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57510DC for ; Sat, 25 Nov 2023 21:30:59 -0800 (PST) Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1cf6373ce31so22197945ad.0 for ; Sat, 25 Nov 2023 21:30:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1700976658; x=1701581458; darn=vger.kernel.org; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=RvemdwUFmCFCnLzzopaaVN6/GYHBEgJkBSAkUJl17Zg=; b=VJO1jbvMViPV+shdurhp93tccXD80CGjVroNZ2xQTmOSGPcFEGUhF3H4i3E0oX6EdW +eP9zhMPK60kq4SclES3pNPEeNCAtb2y5K1go19GW8gzTLfesoL5rEys5f9K6VUA2sIZ gjpx+4zji9Mt0uBgydC8fvq9Nomz7L2HVmGNg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700976658; x=1701581458; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RvemdwUFmCFCnLzzopaaVN6/GYHBEgJkBSAkUJl17Zg=; b=gMHQriLZ4DSbDuVNF6Z7uqwYl8ncmIA46mX62DTGrCXZk8QYj7h3Mc9UT+910Yed6X NOm9kalGcoopxBoeq5yzD4xj9uqUP1xES+qdeBJiaszp9dD82E8mXZ5CB6k12eg8m6YQ 4Eiuwd7mVC84c8QkPVjEWGyNukBR7xo0XGVoFxieq6NQrB2oVLZl5mtzkccBinIWw5v6 TdBO+Fy+BbS16AVpbg5bCSIrUfq8htaqH0MsM6w/3+wHBs35S2YpE7BybM05KzAOp53E 5M+g4opozL3RODhqVznX/6naeQ20DkJ0CCZUDbnu7EX+FV4OUJi2PD2w1YApqyJB4SkF QNjQ== X-Gm-Message-State: AOJu0Yw7B06gbrclXSS82/mItqsxXDHP14ZFiDWBPNGglFdcGaaE8tTq gp52BzS4WmL9lj/3Qrn5Z1j90/RwBkZI2jvyRwU0yKzA27C9ttS2BWIK3hvBXCSdDuD4KeWFXwo mTd4AyqZQ3kCOCU6hEb1kmyJUbwoXtsI5bcdSV+b2HAsl0DokgVOhFWE6cYjHSdak/dpQwuPvFH HN5R73aMgwsyxBfxKalA== X-Google-Smtp-Source: AGHT+IGyOiWf22D1TEpY7OaO+LStl+lbNbWTU2Ke0ZqA8WP8TOrE7Jqv0EDrc+LwG6TZ4frBQhIkmQ== X-Received: by 2002:a17:902:e812:b0:1cc:5671:8d9 with SMTP id u18-20020a170902e81200b001cc567108d9mr15391431plg.27.1700976658244; Sat, 25 Nov 2023 21:30:58 -0800 (PST) Received: from dhcp-10-123-20-35.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id s78-20020a632c51000000b00578b8fab907sm5516166pgs.73.2023.11.25.21.30.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 21:30:57 -0800 (PST) From: Chandrakanth patil To: linux-scsi@vger.kernel.org, sathya.prakash@broadcom.com, sumit.saxena@broadcom.com, ranjan.kumar@broadcom.com, prayas.patel@broadcom.com Cc: Chandrakanth patil , stable@vger.kernel.org Subject: [PATCH 2/4] mpi3mr: Cleanup block devices post controller reset Date: Sun, 26 Nov 2023 11:01:32 +0530 Message-Id: <20231126053134.10133-3-chandrakanth.patil@broadcom.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20231126053134.10133-1-chandrakanth.patil@broadcom.com> References: <20231126053134.10133-1-chandrakanth.patil@broadcom.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 After a controller reset, if the firmware changes the state of devices to "hide," then remove those devices from the OS. Cc: # v6.6+ Signed-off-by: Sathya Prakash Signed-off-by: Chandrakanth patil --- drivers/scsi/mpi3mr/mpi3mr_os.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c index 561fe0857bc0..872d4b809d08 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -1047,8 +1047,9 @@ void mpi3mr_rfresh_tgtdevs(struct mpi3mr_ioc *mrioc) list_for_each_entry_safe(tgtdev, tgtdev_next, &mrioc->tgtdev_list, list) { if ((tgtdev->dev_handle == MPI3MR_INVALID_DEV_HANDLE) && - tgtdev->host_exposed && tgtdev->starget && - tgtdev->starget->hostdata) { + tgtdev->is_hidden && + tgtdev->host_exposed && tgtdev->starget && + tgtdev->starget->hostdata) { tgt_priv = tgtdev->starget->hostdata; tgt_priv->dev_removed = 1; atomic_set(&tgt_priv->block_io, 0); @@ -1064,6 +1065,10 @@ void mpi3mr_rfresh_tgtdevs(struct mpi3mr_ioc *mrioc) mpi3mr_remove_tgtdev_from_host(mrioc, tgtdev); mpi3mr_tgtdev_del_from_list(mrioc, tgtdev, true); mpi3mr_tgtdev_put(tgtdev); + } else if (tgtdev->is_hidden & tgtdev->host_exposed) { + dprint_reset(mrioc, "hiding target device with perst_id(%d)\n", + tgtdev->perst_id); + mpi3mr_remove_tgtdev_from_host(mrioc, tgtdev); } } From patchwork Sun Nov 26 05:31:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandrakanth Patil X-Patchwork-Id: 13468772 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="g4zpum5Z" Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com [IPv6:2607:f8b0:4864:20::1130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AFECDC for ; Sat, 25 Nov 2023 21:31:05 -0800 (PST) Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-5c85e8fdd2dso29249577b3.2 for ; Sat, 25 Nov 2023 21:31:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1700976664; x=1701581464; darn=vger.kernel.org; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=Pplkkx3QSqkMXfA3cR/+JosWlTFrJrbmsz6cfxprViQ=; b=g4zpum5ZAEJvoEtawfEuKIEOBcaikaMlU//NHLfzXcGb9ilvyYx64qo91OdPGWaWxn phLLVO2jGe7nkHSWBy5MF+PFRic5F6wmIfavM2GvDL7el2tsXh/PxWcGhtr9VGYL9+YM Yj6dJB+vRiyKqMPcdXxRgqTU0lRhKZESFcyqM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700976664; x=1701581464; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Pplkkx3QSqkMXfA3cR/+JosWlTFrJrbmsz6cfxprViQ=; b=QmiSMP/ZPIPXU6RUGaDE7RTNW5O+cIP+Yc/wTxQiNR6As0rBI7umJsAQHLnND0GzrC eUX+rAyzL5cUwzE4kcAhuaZrG5CyNCO1cKsdfY3I7ZW11e1nuCbRnLaJM/d8Mwt+TAl4 H7Ee+yR0QwC0i1R84ib/jfVvdr/hj0vFBlSP9Gv2h7K3FkPw/bxXrPjfO9aV6IC27Uh+ lZRbcKAZzE0hpykrhnbQbz1gZN5PYjybZXRyz0lMCzR1/X/CbGS8rOdR+SqN+HWuV+Oa Y85ZhCEg20iUuOPLRF0nXsbxUpOjNkztGYLJ6WMfbet/gH+hGNVz6su2iwKHq5aydFxK YxuQ== X-Gm-Message-State: AOJu0YzMRhpkrOj4KTCUnNd7xCd0HT7r9vXUHzGxzAAJvNjo/7VLPFcT 2EaRvfpjL9Ph2Cn0/CDEAYAUjBOOJZIGxjsujEouWSY3bOrfbCPeHcoiC0BJ5GCTplb5rBtAiad g7Egqjg8cWGeXDFzoQ42Po8sDrHcDzdiCcYd6bj+H0JU2L14OE0Gy+9N1jCcmdN4wB0SAVhPbtP /99fErNlsiPciN/Bhs/A== X-Google-Smtp-Source: AGHT+IE6yl2vfJyeaX1ogQweJkK2DJdS+QjzQvP43bpLT2g4XC8OUI0jQS03nFttip2jU4Ow7fOHsg== X-Received: by 2002:a81:9190:0:b0:5a8:e6f4:4b6c with SMTP id i138-20020a819190000000b005a8e6f44b6cmr8512052ywg.25.1700976663763; Sat, 25 Nov 2023 21:31:03 -0800 (PST) Received: from dhcp-10-123-20-35.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id s78-20020a632c51000000b00578b8fab907sm5516166pgs.73.2023.11.25.21.31.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 21:31:03 -0800 (PST) From: Chandrakanth patil To: linux-scsi@vger.kernel.org, sathya.prakash@broadcom.com, sumit.saxena@broadcom.com, ranjan.kumar@broadcom.com, prayas.patel@broadcom.com Cc: Chandrakanth patil , stable@vger.kernel.org Subject: [PATCH 3/4] mpi3mr: Block PEL Enable Command on Controller Reset and Unrecoverable State Date: Sun, 26 Nov 2023 11:01:33 +0530 Message-Id: <20231126053134.10133-4-chandrakanth.patil@broadcom.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20231126053134.10133-1-chandrakanth.patil@broadcom.com> References: <20231126053134.10133-1-chandrakanth.patil@broadcom.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 If a controller reset is underway or the controller is in an unrecoverable state, the PEL enable management command will be returned as EAGAIN or EFAULT. Cc: # v6.1+ Signed-off-by: Sathya Prakash Signed-off-by: Chandrakanth patil --- drivers/scsi/mpi3mr/mpi3mr_app.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/scsi/mpi3mr/mpi3mr_app.c b/drivers/scsi/mpi3mr/mpi3mr_app.c index 08645a99ad6b..9dacbb8570c9 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_app.c +++ b/drivers/scsi/mpi3mr/mpi3mr_app.c @@ -223,6 +223,22 @@ static long mpi3mr_bsg_pel_enable(struct mpi3mr_ioc *mrioc, return rval; } + if (mrioc->unrecoverable) { + dprint_bsg_err(mrioc, "%s: unrecoverable controller\n", + __func__); + return -EFAULT; + } + + if (mrioc->reset_in_progress) { + dprint_bsg_err(mrioc, "%s: reset in progress\n", __func__); + return -EAGAIN; + } + + if (mrioc->stop_bsgs) { + dprint_bsg_err(mrioc, "%s: bsgs are blocked\n", __func__); + return -EAGAIN; + } + sg_copy_to_buffer(job->request_payload.sg_list, job->request_payload.sg_cnt, &pel_enable, sizeof(pel_enable)); From patchwork Sun Nov 26 05:31:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandrakanth Patil X-Patchwork-Id: 13468773 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="XWSs8GQc" Received: from mail-oo1-xc29.google.com (mail-oo1-xc29.google.com [IPv6:2607:f8b0:4864:20::c29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2ED28118 for ; Sat, 25 Nov 2023 21:31:10 -0800 (PST) Received: by mail-oo1-xc29.google.com with SMTP id 006d021491bc7-58d6bf7575fso296655eaf.0 for ; Sat, 25 Nov 2023 21:31:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1700976669; x=1701581469; darn=vger.kernel.org; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=ZeXEUGf0lc6W0GZaHjIEsyeAlkqvwkWbIClFV1EMDUk=; b=XWSs8GQcJSBqaUts4jYnO13aZ6X3xnGxR+xziZDghUI4MZiPFPOatPjlJfykh03HTB LpGbPbSMpjn/gjxp6QD6DEXqRU5bBFQ8pBLnTXqQ9mZ4NvtRDmv7nbRjkTY0eayB6dRg UF2fRNAx70icPtv19yv8FEhJ0kYFc2u9f7GZM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700976669; x=1701581469; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZeXEUGf0lc6W0GZaHjIEsyeAlkqvwkWbIClFV1EMDUk=; b=gmGAiyT9LDmPcqfO6etZ5UbxJvzbZQy7LUU5C0F0wsh0zBdoIHf+oR8SIzfE4jaXnz l84rvz4Qf1U0bzVsk2UX273zI2dGwoccSt4KxK0zJT3CqrO1Kq8H5V9/SI/YvrEFarSD jAFA4h80bZ2y/Zxnnb48Kf9k6Yh771HYiatWyI0rzJF/LS7QfDqbLBv0tp0wiKitqdaL IkvCHD2rV+J+/ErTz75M4tqt4LD119AcvIvpquHm6LCnICtAlCdYSeaNO6DYttxOC9eJ 7bcdwY1cJshQRm+nG+p8fiuYZpVYWcRklaqZLAgHNZzzQ8NQOCz7PEQDyFT2zDsllX3x kI/w== X-Gm-Message-State: AOJu0YxNjWk0+qzmVxYceV2BlwYmX0bApgndwCpwmkiMRQTdAWLbMZT9 xyshNcayU1sfdDvGQFDS2r0yrBmWu3WLTs7D2sbPFRS9+eH0M52yTgof0/uPxz84Mt+GWPqgMMy iO0Xw+gIbPlp8cMSoRuJvP9Q7oLnRdFDflDYVmltFdgTliGJaX17e2pMlvjMbzI6Xlg17st5aP8 2E/W173vaf3kNSsEnZRg== X-Google-Smtp-Source: AGHT+IFqNLOzRcvk7sbqwV4x0KTKjBJ/GfZZ61NVDeAmVEgb1M7awuiVV1M9vrY0L6acPeca41N7xQ== X-Received: by 2002:a05:6358:5926:b0:16b:f954:5f2 with SMTP id g38-20020a056358592600b0016bf95405f2mr6307703rwf.13.1700976669045; Sat, 25 Nov 2023 21:31:09 -0800 (PST) Received: from dhcp-10-123-20-35.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id s78-20020a632c51000000b00578b8fab907sm5516166pgs.73.2023.11.25.21.31.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 21:31:08 -0800 (PST) From: Chandrakanth patil To: linux-scsi@vger.kernel.org, sathya.prakash@broadcom.com, sumit.saxena@broadcom.com, ranjan.kumar@broadcom.com, prayas.patel@broadcom.com Cc: Chandrakanth patil Subject: [PATCH 4/4] mpi3mr: Fetch correct device dev handle for status reply descriptor Date: Sun, 26 Nov 2023 11:01:34 +0530 Message-Id: <20231126053134.10133-5-chandrakanth.patil@broadcom.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20231126053134.10133-1-chandrakanth.patil@broadcom.com> References: <20231126053134.10133-1-chandrakanth.patil@broadcom.com> Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The current dev handle for the status reply is 0xFFFF, which is invalid. So fetch the correct value. Signed-off-by: Sumit Saxena Signed-off-by: Chandrakanth patil --- drivers/scsi/mpi3mr/mpi3mr_os.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c index 872d4b809d08..1bffd629c124 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -3205,6 +3205,7 @@ void mpi3mr_process_op_reply_desc(struct mpi3mr_ioc *mrioc, tg = stgt_priv_data->throttle_group; throttle_enabled_dev = stgt_priv_data->io_throttle_enabled; + dev_handle = stgt_priv_data->dev_handle; } } if (unlikely((data_len_blks >= mrioc->io_throttle_data_length) &&