From patchwork Thu May 20 15:25:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kashyap Desai X-Patchwork-Id: 443730 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, MIME_HEADER_CTYPE_ONLY, MIME_NO_TEXT, SPF_HELO_NONE, SPF_PASS, T_TVD_MIME_NO_HEADERS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FB61C433B4 for ; Thu, 20 May 2021 15:21:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E241E60FE7 for ; Thu, 20 May 2021 15:21:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232713AbhETPWk (ORCPT ); Thu, 20 May 2021 11:22:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232080AbhETPWk (ORCPT ); Thu, 20 May 2021 11:22:40 -0400 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 D3C33C061574 for ; Thu, 20 May 2021 08:21:18 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id b13so8865228pfv.4 for ; Thu, 20 May 2021 08:21:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=oAtalb/FPxNHVFrutU8iYAqrarjJh0epSwTJUkulXOw=; b=Micu551uXlGYsBLbwFxP0XLIgHLSkk830ZL0Jz32uhSgL6CgIdYf+w+m/Ydr9K1cZc nss7TVmXidwBg0GLirDGnPj/5y9fPHlv3RcLr1uD6H6UqLO7AVXGLMPkpX6Ov+etI7PH kHa/K5szuIyklHhOmdznKHDPrumYdiGdhW3w0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=oAtalb/FPxNHVFrutU8iYAqrarjJh0epSwTJUkulXOw=; b=eGzwS7oTCfo44oxrStUYc/eEWtInMpVFRbSUAVaEZ6EVWJWKb/sIb0wh4tasSXUgR2 zhh7OM9Ea5vtIhrQRmgn3BnWWBhFLOW+Aobqe9RDHBOagdH/LgL+2uz1f0F3gCrUX9Y7 nAyW+jCYv88PeBwVFWEb1JD8TzPzDkF13ZtiV/Hk1hDCPQ5bCrGnb39fqEeCeOkxvOmq CKABOI8A5NSPk8RYE0PEHH97qjmzmg3pCnbK6EYupFk9FrZly8N4YHLtW387OlKlu4/T dQSxRlC4pz/Msz+QzbCz7IOfcDnHNGdXgoUQ54G0u4MBb1R/iq4E24b4DqBtZitabWn2 G2tg== X-Gm-Message-State: AOAM533gGs2Z2m5rZa1LYpx7cGiwqEn9d4uBL/3XQXQ518k4WPDSpj1L 69upl+4sYwfIlcWUbAISgVRjaeVB3G4JagNgahYiYaB5drWUM0YHaKxOT5fYUIn6kgMjnRlWUvL e0JSjF0PnWf97kJiPKWmKQBf3NAHmRsBtO2pQBekkB9dsH4veOHpvsXYi/Uqlfh57SBq7QxlcFV 6vRc0KVw== X-Google-Smtp-Source: ABdhPJxRPnX46rxXjziCVyh9YosJZ6WjGKSfS1cxFPneJOpWyWIGZNAlxkCKD+yW7IWNkTf1dKrzEg== X-Received: by 2002:a63:b30a:: with SMTP id i10mr2571080pgf.306.1621524077790; Thu, 20 May 2021 08:21:17 -0700 (PDT) Received: from drv-bst-rhel8.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id s8sm2250557pfe.112.2021.05.20.08.21.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 May 2021 08:21:17 -0700 (PDT) From: Kashyap Desai To: linux-scsi@vger.kernel.org Cc: jejb@linux.ibm.com, martin.petersen@oracle.com, steve.hagan@broadcom.com, peter.rivera@broadcom.com, mpi3mr-linuxdrv.pdl@broadcom.com, Kashyap Desai Subject: [PATCH v6 00/24] Introducing mpi3mr driver Date: Thu, 20 May 2021 20:55:21 +0530 Message-Id: <20210520152545.2710479-1-kashyap.desai@broadcom.com> X-Mailer: git-send-email 2.18.1 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org v5->v6: - Removed special case handling of REPORT_LUN (Patch #5) - comment provided by Hannes. - Added Reviewed-by tag from Hannes,Tomas and Himanshu to appropriate patches. Addressed below feedback from Christoph H - Removed meta-header mpi30_api.h - Drop the leading underscore from the various type names. - Removed history and extra information from Copyright headers. v4->v5: - Fix error reported by kernel test robot in Patch #6. v3->v4 - Addressed comments from Christoph Hellwig and Bart Van Assche to make MPI headers compliant with Linux kernel coding guidelines. - Added Reviewed-by tag from Hannes and Himanshu to appropriate patches. - Use correct return type in scsi error handler (Patch #6) - comment provided by Hannes. - Fix array overflow while printing ioc info(Patch #11) - comment provided by Hannes. - Remove redundant kfree of dev_rmhs_cmds (Patch #13) - comment provided by Tomas. - Replaced few strcpy with strncpy to avoid string overflow. - Updated Copyright. v2->v3 - further removed unused pointer typedef from mpi30_type.h - Add Tomas Henzl's reviewed-tag to appropriate patches - Fix added which is Reported-by kernel test robot - Removed .eh_abort_handler suggested by Hannes. v1->v2 - removed undefined entries from mpi30_type.h - removed DRV_CMD_CALLBACK typedef - Use IRQF_SHARED instead of IRQF_ONESHOT - Use READ_ONCE, WRITE_ONCE while accessing operational request queue consumer index - removed in_interrup() - remove pr_cont. - move some code from error handling to device handling patch. - used direct values instead of macro MPI3_SECTOR_SIZE_XYZ - Add Hannes's reviewed-tag to appropriate patches - Add Reported-by kernel test robot to appropriate patches. This patch series covers logical patches of the new device driver for the MPI3MR high performance storage I/O & RAID controllers (Avenger series). The mpi3mr has true multiple h/w queue interfacing like nvme. See more info - https://www.spinics.net/lists/linux-scsi/msg147868.html The controllers managed by the mpi3mr driver are capable of reaching a very high performance numbers compared to existing controller due to the new hardware architectures. This Driver is tested with the internal versions of the MPI3MR I/O & RAID controllers. Patches are logical split mainly for better code review. Full patch set is required for functional stability of this new driver. You can find the source at - https://github.com/kadesai16/mpi3mr Kashyap Desai (24): mpi3mr: add mpi30 Rev-R headers and Kconfig mpi3mr: base driver code mpi3mr: create operational request and reply queue pair mpi3mr: add support of queue command processing mpi3mr: add support of internal watchdog thread mpi3mr: add support of event handling part-1 mpi3mr: add support of event handling pcie devices part-2 mpi3mr: add support of event handling part-3 mpi3mr: add support for recovering controller mpi3mr: add support of timestamp sync with firmware mpi3mr: print ioc info for debugging mpi3mr: add bios_param shost template hook mpi3mr: implement scsi error handler hooks mpi3mr: add change queue depth support mpi3mr: allow certain commands during pci-remove hook mpi3mr: hardware workaround for UNMAP commands to nvme drives mpi3mr: add support of threaded isr mpi3mr: add complete support of soft reset mpi3mr: print pending host ios for debug mpi3mr: wait for pending IO completions upon detection of VD IO timeout mpi3mr: add support of PM suspend and resume mpi3mr: add support of DSN secure fw check mpi3mr: add eedp dif dix support mpi3mr: add event handling debug prints drivers/scsi/Kconfig | 1 + drivers/scsi/Makefile | 1 + drivers/scsi/mpi3mr/Kconfig | 7 + drivers/scsi/mpi3mr/Makefile | 4 + drivers/scsi/mpi3mr/mpi/mpi30_cnfg.h | 1880 ++++++++++ drivers/scsi/mpi3mr/mpi/mpi30_image.h | 216 ++ drivers/scsi/mpi3mr/mpi/mpi30_init.h | 159 + drivers/scsi/mpi3mr/mpi/mpi30_ioc.h | 1004 +++++ drivers/scsi/mpi3mr/mpi/mpi30_sas.h | 33 + drivers/scsi/mpi3mr/mpi/mpi30_transport.h | 463 +++ drivers/scsi/mpi3mr/mpi3mr.h | 900 +++++ drivers/scsi/mpi3mr/mpi3mr_debug.h | 60 + drivers/scsi/mpi3mr/mpi3mr_fw.c | 3956 ++++++++++++++++++++ drivers/scsi/mpi3mr/mpi3mr_os.c | 4054 +++++++++++++++++++++ 14 files changed, 12738 insertions(+) create mode 100644 drivers/scsi/mpi3mr/Kconfig create mode 100644 drivers/scsi/mpi3mr/Makefile create mode 100644 drivers/scsi/mpi3mr/mpi/mpi30_cnfg.h create mode 100644 drivers/scsi/mpi3mr/mpi/mpi30_image.h create mode 100644 drivers/scsi/mpi3mr/mpi/mpi30_init.h create mode 100644 drivers/scsi/mpi3mr/mpi/mpi30_ioc.h create mode 100644 drivers/scsi/mpi3mr/mpi/mpi30_sas.h create mode 100644 drivers/scsi/mpi3mr/mpi/mpi30_transport.h create mode 100644 drivers/scsi/mpi3mr/mpi3mr.h create mode 100644 drivers/scsi/mpi3mr/mpi3mr_debug.h create mode 100644 drivers/scsi/mpi3mr/mpi3mr_fw.c create mode 100644 drivers/scsi/mpi3mr/mpi3mr_os.c Reviewed-by: Tomas Henzl Reviewed-by: Hannes Reinecke Reviewed-by: Hannes Reinecke Signed-off-by: Kashyap Desai Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Reviewed-by: Himanshu Madhani Signed-off-by: Kashyap Desai