aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/cxgbi
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/cxgbi
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/cxgbi')
-rw-r--r--drivers/scsi/cxgbi/cxgb3i/cxgb3i.c3
-rw-r--r--drivers/scsi/cxgbi/cxgb4i/cxgb4i.c3
-rw-r--r--drivers/scsi/cxgbi/libcxgbi.c10
3 files changed, 10 insertions, 6 deletions
diff --git a/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c b/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c
index 50d4e3f05038..f76185b010da 100644
--- a/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c
+++ b/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c
@@ -106,9 +106,6 @@ static struct iscsi_transport cxgb3i_iscsi_transport = {
106 .caps = CAP_RECOVERY_L0 | CAP_MULTI_R2T | CAP_HDRDGST 106 .caps = CAP_RECOVERY_L0 | CAP_MULTI_R2T | CAP_HDRDGST
107 | CAP_DATADGST | CAP_DIGEST_OFFLOAD | 107 | CAP_DATADGST | CAP_DIGEST_OFFLOAD |
108 CAP_PADDING_OFFLOAD | CAP_TEXT_NEGO, 108 CAP_PADDING_OFFLOAD | CAP_TEXT_NEGO,
109 .host_param_mask = ISCSI_HOST_HWADDRESS | ISCSI_HOST_IPADDRESS |
110 ISCSI_HOST_INITIATOR_NAME |
111 ISCSI_HOST_NETDEV_NAME,
112 .attr_is_visible = cxgbi_attr_is_visible, 109 .attr_is_visible = cxgbi_attr_is_visible,
113 .get_host_param = cxgbi_get_host_param, 110 .get_host_param = cxgbi_get_host_param,
114 .set_host_param = cxgbi_set_host_param, 111 .set_host_param = cxgbi_set_host_param,
diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
index 72f19ef7e016..628a6983a20b 100644
--- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
+++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
@@ -107,9 +107,6 @@ static struct iscsi_transport cxgb4i_iscsi_transport = {
107 .caps = CAP_RECOVERY_L0 | CAP_MULTI_R2T | CAP_HDRDGST | 107 .caps = CAP_RECOVERY_L0 | CAP_MULTI_R2T | CAP_HDRDGST |
108 CAP_DATADGST | CAP_DIGEST_OFFLOAD | 108 CAP_DATADGST | CAP_DIGEST_OFFLOAD |
109 CAP_PADDING_OFFLOAD | CAP_TEXT_NEGO, 109 CAP_PADDING_OFFLOAD | CAP_TEXT_NEGO,
110 .host_param_mask = ISCSI_HOST_HWADDRESS | ISCSI_HOST_IPADDRESS |
111 ISCSI_HOST_INITIATOR_NAME |
112 ISCSI_HOST_NETDEV_NAME,
113 .attr_is_visible = cxgbi_attr_is_visible, 110 .attr_is_visible = cxgbi_attr_is_visible,
114 .get_host_param = cxgbi_get_host_param, 111 .get_host_param = cxgbi_get_host_param,
115 .set_host_param = cxgbi_set_host_param, 112 .set_host_param = cxgbi_set_host_param,
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index f9c2ca0d8083..67ded44557e1 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -2569,6 +2569,16 @@ EXPORT_SYMBOL_GPL(cxgbi_iscsi_cleanup);
2569mode_t cxgbi_attr_is_visible(int param_type, int param) 2569mode_t cxgbi_attr_is_visible(int param_type, int param)
2570{ 2570{
2571 switch (param_type) { 2571 switch (param_type) {
2572 case ISCSI_HOST_PARAM:
2573 switch (param) {
2574 case ISCSI_HOST_PARAM_NETDEV_NAME:
2575 case ISCSI_HOST_PARAM_HWADDRESS:
2576 case ISCSI_HOST_PARAM_IPADDRESS:
2577 case ISCSI_HOST_PARAM_INITIATOR_NAME:
2578 return S_IRUGO;
2579 default:
2580 return 0;
2581 }
2572 case ISCSI_PARAM: 2582 case ISCSI_PARAM:
2573 switch (param) { 2583 switch (param) {
2574 case ISCSI_PARAM_MAX_RECV_DLENGTH: 2584 case ISCSI_PARAM_MAX_RECV_DLENGTH: