aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_attr.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2008-08-24 21:50:06 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-10-13 09:28:54 -0400
commit84774a4d0a4dba8a5767da6c58ea5a8c5b0cfe25 (patch)
tree2bc1c62a32f76260ae5743f7888c4ff45122cef4 /drivers/scsi/lpfc/lpfc_attr.c
parentd7c255b26d8e3f12164d82093de3bf22efad2b4a (diff)
[SCSI] lpfc 8.2.8 : Add new FCOE hardware support
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_attr.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c33
1 files changed, 29 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 172b6b0a5704..b9acc6eefe62 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -211,6 +211,25 @@ lpfc_programtype_show(struct device *dev, struct device_attribute *attr,
211} 211}
212 212
213/** 213/**
214 * lpfc_mlomgmt_show: Return the Menlo Maintenance sli flag.
215 * @dev: class converted to a Scsi_host structure.
216 * @attr: device attribute, not used.
217 * @buf: on return contains the Menlo Maintenance sli flag.
218 *
219 * Returns: size of formatted string.
220 **/
221static ssize_t
222lpfc_mlomgmt_show(struct device *dev, struct device_attribute *attr, char *buf)
223{
224 struct Scsi_Host *shost = class_to_shost(dev);
225 struct lpfc_vport *vport = (struct lpfc_vport *)shost->hostdata;
226 struct lpfc_hba *phba = vport->phba;
227
228 return snprintf(buf, PAGE_SIZE, "%d\n",
229 (phba->sli.sli_flag & LPFC_MENLO_MAINT));
230}
231
232/**
214 * lpfc_vportnum_show: Return the port number in ascii of the hba. 233 * lpfc_vportnum_show: Return the port number in ascii of the hba.
215 * @dev: class converted to a Scsi_host structure. 234 * @dev: class converted to a Scsi_host structure.
216 * @attr: device attribute, not used. 235 * @attr: device attribute, not used.
@@ -352,8 +371,10 @@ lpfc_link_state_show(struct device *dev, struct device_attribute *attr,
352 "Unknown\n"); 371 "Unknown\n");
353 break; 372 break;
354 } 373 }
355 374 if (phba->sli.sli_flag & LPFC_MENLO_MAINT)
356 if (phba->fc_topology == TOPOLOGY_LOOP) { 375 len += snprintf(buf + len, PAGE_SIZE-len,
376 " Menlo Maint Mode\n");
377 else if (phba->fc_topology == TOPOLOGY_LOOP) {
357 if (vport->fc_flag & FC_PUBLIC_LOOP) 378 if (vport->fc_flag & FC_PUBLIC_LOOP)
358 len += snprintf(buf + len, PAGE_SIZE-len, 379 len += snprintf(buf + len, PAGE_SIZE-len,
359 " Public Loop\n"); 380 " Public Loop\n");
@@ -1476,6 +1497,7 @@ static DEVICE_ATTR(option_rom_version, S_IRUGO,
1476 lpfc_option_rom_version_show, NULL); 1497 lpfc_option_rom_version_show, NULL);
1477static DEVICE_ATTR(num_discovered_ports, S_IRUGO, 1498static DEVICE_ATTR(num_discovered_ports, S_IRUGO,
1478 lpfc_num_discovered_ports_show, NULL); 1499 lpfc_num_discovered_ports_show, NULL);
1500static DEVICE_ATTR(menlo_mgmt_mode, S_IRUGO, lpfc_mlomgmt_show, NULL);
1479static DEVICE_ATTR(nport_evt_cnt, S_IRUGO, lpfc_nport_evt_cnt_show, NULL); 1501static DEVICE_ATTR(nport_evt_cnt, S_IRUGO, lpfc_nport_evt_cnt_show, NULL);
1480static DEVICE_ATTR(lpfc_drvr_version, S_IRUGO, lpfc_drvr_version_show, NULL); 1502static DEVICE_ATTR(lpfc_drvr_version, S_IRUGO, lpfc_drvr_version_show, NULL);
1481static DEVICE_ATTR(board_mode, S_IRUGO | S_IWUSR, 1503static DEVICE_ATTR(board_mode, S_IRUGO | S_IWUSR,
@@ -2395,6 +2417,7 @@ struct device_attribute *lpfc_hba_attrs[] = {
2395 &dev_attr_option_rom_version, 2417 &dev_attr_option_rom_version,
2396 &dev_attr_link_state, 2418 &dev_attr_link_state,
2397 &dev_attr_num_discovered_ports, 2419 &dev_attr_num_discovered_ports,
2420 &dev_attr_menlo_mgmt_mode,
2398 &dev_attr_lpfc_drvr_version, 2421 &dev_attr_lpfc_drvr_version,
2399 &dev_attr_lpfc_temp_sensor, 2422 &dev_attr_lpfc_temp_sensor,
2400 &dev_attr_lpfc_log_verbose, 2423 &dev_attr_lpfc_log_verbose,
@@ -2763,6 +2786,8 @@ sysfs_mbox_read(struct kobject *kobj, struct bin_attribute *bin_attr,
2763 case MBX_DEL_LD_ENTRY: 2786 case MBX_DEL_LD_ENTRY:
2764 case MBX_SET_VARIABLE: 2787 case MBX_SET_VARIABLE:
2765 case MBX_WRITE_WWN: 2788 case MBX_WRITE_WWN:
2789 case MBX_PORT_CAPABILITIES:
2790 case MBX_PORT_IOV_CONTROL:
2766 break; 2791 break;
2767 case MBX_READ_SPARM64: 2792 case MBX_READ_SPARM64:
2768 case MBX_READ_LA: 2793 case MBX_READ_LA:
@@ -2867,7 +2892,7 @@ static struct bin_attribute sysfs_mbox_attr = {
2867}; 2892};
2868 2893
2869/** 2894/**
2870 * lpfc_alloc_sysfs_attr: Creates the sysfs, ctlreg, menlo and mbox entries. 2895 * lpfc_alloc_sysfs_attr: Creates the ctlreg and mbox entries.
2871 * @vport: address of lpfc vport structure. 2896 * @vport: address of lpfc vport structure.
2872 * 2897 *
2873 * Return codes: 2898 * Return codes:
@@ -2898,7 +2923,7 @@ out:
2898} 2923}
2899 2924
2900/** 2925/**
2901 * lpfc_free_sysfs_attr: Removes the sysfs, ctlreg, menlo and mbox entries. 2926 * lpfc_free_sysfs_attr: Removes the ctlreg and mbox entries.
2902 * @vport: address of lpfc vport structure. 2927 * @vport: address of lpfc vport structure.
2903 **/ 2928 **/
2904void 2929void