X-Git-Url: https://git.stricted.de/?a=blobdiff_plain;f=drivers%2Ftarget%2Ftarget_core_iblock.c;h=eb94367380c1d159087b43303df8df352ec38709;hb=0c2ad7d1132d8b089b1d37875917858e03610019;hp=c2d4ccbb7133bf09b8e68c13d5c68fdb6ffd78b0;hpb=e1306bdab3af8bef620990a99e613f99eb30065c;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c index c2d4ccbb7133..eb94367380c1 100644 --- a/drivers/target/target_core_iblock.c +++ b/drivers/target/target_core_iblock.c @@ -514,9 +514,11 @@ static void iblock_submit_bios(struct bio_list *list, int rw) blk_finish_plug(&plug); } -static int iblock_execute_cmd(struct se_cmd *cmd, struct scatterlist *sgl, - u32 sgl_nents, enum dma_data_direction data_direction) +static int iblock_execute_rw(struct se_cmd *cmd) { + struct scatterlist *sgl = cmd->t_data_sg; + u32 sgl_nents = cmd->t_data_nents; + enum dma_data_direction data_direction = cmd->data_direction; struct se_device *dev = cmd->se_dev; struct iblock_req *ibr; struct bio *bio; @@ -663,6 +665,15 @@ static void iblock_bio_done(struct bio *bio, int err) iblock_complete_cmd(cmd); } +static struct spc_ops iblock_spc_ops = { + .execute_rw = iblock_execute_rw, +}; + +static int iblock_parse_cdb(struct se_cmd *cmd) +{ + return sbc_parse_cdb(cmd, &iblock_spc_ops); +} + static struct se_subsystem_api iblock_template = { .name = "iblock", .owner = THIS_MODULE, @@ -674,8 +685,7 @@ static struct se_subsystem_api iblock_template = { .allocate_virtdevice = iblock_allocate_virtdevice, .create_virtdevice = iblock_create_virtdevice, .free_device = iblock_free_device, - .parse_cdb = sbc_parse_cdb, - .execute_cmd = iblock_execute_cmd, + .parse_cdb = iblock_parse_cdb, .do_discard = iblock_do_discard, .do_sync_cache = iblock_emulate_sync_cache, .check_configfs_dev_params = iblock_check_configfs_dev_params,