@@ -815,6 +815,7 @@ static const struct target_backend_ops fileio_ops = {
.inquiry_prod = "FILEIO",
.inquiry_rev = FD_VERSION,
.owner = THIS_MODULE,
+ .sbc_ops = &fd_sbc_ops,
.attach_hba = fd_attach_hba,
.detach_hba = fd_detach_hba,
.alloc_device = fd_alloc_device,
@@ -833,6 +833,7 @@ static const struct target_backend_ops iblock_ops = {
.inquiry_prod = "IBLOCK",
.inquiry_rev = IBLOCK_VERSION,
.owner = THIS_MODULE,
+ .sbc_ops = &iblock_sbc_ops,
.attach_hba = iblock_attach_hba,
.detach_hba = iblock_detach_hba,
.alloc_device = iblock_alloc_device,
@@ -1127,6 +1127,7 @@ static void pscsi_req_done(struct request *req, int uptodate)
static const struct target_backend_ops pscsi_ops = {
.name = "pscsi",
.owner = THIS_MODULE,
+ .sbc_ops = NULL,
.transport_flags = TRANSPORT_FLAG_PASSTHROUGH,
.attach_hba = pscsi_attach_hba,
.detach_hba = pscsi_detach_hba,
@@ -662,6 +662,7 @@ static const struct target_backend_ops rd_mcp_ops = {
.name = "rd_mcp",
.inquiry_prod = "RAMDISK-MCP",
.inquiry_rev = RD_MCP_VERSION,
+ .sbc_ops = &rd_sbc_ops,
.attach_hba = rd_attach_hba,
.detach_hba = rd_detach_hba,
.alloc_device = rd_alloc_device,
@@ -1151,6 +1151,7 @@ static const struct target_backend_ops tcmu_ops = {
.name = "user",
.owner = THIS_MODULE,
.transport_flags = TRANSPORT_FLAG_PASSTHROUGH,
+ .sbc_ops = NULL,
.attach_hba = tcmu_attach_hba,
.detach_hba = tcmu_detach_hba,
.alloc_device = tcmu_alloc_device,
@@ -8,6 +8,10 @@ struct target_backend_ops {
char inquiry_prod[16];
char inquiry_rev[4];
struct module *owner;
+ /*
+ * Used by NVMe-target for se_cmd dispatch without SCSI CDB parsing
+ */
+ struct sbc_ops *sbc_ops;
u8 transport_flags;