aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-11-22 13:52:03 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-22 13:52:03 -0500
commitb0e3636f656c98bdeded5aaa78601e3256b18d6d (patch)
tree8b2096769179967bd3c186cf79c232f21fa1d1a1 /drivers/scsi
parent0032cdefff0f4ff5bd9464036d510a5441ec8b83 (diff)
parent86784c6bdeeef78eed94d298be7a8879f6a97ee2 (diff)
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull SCSI target updates from Nicholas Bellinger: "Things have been quiet this round with mostly bugfixes, percpu conversions, and other minor iscsi-target conformance testing changes. The highlights include: - Add demo_mode_discovery attribute for iscsi-target (Thomas) - Convert tcm_fc(FCoE) to use percpu-ida pre-allocation - Add send completion interrupt coalescing for ib_isert - Convert target-core to use percpu-refcounting for se_lun - Fix mutex_trylock usage bug in iscsit_increment_maxcmdsn - tcm_loop updates (Hannes) - target-core ALUA cleanups + prep for v3.14 SCSI Referrals support (Hannes) v3.14 is currently shaping to be a busy development cycle in target land, with initial support for T10 Referrals and T10 DIF currently on the roadmap" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (40 commits) iscsi-target: chap auth shouldn't match username with trailing garbage iscsi-target: fix extract_param to handle buffer length corner case iscsi-target: Expose default_erl as TPG attribute target_core_configfs: split up ALUA supported states target_core_alua: Make supported states configurable target_core_alua: Store supported ALUA states target_core_alua: Rename ALUA_ACCESS_STATE_OPTIMIZED target_core_alua: spellcheck target core: rename (ex,im)plict -> (ex,im)plicit percpu-refcount: Add percpu-refcount.o to obj-y iscsi-target: Do not reject non-immediate CmdSNs exceeding MaxCmdSN iscsi-target: Convert iscsi_session statistics to atomic_long_t target: Convert se_device statistics to atomic_long_t target: Fix delayed Task Aborted Status (TAS) handling bug iscsi-target: Reject unsupported multi PDU text command sequence ib_isert: Avoid duplicate iscsit_increment_maxcmdsn call iscsi-target: Fix mutex_trylock usage in iscsit_increment_maxcmdsn target: Core does not need blkdev.h target: Pass through I/O topology for block backstores iser-target: Avoid using FRMR for single dma entry requests ...
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/qla2xxx/tcm_qla2xxx.c56
-rw-r--r--drivers/scsi/qla2xxx/tcm_qla2xxx.h2
2 files changed, 28 insertions, 30 deletions
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index f85b9e5c1f05..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
336static int tcm_qla2xxx_check_demo_mode_cache(struct se_portal_group *se_tpg) 336static 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
344static int tcm_qla2xxx_check_demo_write_protect(struct se_portal_group *se_tpg) 344static 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
352static int tcm_qla2xxx_check_prod_write_protect(struct se_portal_group *se_tpg) 352static 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
360static int tcm_qla2xxx_check_demo_mode_login_only(struct se_portal_group *se_tpg) 360static 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
368static struct se_node_acl *tcm_qla2xxx_alloc_fabric_acl( 368static 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 \
853static ssize_t tcm_qla2xxx_tpg_attrib_store_##name( \ 853static 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);
@@ -1830,16 +1830,16 @@ static int tcm_qla2xxx_register_configfs(void)
1830 /* 1830 /*
1831 * Setup default attribute lists for various fabric->tf_cit_tmpl 1831 * Setup default attribute lists for various fabric->tf_cit_tmpl
1832 */ 1832 */
1833 TF_CIT_TMPL(fabric)->tfc_wwn_cit.ct_attrs = tcm_qla2xxx_wwn_attrs; 1833 fabric->tf_cit_tmpl.tfc_wwn_cit.ct_attrs = tcm_qla2xxx_wwn_attrs;
1834 TF_CIT_TMPL(fabric)->tfc_tpg_base_cit.ct_attrs = tcm_qla2xxx_tpg_attrs; 1834 fabric->tf_cit_tmpl.tfc_tpg_base_cit.ct_attrs = tcm_qla2xxx_tpg_attrs;
1835 TF_CIT_TMPL(fabric)->tfc_tpg_attrib_cit.ct_attrs = 1835 fabric->tf_cit_tmpl.tfc_tpg_attrib_cit.ct_attrs =
1836 tcm_qla2xxx_tpg_attrib_attrs; 1836 tcm_qla2xxx_tpg_attrib_attrs;
1837 TF_CIT_TMPL(fabric)->tfc_tpg_param_cit.ct_attrs = NULL; 1837 fabric->tf_cit_tmpl.tfc_tpg_param_cit.ct_attrs = NULL;
1838 TF_CIT_TMPL(fabric)->tfc_tpg_np_base_cit.ct_attrs = NULL; 1838 fabric->tf_cit_tmpl.tfc_tpg_np_base_cit.ct_attrs = NULL;
1839 TF_CIT_TMPL(fabric)->tfc_tpg_nacl_base_cit.ct_attrs = NULL; 1839 fabric->tf_cit_tmpl.tfc_tpg_nacl_base_cit.ct_attrs = NULL;
1840 TF_CIT_TMPL(fabric)->tfc_tpg_nacl_attrib_cit.ct_attrs = NULL; 1840 fabric->tf_cit_tmpl.tfc_tpg_nacl_attrib_cit.ct_attrs = NULL;
1841 TF_CIT_TMPL(fabric)->tfc_tpg_nacl_auth_cit.ct_attrs = NULL; 1841 fabric->tf_cit_tmpl.tfc_tpg_nacl_auth_cit.ct_attrs = NULL;
1842 TF_CIT_TMPL(fabric)->tfc_tpg_nacl_param_cit.ct_attrs = NULL; 1842 fabric->tf_cit_tmpl.tfc_tpg_nacl_param_cit.ct_attrs = NULL;
1843 /* 1843 /*
1844 * Register the fabric for use within TCM 1844 * Register the fabric for use within TCM
1845 */ 1845 */
@@ -1870,15 +1870,15 @@ static int tcm_qla2xxx_register_configfs(void)
1870 /* 1870 /*
1871 * Setup default attribute lists for various npiv_fabric->tf_cit_tmpl 1871 * Setup default attribute lists for various npiv_fabric->tf_cit_tmpl
1872 */ 1872 */
1873 TF_CIT_TMPL(npiv_fabric)->tfc_wwn_cit.ct_attrs = tcm_qla2xxx_wwn_attrs; 1873 npiv_fabric->tf_cit_tmpl.tfc_wwn_cit.ct_attrs = tcm_qla2xxx_wwn_attrs;
1874 TF_CIT_TMPL(npiv_fabric)->tfc_tpg_base_cit.ct_attrs = NULL; 1874 npiv_fabric->tf_cit_tmpl.tfc_tpg_base_cit.ct_attrs = NULL;
1875 TF_CIT_TMPL(npiv_fabric)->tfc_tpg_attrib_cit.ct_attrs = NULL; 1875 npiv_fabric->tf_cit_tmpl.tfc_tpg_attrib_cit.ct_attrs = NULL;
1876 TF_CIT_TMPL(npiv_fabric)->tfc_tpg_param_cit.ct_attrs = NULL; 1876 npiv_fabric->tf_cit_tmpl.tfc_tpg_param_cit.ct_attrs = NULL;
1877 TF_CIT_TMPL(npiv_fabric)->tfc_tpg_np_base_cit.ct_attrs = NULL; 1877 npiv_fabric->tf_cit_tmpl.tfc_tpg_np_base_cit.ct_attrs = NULL;
1878 TF_CIT_TMPL(npiv_fabric)->tfc_tpg_nacl_base_cit.ct_attrs = NULL; 1878 npiv_fabric->tf_cit_tmpl.tfc_tpg_nacl_base_cit.ct_attrs = NULL;
1879 TF_CIT_TMPL(npiv_fabric)->tfc_tpg_nacl_attrib_cit.ct_attrs = NULL; 1879 npiv_fabric->tf_cit_tmpl.tfc_tpg_nacl_attrib_cit.ct_attrs = NULL;
1880 TF_CIT_TMPL(npiv_fabric)->tfc_tpg_nacl_auth_cit.ct_attrs = NULL; 1880 npiv_fabric->tf_cit_tmpl.tfc_tpg_nacl_auth_cit.ct_attrs = NULL;
1881 TF_CIT_TMPL(npiv_fabric)->tfc_tpg_nacl_param_cit.ct_attrs = NULL; 1881 npiv_fabric->tf_cit_tmpl.tfc_tpg_nacl_param_cit.ct_attrs = NULL;
1882 /* 1882 /*
1883 * Register the npiv_fabric for use within TCM 1883 * Register the npiv_fabric for use within TCM
1884 */ 1884 */
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
50struct tcm_qla2xxx_fc_loopid { 48struct tcm_qla2xxx_fc_loopid {
51 struct se_node_acl *se_nacl; 49 struct se_node_acl *se_nacl;
52}; 50};