diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2011-07-25 14:48:43 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-08-27 10:36:06 -0400 |
commit | 1d063c17298d7cd26cfe350f1e93e1727b4aa53f (patch) | |
tree | ce7996d0b3fe0903287eac2649c79658b5c9c528 /drivers/scsi/bnx2i | |
parent | 3128c6c73cdf3df92c3165bfb785ae50114d18bf (diff) |
[SCSI] iscsi class: sysfs group is_visible callout for session attrs
The iscsi class currently does not support writable sysfs
attrs for LLD sysfs settings. This patch converts the
iscsi class and driver's session attrs to use the attribute
container sysfs group and the sysfs group's is_visible callout
to be able to support readable or writable sysfs attrs.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bnx2i')
-rw-r--r-- | drivers/scsi/bnx2i/bnx2i_iscsi.c | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c index 2d529c9fa1ad..2db3399d2734 100644 --- a/drivers/scsi/bnx2i/bnx2i_iscsi.c +++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c | |||
@@ -2193,6 +2193,26 @@ static mode_t bnx2i_attr_is_visible(int param_type, int param) | |||
2193 | case ISCSI_PARAM_PERSISTENT_PORT: | 2193 | case ISCSI_PARAM_PERSISTENT_PORT: |
2194 | case ISCSI_PARAM_PING_TMO: | 2194 | case ISCSI_PARAM_PING_TMO: |
2195 | case ISCSI_PARAM_RECV_TMO: | 2195 | case ISCSI_PARAM_RECV_TMO: |
2196 | case ISCSI_PARAM_INITIAL_R2T_EN: | ||
2197 | case ISCSI_PARAM_MAX_R2T: | ||
2198 | case ISCSI_PARAM_IMM_DATA_EN: | ||
2199 | case ISCSI_PARAM_FIRST_BURST: | ||
2200 | case ISCSI_PARAM_MAX_BURST: | ||
2201 | case ISCSI_PARAM_PDU_INORDER_EN: | ||
2202 | case ISCSI_PARAM_DATASEQ_INORDER_EN: | ||
2203 | case ISCSI_PARAM_ERL: | ||
2204 | case ISCSI_PARAM_TARGET_NAME: | ||
2205 | case ISCSI_PARAM_TPGT: | ||
2206 | case ISCSI_PARAM_USERNAME: | ||
2207 | case ISCSI_PARAM_PASSWORD: | ||
2208 | case ISCSI_PARAM_USERNAME_IN: | ||
2209 | case ISCSI_PARAM_PASSWORD_IN: | ||
2210 | case ISCSI_PARAM_FAST_ABORT: | ||
2211 | case ISCSI_PARAM_ABORT_TMO: | ||
2212 | case ISCSI_PARAM_LU_RESET_TMO: | ||
2213 | case ISCSI_PARAM_TGT_RESET_TMO: | ||
2214 | case ISCSI_PARAM_IFACE_NAME: | ||
2215 | case ISCSI_PARAM_INITIATOR_NAME: | ||
2196 | return S_IRUGO; | 2216 | return S_IRUGO; |
2197 | default: | 2217 | default: |
2198 | return 0; | 2218 | return 0; |
@@ -2231,20 +2251,6 @@ struct iscsi_transport bnx2i_iscsi_transport = { | |||
2231 | CAP_MULTI_R2T | CAP_DATADGST | | 2251 | CAP_MULTI_R2T | CAP_DATADGST | |
2232 | CAP_DATA_PATH_OFFLOAD | | 2252 | CAP_DATA_PATH_OFFLOAD | |
2233 | CAP_TEXT_NEGO, | 2253 | CAP_TEXT_NEGO, |
2234 | .param_mask = ISCSI_INITIAL_R2T_EN | | ||
2235 | ISCSI_MAX_R2T | | ||
2236 | ISCSI_IMM_DATA_EN | | ||
2237 | ISCSI_FIRST_BURST | | ||
2238 | ISCSI_MAX_BURST | | ||
2239 | ISCSI_PDU_INORDER_EN | | ||
2240 | ISCSI_DATASEQ_INORDER_EN | | ||
2241 | ISCSI_ERL | | ||
2242 | ISCSI_TARGET_NAME | ISCSI_TPGT | | ||
2243 | ISCSI_USERNAME | ISCSI_PASSWORD | | ||
2244 | ISCSI_USERNAME_IN | ISCSI_PASSWORD_IN | | ||
2245 | ISCSI_FAST_ABORT | ISCSI_ABORT_TMO | | ||
2246 | ISCSI_LU_RESET_TMO | ISCSI_TGT_RESET_TMO | | ||
2247 | ISCSI_IFACE_NAME | ISCSI_INITIATOR_NAME, | ||
2248 | .host_param_mask = ISCSI_HOST_HWADDRESS | ISCSI_HOST_IPADDRESS | | 2254 | .host_param_mask = ISCSI_HOST_HWADDRESS | ISCSI_HOST_IPADDRESS | |
2249 | ISCSI_HOST_NETDEV_NAME, | 2255 | ISCSI_HOST_NETDEV_NAME, |
2250 | .create_session = bnx2i_session_create, | 2256 | .create_session = bnx2i_session_create, |