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); + } } }