Skip to content

Commit

Permalink
scsi: mpi3mr: NVMe encapsulation support for tri-mode HBA
Browse files Browse the repository at this point in the history
  • Loading branch information
ixhamza committed Nov 14, 2024
1 parent cfbeb70 commit 0944917
Show file tree
Hide file tree
Showing 4 changed files with 448 additions and 3 deletions.
10 changes: 10 additions & 0 deletions drivers/scsi/mpi3mr/mpi3mr.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
#include "mpi/mpi30_sas.h"
#include "mpi/mpi30_pci.h"
#include "mpi3mr_debug.h"
#include <linux/nvme.h>
#include <linux/nvme_ioctl.h>

/* Global list and lock for storing multiple adapters managed by the driver */
extern spinlock_t mrioc_list_lock;
Expand Down Expand Up @@ -1359,6 +1361,14 @@ extern const struct attribute_group *mpi3mr_dev_groups[];
extern struct sas_function_template mpi3mr_transport_functions;
extern struct scsi_transport_template *mpi3mr_transport_template;

int mpi3mr_build_nvme_sgl(struct mpi3mr_ioc *mrioc,
struct mpi3_nvme_encapsulated_request *nvme_encap_request,
struct mpi3mr_buf_map *drv_bufs, u8 bufcnt);
int mpi3mr_build_nvme_prp(struct mpi3mr_ioc *mrioc,
struct mpi3_nvme_encapsulated_request *nvme_encap_request,
struct mpi3mr_buf_map *drv_bufs, u8 bufcnt);
unsigned int mpi3mr_get_nvme_data_fmt(
struct mpi3_nvme_encapsulated_request *nvme_encap_request);
int mpi3mr_cfg_get_dev_pg0(struct mpi3mr_ioc *mrioc, u16 *ioc_status,
struct mpi3_device_page0 *dev_pg0, u16 pg_sz, u32 form, u32 form_spec);
int mpi3mr_cfg_get_sas_phy_pg0(struct mpi3mr_ioc *mrioc, u16 *ioc_status,
Expand Down
6 changes: 3 additions & 3 deletions drivers/scsi/mpi3mr/mpi3mr_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ static void mpi3mr_bsg_build_sgl(u8 *mpi_req, uint32_t sgl_offset,
*
* Return: Data format of the NVMe command (PRP/SGL etc)
*/
static unsigned int mpi3mr_get_nvme_data_fmt(
unsigned int mpi3mr_get_nvme_data_fmt(
struct mpi3_nvme_encapsulated_request *nvme_encap_request)
{
u8 format = 0;
Expand All @@ -659,7 +659,7 @@ static unsigned int mpi3mr_get_nvme_data_fmt(
*
* Return: 0 on success, -1 on failure
*/
static int mpi3mr_build_nvme_sgl(struct mpi3mr_ioc *mrioc,
int mpi3mr_build_nvme_sgl(struct mpi3mr_ioc *mrioc,
struct mpi3_nvme_encapsulated_request *nvme_encap_request,
struct mpi3mr_buf_map *drv_bufs, u8 bufcnt)
{
Expand Down Expand Up @@ -718,7 +718,7 @@ static int mpi3mr_build_nvme_sgl(struct mpi3mr_ioc *mrioc,
*
* Return: 0 on success, -1 on failure
*/
static int mpi3mr_build_nvme_prp(struct mpi3mr_ioc *mrioc,
int mpi3mr_build_nvme_prp(struct mpi3mr_ioc *mrioc,
struct mpi3_nvme_encapsulated_request *nvme_encap_request,
struct mpi3mr_buf_map *drv_bufs, u8 bufcnt)
{
Expand Down
Loading

0 comments on commit 0944917

Please sign in to comment.