aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx
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/qla4xxx
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/qla4xxx')
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index df6da3cb124d..a9da3152ee51 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -138,9 +138,6 @@ static struct iscsi_transport qla4xxx_iscsi_transport = {
138 .name = DRIVER_NAME, 138 .name = DRIVER_NAME,
139 .caps = CAP_FW_DB | CAP_SENDTARGETS_OFFLOAD | 139 .caps = CAP_FW_DB | CAP_SENDTARGETS_OFFLOAD |
140 CAP_DATA_PATH_OFFLOAD, 140 CAP_DATA_PATH_OFFLOAD,
141 .host_param_mask = ISCSI_HOST_HWADDRESS |
142 ISCSI_HOST_IPADDRESS |
143 ISCSI_HOST_INITIATOR_NAME,
144 .tgt_dscvr = qla4xxx_tgt_dscvr, 141 .tgt_dscvr = qla4xxx_tgt_dscvr,
145 .attr_is_visible = ql4_attr_is_visible, 142 .attr_is_visible = ql4_attr_is_visible,
146 .get_conn_param = qla4xxx_conn_get_param, 143 .get_conn_param = qla4xxx_conn_get_param,
@@ -156,6 +153,15 @@ static struct scsi_transport_template *qla4xxx_scsi_transport;
156static mode_t ql4_attr_is_visible(int param_type, int param) 153static mode_t ql4_attr_is_visible(int param_type, int param)
157{ 154{
158 switch (param_type) { 155 switch (param_type) {
156 case ISCSI_HOST_PARAM:
157 switch (param) {
158 case ISCSI_HOST_PARAM_HWADDRESS:
159 case ISCSI_HOST_PARAM_IPADDRESS:
160 case ISCSI_HOST_PARAM_INITIATOR_NAME:
161 return S_IRUGO;
162 default:
163 return 0;
164 }
159 case ISCSI_PARAM: 165 case ISCSI_PARAM:
160 switch (param) { 166 switch (param) {
161 case ISCSI_PARAM_CONN_ADDRESS: 167 case ISCSI_PARAM_CONN_ADDRESS: