aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/cxgbi/libcxgbi.c
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2011-07-25 14:48:42 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-08-27 10:36:03 -0400
commit3128c6c73cdf3df92c3165bfb785ae50114d18bf (patch)
tree49af7993064b0140bda96c795a47fa336525d02c /drivers/scsi/cxgbi/libcxgbi.c
parented1086e041b4870313dd0c0755f4bbc3b62d0d08 (diff)
[SCSI] iscsi cls: sysfs group is_visible callout for conn attrs
The iscsi class currently does not support writable sysfs attrs for LLD sysfs settings. This patch converts the iscsi class and drivers 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/libcxgbi.c')
-rw-r--r--drivers/scsi/cxgbi/libcxgbi.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index 77ac217ad5ce..e5f4f968ed7b 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -2566,6 +2566,32 @@ void cxgbi_iscsi_cleanup(struct iscsi_transport *itp,
2566} 2566}
2567EXPORT_SYMBOL_GPL(cxgbi_iscsi_cleanup); 2567EXPORT_SYMBOL_GPL(cxgbi_iscsi_cleanup);
2568 2568
2569mode_t cxgbi_attr_is_visible(int param_type, int param)
2570{
2571 switch (param_type) {
2572 case ISCSI_PARAM:
2573 switch (param) {
2574 case ISCSI_PARAM_MAX_RECV_DLENGTH:
2575 case ISCSI_PARAM_MAX_XMIT_DLENGTH:
2576 case ISCSI_PARAM_HDRDGST_EN:
2577 case ISCSI_PARAM_DATADGST_EN:
2578 case ISCSI_PARAM_CONN_ADDRESS:
2579 case ISCSI_PARAM_CONN_PORT:
2580 case ISCSI_PARAM_EXP_STATSN:
2581 case ISCSI_PARAM_PERSISTENT_ADDRESS:
2582 case ISCSI_PARAM_PERSISTENT_PORT:
2583 case ISCSI_PARAM_PING_TMO:
2584 case ISCSI_PARAM_RECV_TMO:
2585 return S_IRUGO;
2586 default:
2587 return 0;
2588 }
2589 }
2590
2591 return 0;
2592}
2593EXPORT_SYMBOL_GPL(cxgbi_attr_is_visible);
2594
2569static int __init libcxgbi_init_module(void) 2595static int __init libcxgbi_init_module(void)
2570{ 2596{
2571 sw_tag_idx_bits = (__ilog2_u32(ISCSI_ITT_MASK)) + 1; 2597 sw_tag_idx_bits = (__ilog2_u32(ISCSI_ITT_MASK)) + 1;