Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 375355
b: refs/heads/master
c: 22661e2
h: refs/heads/master
i:
  375353: ecadd85
  375351: 26e92b6
v: v3
  • Loading branch information
Jayamohan Kallickal authored and James Bottomley committed May 2, 2013
1 parent 9843ef2 commit 8bab911
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ef9e1b9bdca82d9b692da77e35595c2d4b87a4b5
refs/heads/master: 22661e25cca8bb780f79756e7a7e201b478f8c14
2 changes: 2 additions & 0 deletions trunk/drivers/scsi/be2iscsi/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,12 @@ BEISCSI_RW_ATTR(log_enable, 0x00,

DEVICE_ATTR(beiscsi_drvr_ver, S_IRUGO, beiscsi_drvr_ver_disp, NULL);
DEVICE_ATTR(beiscsi_adapter_family, S_IRUGO, beiscsi_adap_family_disp, NULL);
DEVICE_ATTR(beiscsi_fw_ver, S_IRUGO, beiscsi_fw_ver_disp, NULL);
struct device_attribute *beiscsi_attrs[] = {
&dev_attr_beiscsi_log_enable,
&dev_attr_beiscsi_drvr_ver,
&dev_attr_beiscsi_adapter_family,
&dev_attr_beiscsi_fw_ver,
NULL,
};

Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/scsi/be2iscsi/be_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
#define BEISCSI_MAX_NUM_CPUS 7
#define OC_SKH_MAX_NUM_CPUS 31

#define BEISCSI_VER_STRLEN 32

#define BEISCSI_SGLIST_ELEMENTS 30

Expand Down Expand Up @@ -341,6 +342,7 @@ struct beiscsi_hba {
struct delayed_work beiscsi_hw_check_task;

u8 mac_address[ETH_ALEN];
char fw_ver_str[BEISCSI_VER_STRLEN];
char wq_name[20];
struct workqueue_struct *wq; /* The actuak work queue */
struct be_ctrl_info ctrl;
Expand Down
21 changes: 21 additions & 0 deletions trunk/drivers/scsi/be2iscsi/be_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,8 @@ int mgmt_check_supported_fw(struct be_ctrl_info *ctrl,
beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_INIT,
"BM_%d : phba->fw_config.iscsi_features = %d\n",
phba->fw_config.iscsi_features);
memcpy(phba->fw_ver_str, resp->params.hba_attribs.
firmware_version_string, BEISCSI_VER_STRLEN);
} else
beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
"BG_%d : Failed in mgmt_check_supported_fw\n");
Expand Down Expand Up @@ -1259,6 +1261,25 @@ beiscsi_drvr_ver_disp(struct device *dev, struct device_attribute *attr,
return snprintf(buf, PAGE_SIZE, BE_NAME "\n");
}

/**
* beiscsi_fw_ver_disp()- Display Firmware Version
* @dev: ptr to device not used.
* @attr: device attribute, not used.
* @buf: contains formatted text Firmware version
*
* return
* size of the formatted string
**/
ssize_t
beiscsi_fw_ver_disp(struct device *dev, struct device_attribute *attr,
char *buf)
{
struct Scsi_Host *shost = class_to_shost(dev);
struct beiscsi_hba *phba = iscsi_host_priv(shost);

return snprintf(buf, PAGE_SIZE, "%s\n", phba->fw_ver_str);
}

/**
* beiscsi_adap_family_disp()- Display adapter family.
* @dev: ptr to device to get priv structure
Expand Down
30 changes: 17 additions & 13 deletions trunk/drivers/scsi/be2iscsi/be_mgmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,25 +156,25 @@ union invalidate_commands_params {
} __packed;

struct mgmt_hba_attributes {
u8 flashrom_version_string[32];
u8 manufacturer_name[32];
u8 flashrom_version_string[BEISCSI_VER_STRLEN];
u8 manufacturer_name[BEISCSI_VER_STRLEN];
u32 supported_modes;
u8 seeprom_version_lo;
u8 seeprom_version_hi;
u8 rsvd0[2];
u32 fw_cmd_data_struct_version;
u32 ep_fw_data_struct_version;
u32 future_reserved[12];
u8 ncsi_version_string[12];
u32 default_extended_timeout;
u8 controller_model_number[32];
u8 controller_model_number[BEISCSI_VER_STRLEN];
u8 controller_description[64];
u8 controller_serial_number[32];
u8 ip_version_string[32];
u8 firmware_version_string[32];
u8 bios_version_string[32];
u8 redboot_version_string[32];
u8 driver_version_string[32];
u8 fw_on_flash_version_string[32];
u8 controller_serial_number[BEISCSI_VER_STRLEN];
u8 ip_version_string[BEISCSI_VER_STRLEN];
u8 firmware_version_string[BEISCSI_VER_STRLEN];
u8 bios_version_string[BEISCSI_VER_STRLEN];
u8 redboot_version_string[BEISCSI_VER_STRLEN];
u8 driver_version_string[BEISCSI_VER_STRLEN];
u8 fw_on_flash_version_string[BEISCSI_VER_STRLEN];
u32 functionalities_supported;
u16 max_cdblength;
u8 asic_revision;
Expand All @@ -190,7 +190,8 @@ struct mgmt_hba_attributes {
u32 firmware_post_status;
u32 hba_mtu[8];
u8 iscsi_features;
u8 future_u8[3];
u8 asic_generation;
u8 future_u8[2];
u32 future_u32[3];
} __packed;

Expand All @@ -207,7 +208,7 @@ struct mgmt_controller_attributes {
u64 unique_identifier;
u8 netfilters;
u8 rsvd0[3];
u8 future_u32[4];
u32 future_u32[4];
} __packed;

struct be_mgmt_controller_attributes {
Expand Down Expand Up @@ -311,6 +312,9 @@ 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);

ssize_t beiscsi_fw_ver_disp(struct device *dev,
struct device_attribute *attr, char *buf);

ssize_t beiscsi_adap_family_disp(struct device *dev,
struct device_attribute *attr, char *buf);

Expand Down

0 comments on commit 8bab911

Please sign in to comment.