From f27fb2ef7bd88c9c5f67befe4d85e2155aa0e1a8 Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Mon, 25 Jul 2011 13:48:45 -0500 Subject: [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 Signed-off-by: James Bottomley --- drivers/scsi/be2iscsi/be_iscsi.c | 9 +++++++++ drivers/scsi/be2iscsi/be_main.c | 2 -- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'drivers/scsi/be2iscsi') diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c index ecd19bb3b207..feadaa288080 100644 --- a/drivers/scsi/be2iscsi/be_iscsi.c +++ b/drivers/scsi/be2iscsi/be_iscsi.c @@ -737,6 +737,15 @@ void beiscsi_ep_disconnect(struct iscsi_endpoint *ep) mode_t be2iscsi_attr_is_visible(int param_type, int param) { switch (param_type) { + case ISCSI_HOST_PARAM: + switch (param) { + 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: diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 93a3c708411a..72ac64bbceaf 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -4364,8 +4364,6 @@ struct iscsi_transport beiscsi_iscsi_transport = { .name = DRV_NAME, .caps = CAP_RECOVERY_L0 | CAP_HDRDGST | CAP_TEXT_NEGO | CAP_MULTI_R2T | CAP_DATADGST | CAP_DATA_PATH_OFFLOAD, - .host_param_mask = ISCSI_HOST_HWADDRESS | ISCSI_HOST_IPADDRESS | - ISCSI_HOST_INITIATOR_NAME, .create_session = beiscsi_session_create, .destroy_session = beiscsi_session_destroy, .create_conn = beiscsi_conn_create, -- cgit v1.2.1