Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343711
b: refs/heads/master
c: 26000db
h: refs/heads/master
i:
  343709: d9df2d3
  343707: 4d5c423
  343703: 146197f
  343695: 96f5ebc
  343679: ea9d287
v: v3
  • Loading branch information
John Soni Jose authored and James Bottomley committed Nov 27, 2012
1 parent 0cddf2c commit 3a92176
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7313326125c8da52a10780b5af3b290fa9498dcb
refs/heads/master: 26000db7a6ffc559e635486dd3d02d368cb0bc7f
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 @@ -152,9 +152,11 @@ BEISCSI_RW_ATTR(log_enable, 0x00,
"\t\t\t\tConfiguration Path : 0x20\n");

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

Expand Down
39 changes: 39 additions & 0 deletions trunk/drivers/scsi/be2iscsi/be_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,45 @@ beiscsi_drvr_ver_disp(struct device *dev, struct device_attribute *attr,
return snprintf(buf, PAGE_SIZE, BE_NAME "\n");
}

/**
* beiscsi_adap_family_disp()- Display adapter family.
* @dev: ptr to device to get priv structure
* @attr: device attribute, not used.
* @buf: contains formatted text driver name and version
*
* return
* size of the formatted string
**/
ssize_t
beiscsi_adap_family_disp(struct device *dev, struct device_attribute *attr,
char *buf)
{
uint16_t dev_id = 0;
struct Scsi_Host *shost = class_to_shost(dev);
struct beiscsi_hba *phba = iscsi_host_priv(shost);

dev_id = phba->pcidev->device;
switch (dev_id) {
case BE_DEVICE_ID1:
case OC_DEVICE_ID1:
case OC_DEVICE_ID2:
return snprintf(buf, PAGE_SIZE, "BE2 Adapter Family\n");
break;
case BE_DEVICE_ID2:
case OC_DEVICE_ID3:
return snprintf(buf, PAGE_SIZE, "BE3-R Adapter Family\n");
break;
case OC_SKH_ID1:
return snprintf(buf, PAGE_SIZE, "Skyhawk-R Adapter Family\n");
break;
default:
return snprintf(buf, PAGE_SIZE,
"Unkown Adapter Family: 0x%x\n", dev_id);
break;
}
}


void beiscsi_offload_cxn_v0(struct beiscsi_offload_params *params,
struct wrb_handle *pwrb_handle,
struct be_mem_descriptor *mem_descr)
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/scsi/be2iscsi/be_mgmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,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_adap_family_disp(struct device *dev,
struct device_attribute *attr, char *buf);

void beiscsi_offload_cxn_v0(struct beiscsi_offload_params *params,
struct wrb_handle *pwrb_handle,
struct be_mem_descriptor *mem_descr);
Expand Down

0 comments on commit 3a92176

Please sign in to comment.