aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_attr.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c266
1 files changed, 153 insertions, 113 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 40cf0f4f327..c14f0cbdb12 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -51,7 +51,7 @@
51#define LPFC_LINK_SPEED_STRING "0, 1, 2, 4, 8" 51#define LPFC_LINK_SPEED_STRING "0, 1, 2, 4, 8"
52 52
53/** 53/**
54 * lpfc_jedec_to_ascii: Hex to ascii convertor according to JEDEC rules. 54 * lpfc_jedec_to_ascii - Hex to ascii convertor according to JEDEC rules
55 * @incr: integer to convert. 55 * @incr: integer to convert.
56 * @hdw: ascii string holding converted integer plus a string terminator. 56 * @hdw: ascii string holding converted integer plus a string terminator.
57 * 57 *
@@ -82,7 +82,7 @@ lpfc_jedec_to_ascii(int incr, char hdw[])
82} 82}
83 83
84/** 84/**
85 * lpfc_drvr_version_show: Return the Emulex driver string with version number. 85 * lpfc_drvr_version_show - Return the Emulex driver string with version number
86 * @dev: class unused variable. 86 * @dev: class unused variable.
87 * @attr: device attribute, not used. 87 * @attr: device attribute, not used.
88 * @buf: on return contains the module description text. 88 * @buf: on return contains the module description text.
@@ -152,7 +152,7 @@ lpfc_bg_reftag_err_show(struct device *dev, struct device_attribute *attr,
152} 152}
153 153
154/** 154/**
155 * lpfc_info_show: Return some pci info about the host in ascii. 155 * lpfc_info_show - Return some pci info about the host in ascii
156 * @dev: class converted to a Scsi_host structure. 156 * @dev: class converted to a Scsi_host structure.
157 * @attr: device attribute, not used. 157 * @attr: device attribute, not used.
158 * @buf: on return contains the formatted text from lpfc_info(). 158 * @buf: on return contains the formatted text from lpfc_info().
@@ -169,7 +169,7 @@ lpfc_info_show(struct device *dev, struct device_attribute *attr,
169} 169}
170 170
171/** 171/**
172 * lpfc_serialnum_show: Return the hba serial number in ascii. 172 * lpfc_serialnum_show - Return the hba serial number in ascii
173 * @dev: class converted to a Scsi_host structure. 173 * @dev: class converted to a Scsi_host structure.
174 * @attr: device attribute, not used. 174 * @attr: device attribute, not used.
175 * @buf: on return contains the formatted text serial number. 175 * @buf: on return contains the formatted text serial number.
@@ -188,7 +188,7 @@ lpfc_serialnum_show(struct device *dev, struct device_attribute *attr,
188} 188}
189 189
190/** 190/**
191 * lpfc_temp_sensor_show: Return the temperature sensor level. 191 * lpfc_temp_sensor_show - Return the temperature sensor level
192 * @dev: class converted to a Scsi_host structure. 192 * @dev: class converted to a Scsi_host structure.
193 * @attr: device attribute, not used. 193 * @attr: device attribute, not used.
194 * @buf: on return contains the formatted support level. 194 * @buf: on return contains the formatted support level.
@@ -210,7 +210,7 @@ lpfc_temp_sensor_show(struct device *dev, struct device_attribute *attr,
210} 210}
211 211
212/** 212/**
213 * lpfc_modeldesc_show: Return the model description of the hba. 213 * lpfc_modeldesc_show - Return the model description of the hba
214 * @dev: class converted to a Scsi_host structure. 214 * @dev: class converted to a Scsi_host structure.
215 * @attr: device attribute, not used. 215 * @attr: device attribute, not used.
216 * @buf: on return contains the scsi vpd model description. 216 * @buf: on return contains the scsi vpd model description.
@@ -229,7 +229,7 @@ lpfc_modeldesc_show(struct device *dev, struct device_attribute *attr,
229} 229}
230 230
231/** 231/**
232 * lpfc_modelname_show: Return the model name of the hba. 232 * lpfc_modelname_show - Return the model name of the hba
233 * @dev: class converted to a Scsi_host structure. 233 * @dev: class converted to a Scsi_host structure.
234 * @attr: device attribute, not used. 234 * @attr: device attribute, not used.
235 * @buf: on return contains the scsi vpd model name. 235 * @buf: on return contains the scsi vpd model name.
@@ -248,7 +248,7 @@ lpfc_modelname_show(struct device *dev, struct device_attribute *attr,
248} 248}
249 249
250/** 250/**
251 * lpfc_programtype_show: Return the program type of the hba. 251 * lpfc_programtype_show - Return the program type of the hba
252 * @dev: class converted to a Scsi_host structure. 252 * @dev: class converted to a Scsi_host structure.
253 * @attr: device attribute, not used. 253 * @attr: device attribute, not used.
254 * @buf: on return contains the scsi vpd program type. 254 * @buf: on return contains the scsi vpd program type.
@@ -267,7 +267,7 @@ lpfc_programtype_show(struct device *dev, struct device_attribute *attr,
267} 267}
268 268
269/** 269/**
270 * lpfc_mlomgmt_show: Return the Menlo Maintenance sli flag. 270 * lpfc_mlomgmt_show - Return the Menlo Maintenance sli flag
271 * @dev: class converted to a Scsi_host structure. 271 * @dev: class converted to a Scsi_host structure.
272 * @attr: device attribute, not used. 272 * @attr: device attribute, not used.
273 * @buf: on return contains the Menlo Maintenance sli flag. 273 * @buf: on return contains the Menlo Maintenance sli flag.
@@ -286,7 +286,7 @@ lpfc_mlomgmt_show(struct device *dev, struct device_attribute *attr, char *buf)
286} 286}
287 287
288/** 288/**
289 * lpfc_vportnum_show: Return the port number in ascii of the hba. 289 * lpfc_vportnum_show - Return the port number in ascii of the hba
290 * @dev: class converted to a Scsi_host structure. 290 * @dev: class converted to a Scsi_host structure.
291 * @attr: device attribute, not used. 291 * @attr: device attribute, not used.
292 * @buf: on return contains scsi vpd program type. 292 * @buf: on return contains scsi vpd program type.
@@ -305,7 +305,7 @@ lpfc_vportnum_show(struct device *dev, struct device_attribute *attr,
305} 305}
306 306
307/** 307/**
308 * lpfc_fwrev_show: Return the firmware rev running in the hba. 308 * lpfc_fwrev_show - Return the firmware rev running in the hba
309 * @dev: class converted to a Scsi_host structure. 309 * @dev: class converted to a Scsi_host structure.
310 * @attr: device attribute, not used. 310 * @attr: device attribute, not used.
311 * @buf: on return contains the scsi vpd program type. 311 * @buf: on return contains the scsi vpd program type.
@@ -326,7 +326,7 @@ lpfc_fwrev_show(struct device *dev, struct device_attribute *attr,
326} 326}
327 327
328/** 328/**
329 * lpfc_hdw_show: Return the jedec information about the hba. 329 * lpfc_hdw_show - Return the jedec information about the hba
330 * @dev: class converted to a Scsi_host structure. 330 * @dev: class converted to a Scsi_host structure.
331 * @attr: device attribute, not used. 331 * @attr: device attribute, not used.
332 * @buf: on return contains the scsi vpd program type. 332 * @buf: on return contains the scsi vpd program type.
@@ -347,7 +347,7 @@ lpfc_hdw_show(struct device *dev, struct device_attribute *attr, char *buf)
347} 347}
348 348
349/** 349/**
350 * lpfc_option_rom_version_show: Return the adapter ROM FCode version. 350 * lpfc_option_rom_version_show - Return the adapter ROM FCode version
351 * @dev: class converted to a Scsi_host structure. 351 * @dev: class converted to a Scsi_host structure.
352 * @attr: device attribute, not used. 352 * @attr: device attribute, not used.
353 * @buf: on return contains the ROM and FCode ascii strings. 353 * @buf: on return contains the ROM and FCode ascii strings.
@@ -366,7 +366,7 @@ lpfc_option_rom_version_show(struct device *dev, struct device_attribute *attr,
366} 366}
367 367
368/** 368/**
369 * lpfc_state_show: Return the link state of the port. 369 * lpfc_state_show - Return the link state of the port
370 * @dev: class converted to a Scsi_host structure. 370 * @dev: class converted to a Scsi_host structure.
371 * @attr: device attribute, not used. 371 * @attr: device attribute, not used.
372 * @buf: on return contains text describing the state of the link. 372 * @buf: on return contains text describing the state of the link.
@@ -451,7 +451,7 @@ lpfc_link_state_show(struct device *dev, struct device_attribute *attr,
451} 451}
452 452
453/** 453/**
454 * lpfc_num_discovered_ports_show: Return sum of mapped and unmapped vports. 454 * lpfc_num_discovered_ports_show - Return sum of mapped and unmapped vports
455 * @dev: class device that is converted into a Scsi_host. 455 * @dev: class device that is converted into a Scsi_host.
456 * @attr: device attribute, not used. 456 * @attr: device attribute, not used.
457 * @buf: on return contains the sum of fc mapped and unmapped. 457 * @buf: on return contains the sum of fc mapped and unmapped.
@@ -474,7 +474,7 @@ lpfc_num_discovered_ports_show(struct device *dev,
474} 474}
475 475
476/** 476/**
477 * lpfc_issue_lip: Misnomer, name carried over from long ago. 477 * lpfc_issue_lip - Misnomer, name carried over from long ago
478 * @shost: Scsi_Host pointer. 478 * @shost: Scsi_Host pointer.
479 * 479 *
480 * Description: 480 * Description:
@@ -529,7 +529,7 @@ lpfc_issue_lip(struct Scsi_Host *shost)
529} 529}
530 530
531/** 531/**
532 * lpfc_do_offline: Issues a mailbox command to bring the link down. 532 * lpfc_do_offline - Issues a mailbox command to bring the link down
533 * @phba: lpfc_hba pointer. 533 * @phba: lpfc_hba pointer.
534 * @type: LPFC_EVT_OFFLINE, LPFC_EVT_WARM_START, LPFC_EVT_KILL. 534 * @type: LPFC_EVT_OFFLINE, LPFC_EVT_WARM_START, LPFC_EVT_KILL.
535 * 535 *
@@ -537,7 +537,7 @@ lpfc_issue_lip(struct Scsi_Host *shost)
537 * Assumes any error from lpfc_do_offline() will be negative. 537 * Assumes any error from lpfc_do_offline() will be negative.
538 * Can wait up to 5 seconds for the port ring buffers count 538 * Can wait up to 5 seconds for the port ring buffers count
539 * to reach zero, prints a warning if it is not zero and continues. 539 * to reach zero, prints a warning if it is not zero and continues.
540 * lpfc_workq_post_event() returns a non-zero return coce if call fails. 540 * lpfc_workq_post_event() returns a non-zero return code if call fails.
541 * 541 *
542 * Returns: 542 * Returns:
543 * -EIO error posting the event 543 * -EIO error posting the event
@@ -591,7 +591,7 @@ lpfc_do_offline(struct lpfc_hba *phba, uint32_t type)
591} 591}
592 592
593/** 593/**
594 * lpfc_selective_reset: Offline then onlines the port. 594 * lpfc_selective_reset - Offline then onlines the port
595 * @phba: lpfc_hba pointer. 595 * @phba: lpfc_hba pointer.
596 * 596 *
597 * Description: 597 * Description:
@@ -632,7 +632,7 @@ lpfc_selective_reset(struct lpfc_hba *phba)
632} 632}
633 633
634/** 634/**
635 * lpfc_issue_reset: Selectively resets an adapter. 635 * lpfc_issue_reset - Selectively resets an adapter
636 * @dev: class device that is converted into a Scsi_host. 636 * @dev: class device that is converted into a Scsi_host.
637 * @attr: device attribute, not used. 637 * @attr: device attribute, not used.
638 * @buf: containing the string "selective". 638 * @buf: containing the string "selective".
@@ -672,7 +672,7 @@ lpfc_issue_reset(struct device *dev, struct device_attribute *attr,
672} 672}
673 673
674/** 674/**
675 * lpfc_nport_evt_cnt_show: Return the number of nport events. 675 * lpfc_nport_evt_cnt_show - Return the number of nport events
676 * @dev: class device that is converted into a Scsi_host. 676 * @dev: class device that is converted into a Scsi_host.
677 * @attr: device attribute, not used. 677 * @attr: device attribute, not used.
678 * @buf: on return contains the ascii number of nport events. 678 * @buf: on return contains the ascii number of nport events.
@@ -691,7 +691,7 @@ lpfc_nport_evt_cnt_show(struct device *dev, struct device_attribute *attr,
691} 691}
692 692
693/** 693/**
694 * lpfc_board_mode_show: Return the state of the board. 694 * lpfc_board_mode_show - Return the state of the board
695 * @dev: class device that is converted into a Scsi_host. 695 * @dev: class device that is converted into a Scsi_host.
696 * @attr: device attribute, not used. 696 * @attr: device attribute, not used.
697 * @buf: on return contains the state of the adapter. 697 * @buf: on return contains the state of the adapter.
@@ -720,7 +720,7 @@ lpfc_board_mode_show(struct device *dev, struct device_attribute *attr,
720} 720}
721 721
722/** 722/**
723 * lpfc_board_mode_store: Puts the hba in online, offline, warm or error state. 723 * lpfc_board_mode_store - Puts the hba in online, offline, warm or error state
724 * @dev: class device that is converted into a Scsi_host. 724 * @dev: class device that is converted into a Scsi_host.
725 * @attr: device attribute, not used. 725 * @attr: device attribute, not used.
726 * @buf: containing one of the strings "online", "offline", "warm" or "error". 726 * @buf: containing one of the strings "online", "offline", "warm" or "error".
@@ -766,14 +766,14 @@ lpfc_board_mode_store(struct device *dev, struct device_attribute *attr,
766} 766}
767 767
768/** 768/**
769 * lpfc_get_hba_info: Return various bits of informaton about the adapter. 769 * lpfc_get_hba_info - Return various bits of informaton about the adapter
770 * @phba: pointer to the adapter structure. 770 * @phba: pointer to the adapter structure.
771 * @mxri max xri count. 771 * @mxri: max xri count.
772 * @axri available xri count. 772 * @axri: available xri count.
773 * @mrpi max rpi count. 773 * @mrpi: max rpi count.
774 * @arpi available rpi count. 774 * @arpi: available rpi count.
775 * @mvpi max vpi count. 775 * @mvpi: max vpi count.
776 * @avpi available vpi count. 776 * @avpi: available vpi count.
777 * 777 *
778 * Description: 778 * Description:
779 * If an integer pointer for an count is not null then the value for the 779 * If an integer pointer for an count is not null then the value for the
@@ -846,7 +846,7 @@ lpfc_get_hba_info(struct lpfc_hba *phba,
846} 846}
847 847
848/** 848/**
849 * lpfc_max_rpi_show: Return maximum rpi. 849 * lpfc_max_rpi_show - Return maximum rpi
850 * @dev: class device that is converted into a Scsi_host. 850 * @dev: class device that is converted into a Scsi_host.
851 * @attr: device attribute, not used. 851 * @attr: device attribute, not used.
852 * @buf: on return contains the maximum rpi count in decimal or "Unknown". 852 * @buf: on return contains the maximum rpi count in decimal or "Unknown".
@@ -874,7 +874,7 @@ lpfc_max_rpi_show(struct device *dev, struct device_attribute *attr,
874} 874}
875 875
876/** 876/**
877 * lpfc_used_rpi_show: Return maximum rpi minus available rpi. 877 * lpfc_used_rpi_show - Return maximum rpi minus available rpi
878 * @dev: class device that is converted into a Scsi_host. 878 * @dev: class device that is converted into a Scsi_host.
879 * @attr: device attribute, not used. 879 * @attr: device attribute, not used.
880 * @buf: containing the used rpi count in decimal or "Unknown". 880 * @buf: containing the used rpi count in decimal or "Unknown".
@@ -902,7 +902,7 @@ lpfc_used_rpi_show(struct device *dev, struct device_attribute *attr,
902} 902}
903 903
904/** 904/**
905 * lpfc_max_xri_show: Return maximum xri. 905 * lpfc_max_xri_show - Return maximum xri
906 * @dev: class device that is converted into a Scsi_host. 906 * @dev: class device that is converted into a Scsi_host.
907 * @attr: device attribute, not used. 907 * @attr: device attribute, not used.
908 * @buf: on return contains the maximum xri count in decimal or "Unknown". 908 * @buf: on return contains the maximum xri count in decimal or "Unknown".
@@ -930,7 +930,7 @@ lpfc_max_xri_show(struct device *dev, struct device_attribute *attr,
930} 930}
931 931
932/** 932/**
933 * lpfc_used_xri_show: Return maximum xpi minus the available xpi. 933 * lpfc_used_xri_show - Return maximum xpi minus the available xpi
934 * @dev: class device that is converted into a Scsi_host. 934 * @dev: class device that is converted into a Scsi_host.
935 * @attr: device attribute, not used. 935 * @attr: device attribute, not used.
936 * @buf: on return contains the used xri count in decimal or "Unknown". 936 * @buf: on return contains the used xri count in decimal or "Unknown".
@@ -958,7 +958,7 @@ lpfc_used_xri_show(struct device *dev, struct device_attribute *attr,
958} 958}
959 959
960/** 960/**
961 * lpfc_max_vpi_show: Return maximum vpi. 961 * lpfc_max_vpi_show - Return maximum vpi
962 * @dev: class device that is converted into a Scsi_host. 962 * @dev: class device that is converted into a Scsi_host.
963 * @attr: device attribute, not used. 963 * @attr: device attribute, not used.
964 * @buf: on return contains the maximum vpi count in decimal or "Unknown". 964 * @buf: on return contains the maximum vpi count in decimal or "Unknown".
@@ -986,7 +986,7 @@ lpfc_max_vpi_show(struct device *dev, struct device_attribute *attr,
986} 986}
987 987
988/** 988/**
989 * lpfc_used_vpi_show: Return maximum vpi minus the available vpi. 989 * lpfc_used_vpi_show - Return maximum vpi minus the available vpi
990 * @dev: class device that is converted into a Scsi_host. 990 * @dev: class device that is converted into a Scsi_host.
991 * @attr: device attribute, not used. 991 * @attr: device attribute, not used.
992 * @buf: on return contains the used vpi count in decimal or "Unknown". 992 * @buf: on return contains the used vpi count in decimal or "Unknown".
@@ -1014,7 +1014,7 @@ lpfc_used_vpi_show(struct device *dev, struct device_attribute *attr,
1014} 1014}
1015 1015
1016/** 1016/**
1017 * lpfc_npiv_info_show: Return text about NPIV support for the adapter. 1017 * lpfc_npiv_info_show - Return text about NPIV support for the adapter
1018 * @dev: class device that is converted into a Scsi_host. 1018 * @dev: class device that is converted into a Scsi_host.
1019 * @attr: device attribute, not used. 1019 * @attr: device attribute, not used.
1020 * @buf: text that must be interpreted to determine if npiv is supported. 1020 * @buf: text that must be interpreted to determine if npiv is supported.
@@ -1042,7 +1042,7 @@ lpfc_npiv_info_show(struct device *dev, struct device_attribute *attr,
1042} 1042}
1043 1043
1044/** 1044/**
1045 * lpfc_poll_show: Return text about poll support for the adapter. 1045 * lpfc_poll_show - Return text about poll support for the adapter
1046 * @dev: class device that is converted into a Scsi_host. 1046 * @dev: class device that is converted into a Scsi_host.
1047 * @attr: device attribute, not used. 1047 * @attr: device attribute, not used.
1048 * @buf: on return contains the cfg_poll in hex. 1048 * @buf: on return contains the cfg_poll in hex.
@@ -1064,7 +1064,7 @@ lpfc_poll_show(struct device *dev, struct device_attribute *attr,
1064} 1064}
1065 1065
1066/** 1066/**
1067 * lpfc_poll_store: Set the value of cfg_poll for the adapter. 1067 * lpfc_poll_store - Set the value of cfg_poll for the adapter
1068 * @dev: class device that is converted into a Scsi_host. 1068 * @dev: class device that is converted into a Scsi_host.
1069 * @attr: device attribute, not used. 1069 * @attr: device attribute, not used.
1070 * @buf: one or more lpfc_polling_flags values. 1070 * @buf: one or more lpfc_polling_flags values.
@@ -1136,7 +1136,7 @@ lpfc_poll_store(struct device *dev, struct device_attribute *attr,
1136} 1136}
1137 1137
1138/** 1138/**
1139 * lpfc_param_show: Return a cfg attribute value in decimal. 1139 * lpfc_param_show - Return a cfg attribute value in decimal
1140 * 1140 *
1141 * Description: 1141 * Description:
1142 * Macro that given an attr e.g. hba_queue_depth expands 1142 * Macro that given an attr e.g. hba_queue_depth expands
@@ -1164,7 +1164,7 @@ lpfc_##attr##_show(struct device *dev, struct device_attribute *attr, \
1164} 1164}
1165 1165
1166/** 1166/**
1167 * lpfc_param_hex_show: Return a cfg attribute value in hex. 1167 * lpfc_param_hex_show - Return a cfg attribute value in hex
1168 * 1168 *
1169 * Description: 1169 * Description:
1170 * Macro that given an attr e.g. hba_queue_depth expands 1170 * Macro that given an attr e.g. hba_queue_depth expands
@@ -1173,7 +1173,7 @@ lpfc_##attr##_show(struct device *dev, struct device_attribute *attr, \
1173 * lpfc_##attr##_show: Return the hex value of an adapters cfg_xxx field. 1173 * lpfc_##attr##_show: Return the hex value of an adapters cfg_xxx field.
1174 * @dev: class device that is converted into a Scsi_host. 1174 * @dev: class device that is converted into a Scsi_host.
1175 * @attr: device attribute, not used. 1175 * @attr: device attribute, not used.
1176 * @buf: on return contains the attribute value in hexidecimal. 1176 * @buf: on return contains the attribute value in hexadecimal.
1177 * 1177 *
1178 * Returns: size of formatted string. 1178 * Returns: size of formatted string.
1179 **/ 1179 **/
@@ -1192,7 +1192,7 @@ lpfc_##attr##_show(struct device *dev, struct device_attribute *attr, \
1192} 1192}
1193 1193
1194/** 1194/**
1195 * lpfc_param_init: Intializes a cfg attribute. 1195 * lpfc_param_init - Intializes a cfg attribute
1196 * 1196 *
1197 * Description: 1197 * Description:
1198 * Macro that given an attr e.g. hba_queue_depth expands 1198 * Macro that given an attr e.g. hba_queue_depth expands
@@ -1226,7 +1226,7 @@ lpfc_##attr##_init(struct lpfc_hba *phba, int val) \
1226} 1226}
1227 1227
1228/** 1228/**
1229 * lpfc_param_set: Set a cfg attribute value. 1229 * lpfc_param_set - Set a cfg attribute value
1230 * 1230 *
1231 * Description: 1231 * Description:
1232 * Macro that given an attr e.g. hba_queue_depth expands 1232 * Macro that given an attr e.g. hba_queue_depth expands
@@ -1260,7 +1260,7 @@ lpfc_##attr##_set(struct lpfc_hba *phba, int val) \
1260} 1260}
1261 1261
1262/** 1262/**
1263 * lpfc_param_store: Set a vport attribute value. 1263 * lpfc_param_store - Set a vport attribute value
1264 * 1264 *
1265 * Description: 1265 * Description:
1266 * Macro that given an attr e.g. hba_queue_depth expands 1266 * Macro that given an attr e.g. hba_queue_depth expands
@@ -1300,7 +1300,7 @@ lpfc_##attr##_store(struct device *dev, struct device_attribute *attr, \
1300} 1300}
1301 1301
1302/** 1302/**
1303 * lpfc_vport_param_show: Return decimal formatted cfg attribute value. 1303 * lpfc_vport_param_show - Return decimal formatted cfg attribute value
1304 * 1304 *
1305 * Description: 1305 * Description:
1306 * Macro that given an attr e.g. hba_queue_depth expands 1306 * Macro that given an attr e.g. hba_queue_depth expands
@@ -1326,17 +1326,17 @@ lpfc_##attr##_show(struct device *dev, struct device_attribute *attr, \
1326} 1326}
1327 1327
1328/** 1328/**
1329 * lpfc_vport_param_hex_show: Return hex formatted attribute value. 1329 * lpfc_vport_param_hex_show - Return hex formatted attribute value
1330 * 1330 *
1331 * Description: 1331 * Description:
1332 * Macro that given an attr e.g. 1332 * Macro that given an attr e.g.
1333 * hba_queue_depth expands into a function with the name 1333 * hba_queue_depth expands into a function with the name
1334 * lpfc_hba_queue_depth_show 1334 * lpfc_hba_queue_depth_show
1335 * 1335 *
1336 * lpfc_##attr##_show: prints the attribute value in hexidecimal. 1336 * lpfc_##attr##_show: prints the attribute value in hexadecimal.
1337 * @dev: class device that is converted into a Scsi_host. 1337 * @dev: class device that is converted into a Scsi_host.
1338 * @attr: device attribute, not used. 1338 * @attr: device attribute, not used.
1339 * @buf: on return contains the attribute value in hexidecimal. 1339 * @buf: on return contains the attribute value in hexadecimal.
1340 * 1340 *
1341 * Returns: length of formatted string. 1341 * Returns: length of formatted string.
1342 **/ 1342 **/
@@ -1353,7 +1353,7 @@ lpfc_##attr##_show(struct device *dev, struct device_attribute *attr, \
1353} 1353}
1354 1354
1355/** 1355/**
1356 * lpfc_vport_param_init: Initialize a vport cfg attribute. 1356 * lpfc_vport_param_init - Initialize a vport cfg attribute
1357 * 1357 *
1358 * Description: 1358 * Description:
1359 * Macro that given an attr e.g. hba_queue_depth expands 1359 * Macro that given an attr e.g. hba_queue_depth expands
@@ -1386,7 +1386,7 @@ lpfc_##attr##_init(struct lpfc_vport *vport, int val) \
1386} 1386}
1387 1387
1388/** 1388/**
1389 * lpfc_vport_param_set: Set a vport cfg attribute. 1389 * lpfc_vport_param_set - Set a vport cfg attribute
1390 * 1390 *
1391 * Description: 1391 * Description:
1392 * Macro that given an attr e.g. hba_queue_depth expands 1392 * Macro that given an attr e.g. hba_queue_depth expands
@@ -1417,7 +1417,7 @@ lpfc_##attr##_set(struct lpfc_vport *vport, int val) \
1417} 1417}
1418 1418
1419/** 1419/**
1420 * lpfc_vport_param_store: Set a vport attribute. 1420 * lpfc_vport_param_store - Set a vport attribute
1421 * 1421 *
1422 * Description: 1422 * Description:
1423 * Macro that given an attr e.g. hba_queue_depth 1423 * Macro that given an attr e.g. hba_queue_depth
@@ -1576,7 +1576,7 @@ static DEVICE_ATTR(lpfc_temp_sensor, S_IRUGO, lpfc_temp_sensor_show, NULL);
1576static char *lpfc_soft_wwn_key = "C99G71SL8032A"; 1576static char *lpfc_soft_wwn_key = "C99G71SL8032A";
1577 1577
1578/** 1578/**
1579 * lpfc_soft_wwn_enable_store: Allows setting of the wwn if the key is valid. 1579 * lpfc_soft_wwn_enable_store - Allows setting of the wwn if the key is valid
1580 * @dev: class device that is converted into a Scsi_host. 1580 * @dev: class device that is converted into a Scsi_host.
1581 * @attr: device attribute, not used. 1581 * @attr: device attribute, not used.
1582 * @buf: containing the string lpfc_soft_wwn_key. 1582 * @buf: containing the string lpfc_soft_wwn_key.
@@ -1623,10 +1623,10 @@ static DEVICE_ATTR(lpfc_soft_wwn_enable, S_IWUSR, NULL,
1623 lpfc_soft_wwn_enable_store); 1623 lpfc_soft_wwn_enable_store);
1624 1624
1625/** 1625/**
1626 * lpfc_soft_wwpn_show: Return the cfg soft ww port name of the adapter. 1626 * lpfc_soft_wwpn_show - Return the cfg soft ww port name of the adapter
1627 * @dev: class device that is converted into a Scsi_host. 1627 * @dev: class device that is converted into a Scsi_host.
1628 * @attr: device attribute, not used. 1628 * @attr: device attribute, not used.
1629 * @buf: on return contains the wwpn in hexidecimal. 1629 * @buf: on return contains the wwpn in hexadecimal.
1630 * 1630 *
1631 * Returns: size of formatted string. 1631 * Returns: size of formatted string.
1632 **/ 1632 **/
@@ -1643,10 +1643,10 @@ lpfc_soft_wwpn_show(struct device *dev, struct device_attribute *attr,
1643} 1643}
1644 1644
1645/** 1645/**
1646 * lpfc_soft_wwpn_store: Set the ww port name of the adapter. 1646 * lpfc_soft_wwpn_store - Set the ww port name of the adapter
1647 * @dev class device that is converted into a Scsi_host. 1647 * @dev class device that is converted into a Scsi_host.
1648 * @attr: device attribute, not used. 1648 * @attr: device attribute, not used.
1649 * @buf: contains the wwpn in hexidecimal. 1649 * @buf: contains the wwpn in hexadecimal.
1650 * @count: number of wwpn bytes in buf 1650 * @count: number of wwpn bytes in buf
1651 * 1651 *
1652 * Returns: 1652 * Returns:
@@ -1729,10 +1729,10 @@ static DEVICE_ATTR(lpfc_soft_wwpn, S_IRUGO | S_IWUSR,\
1729 lpfc_soft_wwpn_show, lpfc_soft_wwpn_store); 1729 lpfc_soft_wwpn_show, lpfc_soft_wwpn_store);
1730 1730
1731/** 1731/**
1732 * lpfc_soft_wwnn_show: Return the cfg soft ww node name for the adapter. 1732 * lpfc_soft_wwnn_show - Return the cfg soft ww node name for the adapter
1733 * @dev: class device that is converted into a Scsi_host. 1733 * @dev: class device that is converted into a Scsi_host.
1734 * @attr: device attribute, not used. 1734 * @attr: device attribute, not used.
1735 * @buf: on return contains the wwnn in hexidecimal. 1735 * @buf: on return contains the wwnn in hexadecimal.
1736 * 1736 *
1737 * Returns: size of formatted string. 1737 * Returns: size of formatted string.
1738 **/ 1738 **/
@@ -1747,9 +1747,9 @@ lpfc_soft_wwnn_show(struct device *dev, struct device_attribute *attr,
1747} 1747}
1748 1748
1749/** 1749/**
1750 * lpfc_soft_wwnn_store: sets the ww node name of the adapter. 1750 * lpfc_soft_wwnn_store - sets the ww node name of the adapter
1751 * @cdev: class device that is converted into a Scsi_host. 1751 * @cdev: class device that is converted into a Scsi_host.
1752 * @buf: contains the ww node name in hexidecimal. 1752 * @buf: contains the ww node name in hexadecimal.
1753 * @count: number of wwnn bytes in buf. 1753 * @count: number of wwnn bytes in buf.
1754 * 1754 *
1755 * Returns: 1755 * Returns:
@@ -1845,7 +1845,7 @@ MODULE_PARM_DESC(lpfc_nodev_tmo,
1845 "for a device to come back"); 1845 "for a device to come back");
1846 1846
1847/** 1847/**
1848 * lpfc_nodev_tmo_show: Return the hba dev loss timeout value. 1848 * lpfc_nodev_tmo_show - Return the hba dev loss timeout value
1849 * @dev: class converted to a Scsi_host structure. 1849 * @dev: class converted to a Scsi_host structure.
1850 * @attr: device attribute, not used. 1850 * @attr: device attribute, not used.
1851 * @buf: on return contains the dev loss timeout in decimal. 1851 * @buf: on return contains the dev loss timeout in decimal.
@@ -1864,7 +1864,7 @@ lpfc_nodev_tmo_show(struct device *dev, struct device_attribute *attr,
1864} 1864}
1865 1865
1866/** 1866/**
1867 * lpfc_nodev_tmo_init: Set the hba nodev timeout value. 1867 * lpfc_nodev_tmo_init - Set the hba nodev timeout value
1868 * @vport: lpfc vport structure pointer. 1868 * @vport: lpfc vport structure pointer.
1869 * @val: contains the nodev timeout value. 1869 * @val: contains the nodev timeout value.
1870 * 1870 *
@@ -1905,7 +1905,7 @@ lpfc_nodev_tmo_init(struct lpfc_vport *vport, int val)
1905} 1905}
1906 1906
1907/** 1907/**
1908 * lpfc_update_rport_devloss_tmo: Update dev loss tmo value. 1908 * lpfc_update_rport_devloss_tmo - Update dev loss tmo value
1909 * @vport: lpfc vport structure pointer. 1909 * @vport: lpfc vport structure pointer.
1910 * 1910 *
1911 * Description: 1911 * Description:
@@ -1926,7 +1926,7 @@ lpfc_update_rport_devloss_tmo(struct lpfc_vport *vport)
1926} 1926}
1927 1927
1928/** 1928/**
1929 * lpfc_nodev_tmo_set: Set the vport nodev tmo and devloss tmo values. 1929 * lpfc_nodev_tmo_set - Set the vport nodev tmo and devloss tmo values
1930 * @vport: lpfc vport structure pointer. 1930 * @vport: lpfc vport structure pointer.
1931 * @val: contains the tmo value. 1931 * @val: contains the tmo value.
1932 * 1932 *
@@ -1982,7 +1982,7 @@ lpfc_vport_param_init(devloss_tmo, LPFC_DEF_DEVLOSS_TMO,
1982lpfc_vport_param_show(devloss_tmo) 1982lpfc_vport_param_show(devloss_tmo)
1983 1983
1984/** 1984/**
1985 * lpfc_devloss_tmo_set: Sets vport nodev tmo, devloss tmo values, changed bit. 1985 * lpfc_devloss_tmo_set - Sets vport nodev tmo, devloss tmo values, changed bit
1986 * @vport: lpfc vport structure pointer. 1986 * @vport: lpfc vport structure pointer.
1987 * @val: contains the tmo value. 1987 * @val: contains the tmo value.
1988 * 1988 *
@@ -2094,7 +2094,7 @@ MODULE_PARM_DESC(lpfc_restrict_login,
2094lpfc_vport_param_show(restrict_login); 2094lpfc_vport_param_show(restrict_login);
2095 2095
2096/** 2096/**
2097 * lpfc_restrict_login_init: Set the vport restrict login flag. 2097 * lpfc_restrict_login_init - Set the vport restrict login flag
2098 * @vport: lpfc vport structure pointer. 2098 * @vport: lpfc vport structure pointer.
2099 * @val: contains the restrict login value. 2099 * @val: contains the restrict login value.
2100 * 2100 *
@@ -2128,7 +2128,7 @@ lpfc_restrict_login_init(struct lpfc_vport *vport, int val)
2128} 2128}
2129 2129
2130/** 2130/**
2131 * lpfc_restrict_login_set: Set the vport restrict login flag. 2131 * lpfc_restrict_login_set - Set the vport restrict login flag
2132 * @vport: lpfc vport structure pointer. 2132 * @vport: lpfc vport structure pointer.
2133 * @val: contains the restrict login value. 2133 * @val: contains the restrict login value.
2134 * 2134 *
@@ -2201,7 +2201,7 @@ LPFC_VPORT_ATTR_R(scan_down, 1, 0, 1,
2201*/ 2201*/
2202 2202
2203/** 2203/**
2204 * lpfc_topology_set: Set the adapters topology field. 2204 * lpfc_topology_set - Set the adapters topology field
2205 * @phba: lpfc_hba pointer. 2205 * @phba: lpfc_hba pointer.
2206 * @val: topology value. 2206 * @val: topology value.
2207 * 2207 *
@@ -2216,18 +2216,41 @@ LPFC_VPORT_ATTR_R(scan_down, 1, 0, 1,
2216 * non-zero return value from lpfc_issue_lip() 2216 * non-zero return value from lpfc_issue_lip()
2217 * -EINVAL val out of range 2217 * -EINVAL val out of range
2218 **/ 2218 **/
2219static int 2219static ssize_t
2220lpfc_topology_set(struct lpfc_hba *phba, int val) 2220lpfc_topology_store(struct device *dev, struct device_attribute *attr,
2221 const char *buf, size_t count)
2221{ 2222{
2223 struct Scsi_Host *shost = class_to_shost(dev);
2224 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
2225 struct lpfc_hba *phba = vport->phba;
2226 int val = 0;
2227 int nolip = 0;
2228 const char *val_buf = buf;
2222 int err; 2229 int err;
2223 uint32_t prev_val; 2230 uint32_t prev_val;
2231
2232 if (!strncmp(buf, "nolip ", strlen("nolip "))) {
2233 nolip = 1;
2234 val_buf = &buf[strlen("nolip ")];
2235 }
2236
2237 if (!isdigit(val_buf[0]))
2238 return -EINVAL;
2239 if (sscanf(val_buf, "%i", &val) != 1)
2240 return -EINVAL;
2241
2224 if (val >= 0 && val <= 6) { 2242 if (val >= 0 && val <= 6) {
2225 prev_val = phba->cfg_topology; 2243 prev_val = phba->cfg_topology;
2226 phba->cfg_topology = val; 2244 phba->cfg_topology = val;
2245 if (nolip)
2246 return strlen(buf);
2247
2227 err = lpfc_issue_lip(lpfc_shost_from_vport(phba->pport)); 2248 err = lpfc_issue_lip(lpfc_shost_from_vport(phba->pport));
2228 if (err) 2249 if (err) {
2229 phba->cfg_topology = prev_val; 2250 phba->cfg_topology = prev_val;
2230 return err; 2251 return -EINVAL;
2252 } else
2253 return strlen(buf);
2231 } 2254 }
2232 lpfc_printf_log(phba, KERN_ERR, LOG_INIT, 2255 lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
2233 "%d:0467 lpfc_topology attribute cannot be set to %d, " 2256 "%d:0467 lpfc_topology attribute cannot be set to %d, "
@@ -2240,14 +2263,12 @@ module_param(lpfc_topology, int, 0);
2240MODULE_PARM_DESC(lpfc_topology, "Select Fibre Channel topology"); 2263MODULE_PARM_DESC(lpfc_topology, "Select Fibre Channel topology");
2241lpfc_param_show(topology) 2264lpfc_param_show(topology)
2242lpfc_param_init(topology, 0, 0, 6) 2265lpfc_param_init(topology, 0, 0, 6)
2243lpfc_param_store(topology)
2244static DEVICE_ATTR(lpfc_topology, S_IRUGO | S_IWUSR, 2266static DEVICE_ATTR(lpfc_topology, S_IRUGO | S_IWUSR,
2245 lpfc_topology_show, lpfc_topology_store); 2267 lpfc_topology_show, lpfc_topology_store);
2246 2268
2247 2269
2248/** 2270/**
2249 * lpfc_stat_data_ctrl_store: write call back for lpfc_stat_data_ctrl 2271 * lpfc_stat_data_ctrl_store - write call back for lpfc_stat_data_ctrl sysfs file
2250 * sysfs file.
2251 * @dev: Pointer to class device. 2272 * @dev: Pointer to class device.
2252 * @buf: Data buffer. 2273 * @buf: Data buffer.
2253 * @count: Size of the data buffer. 2274 * @count: Size of the data buffer.
@@ -2282,7 +2303,7 @@ lpfc_stat_data_ctrl_store(struct device *dev, struct device_attribute *attr,
2282 unsigned long base, step, bucket_type; 2303 unsigned long base, step, bucket_type;
2283 2304
2284 if (!strncmp(buf, "setbucket", strlen("setbucket"))) { 2305 if (!strncmp(buf, "setbucket", strlen("setbucket"))) {
2285 if (strlen(buf) > LPFC_MAX_DATA_CTRL_LEN) 2306 if (strlen(buf) > (LPFC_MAX_DATA_CTRL_LEN - 1))
2286 return -EINVAL; 2307 return -EINVAL;
2287 2308
2288 strcpy(bucket_data, buf); 2309 strcpy(bucket_data, buf);
@@ -2411,8 +2432,7 @@ lpfc_stat_data_ctrl_store(struct device *dev, struct device_attribute *attr,
2411 2432
2412 2433
2413/** 2434/**
2414 * lpfc_stat_data_ctrl_show: Read callback function for 2435 * lpfc_stat_data_ctrl_show - Read function for lpfc_stat_data_ctrl sysfs file
2415 * lpfc_stat_data_ctrl sysfs file.
2416 * @dev: Pointer to class device object. 2436 * @dev: Pointer to class device object.
2417 * @buf: Data buffer. 2437 * @buf: Data buffer.
2418 * 2438 *
@@ -2489,8 +2509,7 @@ static DEVICE_ATTR(lpfc_stat_data_ctrl, S_IRUGO | S_IWUSR,
2489 2509
2490 2510
2491/** 2511/**
2492 * sysfs_drvr_stat_data_read: Read callback function for lpfc_drvr_stat_data 2512 * sysfs_drvr_stat_data_read - Read function for lpfc_drvr_stat_data attribute
2493 * sysfs attribute.
2494 * @kobj: Pointer to the kernel object 2513 * @kobj: Pointer to the kernel object
2495 * @bin_attr: Attribute object 2514 * @bin_attr: Attribute object
2496 * @buff: Buffer pointer 2515 * @buff: Buffer pointer
@@ -2585,7 +2604,7 @@ static struct bin_attribute sysfs_drvr_stat_data_attr = {
2585*/ 2604*/
2586 2605
2587/** 2606/**
2588 * lpfc_link_speed_set: Set the adapters link speed. 2607 * lpfc_link_speed_set - Set the adapters link speed
2589 * @phba: lpfc_hba pointer. 2608 * @phba: lpfc_hba pointer.
2590 * @val: link speed value. 2609 * @val: link speed value.
2591 * 2610 *
@@ -2601,12 +2620,29 @@ static struct bin_attribute sysfs_drvr_stat_data_attr = {
2601 * non-zero return value from lpfc_issue_lip() 2620 * non-zero return value from lpfc_issue_lip()
2602 * -EINVAL val out of range 2621 * -EINVAL val out of range
2603 **/ 2622 **/
2604static int 2623static ssize_t
2605lpfc_link_speed_set(struct lpfc_hba *phba, int val) 2624lpfc_link_speed_store(struct device *dev, struct device_attribute *attr,
2625 const char *buf, size_t count)
2606{ 2626{
2627 struct Scsi_Host *shost = class_to_shost(dev);
2628 struct lpfc_vport *vport = (struct lpfc_vport *) shost->hostdata;
2629 struct lpfc_hba *phba = vport->phba;
2630 int val = 0;
2631 int nolip = 0;
2632 const char *val_buf = buf;
2607 int err; 2633 int err;
2608 uint32_t prev_val; 2634 uint32_t prev_val;
2609 2635
2636 if (!strncmp(buf, "nolip ", strlen("nolip "))) {
2637 nolip = 1;
2638 val_buf = &buf[strlen("nolip ")];
2639 }
2640
2641 if (!isdigit(val_buf[0]))
2642 return -EINVAL;
2643 if (sscanf(val_buf, "%i", &val) != 1)
2644 return -EINVAL;
2645
2610 if (((val == LINK_SPEED_1G) && !(phba->lmt & LMT_1Gb)) || 2646 if (((val == LINK_SPEED_1G) && !(phba->lmt & LMT_1Gb)) ||
2611 ((val == LINK_SPEED_2G) && !(phba->lmt & LMT_2Gb)) || 2647 ((val == LINK_SPEED_2G) && !(phba->lmt & LMT_2Gb)) ||
2612 ((val == LINK_SPEED_4G) && !(phba->lmt & LMT_4Gb)) || 2648 ((val == LINK_SPEED_4G) && !(phba->lmt & LMT_4Gb)) ||
@@ -2614,14 +2650,19 @@ lpfc_link_speed_set(struct lpfc_hba *phba, int val)
2614 ((val == LINK_SPEED_10G) && !(phba->lmt & LMT_10Gb))) 2650 ((val == LINK_SPEED_10G) && !(phba->lmt & LMT_10Gb)))
2615 return -EINVAL; 2651 return -EINVAL;
2616 2652
2617 if ((val >= 0 && val <= LPFC_MAX_LINK_SPEED) 2653 if ((val >= 0 && val <= 8)
2618 && (LPFC_LINK_SPEED_BITMAP & (1 << val))) { 2654 && (LPFC_LINK_SPEED_BITMAP & (1 << val))) {
2619 prev_val = phba->cfg_link_speed; 2655 prev_val = phba->cfg_link_speed;
2620 phba->cfg_link_speed = val; 2656 phba->cfg_link_speed = val;
2657 if (nolip)
2658 return strlen(buf);
2659
2621 err = lpfc_issue_lip(lpfc_shost_from_vport(phba->pport)); 2660 err = lpfc_issue_lip(lpfc_shost_from_vport(phba->pport));
2622 if (err) 2661 if (err) {
2623 phba->cfg_link_speed = prev_val; 2662 phba->cfg_link_speed = prev_val;
2624 return err; 2663 return -EINVAL;
2664 } else
2665 return strlen(buf);
2625 } 2666 }
2626 2667
2627 lpfc_printf_log(phba, KERN_ERR, LOG_INIT, 2668 lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
@@ -2637,7 +2678,7 @@ MODULE_PARM_DESC(lpfc_link_speed, "Select link speed");
2637lpfc_param_show(link_speed) 2678lpfc_param_show(link_speed)
2638 2679
2639/** 2680/**
2640 * lpfc_link_speed_init: Set the adapters link speed. 2681 * lpfc_link_speed_init - Set the adapters link speed
2641 * @phba: lpfc_hba pointer. 2682 * @phba: lpfc_hba pointer.
2642 * @val: link speed value. 2683 * @val: link speed value.
2643 * 2684 *
@@ -2668,7 +2709,6 @@ lpfc_link_speed_init(struct lpfc_hba *phba, int val)
2668 return -EINVAL; 2709 return -EINVAL;
2669} 2710}
2670 2711
2671lpfc_param_store(link_speed)
2672static DEVICE_ATTR(lpfc_link_speed, S_IRUGO | S_IWUSR, 2712static DEVICE_ATTR(lpfc_link_speed, S_IRUGO | S_IWUSR,
2673 lpfc_link_speed_show, lpfc_link_speed_store); 2713 lpfc_link_speed_show, lpfc_link_speed_store);
2674 2714
@@ -2865,7 +2905,7 @@ MODULE_PARM_DESC(lpfc_prot_guard, "host protection guard type");
2865 2905
2866 2906
2867/* 2907/*
2868 * lpfc_sg_seg_cnt: Initial Maximum DMA Segment Count 2908 * lpfc_sg_seg_cnt - Initial Maximum DMA Segment Count
2869 * This value can be set to values between 64 and 256. The default value is 2909 * This value can be set to values between 64 and 256. The default value is
2870 * 64, but may be increased to allow for larger Max I/O sizes. The scsi layer 2910 * 64, but may be increased to allow for larger Max I/O sizes. The scsi layer
2871 * will be allowed to request I/Os of sizes up to (MAX_SEG_COUNT * SEG_SIZE). 2911 * will be allowed to request I/Os of sizes up to (MAX_SEG_COUNT * SEG_SIZE).
@@ -2967,7 +3007,7 @@ struct device_attribute *lpfc_vport_attrs[] = {
2967}; 3007};
2968 3008
2969/** 3009/**
2970 * sysfs_ctlreg_write: Write method for writing to ctlreg. 3010 * sysfs_ctlreg_write - Write method for writing to ctlreg
2971 * @kobj: kernel kobject that contains the kernel class device. 3011 * @kobj: kernel kobject that contains the kernel class device.
2972 * @bin_attr: kernel attributes passed to us. 3012 * @bin_attr: kernel attributes passed to us.
2973 * @buf: contains the data to be written to the adapter IOREG space. 3013 * @buf: contains the data to be written to the adapter IOREG space.
@@ -3017,7 +3057,7 @@ sysfs_ctlreg_write(struct kobject *kobj, struct bin_attribute *bin_attr,
3017} 3057}
3018 3058
3019/** 3059/**
3020 * sysfs_ctlreg_read: Read method for reading from ctlreg. 3060 * sysfs_ctlreg_read - Read method for reading from ctlreg
3021 * @kobj: kernel kobject that contains the kernel class device. 3061 * @kobj: kernel kobject that contains the kernel class device.
3022 * @bin_attr: kernel attributes passed to us. 3062 * @bin_attr: kernel attributes passed to us.
3023 * @buf: if succesful contains the data from the adapter IOREG space. 3063 * @buf: if succesful contains the data from the adapter IOREG space.
@@ -3078,7 +3118,7 @@ static struct bin_attribute sysfs_ctlreg_attr = {
3078}; 3118};
3079 3119
3080/** 3120/**
3081 * sysfs_mbox_idle: frees the sysfs mailbox. 3121 * sysfs_mbox_idle - frees the sysfs mailbox
3082 * @phba: lpfc_hba pointer 3122 * @phba: lpfc_hba pointer
3083 **/ 3123 **/
3084static void 3124static void
@@ -3095,7 +3135,7 @@ sysfs_mbox_idle(struct lpfc_hba *phba)
3095} 3135}
3096 3136
3097/** 3137/**
3098 * sysfs_mbox_write: Write method for writing information via mbox. 3138 * sysfs_mbox_write - Write method for writing information via mbox
3099 * @kobj: kernel kobject that contains the kernel class device. 3139 * @kobj: kernel kobject that contains the kernel class device.
3100 * @bin_attr: kernel attributes passed to us. 3140 * @bin_attr: kernel attributes passed to us.
3101 * @buf: contains the data to be written to sysfs mbox. 3141 * @buf: contains the data to be written to sysfs mbox.
@@ -3170,7 +3210,7 @@ sysfs_mbox_write(struct kobject *kobj, struct bin_attribute *bin_attr,
3170} 3210}
3171 3211
3172/** 3212/**
3173 * sysfs_mbox_read: Read method for reading information via mbox. 3213 * sysfs_mbox_read - Read method for reading information via mbox
3174 * @kobj: kernel kobject that contains the kernel class device. 3214 * @kobj: kernel kobject that contains the kernel class device.
3175 * @bin_attr: kernel attributes passed to us. 3215 * @bin_attr: kernel attributes passed to us.
3176 * @buf: contains the data to be read from sysfs mbox. 3216 * @buf: contains the data to be read from sysfs mbox.
@@ -3374,7 +3414,7 @@ static struct bin_attribute sysfs_mbox_attr = {
3374}; 3414};
3375 3415
3376/** 3416/**
3377 * lpfc_alloc_sysfs_attr: Creates the ctlreg and mbox entries. 3417 * lpfc_alloc_sysfs_attr - Creates the ctlreg and mbox entries
3378 * @vport: address of lpfc vport structure. 3418 * @vport: address of lpfc vport structure.
3379 * 3419 *
3380 * Return codes: 3420 * Return codes:
@@ -3415,7 +3455,7 @@ out:
3415} 3455}
3416 3456
3417/** 3457/**
3418 * lpfc_free_sysfs_attr: Removes the ctlreg and mbox entries. 3458 * lpfc_free_sysfs_attr - Removes the ctlreg and mbox entries
3419 * @vport: address of lpfc vport structure. 3459 * @vport: address of lpfc vport structure.
3420 **/ 3460 **/
3421void 3461void
@@ -3437,7 +3477,7 @@ lpfc_free_sysfs_attr(struct lpfc_vport *vport)
3437 */ 3477 */
3438 3478
3439/** 3479/**
3440 * lpfc_get_host_port_id: Copy the vport DID into the scsi host port id. 3480 * lpfc_get_host_port_id - Copy the vport DID into the scsi host port id
3441 * @shost: kernel scsi host pointer. 3481 * @shost: kernel scsi host pointer.
3442 **/ 3482 **/
3443static void 3483static void
@@ -3450,7 +3490,7 @@ lpfc_get_host_port_id(struct Scsi_Host *shost)
3450} 3490}
3451 3491
3452/** 3492/**
3453 * lpfc_get_host_port_type: Set the value of the scsi host port type. 3493 * lpfc_get_host_port_type - Set the value of the scsi host port type
3454 * @shost: kernel scsi host pointer. 3494 * @shost: kernel scsi host pointer.
3455 **/ 3495 **/
3456static void 3496static void
@@ -3482,7 +3522,7 @@ lpfc_get_host_port_type(struct Scsi_Host *shost)
3482} 3522}
3483 3523
3484/** 3524/**
3485 * lpfc_get_host_port_state: Set the value of the scsi host port state. 3525 * lpfc_get_host_port_state - Set the value of the scsi host port state
3486 * @shost: kernel scsi host pointer. 3526 * @shost: kernel scsi host pointer.
3487 **/ 3527 **/
3488static void 3528static void
@@ -3520,7 +3560,7 @@ lpfc_get_host_port_state(struct Scsi_Host *shost)
3520} 3560}
3521 3561
3522/** 3562/**
3523 * lpfc_get_host_speed: Set the value of the scsi host speed. 3563 * lpfc_get_host_speed - Set the value of the scsi host speed
3524 * @shost: kernel scsi host pointer. 3564 * @shost: kernel scsi host pointer.
3525 **/ 3565 **/
3526static void 3566static void
@@ -3556,7 +3596,7 @@ lpfc_get_host_speed(struct Scsi_Host *shost)
3556} 3596}
3557 3597
3558/** 3598/**
3559 * lpfc_get_host_fabric_name: Set the value of the scsi host fabric name. 3599 * lpfc_get_host_fabric_name - Set the value of the scsi host fabric name
3560 * @shost: kernel scsi host pointer. 3600 * @shost: kernel scsi host pointer.
3561 **/ 3601 **/
3562static void 3602static void
@@ -3582,7 +3622,7 @@ lpfc_get_host_fabric_name (struct Scsi_Host *shost)
3582} 3622}
3583 3623
3584/** 3624/**
3585 * lpfc_get_stats: Return statistical information about the adapter. 3625 * lpfc_get_stats - Return statistical information about the adapter
3586 * @shost: kernel scsi host pointer. 3626 * @shost: kernel scsi host pointer.
3587 * 3627 *
3588 * Notes: 3628 * Notes:
@@ -3707,7 +3747,7 @@ lpfc_get_stats(struct Scsi_Host *shost)
3707} 3747}
3708 3748
3709/** 3749/**
3710 * lpfc_reset_stats: Copy the adapter link stats information. 3750 * lpfc_reset_stats - Copy the adapter link stats information
3711 * @shost: kernel scsi host pointer. 3751 * @shost: kernel scsi host pointer.
3712 **/ 3752 **/
3713static void 3753static void
@@ -3788,7 +3828,7 @@ lpfc_reset_stats(struct Scsi_Host *shost)
3788 */ 3828 */
3789 3829
3790/** 3830/**
3791 * lpfc_get_node_by_target: Return the nodelist for a target. 3831 * lpfc_get_node_by_target - Return the nodelist for a target
3792 * @starget: kernel scsi target pointer. 3832 * @starget: kernel scsi target pointer.
3793 * 3833 *
3794 * Returns: 3834 * Returns:
@@ -3817,7 +3857,7 @@ lpfc_get_node_by_target(struct scsi_target *starget)
3817} 3857}
3818 3858
3819/** 3859/**
3820 * lpfc_get_starget_port_id: Set the target port id to the ndlp DID or -1. 3860 * lpfc_get_starget_port_id - Set the target port id to the ndlp DID or -1
3821 * @starget: kernel scsi target pointer. 3861 * @starget: kernel scsi target pointer.
3822 **/ 3862 **/
3823static void 3863static void
@@ -3829,7 +3869,7 @@ lpfc_get_starget_port_id(struct scsi_target *starget)
3829} 3869}
3830 3870
3831/** 3871/**
3832 * lpfc_get_starget_node_name: Set the target node name. 3872 * lpfc_get_starget_node_name - Set the target node name
3833 * @starget: kernel scsi target pointer. 3873 * @starget: kernel scsi target pointer.
3834 * 3874 *
3835 * Description: Set the target node name to the ndlp node name wwn or zero. 3875 * Description: Set the target node name to the ndlp node name wwn or zero.
@@ -3844,7 +3884,7 @@ lpfc_get_starget_node_name(struct scsi_target *starget)
3844} 3884}
3845 3885
3846/** 3886/**
3847 * lpfc_get_starget_port_name: Set the target port name. 3887 * lpfc_get_starget_port_name - Set the target port name
3848 * @starget: kernel scsi target pointer. 3888 * @starget: kernel scsi target pointer.
3849 * 3889 *
3850 * Description: set the target port name to the ndlp port name wwn or zero. 3890 * Description: set the target port name to the ndlp port name wwn or zero.
@@ -3859,7 +3899,7 @@ lpfc_get_starget_port_name(struct scsi_target *starget)
3859} 3899}
3860 3900
3861/** 3901/**
3862 * lpfc_set_rport_loss_tmo: Set the rport dev loss tmo. 3902 * lpfc_set_rport_loss_tmo - Set the rport dev loss tmo
3863 * @rport: fc rport address. 3903 * @rport: fc rport address.
3864 * @timeout: new value for dev loss tmo. 3904 * @timeout: new value for dev loss tmo.
3865 * 3905 *
@@ -3877,7 +3917,7 @@ lpfc_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout)
3877} 3917}
3878 3918
3879/** 3919/**
3880 * lpfc_rport_show_function: Return rport target information. 3920 * lpfc_rport_show_function - Return rport target information
3881 * 3921 *
3882 * Description: 3922 * Description:
3883 * Macro that uses field to generate a function with the name lpfc_show_rport_ 3923 * Macro that uses field to generate a function with the name lpfc_show_rport_
@@ -3905,7 +3945,7 @@ lpfc_show_rport_##field (struct device *dev, \
3905static FC_RPORT_ATTR(field, S_IRUGO, lpfc_show_rport_##field, NULL) 3945static FC_RPORT_ATTR(field, S_IRUGO, lpfc_show_rport_##field, NULL)
3906 3946
3907/** 3947/**
3908 * lpfc_set_vport_symbolic_name: Set the vport's symbolic name. 3948 * lpfc_set_vport_symbolic_name - Set the vport's symbolic name
3909 * @fc_vport: The fc_vport who's symbolic name has been changed. 3949 * @fc_vport: The fc_vport who's symbolic name has been changed.
3910 * 3950 *
3911 * Description: 3951 * Description:
@@ -4048,7 +4088,7 @@ struct fc_function_template lpfc_vport_transport_functions = {
4048}; 4088};
4049 4089
4050/** 4090/**
4051 * lpfc_get_cfgparam: Used during probe_one to init the adapter structure. 4091 * lpfc_get_cfgparam - Used during probe_one to init the adapter structure
4052 * @phba: lpfc_hba pointer. 4092 * @phba: lpfc_hba pointer.
4053 **/ 4093 **/
4054void 4094void
@@ -4097,7 +4137,7 @@ lpfc_get_cfgparam(struct lpfc_hba *phba)
4097} 4137}
4098 4138
4099/** 4139/**
4100 * lpfc_get_vport_cfgparam: Used during port create, init the vport structure. 4140 * lpfc_get_vport_cfgparam - Used during port create, init the vport structure
4101 * @vport: lpfc_vport pointer. 4141 * @vport: lpfc_vport pointer.
4102 **/ 4142 **/
4103void 4143void