FreeBSD kernel CAM code
nvme_all.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include "opt_scsi.h"
#include <sys/systm.h>
#include <sys/libkern.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/sysctl.h>
#include <cam/cam.h>
#include <cam/cam_ccb.h>
#include <cam/cam_queue.h>
#include <cam/cam_xpt.h>
#include <cam/nvme/nvme_all.h>
#include <sys/sbuf.h>
#include <sys/endian.h>
#include <cam/cam_periph.h>
#include <cam/cam_xpt_sim.h>
#include <cam/cam_xpt_periph.h>
#include <cam/cam_xpt_internal.h>
Include dependency graph for nvme_all.c:

Go to the source code of this file.

Functions

 __FBSDID ("$FreeBSD$")
 
void nvme_ns_cmd (struct ccb_nvmeio *nvmeio, uint8_t cmd, uint32_t nsid, uint32_t cdw10, uint32_t cdw11, uint32_t cdw12, uint32_t cdw13, uint32_t cdw14, uint32_t cdw15)
 
int nvme_identify_match (caddr_t identbuffer, caddr_t table_entry)
 
void nvme_print_ident (const struct nvme_controller_data *cdata, const struct nvme_namespace_data *data, struct sbuf *sb)
 
const char * nvme_op_string (const struct nvme_command *cmd, int admin)
 
const char * nvme_cmd_string (const struct nvme_command *cmd, char *cmd_string, size_t len)
 
void nvme_cmd_sbuf (const struct nvme_command *cmd, struct sbuf *sb)
 
int nvme_command_sbuf (struct ccb_nvmeio *nvmeio, struct sbuf *sb)
 
const void * nvme_get_identify_cntrl (struct cam_periph *periph)
 
const void * nvme_get_identify_ns (struct cam_periph *periph)
 

Variables

static const char * nvme_opc2str []
 

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ nvme_cmd_sbuf()

void nvme_cmd_sbuf ( const struct nvme_command *  cmd,
struct sbuf *  sb 
)

Definition at line 170 of file nvme_all.c.

Referenced by nvme_cmd_string(), and nvme_command_sbuf().

Here is the caller graph for this function:

◆ nvme_cmd_string()

const char * nvme_cmd_string ( const struct nvme_command *  cmd,
char *  cmd_string,
size_t  len 
)

Definition at line 146 of file nvme_all.c.

References nvme_cmd_sbuf().

Referenced by nvme_proto_debug_out().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nvme_command_sbuf()

int nvme_command_sbuf ( struct ccb_nvmeio nvmeio,
struct sbuf *  sb 
)

Definition at line 189 of file nvme_all.c.

References ccb_nvmeio::ccb_h, ccb_nvmeio::cmd, ccb_hdr::func_code, nvme_cmd_sbuf(), nvme_op_string(), and XPT_NVME_ADMIN.

Referenced by cam_error_string().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nvme_get_identify_cntrl()

const void * nvme_get_identify_cntrl ( struct cam_periph periph)

Definition at line 200 of file nvme_all.c.

References cam_path::device, cam_ed::nvme_cdata, and cam_periph::path.

Referenced by ndaregister().

Here is the caller graph for this function:

◆ nvme_get_identify_ns()

const void * nvme_get_identify_ns ( struct cam_periph periph)

Definition at line 210 of file nvme_all.c.

References cam_path::device, cam_ed::nvme_data, and cam_periph::path.

Referenced by ndaregister().

Here is the caller graph for this function:

◆ nvme_identify_match()

int nvme_identify_match ( caddr_t  identbuffer,
caddr_t  table_entry 
)

Definition at line 83 of file nvme_all.c.

◆ nvme_ns_cmd()

void nvme_ns_cmd ( struct ccb_nvmeio nvmeio,
uint8_t  cmd,
uint32_t  nsid,
uint32_t  cdw10,
uint32_t  cdw11,
uint32_t  cdw12,
uint32_t  cdw13,
uint32_t  cdw14,
uint32_t  cdw15 
)

Definition at line 67 of file nvme_all.c.

References ccb_nvmeio::cmd.

Referenced by nvme_probe_start().

Here is the caller graph for this function:

◆ nvme_op_string()

const char * nvme_op_string ( const struct nvme_command *  cmd,
int  admin 
)

Definition at line 133 of file nvme_all.c.

References nvme_opc2str.

Referenced by nvme_command_sbuf(), and nvme_proto_debug_out().

Here is the caller graph for this function:

◆ nvme_print_ident()

void nvme_print_ident ( const struct nvme_controller_data *  cdata,
const struct nvme_namespace_data *  data,
struct sbuf *  sb 
)

Definition at line 89 of file nvme_all.c.

References CAM_STRVIS_FLAG_NONASCII_SPC, and cam_strvis_sbuf().

Referenced by nvme_proto_announce().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ nvme_opc2str

const char* nvme_opc2str[]
static
Initial value:
= {
"FLUSH",
"WRITE",
"READ",
"RSVD-3",
"WRITE_UNCORRECTABLE",
"COMPARE",
"RSVD-6",
"RSVD-7",
"WRITE_ZEROES",
"DATASET_MANAGEMENT",
"RSVD-a",
"RSVD-b",
"RSVD-c",
"RESERVATION_REGISTER",
"RESERVATION_REPORT",
"RSVD-f",
"RSVD-10",
"RESERVATION_ACQUIRE",
"RSVD-12",
"RSVD-13",
"RSVD-14",
"RESERVATION_RELEASE",
}

Definition at line 107 of file nvme_all.c.

Referenced by nvme_op_string().