diff options
author | Sumit Saxena <sumit.saxena@broadcom.com> | 2022-04-29 17:16:37 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-05-02 17:02:42 -0400 |
commit | 506bc1a0d6ba626492c06e5632a3fbe202770fd2 (patch) | |
tree | 8cd461cab9e75a61ab0239271014b01556833c6f /drivers/scsi/mpi3mr/mpi3mr_debug.h | |
parent | f3de4706c1e0c3b9fa39ec24a30c1996a33bc9e4 (diff) | |
download | lwn-506bc1a0d6ba626492c06e5632a3fbe202770fd2.tar.gz lwn-506bc1a0d6ba626492c06e5632a3fbe202770fd2.zip |
scsi: mpi3mr: Add support for MPT commands
There are certain management commands which require firmware intervention.
These commands are termed MPT commands. Add support for them.
Link: https://lore.kernel.org/r/20220429211641.642010-5-sumit.saxena@broadcom.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mpi3mr/mpi3mr_debug.h')
-rw-r--r-- | drivers/scsi/mpi3mr/mpi3mr_debug.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/scsi/mpi3mr/mpi3mr_debug.h b/drivers/scsi/mpi3mr/mpi3mr_debug.h index 65bfac72948c..2464c400a5a4 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_debug.h +++ b/drivers/scsi/mpi3mr/mpi3mr_debug.h @@ -125,6 +125,31 @@ #endif /* MPT3SAS_DEBUG_H_INCLUDED */ /** + * dprint_dump - print contents of a memory buffer + * @req: Pointer to a memory buffer + * @sz: Memory buffer size + * @namestr: Name String to identify the buffer type + */ +static inline void +dprint_dump(void *req, int sz, const char *name_string) +{ + int i; + __le32 *mfp = (__le32 *)req; + + sz = sz/4; + if (name_string) + pr_info("%s:\n\t", name_string); + else + pr_info("request:\n\t"); + for (i = 0; i < sz; i++) { + if (i && ((i % 8) == 0)) + pr_info("\n\t"); + pr_info("%08x ", le32_to_cpu(mfp[i])); + } + pr_info("\n"); +} + +/** * dprint_dump_req - print message frame contents * @req: pointer to message frame * @sz: number of dwords |