diff options
-rw-r--r-- | drivers/scsi/qla2xxx/tcm_qla2xxx.c | 20 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/tcm_qla2xxx.h | 2 |
2 files changed, 10 insertions, 12 deletions
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index 92b1654f8e20..7eb19be35d46 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c | |||
@@ -330,7 +330,7 @@ static int tcm_qla2xxx_check_demo_mode(struct se_portal_group *se_tpg) | |||
330 | struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, | 330 | struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, |
331 | struct tcm_qla2xxx_tpg, se_tpg); | 331 | struct tcm_qla2xxx_tpg, se_tpg); |
332 | 332 | ||
333 | return QLA_TPG_ATTRIB(tpg)->generate_node_acls; | 333 | return tpg->tpg_attrib.generate_node_acls; |
334 | } | 334 | } |
335 | 335 | ||
336 | static int tcm_qla2xxx_check_demo_mode_cache(struct se_portal_group *se_tpg) | 336 | static int tcm_qla2xxx_check_demo_mode_cache(struct se_portal_group *se_tpg) |
@@ -338,7 +338,7 @@ static int tcm_qla2xxx_check_demo_mode_cache(struct se_portal_group *se_tpg) | |||
338 | struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, | 338 | struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, |
339 | struct tcm_qla2xxx_tpg, se_tpg); | 339 | struct tcm_qla2xxx_tpg, se_tpg); |
340 | 340 | ||
341 | return QLA_TPG_ATTRIB(tpg)->cache_dynamic_acls; | 341 | return tpg->tpg_attrib.cache_dynamic_acls; |
342 | } | 342 | } |
343 | 343 | ||
344 | static int tcm_qla2xxx_check_demo_write_protect(struct se_portal_group *se_tpg) | 344 | static int tcm_qla2xxx_check_demo_write_protect(struct se_portal_group *se_tpg) |
@@ -346,7 +346,7 @@ static int tcm_qla2xxx_check_demo_write_protect(struct se_portal_group *se_tpg) | |||
346 | struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, | 346 | struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, |
347 | struct tcm_qla2xxx_tpg, se_tpg); | 347 | struct tcm_qla2xxx_tpg, se_tpg); |
348 | 348 | ||
349 | return QLA_TPG_ATTRIB(tpg)->demo_mode_write_protect; | 349 | return tpg->tpg_attrib.demo_mode_write_protect; |
350 | } | 350 | } |
351 | 351 | ||
352 | static int tcm_qla2xxx_check_prod_write_protect(struct se_portal_group *se_tpg) | 352 | static int tcm_qla2xxx_check_prod_write_protect(struct se_portal_group *se_tpg) |
@@ -354,7 +354,7 @@ static int tcm_qla2xxx_check_prod_write_protect(struct se_portal_group *se_tpg) | |||
354 | struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, | 354 | struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, |
355 | struct tcm_qla2xxx_tpg, se_tpg); | 355 | struct tcm_qla2xxx_tpg, se_tpg); |
356 | 356 | ||
357 | return QLA_TPG_ATTRIB(tpg)->prod_mode_write_protect; | 357 | return tpg->tpg_attrib.prod_mode_write_protect; |
358 | } | 358 | } |
359 | 359 | ||
360 | static int tcm_qla2xxx_check_demo_mode_login_only(struct se_portal_group *se_tpg) | 360 | static int tcm_qla2xxx_check_demo_mode_login_only(struct se_portal_group *se_tpg) |
@@ -362,7 +362,7 @@ static int tcm_qla2xxx_check_demo_mode_login_only(struct se_portal_group *se_tpg | |||
362 | struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, | 362 | struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, |
363 | struct tcm_qla2xxx_tpg, se_tpg); | 363 | struct tcm_qla2xxx_tpg, se_tpg); |
364 | 364 | ||
365 | return QLA_TPG_ATTRIB(tpg)->demo_mode_login_only; | 365 | return tpg->tpg_attrib.demo_mode_login_only; |
366 | } | 366 | } |
367 | 367 | ||
368 | static struct se_node_acl *tcm_qla2xxx_alloc_fabric_acl( | 368 | static struct se_node_acl *tcm_qla2xxx_alloc_fabric_acl( |
@@ -847,7 +847,7 @@ static ssize_t tcm_qla2xxx_tpg_attrib_show_##name( \ | |||
847 | struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, \ | 847 | struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg, \ |
848 | struct tcm_qla2xxx_tpg, se_tpg); \ | 848 | struct tcm_qla2xxx_tpg, se_tpg); \ |
849 | \ | 849 | \ |
850 | return sprintf(page, "%u\n", QLA_TPG_ATTRIB(tpg)->name); \ | 850 | return sprintf(page, "%u\n", tpg->tpg_attrib.name); \ |
851 | } \ | 851 | } \ |
852 | \ | 852 | \ |
853 | static ssize_t tcm_qla2xxx_tpg_attrib_store_##name( \ | 853 | static ssize_t tcm_qla2xxx_tpg_attrib_store_##name( \ |
@@ -1027,10 +1027,10 @@ static struct se_portal_group *tcm_qla2xxx_make_tpg( | |||
1027 | * By default allow READ-ONLY TPG demo-mode access w/ cached dynamic | 1027 | * By default allow READ-ONLY TPG demo-mode access w/ cached dynamic |
1028 | * NodeACLs | 1028 | * NodeACLs |
1029 | */ | 1029 | */ |
1030 | QLA_TPG_ATTRIB(tpg)->generate_node_acls = 1; | 1030 | tpg->tpg_attrib.generate_node_acls = 1; |
1031 | QLA_TPG_ATTRIB(tpg)->demo_mode_write_protect = 1; | 1031 | tpg->tpg_attrib.demo_mode_write_protect = 1; |
1032 | QLA_TPG_ATTRIB(tpg)->cache_dynamic_acls = 1; | 1032 | tpg->tpg_attrib.cache_dynamic_acls = 1; |
1033 | QLA_TPG_ATTRIB(tpg)->demo_mode_login_only = 1; | 1033 | tpg->tpg_attrib.demo_mode_login_only = 1; |
1034 | 1034 | ||
1035 | ret = core_tpg_register(&tcm_qla2xxx_fabric_configfs->tf_ops, wwn, | 1035 | ret = core_tpg_register(&tcm_qla2xxx_fabric_configfs->tf_ops, wwn, |
1036 | &tpg->se_tpg, tpg, TRANSPORT_TPG_TYPE_NORMAL); | 1036 | &tpg->se_tpg, tpg, TRANSPORT_TPG_TYPE_NORMAL); |
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.h b/drivers/scsi/qla2xxx/tcm_qla2xxx.h index 329327528a55..771f7b816443 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.h +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.h | |||
@@ -45,8 +45,6 @@ struct tcm_qla2xxx_tpg { | |||
45 | struct se_portal_group se_tpg; | 45 | struct se_portal_group se_tpg; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | #define QLA_TPG_ATTRIB(tpg) (&(tpg)->tpg_attrib) | ||
49 | |||
50 | struct tcm_qla2xxx_fc_loopid { | 48 | struct tcm_qla2xxx_fc_loopid { |
51 | struct se_node_acl *se_nacl; | 49 | struct se_node_acl *se_nacl; |
52 | }; | 50 | }; |