From patchwork Thu Feb 10 09:58:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 542343 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BA98C433F5 for ; Thu, 10 Feb 2022 09:48:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238985AbiBJJsg (ORCPT ); Thu, 10 Feb 2022 04:48:36 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238982AbiBJJsf (ORCPT ); Thu, 10 Feb 2022 04:48:35 -0500 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 106E8138 for ; Thu, 10 Feb 2022 01:48:36 -0800 (PST) Received: by mail-pf1-x436.google.com with SMTP id u16so3584616pfg.3 for ; Thu, 10 Feb 2022 01:48:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version; bh=Q547jMa4UA53t4ZYNiYRJ4odOz+LQPcghzvQ+7qW/uk=; b=Ub7gbKDAjQ51y5+ALxa2pWeKgZNMk0xpNWVTJ6+lI5JhEvF6w4Pj46n6gKHhh3Gwbh 1T7JU80mpgou1bCrrpH7vaNvWfoe1zFyKmNO+gErjJreDg/rrJ/LvMftLRUe8IpVx0lT QnTaR88hcssC/CoF3gV+RvqoRzRw05+o39z08= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version; bh=Q547jMa4UA53t4ZYNiYRJ4odOz+LQPcghzvQ+7qW/uk=; b=NSU38s9C4bSEhtgLqoerWfrg6i33evKKqjBGTYKfbNHBOuxTFIa1JnWKBO9mZ9n3nV hpMkJpgANRUWPSVTxjlMJgthf0PSDzuwRYaKFdl4SfZ16cY/6rB+ucycZrs7BSWjaQkg /DOB/Uyu5QKQ20yFNOIj9nBS6dhJkXp1FT3d+n0JtcFZQNC91N4eXQVwSEF65RronIz5 sBe404Xh/mfpL6spUQlhXq0ZNEVFXJQMHRerlc4TqOO9erN/39JwFLEPSDGfhuWC8rkW O8UzACrfZ4HhmLrz49KAjEZj69XZAmfLBuaPPiDkVSDDDD1K+aKjyGUskzpYhumy/6tW orug== X-Gm-Message-State: AOAM531SH5BtiS3SSSzSZ+BogZNofTdD789nt/agYHBDUEO5bchL5m27 fAWp2z6UOI5AZ71+OIpeCL45zBB9ugcF7hdw4zNn0lPeq0oD3t2qzguFsZ6MJbNQfH9/7tHl6mv rBqYBVvgHbU5jOWpa0uZ0uPkv6NG6A3LSBWIKmGdTNQMLxu/2RPsKZgaRA8jv2q0iYjvNNYhDfC olietJon9srXk= X-Google-Smtp-Source: ABdhPJxH/X2EYCFZffoZON2PVsUnNopxDjXMqSpgYlLrJRPirrPH+E3So6GSuH9JMOqKkEuoAkxKGQ== X-Received: by 2002:a05:6a00:198a:: with SMTP id d10mr6776571pfl.2.1644486515004; Thu, 10 Feb 2022 01:48:35 -0800 (PST) Received: from dhcp-10-123-20-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id o21sm23706698pfu.100.2022.02.10.01.48.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 01:48:34 -0800 (PST) From: Sreekanth Reddy To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, mpi3mr-linuxdrv.pdl@broadcom.com, Sreekanth Reddy Subject: [PATCH 1/9] mpi3mr: Fix deadlock while canceling the fw event Date: Thu, 10 Feb 2022 15:28:09 +0530 Message-Id: <20220210095817.22828-2-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220210095817.22828-1-sreekanth.reddy@broadcom.com> References: <20220210095817.22828-1-sreekanth.reddy@broadcom.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org During controller reset, the driver tries to flush all the pending firmware event works from worker queue that are queued prior to the reset. However, if any work is waiting for device addition/removal operation to be completed at the SML then a deadlock is observed. This is due to the reason that the controller reset is waiting for the device addition/removal to be completed and the device/addition removal is waiting for the controller reset to be completed. So, to limit this deadlock, continue with the controller reset handling without canceling the work which is waiting for device addition/removal operation to complete at SML. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpi3mr/mpi3mr.h | 4 ++ drivers/scsi/mpi3mr/mpi3mr_fw.c | 2 +- drivers/scsi/mpi3mr/mpi3mr_os.c | 106 ++++++++++++++++++++++++++------ 3 files changed, 91 insertions(+), 21 deletions(-) diff --git a/drivers/scsi/mpi3mr/mpi3mr.h b/drivers/scsi/mpi3mr/mpi3mr.h index fc4eaf6..d892ade 100644 --- a/drivers/scsi/mpi3mr/mpi3mr.h +++ b/drivers/scsi/mpi3mr/mpi3mr.h @@ -866,6 +866,8 @@ struct mpi3mr_ioc { * @send_ack: Event acknowledgment required or not * @process_evt: Bottomhalf processing required or not * @evt_ctx: Event context to send in Ack + * @pending_at_sml: waiting for device add/remove API to complete + * @discard: discard this event * @ref_count: kref count * @event_data: Actual MPI3 event data */ @@ -877,6 +879,8 @@ struct mpi3mr_fwevt { bool send_ack; bool process_evt; u32 evt_ctx; + bool pending_at_sml; + bool discard; struct kref ref_count; char event_data[0] __aligned(4); }; diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c index 15bdc21..7193b98 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_fw.c +++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c @@ -4353,8 +4353,8 @@ int mpi3mr_soft_reset_handler(struct mpi3mr_ioc *mrioc, memset(mrioc->devrem_bitmap, 0, mrioc->devrem_bitmap_sz); memset(mrioc->removepend_bitmap, 0, mrioc->dev_handle_bitmap_sz); memset(mrioc->evtack_cmds_bitmap, 0, mrioc->evtack_cmds_bitmap_sz); - mpi3mr_cleanup_fwevt_list(mrioc); mpi3mr_flush_host_io(mrioc); + mpi3mr_cleanup_fwevt_list(mrioc); mpi3mr_invalidate_devhandles(mrioc); if (mrioc->prepare_for_reset) { mrioc->prepare_for_reset = 0; diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c index 284117d..90911ea 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -285,6 +285,35 @@ static struct mpi3mr_fwevt *mpi3mr_dequeue_fwevt( return fwevt; } +/** + * mpi3mr_cancel_work - cancel firmware event + * @fwevt: fwevt object which needs to be canceled + * + * Return: Nothing. + */ +static void mpi3mr_cancel_work(struct mpi3mr_fwevt *fwevt) +{ + /* + * Wait on the fwevt to complete. If this returns 1, then + * the event was never executed. + * + * If it did execute, we wait for it to finish, and the put will + * happen from mpi3mr_process_fwevt() + */ + if (cancel_work_sync(&fwevt->work)) { + /* + * Put fwevt reference count after + * dequeuing it from worker queue + */ + mpi3mr_fwevt_put(fwevt); + /* + * Put fwevt reference count to neutralize + * kref_init increment + */ + mpi3mr_fwevt_put(fwevt); + } +} + /** * mpi3mr_cleanup_fwevt_list - Cleanup firmware event list * @mrioc: Adapter instance reference @@ -302,28 +331,25 @@ void mpi3mr_cleanup_fwevt_list(struct mpi3mr_ioc *mrioc) !mrioc->fwevt_worker_thread) return; - while ((fwevt = mpi3mr_dequeue_fwevt(mrioc)) || - (fwevt = mrioc->current_event)) { + while ((fwevt = mpi3mr_dequeue_fwevt(mrioc))) + mpi3mr_cancel_work(fwevt); + + if (mrioc->current_event) { + fwevt = mrioc->current_event; /* - * Wait on the fwevt to complete. If this returns 1, then - * the event was never executed, and we need a put for the - * reference the work had on the fwevt. - * - * If it did execute, we wait for it to finish, and the put will - * happen from mpi3mr_process_fwevt() + * Don't call cancel_work_sync() API for the + * fwevt work if the controller reset is + * get called as part of processing the + * same fwevt work (or) when worker thread is + * waiting for device add/remove APIs to complete. + * Otherwise we will see deadlock. */ - if (cancel_work_sync(&fwevt->work)) { - /* - * Put fwevt reference count after - * dequeuing it from worker queue - */ - mpi3mr_fwevt_put(fwevt); - /* - * Put fwevt reference count to neutralize - * kref_init increment - */ - mpi3mr_fwevt_put(fwevt); + if (current_work() == &fwevt->work || fwevt->pending_at_sml) { + fwevt->discard = 1; + return; } + + mpi3mr_cancel_work(fwevt); } } @@ -690,6 +716,24 @@ static struct mpi3mr_tgt_dev *__mpi3mr_get_tgtdev_from_tgtpriv( return tgtdev; } +/** + * mpi3mr_print_device_event_notice - print notice related to post processing of + * device event after controller reset. + * + * @mrioc: Adapter instance reference + * @device_add: true for device add event and false for device removal event + * + * Return: None. + */ +static void mpi3mr_print_device_event_notice(struct mpi3mr_ioc *mrioc, + bool device_add) +{ + ioc_notice(mrioc, "Device %s was under process before the reset and\n", + (device_add ? "addition" : "removal")); + ioc_notice(mrioc, "completed after reset, verify whether the exposed devices\n"); + ioc_notice(mrioc, "are matched with attached devices for correctness\n"); +} + /** * mpi3mr_remove_tgtdev_from_host - Remove dev from upper layers * @mrioc: Adapter instance reference @@ -714,8 +758,17 @@ static void mpi3mr_remove_tgtdev_from_host(struct mpi3mr_ioc *mrioc, } if (tgtdev->starget) { + if (mrioc->current_event) + mrioc->current_event->pending_at_sml = 1; scsi_remove_target(&tgtdev->starget->dev); tgtdev->host_exposed = 0; + if (mrioc->current_event) { + mrioc->current_event->pending_at_sml = 0; + if (mrioc->current_event->discard) { + mpi3mr_print_device_event_notice(mrioc, false); + return; + } + } } ioc_info(mrioc, "%s :Removed handle(0x%04x), wwid(0x%016llx)\n", __func__, tgtdev->dev_handle, (unsigned long long)tgtdev->wwid); @@ -749,11 +802,20 @@ static int mpi3mr_report_tgtdev_to_host(struct mpi3mr_ioc *mrioc, } if (!tgtdev->host_exposed && !mrioc->reset_in_progress) { tgtdev->host_exposed = 1; + if (mrioc->current_event) + mrioc->current_event->pending_at_sml = 1; scsi_scan_target(&mrioc->shost->shost_gendev, 0, tgtdev->perst_id, SCAN_WILD_CARD, SCSI_SCAN_INITIAL); if (!tgtdev->starget) tgtdev->host_exposed = 0; + if (mrioc->current_event) { + mrioc->current_event->pending_at_sml = 0; + if (mrioc->current_event->discard) { + mpi3mr_print_device_event_notice(mrioc, true); + goto out; + } + } } out: if (tgtdev) @@ -1193,6 +1255,8 @@ static void mpi3mr_sastopochg_evt_bh(struct mpi3mr_ioc *mrioc, mpi3mr_sastopochg_evt_debug(mrioc, event_data); for (i = 0; i < event_data->num_entries; i++) { + if (fwevt->discard) + return; handle = le16_to_cpu(event_data->phy_entry[i].attached_dev_handle); if (!handle) continue; @@ -1324,6 +1388,8 @@ static void mpi3mr_pcietopochg_evt_bh(struct mpi3mr_ioc *mrioc, mpi3mr_pcietopochg_evt_debug(mrioc, event_data); for (i = 0; i < event_data->num_entries; i++) { + if (fwevt->discard) + return; handle = le16_to_cpu(event_data->port_entry[i].attached_dev_handle); if (!handle) @@ -1362,8 +1428,8 @@ static void mpi3mr_pcietopochg_evt_bh(struct mpi3mr_ioc *mrioc, static void mpi3mr_fwevt_bh(struct mpi3mr_ioc *mrioc, struct mpi3mr_fwevt *fwevt) { - mrioc->current_event = fwevt; mpi3mr_fwevt_del_from_list(mrioc, fwevt); + mrioc->current_event = fwevt; if (mrioc->stop_drv_processing) goto out; From patchwork Thu Feb 10 09:58:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 542342 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81281C433F5 for ; Thu, 10 Feb 2022 09:48:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238992AbiBJJsq (ORCPT ); Thu, 10 Feb 2022 04:48:46 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238777AbiBJJsg (ORCPT ); Thu, 10 Feb 2022 04:48:36 -0500 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C7681DD for ; Thu, 10 Feb 2022 01:48:38 -0800 (PST) Received: by mail-pf1-x42c.google.com with SMTP id d187so9247382pfa.10 for ; Thu, 10 Feb 2022 01:48:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version; bh=qlV21y0vM/YFJarEmfFOG4wH8qa/dBQdeOZa2DaVXm4=; b=Md2kFUtpuCaVXnKay6TWqRPmUxOhJyhDMrwW/pqk5f8//uJoYBjf1O7NVpQvI3yVVx On0cxr/vOvZwySuemF86pbPXdVZ/NHHMWQvRw9H4m/Z4TJN4+NvAejJzMf70WMvzkBqw bubX+EJ4E/a3QuoLIEQWAXZ7Emx9W8eh7uWYk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version; bh=qlV21y0vM/YFJarEmfFOG4wH8qa/dBQdeOZa2DaVXm4=; b=C9zWz2N8VV+1UxQvdmmMBCnaaDIAKvj/bQfF0Hlwuk/3cGakqPJ/dUXCmtFNJde4el GI3Z9zmEBevo8kE3uazWnaaikQzmWD7tfKIZXAv0aRVMSp5HiAzbGUXNvceKecxCbUJs fDMgAHqKAV/2eOPpHKhEpRjLxGIj6FL8yPVNTdI92dRdk1xeToTi/e+yOjNbCA2359uE FskQn2jMOQx1wppZka5zguvesPP7J0z8Gn8xMI+nNmPF0UcTDPViiIcfbmM6D4m4+N7I VN+aWffIGUVDIoR+KRQOt2HHedJbnwidF2/C+srj/5lDPvIQ9XZ+uWoFvIa2ujFCIbBU qp8A== X-Gm-Message-State: AOAM531C3qOzyX0aEmQHmjdQ4YjeZNmBnBG50nWmej+MMgtQjLvUOoIv z6VgZmaKjrE/zn7Gn4PmqjwH0Y1db9ulBly2lUGWHNZhYCv7wj3nkB3J9jHjgZZCuP7PeZr8hj2 NMYN/MUPTe2gP2QXFudeXvyxdvCUJjusUvc9HzU4MrSBEfnFu4wX4+EOfaYVpQ2i9YhhUsWt8N/ 6lg3N/xknK5SE= X-Google-Smtp-Source: ABdhPJxL5lnkNzAU+ROqeBGazzBySmdRMzRcJW0kBjT/nBTbSJW/+tWqRrTY9kuZ8boa9ypELx34rg== X-Received: by 2002:a63:d145:: with SMTP id c5mr5496435pgj.217.1644486517095; Thu, 10 Feb 2022 01:48:37 -0800 (PST) Received: from dhcp-10-123-20-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id o21sm23706698pfu.100.2022.02.10.01.48.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 01:48:36 -0800 (PST) From: Sreekanth Reddy To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, mpi3mr-linuxdrv.pdl@broadcom.com, Sreekanth Reddy Subject: [PATCH 2/9] mpi3mr: Fix print proper pending IO count Date: Thu, 10 Feb 2022 15:28:10 +0530 Message-Id: <20220210095817.22828-3-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220210095817.22828-1-sreekanth.reddy@broadcom.com> References: <20220210095817.22828-1-sreekanth.reddy@broadcom.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Print proper pending IO count after issuing target reset TM operation. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpi3mr/mpi3mr_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c index 90911ea..cfa7801 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -3452,7 +3452,7 @@ static int mpi3mr_eh_target_reset(struct scsi_cmnd *scmd) if (stgt_priv_data->pend_count) { sdev_printk(KERN_INFO, scmd->device, "%s: target has %d pending commands, target reset is failed\n", - mrioc->name, sdev_priv_data->pend_count); + mrioc->name, stgt_priv_data->pend_count); goto out; } From patchwork Thu Feb 10 09:58:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 541687 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F33E6C433EF for ; Thu, 10 Feb 2022 09:48:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238982AbiBJJsq (ORCPT ); Thu, 10 Feb 2022 04:48:46 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238987AbiBJJsj (ORCPT ); Thu, 10 Feb 2022 04:48:39 -0500 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AFB4138 for ; Thu, 10 Feb 2022 01:48:40 -0800 (PST) Received: by mail-pj1-x102a.google.com with SMTP id om7so4647100pjb.5 for ; Thu, 10 Feb 2022 01:48:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version; bh=hLKU4i6psE32Y5kT2dg71+KOU7rYGx0U5z0/jvD9cWk=; b=CmpfUJxkJisHcroiil/9S5fL0mmdF2sFnxI3G3N0OV4u0ejdIixiqPFn1Mcg7b8rI0 D4hfBNL95TjQ6r6IbibdjzXpPcGY4eWwT+AVQNQBESl+TCDI9h2RLJRo/weODLpJ7wtr DjOEhzzTvJjpTVyc2uoX//u4bmuix/X8Qjwdk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version; bh=hLKU4i6psE32Y5kT2dg71+KOU7rYGx0U5z0/jvD9cWk=; b=Dt6O0+Oj0RambL3o/3SItp+2gAte7CgUKhSg+AffkYLa55nu7zhovtk+QaxQ7TX1LA JL5hZTpWHvxA04qQZM39TubVJXrZ8EYN7HOOtyKwk1z6LNw9O3QWQaRAyYy2mrtcXnh4 sJp2mJJzB1eI0f3Bcu9GcZ9m9uHj87UdFPnTBfoXMDNQef2zmVqAZTDBipFljmBHbp1B uUOoBMNTqeIOeKotWllsq3xoamJiZ/LtASTi9wd5i1Xr79rD4T25S/2CdlJT5iLaT8mA w5wC6Rje4vLM8R6ZxZw5LVAxMEKeG8B7ID2zP40QD+J/hRvnlprCPjA4uBOoK0sup1rf ZdAA== X-Gm-Message-State: AOAM5301uKIrMCRMFeqB1f/RhBfoyMRnr4FsGLTwzYq396ev/isITYT/ BJFXvctalWvaANQj/44lyMUdvFIsDDSl/3tGDatNCASDP7NygARDsSsHdgcDLrxnce3X0BoXM7k ZrUqJHS6YmpH1l/DEsF/7cmrUfSW0iXAtkM4TTxGLKbpLUP4wHt3Rc1m+ZFHRAyFIyqEiJOL1rp wumEi5WDed6r4= X-Google-Smtp-Source: ABdhPJyA9YtO0V0QOyLQQghEG6OaU85EBY1ezO+Tf+Ob6m8ygqls2cOmrLAI5hXS8oDml5PZJb9xXw== X-Received: by 2002:a17:902:c406:: with SMTP id k6mr6713382plk.156.1644486519205; Thu, 10 Feb 2022 01:48:39 -0800 (PST) Received: from dhcp-10-123-20-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id o21sm23706698pfu.100.2022.02.10.01.48.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 01:48:38 -0800 (PST) From: Sreekanth Reddy To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, mpi3mr-linuxdrv.pdl@broadcom.com, Sreekanth Reddy Subject: [PATCH 3/9] mpi3mr: update MPI3 headers Date: Thu, 10 Feb 2022 15:28:11 +0530 Message-Id: <20220210095817.22828-4-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220210095817.22828-1-sreekanth.reddy@broadcom.com> References: <20220210095817.22828-1-sreekanth.reddy@broadcom.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Update MPI3 headers. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpi3mr/mpi/mpi30_cnfg.h | 122 +++++++++++++++------- drivers/scsi/mpi3mr/mpi/mpi30_init.h | 3 + drivers/scsi/mpi3mr/mpi/mpi30_ioc.h | 46 ++++---- drivers/scsi/mpi3mr/mpi/mpi30_pci.h | 3 +- drivers/scsi/mpi3mr/mpi/mpi30_transport.h | 8 +- drivers/scsi/mpi3mr/mpi3mr_fw.c | 6 +- drivers/scsi/mpi3mr/mpi3mr_os.c | 29 ----- 7 files changed, 116 insertions(+), 101 deletions(-) diff --git a/drivers/scsi/mpi3mr/mpi/mpi30_cnfg.h b/drivers/scsi/mpi3mr/mpi/mpi30_cnfg.h index 5e1f6ce..4cd9f24 100644 --- a/drivers/scsi/mpi3mr/mpi/mpi30_cnfg.h +++ b/drivers/scsi/mpi3mr/mpi/mpi30_cnfg.h @@ -191,7 +191,6 @@ struct mpi3_config_page_header { #define MPI3_TEMP_SENSOR_LOCATION_DRAM (0x3) #define MPI3_MFGPAGE_VENDORID_BROADCOM (0x1000) #define MPI3_MFGPAGE_DEVID_SAS4116 (0x00a5) -#define MPI3_MFGPAGE_DEVID_SAS4016 (0x00a7) struct mpi3_man_page0 { struct mpi3_config_page_header header; u8 chip_revision[8]; @@ -203,7 +202,7 @@ struct mpi3_man_page0 { __le32 reserved94; __le32 reserved98; u8 oem; - u8 sub_oem; + u8 profile_identifier; __le16 flags; u8 board_mfg_day; u8 board_mfg_month; @@ -267,13 +266,18 @@ struct mpi3_man6_gpio_entry { #define MPI3_MAN6_GPIO_FUNCTION_ISTWI_RESET (0x0a) #define MPI3_MAN6_GPIO_FUNCTION_BACKEND_PCIE_RESET (0x0b) #define MPI3_MAN6_GPIO_FUNCTION_GLOBAL_FAULT (0x0c) -#define MPI3_MAN6_GPIO_FUNCTION_EPACK_ATTN (0x0d) +#define MPI3_MAN6_GPIO_FUNCTION_PBLP_STATUS_CHANGE (0x0d) #define MPI3_MAN6_GPIO_FUNCTION_EPACK_ONLINE (0x0e) #define MPI3_MAN6_GPIO_FUNCTION_EPACK_FAULT (0x0f) #define MPI3_MAN6_GPIO_FUNCTION_CTRL_TYPE (0x10) #define MPI3_MAN6_GPIO_FUNCTION_LICENSE (0x11) #define MPI3_MAN6_GPIO_FUNCTION_REFCLK_CONTROL (0x12) #define MPI3_MAN6_GPIO_FUNCTION_BACKEND_PCIE_RESET_CLAMP (0x13) +#define MPI3_MAN6_GPIO_FUNCTION_AUXILIARY_POWER (0x14) +#define MPI3_MAN6_GPIO_FUNCTION_RAID_DATA_CACHE_DIRTY (0x15) +#define MPI3_MAN6_GPIO_FUNCTION_BOARD_FAN_CONTROL (0x16) +#define MPI3_MAN6_GPIO_FUNCTION_BOARD_FAN_FAULT (0x17) +#define MPI3_MAN6_GPIO_FUNCTION_POWER_BRAKE (0x18) #define MPI3_MAN6_GPIO_ISTWI_RESET_FUNCTIONFLAGS_DEVSELECT_MASK (0x01) #define MPI3_MAN6_GPIO_ISTWI_RESET_FUNCTIONFLAGS_DEVSELECT_ISTWI (0x00) #define MPI3_MAN6_GPIO_ISTWI_RESET_FUNCTIONFLAGS_DEVSELECT_RECEPTACLEID (0x01) @@ -409,18 +413,22 @@ enum mpi3_man9_resources { #define MPI3_MAN9_MAX_OUTSTANDING_REQS (65000) #define MPI3_MAN9_MIN_TARGET_CMDS (0) #define MPI3_MAN9_MAX_TARGET_CMDS (65535) -#define MPI3_MAN9_MIN_SAS_TARGETS (0) -#define MPI3_MAN9_MAX_SAS_TARGETS (65535) -#define MPI3_MAN9_MIN_PCIE_TARGETS (0) +#define MPI3_MAN9_MIN_NVME_TARGETS (0) #define MPI3_MAN9_MIN_INITIATORS (0) -#define MPI3_MAN9_MAX_INITIATORS (65535) -#define MPI3_MAN9_MIN_ENCLOSURES (0) +#define MPI3_MAN9_MIN_VDS (0) +#define MPI3_MAN9_MIN_ENCLOSURES (1) #define MPI3_MAN9_MAX_ENCLOSURES (65535) #define MPI3_MAN9_MIN_ENCLOSURE_PHYS (0) -#define MPI3_MAN9_MIN_NAMESPACE_COUNT (1) #define MPI3_MAN9_MIN_EXPANDERS (0) #define MPI3_MAN9_MAX_EXPANDERS (65535) #define MPI3_MAN9_MIN_PCIE_SWITCHES (0) +#define MPI3_MAN9_MIN_HOST_PD_DRIVES (0) +#define MPI3_MAN9_ADV_HOST_PD_DRIVES (0) +#define MPI3_MAN9_RAID_PD_DRIVES (0) +#define MPI3_MAN9_DRIVER_DIAG_BUFFER (0) +#define MPI3_MAN9_MIN_NAMESPACE_COUNT (1) +#define MPI3_MAN9_MIN_EXPANDERS (0) +#define MPI3_MAN9_MAX_EXPANDERS (65535) struct mpi3_man_page9 { struct mpi3_config_page_header header; u8 num_resources; @@ -564,7 +572,15 @@ struct mpi3_man11_mgmt_ctrlr_device_format { __le32 reserved00; __le32 reserved04; }; - +struct mpi3_man11_board_fan_device_format { + u8 flags; + u8 reserved01; + u8 min_fan_speed; + u8 max_fan_speed; + __le32 reserved04; +}; +#define MPI3_MAN11_BOARD_FAN_FLAGS_FAN_CTRLR_TYPE_MASK (0x07) +#define MPI3_MAN11_BOARD_FAN_FLAGS_FAN_CTRLR_TYPE_AMC6821 (0x00) union mpi3_man11_device_specific_format { struct mpi3_man11_mux_device_format mux; struct mpi3_man11_temp_sensor_device_format temp_sensor; @@ -574,9 +590,9 @@ union mpi3_man11_device_specific_format { struct mpi3_man11_bkplane_mgmt_device_format bkplane_mgmt; struct mpi3_man11_gas_gauge_device_format gas_gauge; struct mpi3_man11_mgmt_ctrlr_device_format mgmt_controller; + struct mpi3_man11_board_fan_device_format board_fan; __le32 words[2]; }; - struct mpi3_man11_istwi_device_format { u8 device_type; u8 controller; @@ -596,6 +612,7 @@ struct mpi3_man11_istwi_device_format { #define MPI3_MAN11_ISTWI_DEVTYPE_BACKPLANE_MGMT (0x05) #define MPI3_MAN11_ISTWI_DEVTYPE_GAS_GAUGE (0x06) #define MPI3_MAN11_ISTWI_DEVTYPE_MGMT_CONTROLLER (0x07) +#define MPI3_MAN11_ISTWI_DEVTYPE_BOARD_FAN (0x08) #define MPI3_MAN11_ISTWI_FLAGS_MUX_PRESENT (0x01) #ifndef MPI3_MAN11_ISTWI_DEVICE_MAX #define MPI3_MAN11_ISTWI_DEVICE_MAX (1) @@ -717,20 +734,16 @@ struct mpi3_man_page13 { #define MPI3_MAN13_PAGEVERSION (0x00) struct mpi3_man_page14 { struct mpi3_config_page_header header; - __le16 flags; - __le16 reserved0a; + __le32 reserved08; u8 num_slot_groups; u8 num_slots; __le16 max_cert_chain_length; __le32 sealed_slots; + __le32 populated_slots; + __le32 mgmt_pt_updatable_slots; }; - #define MPI3_MAN14_PAGEVERSION (0x00) -#define MPI3_MAN14_FLAGS_AUTH_SESSION_REQ (0x01) -#define MPI3_MAN14_FLAGS_AUTH_API_MASK (0x0e) -#define MPI3_MAN14_FLAGS_AUTH_API_NONE (0x00) -#define MPI3_MAN14_FLAGS_AUTH_API_CERBERUS (0x02) -#define MPI3_MAN14_FLAGS_AUTH_API_SPDM (0x04) +#define MPI3_MAN14_NUMSLOTS_MAX (32) #ifndef MPI3_MAN15_VERSION_RECORD_MAX #define MPI3_MAN15_VERSION_RECORD_MAX 1 #endif @@ -996,12 +1009,6 @@ struct mpi3_io_unit_page6 { #define MPI3_IOUNIT6_PAGEVERSION (0x00) #define MPI3_IOUNIT6_FLAGS_ACT_CABLE_PWR_EXC (0x01) -struct mpi3_io_unit_page7 { - struct mpi3_config_page_header header; - __le32 reserved08; -}; - -#define MPI3_IOUNIT7_PAGEVERSION (0x00) #ifndef MPI3_IOUNIT8_DIGEST_MAX #define MPI3_IOUNIT8_DIGEST_MAX (1) #endif @@ -1041,6 +1048,48 @@ struct mpi3_io_unit_page9 { #define MPI3_IOUNIT9_PAGEVERSION (0x00) #define MPI3_IOUNIT9_FLAGS_VDFIRST_ENABLED (0x01) #define MPI3_IOUNIT9_FIRSTDEVICE_UNKNOWN (0xffff) +struct mpi3_io_unit_page10 { + struct mpi3_config_page_header header; + u8 flags; + u8 reserved09[3]; + __le32 silicon_id; + u8 fw_version_minor; + u8 fw_version_major; + u8 hw_version_minor; + u8 hw_version_major; + u8 part_number[16]; +}; +#define MPI3_IOUNIT10_PAGEVERSION (0x00) +#define MPI3_IOUNIT10_FLAGS_VALID (0x01) +#define MPI3_IOUNIT10_FLAGS_ACTIVEID_MASK (0x02) +#define MPI3_IOUNIT10_FLAGS_ACTIVEID_FIRST_REGION (0x00) +#define MPI3_IOUNIT10_FLAGS_ACTIVEID_SECOND_REGION (0x02) +#define MPI3_IOUNIT10_FLAGS_PBLP_EXPECTED (0x80) +#ifndef MPI3_IOUNIT11_PROFILE_MAX +#define MPI3_IOUNIT11_PROFILE_MAX (1) +#endif +struct mpi3_iounit11_profile { + u8 profile_identifier; + u8 reserved01[3]; + __le16 max_vds; + __le16 max_host_pds; + __le16 max_adv_host_pds; + __le16 max_raid_pds; + __le16 max_nvme; + __le16 max_outstanding_requests; + __le16 subsystem_id; + __le16 reserved12; + __le32 reserved14[2]; +}; +struct mpi3_io_unit_page11 { + struct mpi3_config_page_header header; + __le32 reserved08; + u8 num_profiles; + u8 current_profile_identifier; + __le16 reserved0e; + struct mpi3_iounit11_profile profile[MPI3_IOUNIT11_PROFILE_MAX]; +}; +#define MPI3_IOUNIT11_PAGEVERSION (0x00) struct mpi3_ioc_page0 { struct mpi3_config_page_header header; __le32 reserved08; @@ -1058,12 +1107,10 @@ struct mpi3_ioc_page1 { struct mpi3_config_page_header header; __le32 coalescing_timeout; u8 coalescing_depth; - u8 pci_slot_num; + u8 obsolete; __le16 reserved0e; }; - #define MPI3_IOC1_PAGEVERSION (0x00) -#define MPI3_IOC1_PCISLOTNUM_UNKNOWN (0xff) #ifndef MPI3_IOC2_EVENTMASK_WORDS #define MPI3_IOC2_EVENTMASK_WORDS (4) #endif @@ -1134,13 +1181,11 @@ struct mpi3_driver_page0 { __le32 reserved14; __le32 reserved18; }; - #define MPI3_DRIVER0_PAGEVERSION (0x00) +#define MPI3_DRIVER0_BSDOPTS_DIS_HII_CONFIG_UTIL (0x00000004) #define MPI3_DRIVER0_BSDOPTS_REGISTRATION_MASK (0x00000003) #define MPI3_DRIVER0_BSDOPTS_REGISTRATION_IOC_AND_DEVS (0x00000000) #define MPI3_DRIVER0_BSDOPTS_REGISTRATION_IOC_ONLY (0x00000001) -#define MPI3_DRIVER0_BSDOPTS_DIS_HII_CONFIG_UTIL (0x00000004) -#define MPI3_DRIVER0_BSDOPTS_EN_ADV_ADAPTER_CONFIG (0x00000008) struct mpi3_driver_page1 { struct mpi3_config_page_header header; __le32 flags; @@ -2102,10 +2147,11 @@ struct mpi3_device0_vd_format { u8 raid_level; __le16 device_info; __le16 flags; - __le16 reserved06; - __le32 reserved08[2]; + __le16 io_throttle_group; + __le16 io_throttle_group_low; + __le16 io_throttle_group_high; + __le32 reserved0c; }; - #define MPI3_DEVICE0_VD_STATE_OFFLINE (0x00) #define MPI3_DEVICE0_VD_STATE_PARTIALLY_DEGRADED (0x01) #define MPI3_DEVICE0_VD_STATE_DEGRADED (0x02) @@ -2122,6 +2168,7 @@ struct mpi3_device0_vd_format { #define MPI3_DEVICE0_VD_DEVICE_INFO_NVME (0x0004) #define MPI3_DEVICE0_VD_DEVICE_INFO_SATA (0x0002) #define MPI3_DEVICE0_VD_DEVICE_INFO_SAS (0x0001) +#define MPI3_DEVICE0_VD_FLAGS_IO_THROTTLE_GROUP_QD_MASK (0xf000) #define MPI3_DEVICE0_VD_FLAGS_METADATA_MODE_MASK (0x0003) #define MPI3_DEVICE0_VD_FLAGS_METADATA_MODE_NONE (0x0000) #define MPI3_DEVICE0_VD_FLAGS_METADATA_MODE_HOST (0x0001) @@ -2205,21 +2252,20 @@ struct mpi3_device_page0 { #define MPI3_DEVICE0_ASTATUS_NVME_BAR (0x4f) #define MPI3_DEVICE0_ASTATUS_NVME_NS_DESCRIPTOR (0x50) #define MPI3_DEVICE0_ASTATUS_NVME_INCOMPATIBLE_SETTINGS (0x51) +#define MPI3_DEVICE0_ASTATUS_NVME_TOO_MANY_ERRORS (0x52) #define MPI3_DEVICE0_ASTATUS_NVME_MAX (0x5f) #define MPI3_DEVICE0_ASTATUS_VD_UNKNOWN (0x80) #define MPI3_DEVICE0_ASTATUS_VD_MAX (0x8f) #define MPI3_DEVICE0_FLAGS_CONTROLLER_DEV_HANDLE (0x0080) +#define MPI3_DEVICE0_FLAGS_IO_THROTTLING_REQUIRED (0x0010) #define MPI3_DEVICE0_FLAGS_HIDDEN (0x0008) -#define MPI3_DEVICE0_FLAGS_ATT_METHOD_MASK (0x0006) -#define MPI3_DEVICE0_FLAGS_ATT_METHOD_NOT_DIR_ATTACHED (0x0000) -#define MPI3_DEVICE0_FLAGS_ATT_METHOD_DIR_ATTACHED (0x0002) #define MPI3_DEVICE0_FLAGS_ATT_METHOD_VIRTUAL (0x0004) +#define MPI3_DEVICE0_FLAGS_ATT_METHOD_DIR_ATTACHED (0x0002) #define MPI3_DEVICE0_FLAGS_DEVICE_PRESENT (0x0001) #define MPI3_DEVICE0_QUEUE_DEPTH_NOT_APPLICABLE (0x0000) struct mpi3_device1_sas_sata_format { __le32 reserved00; }; - struct mpi3_device1_pcie_format { __le16 vendor_id; __le16 device_id; diff --git a/drivers/scsi/mpi3mr/mpi/mpi30_init.h b/drivers/scsi/mpi3mr/mpi/mpi30_init.h index 7a208dc..e2e8b22 100644 --- a/drivers/scsi/mpi3mr/mpi/mpi30_init.h +++ b/drivers/scsi/mpi3mr/mpi/mpi30_init.h @@ -55,6 +55,9 @@ struct mpi3_scsi_io_request { #define MPI3_SCSIIO_FLAGS_DATADIRECTION_READ (0x00080000) #define MPI3_SCSIIO_FLAGS_DMAOPERATION_MASK (0x00030000) #define MPI3_SCSIIO_FLAGS_DMAOPERATION_HOST_PI (0x00010000) +#define MPI3_SCSIIO_FLAGS_DIVERT_REASON_MASK (0x000000f0) +#define MPI3_SCSIIO_FLAGS_DIVERT_REASON_IO_THROTTLING (0x00000010) +#define MPI3_SCSIIO_FLAGS_DIVERT_REASON_PROD_SPECIFIC (0x00000080) #define MPI3_SCSIIO_METASGL_INDEX (3) struct mpi3_scsi_io_reply { __le16 host_tag; diff --git a/drivers/scsi/mpi3mr/mpi/mpi30_ioc.h b/drivers/scsi/mpi3mr/mpi/mpi30_ioc.h index bc56273..633037d 100644 --- a/drivers/scsi/mpi3mr/mpi/mpi30_ioc.h +++ b/drivers/scsi/mpi3mr/mpi/mpi30_ioc.h @@ -71,7 +71,7 @@ struct mpi3_ioc_facts_data { u8 ioc_number; u8 who_init; __le16 max_msix_vectors; - __le16 max_outstanding_request; + __le16 max_outstanding_requests; __le16 product_id; __le16 ioc_request_frame_size; __le16 reply_frame_size; @@ -82,7 +82,7 @@ struct mpi3_ioc_facts_data { u8 sge_modifier_shift; u8 protocol_flags; __le16 max_sas_initiators; - __le16 reserved2a; + __le16 max_data_length; __le16 max_sas_expanders; __le16 max_enclosures; __le16 min_dev_handle; @@ -106,12 +106,18 @@ struct mpi3_ioc_facts_data { u8 max_host_pd_ns_count; u8 max_adv_host_pd_ns_count; u8 max_raidpd_ns_count; - u8 reserved5f; + u8 max_devices_per_throttle_group; + __le16 io_throttle_data_length; + __le16 max_io_throttle_group; + __le16 io_throttle_low; + __le16 io_throttle_high; }; - #define MPI3_IOCFACTS_CAPABILITY_NON_SUPERVISOR_MASK (0x80000000) #define MPI3_IOCFACTS_CAPABILITY_SUPERVISOR_IOC (0x00000000) -#define MPI3_IOCFACTS_CAPABILITY_NON_SUPERVISOR_IOC (0x10000000) +#define MPI3_IOCFACTS_CAPABILITY_NON_SUPERVISOR_IOC (0x80000000) +#define MPI3_IOCFACTS_CAPABILITY_INT_COALESCE_MASK (0x00000600) +#define MPI3_IOCFACTS_CAPABILITY_INT_COALESCE_FIXED_THRESHOLD (0x00000000) +#define MPI3_IOCFACTS_CAPABILITY_INT_COALESCE_OUTSTANDING_IO (0x00000200) #define MPI3_IOCFACTS_CAPABILITY_COMPLETE_RESET_CAPABLE (0x00000100) #define MPI3_IOCFACTS_CAPABILITY_SEG_DIAG_TRACE_ENABLED (0x00000080) #define MPI3_IOCFACTS_CAPABILITY_SEG_DIAG_FW_ENABLED (0x00000040) @@ -150,6 +156,7 @@ struct mpi3_ioc_facts_data { #define MPI3_IOCFACTS_PROTOCOL_NVME (0x0004) #define MPI3_IOCFACTS_PROTOCOL_SCSI_INITIATOR (0x0002) #define MPI3_IOCFACTS_PROTOCOL_SCSI_TARGET (0x0001) +#define MPI3_IOCFACTS_MAX_DATA_LENGTH_NOT_REPORTED (0x0000) #define MPI3_IOCFACTS_FLAGS_SIGNED_NVDATA_REQUIRED (0x00010000) #define MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_MASK (0x0000ff00) #define MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_SHIFT (8) @@ -160,6 +167,7 @@ struct mpi3_ioc_facts_data { #define MPI3_IOCFACTS_FLAGS_PERSONALITY_MASK (0x0000000f) #define MPI3_IOCFACTS_FLAGS_PERSONALITY_EHBA (0x00000000) #define MPI3_IOCFACTS_FLAGS_PERSONALITY_RAID_DDR (0x00000002) +#define MPI3_IOCFACTS_IO_THROTTLE_DATA_LENGTH_NOT_REQUIRED (0x0000) struct mpi3_mgmt_passthrough_request { __le16 host_tag; u8 ioc_use_only02; @@ -228,6 +236,7 @@ struct mpi3_create_reply_queue_request { #define MPI3_CREATE_REPLY_QUEUE_FLAGS_SEGMENTED_MASK (0x80) #define MPI3_CREATE_REPLY_QUEUE_FLAGS_SEGMENTED_SEGMENTED (0x80) #define MPI3_CREATE_REPLY_QUEUE_FLAGS_SEGMENTED_CONTIGUOUS (0x00) +#define MPI3_CREATE_REPLY_QUEUE_FLAGS_COALESCE_DISABLE (0x02) #define MPI3_CREATE_REPLY_QUEUE_FLAGS_INT_ENABLE_MASK (0x01) #define MPI3_CREATE_REPLY_QUEUE_FLAGS_INT_ENABLE_DISABLE (0x00) #define MPI3_CREATE_REPLY_QUEUE_FLAGS_INT_ENABLE_ENABLE (0x01) @@ -257,7 +266,6 @@ struct mpi3_port_enable_request { #define MPI3_EVENT_LOG_DATA (0x01) #define MPI3_EVENT_CHANGE (0x02) #define MPI3_EVENT_GPIO_INTERRUPT (0x04) -#define MPI3_EVENT_TEMP_THRESHOLD (0x05) #define MPI3_EVENT_CABLE_MGMT (0x06) #define MPI3_EVENT_DEVICE_ADDED (0x07) #define MPI3_EVENT_DEVICE_INFO_CHANGED (0x08) @@ -324,20 +332,6 @@ struct mpi3_event_data_gpio_interrupt { u8 gpio_num; u8 reserved01[3]; }; - -struct mpi3_event_data_temp_threshold { - __le16 status; - u8 sensor_num; - u8 reserved03; - __le16 current_temperature; - __le16 reserved06; - __le32 reserved08; - __le32 reserved0c; -}; - -#define MPI3_EVENT_TEMP_THRESHOLD_STATUS_FATAL_THRESHOLD_EXCEEDED (0x0004) -#define MPI3_EVENT_TEMP_THRESHOLD_STATUS_CRITICAL_THRESHOLD_EXCEEDED (0x0002) -#define MPI3_EVENT_TEMP_THRESHOLD_STATUS_WARNING_THRESHOLD_EXCEEDED (0x0001) struct mpi3_event_data_cable_management { __le32 active_cable_power_requirement; u8 status; @@ -992,24 +986,27 @@ struct mpi3_ci_upload_request { #define MPI3_CTRL_OP_LOOKUP_MAPPING (0x02) #define MPI3_CTRL_OP_UPDATE_TIMESTAMP (0x04) #define MPI3_CTRL_OP_GET_TIMESTAMP (0x05) +#define MPI3_CTRL_OP_GET_IOC_CHANGE_COUNT (0x06) +#define MPI3_CTRL_OP_CHANGE_PROFILE (0x07) #define MPI3_CTRL_OP_REMOVE_DEVICE (0x10) #define MPI3_CTRL_OP_CLOSE_PERSISTENT_CONNECTION (0x11) #define MPI3_CTRL_OP_HIDDEN_ACK (0x12) #define MPI3_CTRL_OP_CLEAR_DEVICE_COUNTERS (0x13) -#define MPI3_CTRL_OP_SAS_SEND_PRIMITIVE (0x20) +#define MPI3_CTRL_OP_SEND_SAS_PRIMITIVE (0x20) #define MPI3_CTRL_OP_SAS_PHY_CONTROL (0x21) #define MPI3_CTRL_OP_READ_INTERNAL_BUS (0x23) #define MPI3_CTRL_OP_WRITE_INTERNAL_BUS (0x24) #define MPI3_CTRL_OP_PCIE_LINK_CONTROL (0x30) #define MPI3_CTRL_OP_LOOKUP_MAPPING_PARAM8_LOOKUP_METHOD_INDEX (0x00) #define MPI3_CTRL_OP_UPDATE_TIMESTAMP_PARAM64_TIMESTAMP_INDEX (0x00) +#define MPI3_CTRL_OP_CHANGE_PROFILE_PARAM8_PROFILE_ID_INDEX (0x00) #define MPI3_CTRL_OP_REMOVE_DEVICE_PARAM16_DEVHANDLE_INDEX (0x00) #define MPI3_CTRL_OP_CLOSE_PERSIST_CONN_PARAM16_DEVHANDLE_INDEX (0x00) #define MPI3_CTRL_OP_HIDDEN_ACK_PARAM16_DEVHANDLE_INDEX (0x00) #define MPI3_CTRL_OP_CLEAR_DEVICE_COUNTERS_PARAM16_DEVHANDLE_INDEX (0x00) -#define MPI3_CTRL_OP_SAS_SEND_PRIM_PARAM8_PHY_INDEX (0x00) -#define MPI3_CTRL_OP_SAS_SEND_PRIM_PARAM8_PRIMSEQ_INDEX (0x01) -#define MPI3_CTRL_OP_SAS_SEND_PRIM_PARAM32_PRIMITIVE_INDEX (0x00) +#define MPI3_CTRL_OP_SEND_SAS_PRIM_PARAM8_PHY_INDEX (0x00) +#define MPI3_CTRL_OP_SEND_SAS_PRIM_PARAM8_PRIMSEQ_INDEX (0x01) +#define MPI3_CTRL_OP_SEND_SAS_PRIM_PARAM32_PRIMITIVE_INDEX (0x00) #define MPI3_CTRL_OP_SAS_PHY_CONTROL_PARAM8_ACTION_INDEX (0x00) #define MPI3_CTRL_OP_SAS_PHY_CONTROL_PARAM8_PHY_INDEX (0x01) #define MPI3_CTRL_OP_READ_INTERNAL_BUS_PARAM64_ADDRESS_INDEX (0x00) @@ -1031,6 +1028,7 @@ struct mpi3_ci_upload_request { #define MPI3_CTRL_LOOKUP_METHOD_PERSISTID_PARAM16_PERSISTENT_ID_INDEX (1) #define MPI3_CTRL_LOOKUP_METHOD_VALUE16_DEVH_INDEX (0) #define MPI3_CTRL_GET_TIMESTAMP_VALUE64_TIMESTAMP_INDEX (0) +#define MPI3_CTRL_GET_IOC_CHANGE_COUNT_VALUE16_CHANGECOUNT_INDEX (0) #define MPI3_CTRL_READ_INTERNAL_BUS_VALUE32_VALUE_INDEX (0) #define MPI3_CTRL_PRIMFLAGS_SINGLE (0x01) #define MPI3_CTRL_PRIMFLAGS_TRIPLE (0x03) diff --git a/drivers/scsi/mpi3mr/mpi/mpi30_pci.h b/drivers/scsi/mpi3mr/mpi/mpi30_pci.h index dbfaf41..77270f5 100644 --- a/drivers/scsi/mpi3mr/mpi/mpi30_pci.h +++ b/drivers/scsi/mpi3mr/mpi/mpi30_pci.h @@ -19,7 +19,8 @@ struct mpi3_nvme_encapsulated_request { __le16 dev_handle; __le16 encapsulated_command_length; __le16 flags; - __le32 reserved10[4]; + __le32 data_length; + __le32 reserved14[3]; __le32 command[MPI3_NVME_ENCAP_CMD_MAX]; }; diff --git a/drivers/scsi/mpi3mr/mpi/mpi30_transport.h b/drivers/scsi/mpi3mr/mpi/mpi30_transport.h index 6d55011..ba05ea5 100644 --- a/drivers/scsi/mpi3mr/mpi/mpi30_transport.h +++ b/drivers/scsi/mpi3mr/mpi/mpi30_transport.h @@ -19,8 +19,9 @@ union mpi3_version_union { #define MPI3_VERSION_MAJOR (3) #define MPI3_VERSION_MINOR (0) -#define MPI3_VERSION_UNIT (22) -#define MPI3_VERSION_DEV (0) +#define MPI3_VERSION_UNIT (23) +#define MPI3_VERSION_DEV (1) +#define MPI3_DEVHANDLE_INVALID (0xffff) struct mpi3_sysif_oper_queue_indexes { __le16 producer_index; __le16 reserved02; @@ -308,7 +309,7 @@ union mpi3_sge_union { #define MPI3_SGE_FLAGS_END_OF_BUFFER (0x04) #define MPI3_SGE_FLAGS_DLAS_MASK (0x03) #define MPI3_SGE_FLAGS_DLAS_SYSTEM (0x00) -#define MPI3_SGE_FLAGS_DLAS_IOC_DDR (0x01) +#define MPI3_SGE_FLAGS_DLAS_IOC_UDP (0x01) #define MPI3_SGE_FLAGS_DLAS_IOC_CTL (0x02) #define MPI3_SGE_EXT_OPER_EEDP (0x00) #define MPI3_EEDPFLAGS_INCR_PRI_REF_TAG (0x8000) @@ -329,7 +330,6 @@ union mpi3_sge_union { #define MPI3_EEDPFLAGS_HOST_GUARD_OEM_SPECIFIC (0x0020) #define MPI3_EEDPFLAGS_PT_REF_TAG (0x0008) #define MPI3_EEDPFLAGS_EEDP_OP_MASK (0x0007) -#define MPI3_EEDPFLAGS_EEDP_OP_NOOP (0x0000) #define MPI3_EEDPFLAGS_EEDP_OP_CHECK (0x0001) #define MPI3_EEDPFLAGS_EEDP_OP_STRIP (0x0002) #define MPI3_EEDPFLAGS_EEDP_OP_CHECK_REMOVE (0x0003) diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c index 7193b98..f7dc755 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_fw.c +++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c @@ -184,9 +184,6 @@ static void mpi3mr_print_event_data(struct mpi3mr_ioc *mrioc, case MPI3_EVENT_GPIO_INTERRUPT: desc = "GPIO Interrupt"; break; - case MPI3_EVENT_TEMP_THRESHOLD: - desc = "Temperature Threshold"; - break; case MPI3_EVENT_CABLE_MGMT: desc = "Cable Management"; break; @@ -2739,7 +2736,7 @@ static void mpi3mr_process_factsdata(struct mpi3mr_ioc *mrioc, MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_SHIFT; mrioc->facts.protocol_flags = facts_data->protocol_flags; mrioc->facts.mpi_version = le32_to_cpu(facts_data->mpi_version.word); - mrioc->facts.max_reqs = le16_to_cpu(facts_data->max_outstanding_request); + mrioc->facts.max_reqs = le16_to_cpu(facts_data->max_outstanding_requests); mrioc->facts.product_id = le16_to_cpu(facts_data->product_id); mrioc->facts.reply_sz = le16_to_cpu(facts_data->reply_frame_size) * 4; mrioc->facts.exceptions = le16_to_cpu(facts_data->ioc_exceptions); @@ -3621,7 +3618,6 @@ static int mpi3mr_enable_events(struct mpi3mr_ioc *mrioc) mpi3mr_unmask_events(mrioc, MPI3_EVENT_PREPARE_FOR_RESET); mpi3mr_unmask_events(mrioc, MPI3_EVENT_CABLE_MGMT); mpi3mr_unmask_events(mrioc, MPI3_EVENT_ENERGY_PACK_CHANGE); - mpi3mr_unmask_events(mrioc, MPI3_EVENT_TEMP_THRESHOLD); retval = mpi3mr_issue_event_notification(mrioc); if (retval) diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c index cfa7801..3eac18b 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -2185,30 +2185,6 @@ static void mpi3mr_energypackchg_evt_th(struct mpi3mr_ioc *mrioc, mrioc->facts.shutdown_timeout = shutdown_timeout; } -/** - * mpi3mr_tempthreshold_evt_th - Temp threshold event tophalf - * @mrioc: Adapter instance reference - * @event_reply: event data - * - * Displays temperature threshold event details and fault code - * if any is hit due to temperature exceeding threshold. - * - * Return: Nothing - */ -static void mpi3mr_tempthreshold_evt_th(struct mpi3mr_ioc *mrioc, - struct mpi3_event_notification_reply *event_reply) -{ - struct mpi3_event_data_temp_threshold *evtdata = - (struct mpi3_event_data_temp_threshold *)event_reply->event_data; - - ioc_err(mrioc, "Temperature threshold levels %s%s%s exceeded for sensor: %d !!! Current temperature in Celsius: %d\n", - (le16_to_cpu(evtdata->status) & 0x1) ? "Warning " : " ", - (le16_to_cpu(evtdata->status) & 0x2) ? "Critical " : " ", - (le16_to_cpu(evtdata->status) & 0x4) ? "Fatal " : " ", evtdata->sensor_num, - le16_to_cpu(evtdata->current_temperature)); - mpi3mr_print_fault_info(mrioc); -} - /** * mpi3mr_cablemgmt_evt_th - Cable management event tophalf * @mrioc: Adapter instance reference @@ -2319,11 +2295,6 @@ void mpi3mr_os_handle_events(struct mpi3mr_ioc *mrioc, mpi3mr_energypackchg_evt_th(mrioc, event_reply); break; } - case MPI3_EVENT_TEMP_THRESHOLD: - { - mpi3mr_tempthreshold_evt_th(mrioc, event_reply); - break; - } case MPI3_EVENT_CABLE_MGMT: { mpi3mr_cablemgmt_evt_th(mrioc, event_reply); From patchwork Thu Feb 10 09:58:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 541686 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9489AC433FE for ; Thu, 10 Feb 2022 09:48:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238983AbiBJJss (ORCPT ); Thu, 10 Feb 2022 04:48:48 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237797AbiBJJsk (ORCPT ); Thu, 10 Feb 2022 04:48:40 -0500 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CCB81D4 for ; Thu, 10 Feb 2022 01:48:42 -0800 (PST) Received: by mail-pf1-x42a.google.com with SMTP id i6so7368524pfc.9 for ; Thu, 10 Feb 2022 01:48:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version; bh=72h5WKPlkHO5ooGhzFkIaNBrS5n0zDZmOPiouj12v/I=; b=Nsud+txbKDubfQlH1ulTvEFb0/Cpz1q+liWobej9mF65N3jTotE52LrPKGHH6FYhm9 Ke0NHaC22xi5BosUUOUyHffiucETYEB31NNtBDl0SLkcIk6vrIBO8RUSAounscmiVNke vVP2yc6jvlg8XH3S56Kize/gaUNVqdpAbH/90= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version; bh=72h5WKPlkHO5ooGhzFkIaNBrS5n0zDZmOPiouj12v/I=; b=Sro2Zlq+PtjuM51j6S/Nh8noJLfklAP/uX5T5zdexLmtELSQO21abwOYTojOixxEqx v9aS9Keqh+jkeNLOLFZrW4flJup19bnI4w5JTmOz2bARvx4I8qLkRHK7rIbfEdtoC5/A hur3PioG2JvaMsjGwEPXWwBV7D1ZV2+VVZ2yEwhQNXBNkx8SyRaIi0Bp+FPezMhVcU+Y SDIe+dFYfblTNjdoxp3tHhcoMnpamvs/tWmaBGlXq3H8zj1Xbe1zQks0AD8oCaBKo6aZ teYpFR0R0PkmhhLr14mxvxdMPFrd2NSQOkDUICKNJeh1IiFklI3WKEFeKIKi1V1KpDVb l+bg== X-Gm-Message-State: AOAM531pSKs5io/CUqdputr4OqnULNStQ0oZUnfEiRhWwc50Q+XXrvBM /SOLW6/321xfPtbPHsQ/7RgJ/WlYT+BL+hGOrNAiodbFLXZjVpb/NlXJRiRb0ietTJ3DuB/nYF5 6mjXvAjS4iaTaFBrzGSDgc4yu+5v0Y3emGrdyGBM0m6Ojzk7XY2EVutYATnqyHKeCM2DcH/R2VE THfwMxEhtVIc8= X-Google-Smtp-Source: ABdhPJyAmUzm8IzkY4zDwIyd+ijkaB5CYAGTH1hbXsWOz6AKQlNcaFNUeHm4TWTWv5g0xMjUGTcJfw== X-Received: by 2002:a63:d546:: with SMTP id v6mr5383758pgi.171.1644486521197; Thu, 10 Feb 2022 01:48:41 -0800 (PST) Received: from dhcp-10-123-20-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id o21sm23706698pfu.100.2022.02.10.01.48.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 01:48:40 -0800 (PST) From: Sreekanth Reddy To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, mpi3mr-linuxdrv.pdl@broadcom.com, Sreekanth Reddy Subject: [PATCH 4/9] mpi3mr: Fix hibernation issue Date: Thu, 10 Feb 2022 15:28:12 +0530 Message-Id: <20220210095817.22828-5-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220210095817.22828-1-sreekanth.reddy@broadcom.com> References: <20220210095817.22828-1-sreekanth.reddy@broadcom.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Hibernation operation fails when it is issued for second time. This is getting failed as driver is trying to release IOC's PCI resources after setting it's power state to D3 state. So, Set the IOC's power state to D3 only after releasing the IOC's PCI resources. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpi3mr/mpi3mr_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c index 3eac18b..43e5cc6 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -4473,8 +4473,8 @@ static int mpi3mr_suspend(struct pci_dev *pdev, pm_message_t state) ioc_info(mrioc, "pdev=0x%p, slot=%s, entering operating state [D%d]\n", pdev, pci_name(pdev), device_state); pci_save_state(pdev); - pci_set_power_state(pdev, device_state); mpi3mr_cleanup_resources(mrioc); + pci_set_power_state(pdev, device_state); return 0; } From patchwork Thu Feb 10 09:58:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 542340 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48688C4332F for ; Thu, 10 Feb 2022 09:49:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239018AbiBJJs5 (ORCPT ); Thu, 10 Feb 2022 04:48:57 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239005AbiBJJsm (ORCPT ); Thu, 10 Feb 2022 04:48:42 -0500 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 029D61DD for ; Thu, 10 Feb 2022 01:48:44 -0800 (PST) Received: by mail-pl1-x633.google.com with SMTP id y7so1375626plp.2 for ; Thu, 10 Feb 2022 01:48:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version; bh=lzQOXGXhqrqY4OfQORGWZaxpYZH91DvMSkjTFfI0Lic=; b=JPHmzTwH7d0t9HdiV19D5Zxm2fqDMh58Onbpn86ggwECtWs2sfJ68h1hpumXy13ZT7 c1DivFEDJVzmT1FhxCRdPezsEdW2LF4yeP8Ume+lQtkTHUyxErfdl6RE4KqyvvgMNSjb OZA6maMrlPKPOYMjgWv4IlK9XR0AnAgH9hWYg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version; bh=lzQOXGXhqrqY4OfQORGWZaxpYZH91DvMSkjTFfI0Lic=; b=4kSZV3BXoAu9XzBfhVTs2CebDDO47EiIxxBTOe5xbO1UxLYp+C1XDDh/upgQIlGvAi z42Cyst7c+JuIqvhf6sNihgXlyyp0PZuXB7MQn8gJxBRZNIQI9ZK69RtkB/pb1KuBu0j 1n4ts10Go40Od33s/e6LISPkx1KE6zxrfro5EzGvZN4jzy2iSsDUQe7rPwWsqA1fnV6Q ifVDS43d4BILHklWgF89h2ZD6hQ5RHbmjUrO5K4CqkMubeoZo5mG3ZmYaLAQqi2PWf+W kO3tMDEoWO1J/tn/upM1BEOJwrjH/mIzAUPs/WkHk1Ohi5ajbod1rAFlB/BNpm4mQhJk cS9A== X-Gm-Message-State: AOAM533eXB5nPDeprL21AlYi7XE08BDr3qCUCvjKUE8xFTcod7MigE/u S+RKoC/Q5klmK6oJyFLp1dvXfvXo2ibguLoaAjajuQPpRw9j7n/cUtTcR4Seeyi5myq/cqUlXuh JybqGgXWoP35mKjbj4RWhF7dS2aWTs+ifQDRAyl1wKuiqthDNsp1F5wIt4gr1SFGdBUs1PvYOTp 6jh21ZTYdfECI= X-Google-Smtp-Source: ABdhPJzcfYNJ/OrV54lCSA/+EH5ih2C2CdhAmrcfekQinu3ZZMfzwiypTLZnZL06Heg0m/atP9CKdQ== X-Received: by 2002:a17:90a:2fc5:: with SMTP id n5mr1881686pjm.67.1644486523100; Thu, 10 Feb 2022 01:48:43 -0800 (PST) Received: from dhcp-10-123-20-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id o21sm23706698pfu.100.2022.02.10.01.48.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 01:48:42 -0800 (PST) From: Sreekanth Reddy To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, mpi3mr-linuxdrv.pdl@broadcom.com, Sreekanth Reddy Subject: [PATCH 5/9] mpi3mr: Fix cmnd getting marked as inuse forever Date: Thu, 10 Feb 2022 15:28:13 +0530 Message-Id: <20220210095817.22828-6-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220210095817.22828-1-sreekanth.reddy@broadcom.com> References: <20220210095817.22828-1-sreekanth.reddy@broadcom.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org When a driver command which requires the driver to issue follow up command using the same command frame is outstanding and a soft reset operation occurs then that driver command frame is getting marked as inuse permanently and won't be reused again. Clear the driver command frames while flushing out the outstanding commands and avoid issuing any new requests using these command frames while soft reset is going on. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpi3mr/mpi3mr_os.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c index 43e5cc6..1c2e7d3 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -1583,6 +1583,9 @@ static void mpi3mr_dev_rmhs_complete_iou(struct mpi3mr_ioc *mrioc, u16 cmd_idx = drv_cmd->host_tag - MPI3MR_HOSTTAG_DEVRMCMD_MIN; struct delayed_dev_rmhs_node *delayed_dev_rmhs = NULL; + if (drv_cmd->state & MPI3MR_CMD_RESET) + goto clear_drv_cmd; + ioc_info(mrioc, "%s :dev_rmhs_iouctrl_complete:handle(0x%04x), ioc_status(0x%04x), loginfo(0x%08x)\n", __func__, drv_cmd->dev_handle, drv_cmd->ioc_status, @@ -1623,6 +1626,8 @@ static void mpi3mr_dev_rmhs_complete_iou(struct mpi3mr_ioc *mrioc, kfree(delayed_dev_rmhs); return; } + +clear_drv_cmd: drv_cmd->state = MPI3MR_CMD_NOTUSED; drv_cmd->callback = NULL; drv_cmd->retry_count = 0; @@ -1649,6 +1654,9 @@ static void mpi3mr_dev_rmhs_complete_tm(struct mpi3mr_ioc *mrioc, struct mpi3_scsi_task_mgmt_reply *tm_reply = NULL; int retval; + if (drv_cmd->state & MPI3MR_CMD_RESET) + goto clear_drv_cmd; + if (drv_cmd->state & MPI3MR_CMD_REPLY_VALID) tm_reply = (struct mpi3_scsi_task_mgmt_reply *)drv_cmd->reply; @@ -1677,11 +1685,11 @@ static void mpi3mr_dev_rmhs_complete_tm(struct mpi3mr_ioc *mrioc, if (retval) { pr_err(IOCNAME "Issue DevRmHsTMIOUCTL: Admin post failed\n", mrioc->name); - goto out_failed; + goto clear_drv_cmd; } return; -out_failed: +clear_drv_cmd: drv_cmd->state = MPI3MR_CMD_NOTUSED; drv_cmd->callback = NULL; drv_cmd->dev_handle = MPI3MR_INVALID_DEV_HANDLE; @@ -1796,6 +1804,9 @@ static void mpi3mr_complete_evt_ack(struct mpi3mr_ioc *mrioc, u16 cmd_idx = drv_cmd->host_tag - MPI3MR_HOSTTAG_EVTACKCMD_MIN; struct delayed_evt_ack_node *delayed_evtack = NULL; + if (drv_cmd->state & MPI3MR_CMD_RESET) + goto clear_drv_cmd; + if (drv_cmd->ioc_status != MPI3_IOCSTATUS_SUCCESS) { dprint_event_th(mrioc, "immediate event ack failed with ioc_status(0x%04x) log_info(0x%08x)\n", @@ -1813,6 +1824,7 @@ static void mpi3mr_complete_evt_ack(struct mpi3mr_ioc *mrioc, kfree(delayed_evtack); return; } +clear_drv_cmd: drv_cmd->state = MPI3MR_CMD_NOTUSED; drv_cmd->callback = NULL; clear_bit(cmd_idx, mrioc->evtack_cmds_bitmap); From patchwork Thu Feb 10 09:58:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 541685 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEE60C433FE for ; Thu, 10 Feb 2022 09:48:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239001AbiBJJs4 (ORCPT ); Thu, 10 Feb 2022 04:48:56 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239021AbiBJJso (ORCPT ); Thu, 10 Feb 2022 04:48:44 -0500 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E904C138 for ; Thu, 10 Feb 2022 01:48:45 -0800 (PST) Received: by mail-pf1-x431.google.com with SMTP id i21so7782978pfd.13 for ; Thu, 10 Feb 2022 01:48:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version; bh=SHislU+NeeqYgOP5VfRm8/Gf/+lEikgdd//bIbwUA/c=; b=EIFg2W50iUjf2Y8W5bJa3m37FZ+ArAKlUzPOQ/usY46/V7e59/vyQokYLyAptHd9/U zVn0eic4Rpzx1Wc4XqDe16WpulGt1IUwb3pQlhSN5EqK0v4kfHRhb2bp4p4LWQcaXQS0 yFght7SpyNDnL9yR6ErgJUsb3YvmVHnoI55mw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version; bh=SHislU+NeeqYgOP5VfRm8/Gf/+lEikgdd//bIbwUA/c=; b=GshDNZU1MVeea8c/bBZGISiyfUUTOj/1NH1vOEZhUYeNEIzuTcI0xywfIqUwUNRLEZ gmSi7T3W24zOBWCU5O9LH9cTRgQ/F6r/SkX5F//nQfCqZdKEkhwYXDHbt95EYomhBub1 hXamIDdgEogF02S+X14VKld6H9WNSE9wpVAsE7z5frp+HZPa1MTRtnoN77n0vxP1Wdgr DaUsqys/q1iGmLVyCwTBZ6EDHiE64+wiz8joCwPe8bg+DRY7pc81tQArpAmm6mCTnTpd 9Jfy+pPrenVHtUfUM1Hp1uPDH3+aJI6Pby9ubXMxryxQdF3JbC6tHveaYRS5H35NGuvM gCzw== X-Gm-Message-State: AOAM5327npQO//8VACctbFFqo5eeKyzco+BElPaxz6p/uX0IBVRraNAT lo7gov5INlHseUKNYgptZ1DBL8Hn1znR+DFp3um0icd7IDILIGsxDUDuxwBCBhKVnnMaSO03FZ5 mjOWvpTLJvTp+jtOzR2FhdB3pd47+y6HfNQt4CW+mRnUdyf8asjzVr7qOux1vjpeyrJZBLRELdU 0sys3nse82v1g= X-Google-Smtp-Source: ABdhPJyfuGZ6sWSo7TlFvjGrObUyqO5bCIeukAwN8jvUQK75WZh5101L1BUTT6YzV8E/MzY2mNp2FA== X-Received: by 2002:a05:6a00:a87:: with SMTP id b7mr6651895pfl.51.1644486525105; Thu, 10 Feb 2022 01:48:45 -0800 (PST) Received: from dhcp-10-123-20-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id o21sm23706698pfu.100.2022.02.10.01.48.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 01:48:44 -0800 (PST) From: Sreekanth Reddy To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, mpi3mr-linuxdrv.pdl@broadcom.com, Sreekanth Reddy Subject: [PATCH 6/9] mpi3mr: Fix report actual data transfer sz Date: Thu, 10 Feb 2022 15:28:14 +0530 Message-Id: <20220210095817.22828-7-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220210095817.22828-1-sreekanth.reddy@broadcom.com> References: <20220210095817.22828-1-sreekanth.reddy@broadcom.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The driver is missing to set the residual size while completing an IO. Hence, proper data transfer size is reported to the kernel on IO completion based on the transfer length reported by the firmware. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpi3mr/mpi3mr_os.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c index 1c2e7d3..dd15c1f 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -2600,6 +2600,8 @@ void mpi3mr_process_op_reply_desc(struct mpi3mr_ioc *mrioc, scmd->result = DID_OK << 16; goto out_success; } + + scsi_set_resid(scmd, scsi_bufflen(scmd) - xfer_count); if (ioc_status == MPI3_IOCSTATUS_SCSI_DATA_UNDERRUN && xfer_count == 0 && (scsi_status == MPI3_SCSI_STATUS_BUSY || scsi_status == MPI3_SCSI_STATUS_RESERVATION_CONFLICT || From patchwork Thu Feb 10 09:58:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 542341 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E4FEC433F5 for ; Thu, 10 Feb 2022 09:48:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239037AbiBJJst (ORCPT ); Thu, 10 Feb 2022 04:48:49 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238491AbiBJJsq (ORCPT ); Thu, 10 Feb 2022 04:48:46 -0500 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F40371BC for ; Thu, 10 Feb 2022 01:48:47 -0800 (PST) Received: by mail-pf1-x433.google.com with SMTP id x15so6850525pfr.5 for ; Thu, 10 Feb 2022 01:48:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version; bh=O+b9cp3RL5VkRqc9DVo+Wrj2nI+LAbLyjvyuoHxSj8o=; b=JDX3CZjvjg5tHViNcyJiioBgJY+KvRZFEBOirPbUuJp+fx/ZbrwI3TngBNSsMiCl6R 32cuPtWB/9auoXA7e+gjOTGLwVao6xzSTGBqxCWL9QOiPVxoNnTUp2ED06jdLDE00yJy uzpY/qzhfR+21emsKnnLKDdVU4uDaheao6O7A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version; bh=O+b9cp3RL5VkRqc9DVo+Wrj2nI+LAbLyjvyuoHxSj8o=; b=7oSlCc0r1X1L4Z528cWtar4/bmETku4TR0q4yu/8Uvz6TXN/321LntTtT/3sX2beqO WuUE8DBB//35QxA4D3vp/iToGym6h/r+bT7HbrCKgVYgrMngr6NmFdf7FqB5ehA+hzDp neywudcI2J9sf3JIeMFRkJ5EYsyvfmpU7HK+zGC+8qS6ov7r+vg+gfOTD/SXspAIwc4y hg6vpioNENhjqO/ikcl7bE8oH8Nes7c9LpmCKmh9zAu02Vd+v5VAwB6+jcPLPgDvIReA PP49yI363X94QCEi5YdwlXhrDNbv/BZSdbCLktw57clGowcLoET6YG497oQ8rYIgCkar 9xZw== X-Gm-Message-State: AOAM530ekua2dhOM8A0gF5bFNQ7vI96egs7Rw3qSwiLNoL4o965FXfmR tJYzQC1JXFHOjeItxMwsS96vfRLca3N89SpqsDt4DDrhDhFF83xKvq2XHd1dOyJU5XKQK0eehox 9O9GNcxiv152TD52km7TVR8VcSGHfM0Dn0ArMmq+oKLFKlE7ICBjPU90+/inn6Ej5kdLOSJNzc3 kTM981f4G3RRc= X-Google-Smtp-Source: ABdhPJwKtpkJRDAeFVK6FLn6bT0wto0jp1E9g9GTKyjpBYdDMe/MQXeQQeTMw2emLsct5VAJpsjqYw== X-Received: by 2002:a62:ddcb:: with SMTP id w194mr6819233pff.12.1644486527102; Thu, 10 Feb 2022 01:48:47 -0800 (PST) Received: from dhcp-10-123-20-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id o21sm23706698pfu.100.2022.02.10.01.48.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 01:48:46 -0800 (PST) From: Sreekanth Reddy To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, mpi3mr-linuxdrv.pdl@broadcom.com, Sreekanth Reddy Subject: [PATCH 7/9] mpi3mr: Update the copyright year Date: Thu, 10 Feb 2022 15:28:15 +0530 Message-Id: <20220210095817.22828-8-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220210095817.22828-1-sreekanth.reddy@broadcom.com> References: <20220210095817.22828-1-sreekanth.reddy@broadcom.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Update the copyright year to 2017-2022. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpi3mr/mpi3mr.h | 2 +- drivers/scsi/mpi3mr/mpi3mr_debug.h | 2 +- drivers/scsi/mpi3mr/mpi3mr_fw.c | 2 +- drivers/scsi/mpi3mr/mpi3mr_os.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/mpi3mr/mpi3mr.h b/drivers/scsi/mpi3mr/mpi3mr.h index d892ade..4669773 100644 --- a/drivers/scsi/mpi3mr/mpi3mr.h +++ b/drivers/scsi/mpi3mr/mpi3mr.h @@ -2,7 +2,7 @@ /* * Driver for Broadcom MPI3 Storage Controllers * - * Copyright (C) 2017-2021 Broadcom Inc. + * Copyright (C) 2017-2022 Broadcom Inc. * (mailto: mpi3mr-linuxdrv.pdl@broadcom.com) * */ diff --git a/drivers/scsi/mpi3mr/mpi3mr_debug.h b/drivers/scsi/mpi3mr/mpi3mr_debug.h index cef61c5..c798244 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_debug.h +++ b/drivers/scsi/mpi3mr/mpi3mr_debug.h @@ -2,7 +2,7 @@ /* * Driver for Broadcom MPI3 Storage Controllers * - * Copyright (C) 2017-2021 Broadcom Inc. + * Copyright (C) 2017-2022 Broadcom Inc. * (mailto: mpi3mr-linuxdrv.pdl@broadcom.com) * */ diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c index f7dc755..f148446 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_fw.c +++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c @@ -2,7 +2,7 @@ /* * Driver for Broadcom MPI3 Storage Controllers * - * Copyright (C) 2017-2021 Broadcom Inc. + * Copyright (C) 2017-2022 Broadcom Inc. * (mailto: mpi3mr-linuxdrv.pdl@broadcom.com) * */ diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c index dd15c1f..6a3a309 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -2,7 +2,7 @@ /* * Driver for Broadcom MPI3 Storage Controllers * - * Copyright (C) 2017-2021 Broadcom Inc. + * Copyright (C) 2017-2022 Broadcom Inc. * (mailto: mpi3mr-linuxdrv.pdl@broadcom.com) * */ From patchwork Thu Feb 10 09:58:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 541684 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97902C43219 for ; Thu, 10 Feb 2022 09:49:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239005AbiBJJs6 (ORCPT ); Thu, 10 Feb 2022 04:48:58 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239033AbiBJJst (ORCPT ); Thu, 10 Feb 2022 04:48:49 -0500 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D06941DD for ; Thu, 10 Feb 2022 01:48:50 -0800 (PST) Received: by mail-pf1-x435.google.com with SMTP id i186so9378745pfe.0 for ; Thu, 10 Feb 2022 01:48:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version; bh=37W0+LXVb0xfQ7YySXuGS7NF0kKte20NaaM+ZJ37vTk=; b=BEi/1evvikqrxH50Af15f5I/u+ChOdU3Uzjj1LGiJ3WC/Y8l25eGgjqa/hELl0PKu3 R26UDvcwFip0bBYJHA7tqy7RulML+QVL5mU9YW2yuhxClzkmPoxaqioLQqbzrs9anj5k yH8GpzlMoIRh2+Ro+SoKEW52O1V3X6lA0RZ5o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version; bh=37W0+LXVb0xfQ7YySXuGS7NF0kKte20NaaM+ZJ37vTk=; b=gSasNVxvnp/KeMgbCxTcVwu7O5gpswjvkGmGeo9QG9B2dETDdwccMTOI7DAXrDuFdo E6jmslKTJi4K7INtBkneCW6zXv161sdyyIf6XvKryv4StsuPPxHawR4qr+USRh/PRgOZ Fg26RQCFuItCX6JAi5rhaa2MfgINgymIzNmJtqMr3gOndWuMMpjrvymee53d234n9+3j YuoyLQx6eGd/oMl6CISbPtNx+S5l4ZsuGiuWTSMBoq11ai/49ArdaYUJWnYM7GkN5PaM i/GsCEV+cD+TA9fPbB2U5NxCakGN7NXj4M7zN1bmVdemRy3j0KUrhQD/SzcFWqhXcbSC ngEw== X-Gm-Message-State: AOAM532hPjtnGWq5hNdQV+W3052NUM7amAv52y4/gnXaZhm8i2mYjE+E mMxpTTwR33KlOjxB2QqCNvubCxWYOeAZk1LBSIGnl/KxOhV4P/y50zys7r3qrvtSU/a4gqR+dpw RDy5QLYgDQ8ns2GYPl5ZBSsmi4+bHB01yw3QzoYGB4bfM5x4J/+lK3++gleZ2W6slBKoRZuwd3I XS8Vj75UxLrHI= X-Google-Smtp-Source: ABdhPJzrOUDFXwMz9PoCk1i6GXkxXK1cGvABepF0pMZ/TmVOLt9ZmzWdosEUM4bZBHWBN3hRw9dxBg== X-Received: by 2002:a05:6a00:8c5:: with SMTP id s5mr6732114pfu.18.1644486529110; Thu, 10 Feb 2022 01:48:49 -0800 (PST) Received: from dhcp-10-123-20-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id o21sm23706698pfu.100.2022.02.10.01.48.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 01:48:48 -0800 (PST) From: Sreekanth Reddy To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, mpi3mr-linuxdrv.pdl@broadcom.com, Sreekanth Reddy Subject: [PATCH 8/9] mpi3mr: Fix memory leaks Date: Thu, 10 Feb 2022 15:28:16 +0530 Message-Id: <20220210095817.22828-9-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220210095817.22828-1-sreekanth.reddy@broadcom.com> References: <20220210095817.22828-1-sreekanth.reddy@broadcom.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fix memory leaks related to operational reply queue's memory segments which are not getting freed while unloading the driver. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpi3mr/mpi3mr_fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c index f148446..e25c024 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_fw.c +++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c @@ -1517,7 +1517,7 @@ static void mpi3mr_free_op_req_q_segments(struct mpi3mr_ioc *mrioc, u16 q_idx) MPI3MR_MAX_SEG_LIST_SIZE, mrioc->req_qinfo[q_idx].q_segment_list, mrioc->req_qinfo[q_idx].q_segment_list_dma); - mrioc->op_reply_qinfo[q_idx].q_segment_list = NULL; + mrioc->req_qinfo[q_idx].q_segment_list = NULL; } } else size = mrioc->req_qinfo[q_idx].segment_qd * From patchwork Thu Feb 10 09:58:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 542339 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4FFAC433F5 for ; Thu, 10 Feb 2022 09:49:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239024AbiBJJs7 (ORCPT ); Thu, 10 Feb 2022 04:48:59 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239027AbiBJJsz (ORCPT ); Thu, 10 Feb 2022 04:48:55 -0500 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A0FB201 for ; Thu, 10 Feb 2022 01:48:53 -0800 (PST) Received: by mail-pj1-x102b.google.com with SMTP id t14-20020a17090a3e4e00b001b8f6032d96so5030493pjm.2 for ; Thu, 10 Feb 2022 01:48:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version; bh=rG9WgfT+RG3ElGdslSoxrwExENg0N1OVXAPwAib97q8=; b=dg37ea7F5R+ftRWLHRISVzMj0oOmKn/3eypTysg2Xv2OWap/BHuJiE92Dhv8JFWRNM 34vZBZH81nveIVw5jXHbqNTlaIw8+ta/Xfd3rBEcs+q6Iichvf179PiqvGFH43YNQJBR CET4R7IKTVVB/4Ucwg3maSQxtwbhkGVMewFZE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version; bh=rG9WgfT+RG3ElGdslSoxrwExENg0N1OVXAPwAib97q8=; b=kQLVEmpA79E0wdVdHJZw27YLfZXJTJ4CBPJsBZ8Qf8Bnyq+6oPEISDf9ykwV6ntX1v jkqIFoAHUmwOR/9Blhnp1FJY7yCu64vsGcbCzkT9hGSpphThefbB7IFh5mUyTDP7OVzq qNnrWuoYuLN+oIlo44vCVttXcX5ZCJXtmTD36A3KexA8U5VRsc1d0YgKHFdgkg/hn48N JnOlW/c4tsULl1yua4w9rMn8uQKg+3fq4elXGTfOqLdnDEK/HQ/1wu2s2X+4sZp2cPVf veRLS+C+kxnfiZ8zGdocAybg1KYj9sS/tTMhO92rx5TKHJnaIwc8fTRrlk/kACgT/lHv LyGg== X-Gm-Message-State: AOAM530nBif9aha95ei1keCtEkpSf7U3hrJB3cgyQq/yqzhh7Dxr072y IU3IGKTORbJANATBt43+IJ9mqlnKQdZA86sxwv8mV39JxTD/8OKspLYB2zaFbDU5HuxqWq8DHhI 1GR4JRYGNuwTW9vRFCM8k8+v/lOlQaEPq7YKJ0uwlB6l4NPFUU9QoGj0Id0guSlTbLM36kQF6Jc mFKCgYj11EccM= X-Google-Smtp-Source: ABdhPJydFWZzDMfLOimfvNHxnAGrpocN3rmYgNqbgBuvRUAOg2enCJ9q+eqSGvEDKE+85C21ritrgQ== X-Received: by 2002:a17:902:da81:: with SMTP id j1mr6550594plx.3.1644486531974; Thu, 10 Feb 2022 01:48:51 -0800 (PST) Received: from dhcp-10-123-20-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id o21sm23706698pfu.100.2022.02.10.01.48.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 01:48:51 -0800 (PST) From: Sreekanth Reddy To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, mpi3mr-linuxdrv.pdl@broadcom.com, Sreekanth Reddy Subject: [PATCH 9/9] mpi3mr: Bump driver version to 8.0.0.68.0 Date: Thu, 10 Feb 2022 15:28:17 +0530 Message-Id: <20220210095817.22828-10-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220210095817.22828-1-sreekanth.reddy@broadcom.com> References: <20220210095817.22828-1-sreekanth.reddy@broadcom.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Bump mpi3mr driver version to 8.0.0.68.0. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpi3mr/mpi3mr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/mpi3mr/mpi3mr.h b/drivers/scsi/mpi3mr/mpi3mr.h index 4669773..6672d90 100644 --- a/drivers/scsi/mpi3mr/mpi3mr.h +++ b/drivers/scsi/mpi3mr/mpi3mr.h @@ -53,8 +53,8 @@ extern spinlock_t mrioc_list_lock; extern struct list_head mrioc_list; extern int prot_mask; -#define MPI3MR_DRIVER_VERSION "8.0.0.61.0" -#define MPI3MR_DRIVER_RELDATE "20-December-2021" +#define MPI3MR_DRIVER_VERSION "8.0.0.68.0" +#define MPI3MR_DRIVER_RELDATE "10-February-2022" #define MPI3MR_DRIVER_NAME "mpi3mr" #define MPI3MR_DRIVER_LICENSE "GPL"