aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bnx2i
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2011-07-25 14:48:45 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-08-27 10:36:14 -0400
commitf27fb2ef7bd88c9c5f67befe4d85e2155aa0e1a8 (patch)
tree6c313f71cc2c0701a4e873e8231571c442b131e2 /drivers/scsi/bnx2i
parentb78dbba0053c6f14384d55b929d21b85d03c38bb (diff)
[SCSI] iscsi class: sysfs group is_visible callout for iscsi host attrs
The iscsi class currently does not support writable sysfs attrs for LLD sysfs settings. This patch converts the iscsi class and driver's host 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.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c
index 2db3399d2734..d1e697190970 100644
--- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
+++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
@@ -2180,6 +2180,15 @@ static int bnx2i_nl_set_path(struct Scsi_Host *shost, struct iscsi_path *params)
2180static mode_t bnx2i_attr_is_visible(int param_type, int param) 2180static mode_t bnx2i_attr_is_visible(int param_type, int param)
2181{ 2181{
2182 switch (param_type) { 2182 switch (param_type) {
2183 case ISCSI_HOST_PARAM:
2184 switch (param) {
2185 case ISCSI_HOST_PARAM_NETDEV_NAME:
2186 case ISCSI_HOST_PARAM_HWADDRESS:
2187 case ISCSI_HOST_PARAM_IPADDRESS:
2188 return S_IRUGO;
2189 default:
2190 return 0;
2191 }
2183 case ISCSI_PARAM: 2192 case ISCSI_PARAM:
2184 switch (param) { 2193 switch (param) {
2185 case ISCSI_PARAM_MAX_RECV_DLENGTH: 2194 case ISCSI_PARAM_MAX_RECV_DLENGTH:
@@ -2251,8 +2260,6 @@ struct iscsi_transport bnx2i_iscsi_transport = {
2251 CAP_MULTI_R2T | CAP_DATADGST | 2260 CAP_MULTI_R2T | CAP_DATADGST |
2252 CAP_DATA_PATH_OFFLOAD | 2261 CAP_DATA_PATH_OFFLOAD |
2253 CAP_TEXT_NEGO, 2262 CAP_TEXT_NEGO,
2254 .host_param_mask = ISCSI_HOST_HWADDRESS | ISCSI_HOST_IPADDRESS |
2255 ISCSI_HOST_NETDEV_NAME,
2256 .create_session = bnx2i_session_create, 2263 .create_session = bnx2i_session_create,
2257 .destroy_session = bnx2i_session_destroy, 2264 .destroy_session = bnx2i_session_destroy,
2258 .create_conn = bnx2i_conn_create, 2265 .create_conn = bnx2i_conn_create,