diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2011-07-25 13:48:45 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-08-27 08:36:14 -0600 |
commit | f27fb2ef7bd88c9c5f67befe4d85e2155aa0e1a8 (patch) | |
tree | 6c313f71cc2c0701a4e873e8231571c442b131e2 /drivers/scsi/iscsi_tcp.c | |
parent | b78dbba0053c6f14384d55b929d21b85d03c38bb (diff) | |
download | blackbird-obmc-linux-f27fb2ef7bd88c9c5f67befe4d85e2155aa0e1a8.tar.gz blackbird-obmc-linux-f27fb2ef7bd88c9c5f67befe4d85e2155aa0e1a8.zip |
[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/iscsi_tcp.c')
-rw-r--r-- | drivers/scsi/iscsi_tcp.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 6ab212211760..23e706673d06 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c @@ -875,6 +875,16 @@ static void iscsi_sw_tcp_session_destroy(struct iscsi_cls_session *cls_session) static mode_t iscsi_sw_tcp_attr_is_visible(int param_type, int param) { switch (param_type) { + case ISCSI_HOST_PARAM: + switch (param) { + case ISCSI_HOST_PARAM_NETDEV_NAME: + case ISCSI_HOST_PARAM_HWADDRESS: + case ISCSI_HOST_PARAM_IPADDRESS: + case ISCSI_HOST_PARAM_INITIATOR_NAME: + return S_IRUGO; + default: + return 0; + } case ISCSI_PARAM: switch (param) { case ISCSI_PARAM_MAX_RECV_DLENGTH: @@ -955,9 +965,6 @@ static struct iscsi_transport iscsi_sw_tcp_transport = { .name = "tcp", .caps = CAP_RECOVERY_L0 | CAP_MULTI_R2T | CAP_HDRDGST | CAP_DATADGST, - .host_param_mask = ISCSI_HOST_HWADDRESS | ISCSI_HOST_IPADDRESS | - ISCSI_HOST_INITIATOR_NAME | - ISCSI_HOST_NETDEV_NAME, /* session management */ .create_session = iscsi_sw_tcp_session_create, .destroy_session = iscsi_sw_tcp_session_destroy, |