From d5905c278b95c9e3b7f544497e50efd86a291b62 Mon Sep 17 00:00:00 2001 From: John Soni Jose Date: Sat, 20 Oct 2012 04:42:25 +0530 Subject: [PATCH] --- yaml --- r: 343701 b: refs/heads/master c: 5cac7596bac1fffda261643dba20be8c4c44b547 h: refs/heads/master i: 343699: dbac03d922f30b6f818a6834f7363245e8a60f5f v: v3 --- [refs] | 2 +- trunk/drivers/scsi/be2iscsi/be_main.c | 2 ++ trunk/drivers/scsi/be2iscsi/be_mgmt.c | 16 ++++++++++++++++ trunk/drivers/scsi/be2iscsi/be_mgmt.h | 3 +++ 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index a9714f6e551f..1c0132b8c98b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 107dfcbacb34ceb5b8cd84c3903cab9038f4bdee +refs/heads/master: 5cac7596bac1fffda261643dba20be8c4c44b547 diff --git a/trunk/drivers/scsi/be2iscsi/be_main.c b/trunk/drivers/scsi/be2iscsi/be_main.c index 2d1bbb898d96..bd0f49f2b76f 100644 --- a/trunk/drivers/scsi/be2iscsi/be_main.c +++ b/trunk/drivers/scsi/be2iscsi/be_main.c @@ -153,8 +153,10 @@ BEISCSI_RW_ATTR(log_enable, 0x00, "\t\t\t\tIO Path Events : 0x10\n" "\t\t\t\tConfiguration Path : 0x20\n"); +DEVICE_ATTR(beiscsi_drvr_ver, S_IRUGO, beiscsi_drvr_ver_disp, NULL); struct device_attribute *beiscsi_attrs[] = { &dev_attr_beiscsi_log_enable, + &dev_attr_beiscsi_drvr_ver, NULL, }; diff --git a/trunk/drivers/scsi/be2iscsi/be_mgmt.c b/trunk/drivers/scsi/be2iscsi/be_mgmt.c index aab5dd359e2c..1ec1db3a1465 100644 --- a/trunk/drivers/scsi/be2iscsi/be_mgmt.c +++ b/trunk/drivers/scsi/be2iscsi/be_mgmt.c @@ -1136,3 +1136,19 @@ int mgmt_set_vlan(struct beiscsi_hba *phba, free_mcc_tag(&phba->ctrl, tag); return 0; } + +/** + * beiscsi_drvr_ver_disp()- Display the driver Name and Version + * @dev: ptr to device not used. + * @attr: device attribute, not used. + * @buf: contains formatted text driver name and version + * + * return + * size of the formatted string + **/ +ssize_t +beiscsi_drvr_ver_disp(struct device *dev, struct device_attribute *attr, + char *buf) +{ + return snprintf(buf, PAGE_SIZE, BE_NAME "\n"); +} diff --git a/trunk/drivers/scsi/be2iscsi/be_mgmt.h b/trunk/drivers/scsi/be2iscsi/be_mgmt.h index c50cef6fec0d..291c68476c14 100644 --- a/trunk/drivers/scsi/be2iscsi/be_mgmt.h +++ b/trunk/drivers/scsi/be2iscsi/be_mgmt.h @@ -301,4 +301,7 @@ int be_mgmt_get_boot_shandle(struct beiscsi_hba *phba, unsigned int mgmt_get_all_if_id(struct beiscsi_hba *phba); int mgmt_set_vlan(struct beiscsi_hba *phba, uint16_t vlan_tag); + +ssize_t beiscsi_drvr_ver_disp(struct device *dev, + struct device_attribute *attr, char *buf); #endif