mbox series

[v6,00/24] Introducing mpi3mr driver

Message ID 20210520152545.2710479-1-kashyap.desai@broadcom.com
Headers show
Series Introducing mpi3mr driver | expand

Message

Kashyap Desai May 20, 2021, 3:25 p.m. UTC
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 <lkp@intel.com> 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 <lkp@intel.com>
 - 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 <lkp@intel.com> 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

Comments

Tomas Henzl May 25, 2021, 2:43 p.m. UTC | #1
On 5/20/21 5:25 PM, Kashyap Desai wrote:
> SCSI EH hook is added.

> Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>

> Reviewed-by: Hannes Reinecke <hare@suse.de>

> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

> 

> Cc: sathya.prakash@broadcom.com

> Cc: hare@suse.de

> Cc: thenzl@redhat.com


Reviewed-by: Tomas Henzl <thenzl@redhat.com>


Regards,
Tomas
Kashyap Desai May 26, 2021, 7:08 p.m. UTC | #2
> Subject: [PATCH v6 01/24] mpi3mr: add mpi30 Rev-R headers and Kconfig

>

> This adds the Kconfig and mpi30 headers.

>

> Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>

>

> Reviewed-by: Hannes Reinecke <hare@suse.de>

> Reviewed-by: Tomas Henzl <thenzl@redhat.com>

> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>


Bart - V6 patch set accommodate linux coding standard (mainly in mpi3mr
headers) as you initially pointed out.

Christopher,

Can you take a look at the V6 changes as per your feedback I have updated
the series. If you are OK with the changes, I can request Martin to commit
(assuming he has no further concerns) the set. This is the only pending
item for this series.

	
Kashyap
Hannes Reinecke June 1, 2021, 1:32 p.m. UTC | #3
On 5/20/21 5:25 PM, Kashyap Desai wrote:
> Firmware can report various MPI Events.

> Support for certain Events (as listed below) are enabled in the driver

> and their processing in driver is covered in this patch.

> 

> MPI3_EVENT_DEVICE_ADDED

> MPI3_EVENT_DEVICE_INFO_CHANGED

> MPI3_EVENT_DEVICE_STATUS_CHANGE

> MPI3_EVENT_ENCL_DEVICE_STATUS_CHANGE

> MPI3_EVENT_SAS_TOPOLOGY_CHANGE_LIST

> MPI3_EVENT_SAS_DISCOVERY

> MPI3_EVENT_SAS_DEVICE_DISCOVERY_ERROR

> 

> Key support in this patch is device add/removal.

> 

> Fix some compilation warning reported by kernel test robot.

> 

> Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>

> Reported-by: kernel test robot <lkp@intel.com>

> Reviewed-by: Tomas Henzl <thenzl@redhat.com>

> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

> 

> Cc: sathya.prakash@broadcom.com

> ---

>  drivers/scsi/mpi3mr/mpi/mpi30_cnfg.h | 1880 ++++++++++++++++++++++++++

>  drivers/scsi/mpi3mr/mpi/mpi30_sas.h  |   33 +

>  drivers/scsi/mpi3mr/mpi3mr.h         |  204 +++

>  drivers/scsi/mpi3mr/mpi3mr_fw.c      |  197 ++-

>  drivers/scsi/mpi3mr/mpi3mr_os.c      | 1457 +++++++++++++++++++-

>  5 files changed, 3768 insertions(+), 3 deletions(-)

>  create mode 100644 drivers/scsi/mpi3mr/mpi/mpi30_cnfg.h

>  create mode 100644 drivers/scsi/mpi3mr/mpi/mpi30_sas.h

> 

Reviewed-by: Hannes Reinecke <hare@suse.de>


Cheers,

Hannes
-- 
Dr. Hannes Reinecke		        Kernel Storage Architect
hare@suse.de			               +49 911 74053 688
SUSE Software Solutions Germany GmbH, 90409 Nürnberg
GF: F. Imendörffer, HRB 36809 (AG Nürnberg)
Hannes Reinecke June 1, 2021, 1:33 p.m. UTC | #4
On 5/20/21 5:25 PM, Kashyap Desai wrote:
> Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>

> Reviewed-by: Tomas Henzl <thenzl@redhat.com>

> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

> 

> Cc: sathya.prakash@broadcom.com

> ---

>  drivers/scsi/mpi3mr/mpi3mr_fw.c | 95 +++++++++++++++++++++++++++++++++

>  drivers/scsi/mpi3mr/mpi3mr_os.c |  1 +

>  2 files changed, 96 insertions(+)

> 

Reviewed-by: Hannes Reinecke <hare@suse.de>


Cheers,

Hannes
-- 
Dr. Hannes Reinecke		        Kernel Storage Architect
hare@suse.de			               +49 911 74053 688
SUSE Software Solutions Germany GmbH, 90409 Nürnberg
GF: F. Imendörffer, HRB 36809 (AG Nürnberg)
Martin K. Petersen June 2, 2021, 5:11 a.m. UTC | #5
Kashyap,

Applied to 5.14/scsi-staging, thanks!

All your patch trailers were bad:

---8<---
Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>


Reviewed-by: Hannes Reinecke <hare@suse.de>

Reviewed-by: Tomas Henzl <thenzl@redhat.com>

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>


Cc: sathya.prakash@broadcom.com
Cc: bvanassche@acm.org
Cc: hch@infradead.org
---8<---

You can't have blank lines like that.

---8<---
Cc: sathya.prakash@broadcom.com
Cc: bvanassche@acm.org
Cc: hch@infradead.org
Reviewed-by: Hannes Reinecke <hare@suse.de>

Reviewed-by: Tomas Henzl <thenzl@redhat.com>

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>

---8<---

-- 
Martin K. Petersen	Oracle Linux Engineering
Kashyap Desai June 2, 2021, 5:27 a.m. UTC | #6
On Wed, Jun 2, 2021 at 10:41 AM Martin K. Petersen
<martin.petersen@oracle.com> wrote:
>

>

> Kashyap,

>

> Applied to 5.14/scsi-staging, thanks!

>

> All your patch trailers were bad:


Martin,  I will take care regarding trailers as you pointed out in future.

Kashyap
>

> ---8<---

> Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>

>

> Reviewed-by: Hannes Reinecke <hare@suse.de>

> Reviewed-by: Tomas Henzl <thenzl@redhat.com>

> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

>

> Cc: sathya.prakash@broadcom.com

> Cc: bvanassche@acm.org

> Cc: hch@infradead.org

> ---8<---

>

> You can't have blank lines like that.

>

> ---8<---

> Cc: sathya.prakash@broadcom.com

> Cc: bvanassche@acm.org

> Cc: hch@infradead.org

> Reviewed-by: Hannes Reinecke <hare@suse.de>

> Reviewed-by: Tomas Henzl <thenzl@redhat.com>

> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

> Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>

> ---8<---

>

> --

> Martin K. Petersen      Oracle Linux Engineering
Martin K. Petersen June 8, 2021, 3:05 a.m. UTC | #7
On Thu, 20 May 2021 20:55:21 +0530, Kashyap Desai wrote:

> 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.

> 

> [...]


Applied to 5.14/scsi-queue, thanks!

[01/24] mpi3mr: add mpi30 Rev-R headers and Kconfig
        https://git.kernel.org/mkp/scsi/c/c4f7ac64616e
[02/24] mpi3mr: base driver code
        https://git.kernel.org/mkp/scsi/c/824a156633df
[03/24] mpi3mr: create operational request and reply queue pair
        https://git.kernel.org/mkp/scsi/c/c9566231cfaf
[04/24] mpi3mr: add support of queue command processing
        https://git.kernel.org/mkp/scsi/c/023ab2a9b4ed
[05/24] mpi3mr: add support of internal watchdog thread
        https://git.kernel.org/mkp/scsi/c/672ae26c8216
[06/24] mpi3mr: add support of event handling part-1
        https://git.kernel.org/mkp/scsi/c/13ef29ea4aa0
[07/24] mpi3mr: add support of event handling pcie devices part-2
        https://git.kernel.org/mkp/scsi/c/8e653455547a
[08/24] mpi3mr: add support of event handling part-3
        https://git.kernel.org/mkp/scsi/c/e36710dc06e3
[09/24] mpi3mr: add support for recovering controller
        https://git.kernel.org/mkp/scsi/c/fb9b04574f14
[10/24] mpi3mr: add support of timestamp sync with firmware
        https://git.kernel.org/mkp/scsi/c/54dfcffb4191
[11/24] mpi3mr: print ioc info for debugging
        https://git.kernel.org/mkp/scsi/c/ff9561e910fc
[12/24] mpi3mr: add bios_param shost template hook
        https://git.kernel.org/mkp/scsi/c/8f9c6173ca46
[13/24] mpi3mr: implement scsi error handler hooks
        https://git.kernel.org/mkp/scsi/c/e844adb1fbdc
[14/24] mpi3mr: add change queue depth support
        https://git.kernel.org/mkp/scsi/c/0ea177343f1f
[15/24] mpi3mr: allow certain commands during pci-remove hook
        https://git.kernel.org/mkp/scsi/c/82141ddba90a
[16/24] mpi3mr: hardware workaround for UNMAP commands to nvme drives
        https://git.kernel.org/mkp/scsi/c/392bbeb85b2a
[17/24] mpi3mr: add support of threaded isr
        https://git.kernel.org/mkp/scsi/c/463429f8dd5c
[18/24] mpi3mr: add complete support of soft reset
        https://git.kernel.org/mkp/scsi/c/f061178e0762
[19/24] mpi3mr: print pending host ios for debug
        https://git.kernel.org/mkp/scsi/c/71e80106d059
[20/24] mpi3mr: wait for pending IO completions upon detection of VD IO timeout
        https://git.kernel.org/mkp/scsi/c/44dc724f5eec
[21/24] mpi3mr: add support of PM suspend and resume
        https://git.kernel.org/mkp/scsi/c/2f9c4d520aa6
[22/24] mpi3mr: add support of DSN secure fw check
        https://git.kernel.org/mkp/scsi/c/28cbe2f420d3
[23/24] mpi3mr: add eedp dif dix support
        https://git.kernel.org/mkp/scsi/c/74e1f30a2868
[24/24] mpi3mr: add event handling debug prints
        https://git.kernel.org/mkp/scsi/c/9fc4abfe5a5f

-- 
Martin K. Petersen	Oracle Linux Engineering