Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333027
b: refs/heads/master
c: fd30e93
h: refs/heads/master
i:
  333025: ae2df68
  333023: b983b25
v: v3
  • Loading branch information
Nicholas Bellinger committed Sep 18, 2012
1 parent 60443ce commit a532bb4
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 93d441a888c4aefd9f37b30911f8fefa27bdfda3
refs/heads/master: fd30e9310253235e88a4eaa38fa92439b56c220e
10 changes: 6 additions & 4 deletions trunk/drivers/target/target_core_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,8 +988,9 @@ int se_dev_set_emulate_fua_write(struct se_device *dev, int flag)
return -EINVAL;
}

if (flag && dev->transport->fua_write_emulated == 0) {
pr_err("fua_write_emulated not supported\n");
if (flag &&
dev->transport->transport_type == TRANSPORT_PLUGIN_PHBA_PDEV) {
pr_err("emulate_fua_write not supported for pSCSI\n");
return -EINVAL;
}
dev->se_sub_dev->se_dev_attrib.emulate_fua_write = flag;
Expand Down Expand Up @@ -1019,8 +1020,9 @@ int se_dev_set_emulate_write_cache(struct se_device *dev, int flag)
pr_err("Illegal value %d\n", flag);
return -EINVAL;
}
if (flag && dev->transport->write_cache_emulated == 0) {
pr_err("write_cache_emulated not supported\n");
if (flag &&
dev->transport->transport_type == TRANSPORT_PLUGIN_PHBA_PDEV) {
pr_err("emulate_write_cache not supported for pSCSI\n");
return -EINVAL;
}
dev->se_sub_dev->se_dev_attrib.emulate_write_cache = flag;
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/target/target_core_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,6 @@ static struct se_subsystem_api fileio_template = {
.name = "fileio",
.owner = THIS_MODULE,
.transport_type = TRANSPORT_PLUGIN_VHBA_PDEV,
.write_cache_emulated = 1,
.fua_write_emulated = 1,
.attach_hba = fd_attach_hba,
.detach_hba = fd_detach_hba,
.allocate_virtdevice = fd_allocate_virtdevice,
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/target/target_core_iblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -766,8 +766,6 @@ static struct se_subsystem_api iblock_template = {
.name = "iblock",
.owner = THIS_MODULE,
.transport_type = TRANSPORT_PLUGIN_VHBA_PDEV,
.write_cache_emulated = 1,
.fua_write_emulated = 1,
.attach_hba = iblock_attach_hba,
.detach_hba = iblock_detach_hba,
.allocate_virtdevice = iblock_allocate_virtdevice,
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/target/target_core_rd.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@ static int rd_parse_cdb(struct se_cmd *cmd)
static struct se_subsystem_api rd_mcp_template = {
.name = "rd_mcp",
.transport_type = TRANSPORT_PLUGIN_VHBA_VDEV,
.write_cache_emulated = 1,
.attach_hba = rd_attach_hba,
.detach_hba = rd_detach_hba,
.allocate_virtdevice = rd_allocate_virtdevice,
Expand Down
3 changes: 0 additions & 3 deletions trunk/include/target/target_core_backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ struct se_subsystem_api {

u8 transport_type;

unsigned int fua_write_emulated : 1;
unsigned int write_cache_emulated : 1;

int (*attach_hba)(struct se_hba *, u32);
void (*detach_hba)(struct se_hba *);
int (*pmode_enable_hba)(struct se_hba *, unsigned long);
Expand Down

0 comments on commit a532bb4

Please sign in to comment.