diff options
author | Randy Dunlap <randy.dunlap@oracle.com> | 2007-01-06 01:41:48 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-01-13 14:55:01 -0500 |
commit | a69b74d39f50b3e3ca9a6641bd71f3fc55d32d98 (patch) | |
tree | f7563f5bac36a2bfcc93d488364263a66d450436 /drivers/scsi/megaraid/megaraid_mbox.c | |
parent | cd96d96f20f2509dfeb302548132e30f471c071a (diff) |
[SCSI] megaraid: fix kernel-doc
kernel-doc modifications:
- change "@param var" notation to @var;
- change function/description separator from ':' to '-';
- change var/description separator from '-' to ':';
- fix a few doc. typos;
- don't use kernel-doc /** lead-in when the doc. block is not kernel-doc;
- use Linux common */ ending comment format instead of **/;
- use correct function parameter names;
- place function parameters immediately after the function short description;
- place kernel-doc immediately before its function or macro;
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Sumant Patro <sumantp@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_mbox.c')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_mbox.c | 285 |
1 files changed, 140 insertions, 145 deletions
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index 49ee50cc4e84..04d0b6918c61 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c | |||
@@ -147,7 +147,7 @@ MODULE_VERSION(MEGARAID_VERSION); | |||
147 | * ### modules parameters for driver ### | 147 | * ### modules parameters for driver ### |
148 | */ | 148 | */ |
149 | 149 | ||
150 | /** | 150 | /* |
151 | * Set to enable driver to expose unconfigured disk to kernel | 151 | * Set to enable driver to expose unconfigured disk to kernel |
152 | */ | 152 | */ |
153 | static int megaraid_expose_unconf_disks = 0; | 153 | static int megaraid_expose_unconf_disks = 0; |
@@ -155,7 +155,7 @@ module_param_named(unconf_disks, megaraid_expose_unconf_disks, int, 0); | |||
155 | MODULE_PARM_DESC(unconf_disks, | 155 | MODULE_PARM_DESC(unconf_disks, |
156 | "Set to expose unconfigured disks to kernel (default=0)"); | 156 | "Set to expose unconfigured disks to kernel (default=0)"); |
157 | 157 | ||
158 | /** | 158 | /* |
159 | * driver wait time if the adapter's mailbox is busy | 159 | * driver wait time if the adapter's mailbox is busy |
160 | */ | 160 | */ |
161 | static unsigned int max_mbox_busy_wait = MBOX_BUSY_WAIT; | 161 | static unsigned int max_mbox_busy_wait = MBOX_BUSY_WAIT; |
@@ -163,7 +163,7 @@ module_param_named(busy_wait, max_mbox_busy_wait, int, 0); | |||
163 | MODULE_PARM_DESC(busy_wait, | 163 | MODULE_PARM_DESC(busy_wait, |
164 | "Max wait for mailbox in microseconds if busy (default=10)"); | 164 | "Max wait for mailbox in microseconds if busy (default=10)"); |
165 | 165 | ||
166 | /** | 166 | /* |
167 | * number of sectors per IO command | 167 | * number of sectors per IO command |
168 | */ | 168 | */ |
169 | static unsigned int megaraid_max_sectors = MBOX_MAX_SECTORS; | 169 | static unsigned int megaraid_max_sectors = MBOX_MAX_SECTORS; |
@@ -171,7 +171,7 @@ module_param_named(max_sectors, megaraid_max_sectors, int, 0); | |||
171 | MODULE_PARM_DESC(max_sectors, | 171 | MODULE_PARM_DESC(max_sectors, |
172 | "Maximum number of sectors per IO command (default=128)"); | 172 | "Maximum number of sectors per IO command (default=128)"); |
173 | 173 | ||
174 | /** | 174 | /* |
175 | * number of commands per logical unit | 175 | * number of commands per logical unit |
176 | */ | 176 | */ |
177 | static unsigned int megaraid_cmd_per_lun = MBOX_DEF_CMD_PER_LUN; | 177 | static unsigned int megaraid_cmd_per_lun = MBOX_DEF_CMD_PER_LUN; |
@@ -180,7 +180,7 @@ MODULE_PARM_DESC(cmd_per_lun, | |||
180 | "Maximum number of commands per logical unit (default=64)"); | 180 | "Maximum number of commands per logical unit (default=64)"); |
181 | 181 | ||
182 | 182 | ||
183 | /** | 183 | /* |
184 | * Fast driver load option, skip scanning for physical devices during load. | 184 | * Fast driver load option, skip scanning for physical devices during load. |
185 | * This would result in non-disk devices being skipped during driver load | 185 | * This would result in non-disk devices being skipped during driver load |
186 | * time. These can be later added though, using /proc/scsi/scsi | 186 | * time. These can be later added though, using /proc/scsi/scsi |
@@ -191,7 +191,7 @@ MODULE_PARM_DESC(fast_load, | |||
191 | "Faster loading of the driver, skips physical devices! (default=0)"); | 191 | "Faster loading of the driver, skips physical devices! (default=0)"); |
192 | 192 | ||
193 | 193 | ||
194 | /** | 194 | /* |
195 | * mraid_debug level - threshold for amount of information to be displayed by | 195 | * mraid_debug level - threshold for amount of information to be displayed by |
196 | * the driver. This level can be changed through modules parameters, ioctl or | 196 | * the driver. This level can be changed through modules parameters, ioctl or |
197 | * sysfs/proc interface. By default, print the announcement messages only. | 197 | * sysfs/proc interface. By default, print the announcement messages only. |
@@ -338,7 +338,7 @@ static struct device_attribute *megaraid_sdev_attrs[] = { | |||
338 | * | 338 | * |
339 | * Return value: | 339 | * Return value: |
340 | * actual depth set | 340 | * actual depth set |
341 | **/ | 341 | */ |
342 | static int megaraid_change_queue_depth(struct scsi_device *sdev, int qdepth) | 342 | static int megaraid_change_queue_depth(struct scsi_device *sdev, int qdepth) |
343 | { | 343 | { |
344 | if (qdepth > MBOX_MAX_SCSI_CMDS) | 344 | if (qdepth > MBOX_MAX_SCSI_CMDS) |
@@ -370,8 +370,8 @@ static struct scsi_host_template megaraid_template_g = { | |||
370 | * megaraid_init - module load hook | 370 | * megaraid_init - module load hook |
371 | * | 371 | * |
372 | * We register ourselves as hotplug enabled module and let PCI subsystem | 372 | * We register ourselves as hotplug enabled module and let PCI subsystem |
373 | * discover our adaters | 373 | * discover our adapters. |
374 | **/ | 374 | */ |
375 | static int __init | 375 | static int __init |
376 | megaraid_init(void) | 376 | megaraid_init(void) |
377 | { | 377 | { |
@@ -406,7 +406,7 @@ megaraid_init(void) | |||
406 | /** | 406 | /** |
407 | * megaraid_exit - driver unload entry point | 407 | * megaraid_exit - driver unload entry point |
408 | * | 408 | * |
409 | * We simply unwrap the megaraid_init routine here | 409 | * We simply unwrap the megaraid_init routine here. |
410 | */ | 410 | */ |
411 | static void __exit | 411 | static void __exit |
412 | megaraid_exit(void) | 412 | megaraid_exit(void) |
@@ -422,12 +422,12 @@ megaraid_exit(void) | |||
422 | 422 | ||
423 | /** | 423 | /** |
424 | * megaraid_probe_one - PCI hotplug entry point | 424 | * megaraid_probe_one - PCI hotplug entry point |
425 | * @param pdev : handle to this controller's PCI configuration space | 425 | * @pdev : handle to this controller's PCI configuration space |
426 | * @param id : pci device id of the class of controllers | 426 | * @id : pci device id of the class of controllers |
427 | * | 427 | * |
428 | * This routine should be called whenever a new adapter is detected by the | 428 | * This routine should be called whenever a new adapter is detected by the |
429 | * PCI hotplug susbsytem. | 429 | * PCI hotplug susbsytem. |
430 | **/ | 430 | */ |
431 | static int __devinit | 431 | static int __devinit |
432 | megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | 432 | megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) |
433 | { | 433 | { |
@@ -543,16 +543,15 @@ out_probe_one: | |||
543 | 543 | ||
544 | 544 | ||
545 | /** | 545 | /** |
546 | * megaraid_detach_one - release the framework resources and call LLD release | 546 | * megaraid_detach_one - release framework resources and call LLD release routine |
547 | * routine | 547 | * @pdev : handle for our PCI cofiguration space |
548 | * @param pdev : handle for our PCI cofiguration space | ||
549 | * | 548 | * |
550 | * This routine is called during driver unload. We free all the allocated | 549 | * This routine is called during driver unload. We free all the allocated |
551 | * resources and call the corresponding LLD so that it can also release all | 550 | * resources and call the corresponding LLD so that it can also release all |
552 | * its resources. | 551 | * its resources. |
553 | * | 552 | * |
554 | * This routine is also called from the PCI hotplug system | 553 | * This routine is also called from the PCI hotplug system. |
555 | **/ | 554 | */ |
556 | static void | 555 | static void |
557 | megaraid_detach_one(struct pci_dev *pdev) | 556 | megaraid_detach_one(struct pci_dev *pdev) |
558 | { | 557 | { |
@@ -616,9 +615,9 @@ megaraid_detach_one(struct pci_dev *pdev) | |||
616 | 615 | ||
617 | /** | 616 | /** |
618 | * megaraid_mbox_shutdown - PCI shutdown for megaraid HBA | 617 | * megaraid_mbox_shutdown - PCI shutdown for megaraid HBA |
619 | * @param device : generice driver model device | 618 | * @pdev : generic driver model device |
620 | * | 619 | * |
621 | * Shutdown notification, perform flush cache | 620 | * Shutdown notification, perform flush cache. |
622 | */ | 621 | */ |
623 | static void | 622 | static void |
624 | megaraid_mbox_shutdown(struct pci_dev *pdev) | 623 | megaraid_mbox_shutdown(struct pci_dev *pdev) |
@@ -644,10 +643,10 @@ megaraid_mbox_shutdown(struct pci_dev *pdev) | |||
644 | 643 | ||
645 | /** | 644 | /** |
646 | * megaraid_io_attach - attach a device with the IO subsystem | 645 | * megaraid_io_attach - attach a device with the IO subsystem |
647 | * @param adapter : controller's soft state | 646 | * @adapter : controller's soft state |
648 | * | 647 | * |
649 | * Attach this device with the IO subsystem | 648 | * Attach this device with the IO subsystem. |
650 | **/ | 649 | */ |
651 | static int | 650 | static int |
652 | megaraid_io_attach(adapter_t *adapter) | 651 | megaraid_io_attach(adapter_t *adapter) |
653 | { | 652 | { |
@@ -696,10 +695,10 @@ megaraid_io_attach(adapter_t *adapter) | |||
696 | 695 | ||
697 | /** | 696 | /** |
698 | * megaraid_io_detach - detach a device from the IO subsystem | 697 | * megaraid_io_detach - detach a device from the IO subsystem |
699 | * @param adapter : controller's soft state | 698 | * @adapter : controller's soft state |
700 | * | 699 | * |
701 | * Detach this device from the IO subsystem | 700 | * Detach this device from the IO subsystem. |
702 | **/ | 701 | */ |
703 | static void | 702 | static void |
704 | megaraid_io_detach(adapter_t *adapter) | 703 | megaraid_io_detach(adapter_t *adapter) |
705 | { | 704 | { |
@@ -723,13 +722,13 @@ megaraid_io_detach(adapter_t *adapter) | |||
723 | 722 | ||
724 | /** | 723 | /** |
725 | * megaraid_init_mbox - initialize controller | 724 | * megaraid_init_mbox - initialize controller |
726 | * @param adapter - our soft state | 725 | * @adapter : our soft state |
727 | * | 726 | * |
728 | * . Allocate 16-byte aligned mailbox memory for firmware handshake | 727 | * - Allocate 16-byte aligned mailbox memory for firmware handshake |
729 | * . Allocate controller's memory resources | 728 | * - Allocate controller's memory resources |
730 | * . Find out all initialization data | 729 | * - Find out all initialization data |
731 | * . Allocate memory required for all the commands | 730 | * - Allocate memory required for all the commands |
732 | * . Use internal library of FW routines, build up complete soft state | 731 | * - Use internal library of FW routines, build up complete soft state |
733 | */ | 732 | */ |
734 | static int __devinit | 733 | static int __devinit |
735 | megaraid_init_mbox(adapter_t *adapter) | 734 | megaraid_init_mbox(adapter_t *adapter) |
@@ -943,7 +942,7 @@ out_free_raid_dev: | |||
943 | 942 | ||
944 | /** | 943 | /** |
945 | * megaraid_fini_mbox - undo controller initialization | 944 | * megaraid_fini_mbox - undo controller initialization |
946 | * @param adapter : our soft state | 945 | * @adapter : our soft state |
947 | */ | 946 | */ |
948 | static void | 947 | static void |
949 | megaraid_fini_mbox(adapter_t *adapter) | 948 | megaraid_fini_mbox(adapter_t *adapter) |
@@ -973,12 +972,12 @@ megaraid_fini_mbox(adapter_t *adapter) | |||
973 | 972 | ||
974 | /** | 973 | /** |
975 | * megaraid_alloc_cmd_packets - allocate shared mailbox | 974 | * megaraid_alloc_cmd_packets - allocate shared mailbox |
976 | * @param adapter : soft state of the raid controller | 975 | * @adapter : soft state of the raid controller |
977 | * | 976 | * |
978 | * Allocate and align the shared mailbox. This maibox is used to issue | 977 | * Allocate and align the shared mailbox. This maibox is used to issue |
979 | * all the commands. For IO based controllers, the mailbox is also regsitered | 978 | * all the commands. For IO based controllers, the mailbox is also regsitered |
980 | * with the FW. Allocate memory for all commands as well. | 979 | * with the FW. Allocate memory for all commands as well. |
981 | * This is our big allocator | 980 | * This is our big allocator. |
982 | */ | 981 | */ |
983 | static int | 982 | static int |
984 | megaraid_alloc_cmd_packets(adapter_t *adapter) | 983 | megaraid_alloc_cmd_packets(adapter_t *adapter) |
@@ -1138,9 +1137,9 @@ out_free_common_mbox: | |||
1138 | 1137 | ||
1139 | /** | 1138 | /** |
1140 | * megaraid_free_cmd_packets - free memory | 1139 | * megaraid_free_cmd_packets - free memory |
1141 | * @param adapter : soft state of the raid controller | 1140 | * @adapter : soft state of the raid controller |
1142 | * | 1141 | * |
1143 | * Release memory resources allocated for commands | 1142 | * Release memory resources allocated for commands. |
1144 | */ | 1143 | */ |
1145 | static void | 1144 | static void |
1146 | megaraid_free_cmd_packets(adapter_t *adapter) | 1145 | megaraid_free_cmd_packets(adapter_t *adapter) |
@@ -1162,10 +1161,10 @@ megaraid_free_cmd_packets(adapter_t *adapter) | |||
1162 | 1161 | ||
1163 | /** | 1162 | /** |
1164 | * megaraid_mbox_setup_dma_pools - setup dma pool for command packets | 1163 | * megaraid_mbox_setup_dma_pools - setup dma pool for command packets |
1165 | * @param adapter : HBA soft state | 1164 | * @adapter : HBA soft state |
1166 | * | 1165 | * |
1167 | * setup the dma pools for mailbox, passthru and extended passthru structures, | 1166 | * Setup the dma pools for mailbox, passthru and extended passthru structures, |
1168 | * and scatter-gather lists | 1167 | * and scatter-gather lists. |
1169 | */ | 1168 | */ |
1170 | static int | 1169 | static int |
1171 | megaraid_mbox_setup_dma_pools(adapter_t *adapter) | 1170 | megaraid_mbox_setup_dma_pools(adapter_t *adapter) |
@@ -1258,10 +1257,10 @@ fail_setup_dma_pool: | |||
1258 | 1257 | ||
1259 | /** | 1258 | /** |
1260 | * megaraid_mbox_teardown_dma_pools - teardown dma pools for command packets | 1259 | * megaraid_mbox_teardown_dma_pools - teardown dma pools for command packets |
1261 | * @param adapter : HBA soft state | 1260 | * @adapter : HBA soft state |
1262 | * | 1261 | * |
1263 | * teardown the dma pool for mailbox, passthru and extended passthru | 1262 | * Teardown the dma pool for mailbox, passthru and extended passthru |
1264 | * structures, and scatter-gather lists | 1263 | * structures, and scatter-gather lists. |
1265 | */ | 1264 | */ |
1266 | static void | 1265 | static void |
1267 | megaraid_mbox_teardown_dma_pools(adapter_t *adapter) | 1266 | megaraid_mbox_teardown_dma_pools(adapter_t *adapter) |
@@ -1306,10 +1305,11 @@ megaraid_mbox_teardown_dma_pools(adapter_t *adapter) | |||
1306 | /** | 1305 | /** |
1307 | * megaraid_alloc_scb - detach and return a scb from the free list | 1306 | * megaraid_alloc_scb - detach and return a scb from the free list |
1308 | * @adapter : controller's soft state | 1307 | * @adapter : controller's soft state |
1308 | * @scp : pointer to the scsi command to be executed | ||
1309 | * | 1309 | * |
1310 | * return the scb from the head of the free list. NULL if there are none | 1310 | * Return the scb from the head of the free list. %NULL if there are none |
1311 | * available | 1311 | * available. |
1312 | **/ | 1312 | */ |
1313 | static scb_t * | 1313 | static scb_t * |
1314 | megaraid_alloc_scb(adapter_t *adapter, struct scsi_cmnd *scp) | 1314 | megaraid_alloc_scb(adapter_t *adapter, struct scsi_cmnd *scp) |
1315 | { | 1315 | { |
@@ -1343,11 +1343,11 @@ megaraid_alloc_scb(adapter_t *adapter, struct scsi_cmnd *scp) | |||
1343 | * @adapter : controller's soft state | 1343 | * @adapter : controller's soft state |
1344 | * @scb : scb to be freed | 1344 | * @scb : scb to be freed |
1345 | * | 1345 | * |
1346 | * return the scb back to the free list of scbs. The caller must 'flush' the | 1346 | * Return the scb back to the free list of scbs. The caller must 'flush' the |
1347 | * SCB before calling us. E.g., performing pci_unamp and/or pci_sync etc. | 1347 | * SCB before calling us. E.g., performing pci_unamp and/or pci_sync etc. |
1348 | * NOTE NOTE: Make sure the scb is not on any list before calling this | 1348 | * NOTE NOTE: Make sure the scb is not on any list before calling this |
1349 | * routine. | 1349 | * routine. |
1350 | **/ | 1350 | */ |
1351 | static inline void | 1351 | static inline void |
1352 | megaraid_dealloc_scb(adapter_t *adapter, scb_t *scb) | 1352 | megaraid_dealloc_scb(adapter_t *adapter, scb_t *scb) |
1353 | { | 1353 | { |
@@ -1368,10 +1368,10 @@ megaraid_dealloc_scb(adapter_t *adapter, scb_t *scb) | |||
1368 | 1368 | ||
1369 | /** | 1369 | /** |
1370 | * megaraid_mbox_mksgl - make the scatter-gather list | 1370 | * megaraid_mbox_mksgl - make the scatter-gather list |
1371 | * @adapter - controller's soft state | 1371 | * @adapter : controller's soft state |
1372 | * @scb - scsi control block | 1372 | * @scb : scsi control block |
1373 | * | 1373 | * |
1374 | * prepare the scatter-gather list | 1374 | * Prepare the scatter-gather list. |
1375 | */ | 1375 | */ |
1376 | static int | 1376 | static int |
1377 | megaraid_mbox_mksgl(adapter_t *adapter, scb_t *scb) | 1377 | megaraid_mbox_mksgl(adapter_t *adapter, scb_t *scb) |
@@ -1441,10 +1441,10 @@ megaraid_mbox_mksgl(adapter_t *adapter, scb_t *scb) | |||
1441 | 1441 | ||
1442 | /** | 1442 | /** |
1443 | * mbox_post_cmd - issue a mailbox command | 1443 | * mbox_post_cmd - issue a mailbox command |
1444 | * @adapter - controller's soft state | 1444 | * @adapter : controller's soft state |
1445 | * @scb - command to be issued | 1445 | * @scb : command to be issued |
1446 | * | 1446 | * |
1447 | * post the command to the controller if mailbox is availble. | 1447 | * Post the command to the controller if mailbox is available. |
1448 | */ | 1448 | */ |
1449 | static int | 1449 | static int |
1450 | mbox_post_cmd(adapter_t *adapter, scb_t *scb) | 1450 | mbox_post_cmd(adapter_t *adapter, scb_t *scb) |
@@ -1524,7 +1524,7 @@ mbox_post_cmd(adapter_t *adapter, scb_t *scb) | |||
1524 | * Queue entry point for mailbox based controllers. | 1524 | * Queue entry point for mailbox based controllers. |
1525 | */ | 1525 | */ |
1526 | static int | 1526 | static int |
1527 | megaraid_queue_command(struct scsi_cmnd *scp, void (* done)(struct scsi_cmnd *)) | 1527 | megaraid_queue_command(struct scsi_cmnd *scp, void (*done)(struct scsi_cmnd *)) |
1528 | { | 1528 | { |
1529 | adapter_t *adapter; | 1529 | adapter_t *adapter; |
1530 | scb_t *scb; | 1530 | scb_t *scb; |
@@ -1554,15 +1554,15 @@ megaraid_queue_command(struct scsi_cmnd *scp, void (* done)(struct scsi_cmnd *)) | |||
1554 | } | 1554 | } |
1555 | 1555 | ||
1556 | /** | 1556 | /** |
1557 | * megaraid_mbox_build_cmd - transform the mid-layer scsi command to megaraid | 1557 | * megaraid_mbox_build_cmd - transform the mid-layer scsi commands |
1558 | * firmware lingua | 1558 | * @adapter : controller's soft state |
1559 | * @adapter - controller's soft state | 1559 | * @scp : mid-layer scsi command pointer |
1560 | * @scp - mid-layer scsi command pointer | 1560 | * @busy : set if request could not be completed because of lack of |
1561 | * @busy - set if request could not be completed because of lack of | ||
1562 | * resources | 1561 | * resources |
1563 | * | 1562 | * |
1564 | * convert the command issued by mid-layer to format understood by megaraid | 1563 | * Transform the mid-layer scsi command to megaraid firmware lingua. |
1565 | * firmware. We also complete certain command without sending them to firmware | 1564 | * Convert the command issued by mid-layer to format understood by megaraid |
1565 | * firmware. We also complete certain commands without sending them to firmware. | ||
1566 | */ | 1566 | */ |
1567 | static scb_t * | 1567 | static scb_t * |
1568 | megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy) | 1568 | megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy) |
@@ -1943,9 +1943,9 @@ megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy) | |||
1943 | /** | 1943 | /** |
1944 | * megaraid_mbox_runpendq - execute commands queued in the pending queue | 1944 | * megaraid_mbox_runpendq - execute commands queued in the pending queue |
1945 | * @adapter : controller's soft state | 1945 | * @adapter : controller's soft state |
1946 | * @scb : SCB to be queued in the pending list | 1946 | * @scb_q : SCB to be queued in the pending list |
1947 | * | 1947 | * |
1948 | * scan the pending list for commands which are not yet issued and try to | 1948 | * Scan the pending list for commands which are not yet issued and try to |
1949 | * post to the controller. The SCB can be a null pointer, which would indicate | 1949 | * post to the controller. The SCB can be a null pointer, which would indicate |
1950 | * no SCB to be queue, just try to execute the ones in the pending list. | 1950 | * no SCB to be queue, just try to execute the ones in the pending list. |
1951 | * | 1951 | * |
@@ -2018,11 +2018,11 @@ megaraid_mbox_runpendq(adapter_t *adapter, scb_t *scb_q) | |||
2018 | 2018 | ||
2019 | /** | 2019 | /** |
2020 | * megaraid_mbox_prepare_pthru - prepare a command for physical devices | 2020 | * megaraid_mbox_prepare_pthru - prepare a command for physical devices |
2021 | * @adapter - pointer to controller's soft state | 2021 | * @adapter : pointer to controller's soft state |
2022 | * @scb - scsi control block | 2022 | * @scb : scsi control block |
2023 | * @scp - scsi command from the mid-layer | 2023 | * @scp : scsi command from the mid-layer |
2024 | * | 2024 | * |
2025 | * prepare a command for the scsi physical devices | 2025 | * Prepare a command for the scsi physical devices. |
2026 | */ | 2026 | */ |
2027 | static void | 2027 | static void |
2028 | megaraid_mbox_prepare_pthru(adapter_t *adapter, scb_t *scb, | 2028 | megaraid_mbox_prepare_pthru(adapter_t *adapter, scb_t *scb, |
@@ -2066,12 +2066,12 @@ megaraid_mbox_prepare_pthru(adapter_t *adapter, scb_t *scb, | |||
2066 | 2066 | ||
2067 | /** | 2067 | /** |
2068 | * megaraid_mbox_prepare_epthru - prepare a command for physical devices | 2068 | * megaraid_mbox_prepare_epthru - prepare a command for physical devices |
2069 | * @adapter - pointer to controller's soft state | 2069 | * @adapter : pointer to controller's soft state |
2070 | * @scb - scsi control block | 2070 | * @scb : scsi control block |
2071 | * @scp - scsi command from the mid-layer | 2071 | * @scp : scsi command from the mid-layer |
2072 | * | 2072 | * |
2073 | * prepare a command for the scsi physical devices. This rountine prepares | 2073 | * Prepare a command for the scsi physical devices. This rountine prepares |
2074 | * commands for devices which can take extended CDBs (>10 bytes) | 2074 | * commands for devices which can take extended CDBs (>10 bytes). |
2075 | */ | 2075 | */ |
2076 | static void | 2076 | static void |
2077 | megaraid_mbox_prepare_epthru(adapter_t *adapter, scb_t *scb, | 2077 | megaraid_mbox_prepare_epthru(adapter_t *adapter, scb_t *scb, |
@@ -2115,9 +2115,9 @@ megaraid_mbox_prepare_epthru(adapter_t *adapter, scb_t *scb, | |||
2115 | 2115 | ||
2116 | /** | 2116 | /** |
2117 | * megaraid_ack_sequence - interrupt ack sequence for memory mapped HBAs | 2117 | * megaraid_ack_sequence - interrupt ack sequence for memory mapped HBAs |
2118 | * @adapter - controller's soft state | 2118 | * @adapter : controller's soft state |
2119 | * | 2119 | * |
2120 | * Interrupt ackrowledgement sequence for memory mapped HBAs. Find out the | 2120 | * Interrupt acknowledgement sequence for memory mapped HBAs. Find out the |
2121 | * completed command and put them on the completed list for later processing. | 2121 | * completed command and put them on the completed list for later processing. |
2122 | * | 2122 | * |
2123 | * Returns: 1 if the interrupt is valid, 0 otherwise | 2123 | * Returns: 1 if the interrupt is valid, 0 otherwise |
@@ -2230,9 +2230,8 @@ megaraid_ack_sequence(adapter_t *adapter) | |||
2230 | 2230 | ||
2231 | /** | 2231 | /** |
2232 | * megaraid_isr - isr for memory based mailbox based controllers | 2232 | * megaraid_isr - isr for memory based mailbox based controllers |
2233 | * @irq - irq | 2233 | * @irq : irq |
2234 | * @devp - pointer to our soft state | 2234 | * @devp : pointer to our soft state |
2235 | * @regs - unused | ||
2236 | * | 2235 | * |
2237 | * Interrupt service routine for memory-mapped mailbox controllers. | 2236 | * Interrupt service routine for memory-mapped mailbox controllers. |
2238 | */ | 2237 | */ |
@@ -2677,7 +2676,7 @@ megaraid_abort_handler(struct scsi_cmnd *scp) | |||
2677 | * the FW is still live, in which case the outstanding commands counter mut go | 2676 | * the FW is still live, in which case the outstanding commands counter mut go |
2678 | * down to 0. If that happens, also issue the reservation reset command to | 2677 | * down to 0. If that happens, also issue the reservation reset command to |
2679 | * relinquish (possible) reservations on the logical drives connected to this | 2678 | * relinquish (possible) reservations on the logical drives connected to this |
2680 | * host | 2679 | * host. |
2681 | **/ | 2680 | **/ |
2682 | static int | 2681 | static int |
2683 | megaraid_reset_handler(struct scsi_cmnd *scp) | 2682 | megaraid_reset_handler(struct scsi_cmnd *scp) |
@@ -2829,11 +2828,11 @@ megaraid_reset_handler(struct scsi_cmnd *scp) | |||
2829 | 2828 | ||
2830 | /** | 2829 | /** |
2831 | * mbox_post_sync_cmd() - blocking command to the mailbox based controllers | 2830 | * mbox_post_sync_cmd() - blocking command to the mailbox based controllers |
2832 | * @adapter - controller's soft state | 2831 | * @adapter : controller's soft state |
2833 | * @raw_mbox - the mailbox | 2832 | * @raw_mbox : the mailbox |
2834 | * | 2833 | * |
2835 | * Issue a scb in synchronous and non-interrupt mode for mailbox based | 2834 | * Issue a scb in synchronous and non-interrupt mode for mailbox based |
2836 | * controllers | 2835 | * controllers. |
2837 | */ | 2836 | */ |
2838 | static int | 2837 | static int |
2839 | mbox_post_sync_cmd(adapter_t *adapter, uint8_t raw_mbox[]) | 2838 | mbox_post_sync_cmd(adapter_t *adapter, uint8_t raw_mbox[]) |
@@ -2961,12 +2960,12 @@ blocked_mailbox: | |||
2961 | 2960 | ||
2962 | /** | 2961 | /** |
2963 | * mbox_post_sync_cmd_fast - blocking command to the mailbox based controllers | 2962 | * mbox_post_sync_cmd_fast - blocking command to the mailbox based controllers |
2964 | * @adapter - controller's soft state | 2963 | * @adapter : controller's soft state |
2965 | * @raw_mbox - the mailbox | 2964 | * @raw_mbox : the mailbox |
2966 | * | 2965 | * |
2967 | * Issue a scb in synchronous and non-interrupt mode for mailbox based | 2966 | * Issue a scb in synchronous and non-interrupt mode for mailbox based |
2968 | * controllers. This is a faster version of the synchronous command and | 2967 | * controllers. This is a faster version of the synchronous command and |
2969 | * therefore can be called in interrupt-context as well | 2968 | * therefore can be called in interrupt-context as well. |
2970 | */ | 2969 | */ |
2971 | static int | 2970 | static int |
2972 | mbox_post_sync_cmd_fast(adapter_t *adapter, uint8_t raw_mbox[]) | 2971 | mbox_post_sync_cmd_fast(adapter_t *adapter, uint8_t raw_mbox[]) |
@@ -3014,10 +3013,10 @@ mbox_post_sync_cmd_fast(adapter_t *adapter, uint8_t raw_mbox[]) | |||
3014 | 3013 | ||
3015 | /** | 3014 | /** |
3016 | * megaraid_busywait_mbox() - Wait until the controller's mailbox is available | 3015 | * megaraid_busywait_mbox() - Wait until the controller's mailbox is available |
3017 | * @raid_dev - RAID device (HBA) soft state | 3016 | * @raid_dev : RAID device (HBA) soft state |
3018 | * | 3017 | * |
3019 | * wait until the controller's mailbox is available to accept more commands. | 3018 | * Wait until the controller's mailbox is available to accept more commands. |
3020 | * wait for at most 1 second | 3019 | * Wait for at most 1 second. |
3021 | */ | 3020 | */ |
3022 | static int | 3021 | static int |
3023 | megaraid_busywait_mbox(mraid_device_t *raid_dev) | 3022 | megaraid_busywait_mbox(mraid_device_t *raid_dev) |
@@ -3038,9 +3037,9 @@ megaraid_busywait_mbox(mraid_device_t *raid_dev) | |||
3038 | 3037 | ||
3039 | /** | 3038 | /** |
3040 | * megaraid_mbox_product_info - some static information about the controller | 3039 | * megaraid_mbox_product_info - some static information about the controller |
3041 | * @adapter - our soft state | 3040 | * @adapter : our soft state |
3042 | * | 3041 | * |
3043 | * issue commands to the controller to grab some parameters required by our | 3042 | * Issue commands to the controller to grab some parameters required by our |
3044 | * caller. | 3043 | * caller. |
3045 | */ | 3044 | */ |
3046 | static int | 3045 | static int |
@@ -3163,10 +3162,10 @@ megaraid_mbox_product_info(adapter_t *adapter) | |||
3163 | 3162 | ||
3164 | /** | 3163 | /** |
3165 | * megaraid_mbox_extended_cdb - check for support for extended CDBs | 3164 | * megaraid_mbox_extended_cdb - check for support for extended CDBs |
3166 | * @adapter - soft state for the controller | 3165 | * @adapter : soft state for the controller |
3167 | * | 3166 | * |
3168 | * this routine check whether the controller in question supports extended | 3167 | * This routine check whether the controller in question supports extended |
3169 | * ( > 10 bytes ) CDBs | 3168 | * ( > 10 bytes ) CDBs. |
3170 | */ | 3169 | */ |
3171 | static int | 3170 | static int |
3172 | megaraid_mbox_extended_cdb(adapter_t *adapter) | 3171 | megaraid_mbox_extended_cdb(adapter_t *adapter) |
@@ -3199,8 +3198,8 @@ megaraid_mbox_extended_cdb(adapter_t *adapter) | |||
3199 | 3198 | ||
3200 | /** | 3199 | /** |
3201 | * megaraid_mbox_support_ha - Do we support clustering | 3200 | * megaraid_mbox_support_ha - Do we support clustering |
3202 | * @adapter - soft state for the controller | 3201 | * @adapter : soft state for the controller |
3203 | * @init_id - ID of the initiator | 3202 | * @init_id : ID of the initiator |
3204 | * | 3203 | * |
3205 | * Determine if the firmware supports clustering and the ID of the initiator. | 3204 | * Determine if the firmware supports clustering and the ID of the initiator. |
3206 | */ | 3205 | */ |
@@ -3242,9 +3241,9 @@ megaraid_mbox_support_ha(adapter_t *adapter, uint16_t *init_id) | |||
3242 | 3241 | ||
3243 | /** | 3242 | /** |
3244 | * megaraid_mbox_support_random_del - Do we support random deletion | 3243 | * megaraid_mbox_support_random_del - Do we support random deletion |
3245 | * @adapter - soft state for the controller | 3244 | * @adapter : soft state for the controller |
3246 | * | 3245 | * |
3247 | * Determine if the firmware supports random deletion | 3246 | * Determine if the firmware supports random deletion. |
3248 | * Return: 1 is operation supported, 0 otherwise | 3247 | * Return: 1 is operation supported, 0 otherwise |
3249 | */ | 3248 | */ |
3250 | static int | 3249 | static int |
@@ -3277,10 +3276,10 @@ megaraid_mbox_support_random_del(adapter_t *adapter) | |||
3277 | 3276 | ||
3278 | /** | 3277 | /** |
3279 | * megaraid_mbox_get_max_sg - maximum sg elements supported by the firmware | 3278 | * megaraid_mbox_get_max_sg - maximum sg elements supported by the firmware |
3280 | * @adapter - soft state for the controller | 3279 | * @adapter : soft state for the controller |
3281 | * | 3280 | * |
3282 | * Find out the maximum number of scatter-gather elements supported by the | 3281 | * Find out the maximum number of scatter-gather elements supported by the |
3283 | * firmware | 3282 | * firmware. |
3284 | */ | 3283 | */ |
3285 | static int | 3284 | static int |
3286 | megaraid_mbox_get_max_sg(adapter_t *adapter) | 3285 | megaraid_mbox_get_max_sg(adapter_t *adapter) |
@@ -3317,10 +3316,10 @@ megaraid_mbox_get_max_sg(adapter_t *adapter) | |||
3317 | 3316 | ||
3318 | /** | 3317 | /** |
3319 | * megaraid_mbox_enum_raid_scsi - enumerate the RAID and SCSI channels | 3318 | * megaraid_mbox_enum_raid_scsi - enumerate the RAID and SCSI channels |
3320 | * @adapter - soft state for the controller | 3319 | * @adapter : soft state for the controller |
3321 | * | 3320 | * |
3322 | * Enumerate the RAID and SCSI channels for ROMB platoforms so that channels | 3321 | * Enumerate the RAID and SCSI channels for ROMB platforms so that channels |
3323 | * can be exported as regular SCSI channels | 3322 | * can be exported as regular SCSI channels. |
3324 | */ | 3323 | */ |
3325 | static void | 3324 | static void |
3326 | megaraid_mbox_enum_raid_scsi(adapter_t *adapter) | 3325 | megaraid_mbox_enum_raid_scsi(adapter_t *adapter) |
@@ -3354,9 +3353,9 @@ megaraid_mbox_enum_raid_scsi(adapter_t *adapter) | |||
3354 | 3353 | ||
3355 | /** | 3354 | /** |
3356 | * megaraid_mbox_flush_cache - flush adapter and disks cache | 3355 | * megaraid_mbox_flush_cache - flush adapter and disks cache |
3357 | * @param adapter : soft state for the controller | 3356 | * @adapter : soft state for the controller |
3358 | * | 3357 | * |
3359 | * Flush adapter cache followed by disks cache | 3358 | * Flush adapter cache followed by disks cache. |
3360 | */ | 3359 | */ |
3361 | static void | 3360 | static void |
3362 | megaraid_mbox_flush_cache(adapter_t *adapter) | 3361 | megaraid_mbox_flush_cache(adapter_t *adapter) |
@@ -3387,9 +3386,9 @@ megaraid_mbox_flush_cache(adapter_t *adapter) | |||
3387 | 3386 | ||
3388 | /** | 3387 | /** |
3389 | * megaraid_mbox_fire_sync_cmd - fire the sync cmd | 3388 | * megaraid_mbox_fire_sync_cmd - fire the sync cmd |
3390 | * @param adapter : soft state for the controller | 3389 | * @adapter : soft state for the controller |
3391 | * | 3390 | * |
3392 | * Clears the pending cmds in FW and reinits its RAID structs | 3391 | * Clears the pending cmds in FW and reinits its RAID structs. |
3393 | */ | 3392 | */ |
3394 | static int | 3393 | static int |
3395 | megaraid_mbox_fire_sync_cmd(adapter_t *adapter) | 3394 | megaraid_mbox_fire_sync_cmd(adapter_t *adapter) |
@@ -3465,12 +3464,12 @@ blocked_mailbox: | |||
3465 | 3464 | ||
3466 | /** | 3465 | /** |
3467 | * megaraid_mbox_display_scb - display SCB information, mostly debug purposes | 3466 | * megaraid_mbox_display_scb - display SCB information, mostly debug purposes |
3468 | * @param adapter : controllers' soft state | 3467 | * @adapter : controller's soft state |
3469 | * @param scb : SCB to be displayed | 3468 | * @scb : SCB to be displayed |
3470 | * @param level : debug level for console print | 3469 | * @level : debug level for console print |
3471 | * | 3470 | * |
3472 | * Diplay information about the given SCB iff the current debug level is | 3471 | * Diplay information about the given SCB iff the current debug level is |
3473 | * verbose | 3472 | * verbose. |
3474 | */ | 3473 | */ |
3475 | static void | 3474 | static void |
3476 | megaraid_mbox_display_scb(adapter_t *adapter, scb_t *scb) | 3475 | megaraid_mbox_display_scb(adapter_t *adapter, scb_t *scb) |
@@ -3518,7 +3517,7 @@ megaraid_mbox_display_scb(adapter_t *adapter, scb_t *scb) | |||
3518 | * scsi addresses and megaraid scsi and logical drive addresses. We export | 3517 | * scsi addresses and megaraid scsi and logical drive addresses. We export |
3519 | * scsi devices on their actual addresses, whereas the logical drives are | 3518 | * scsi devices on their actual addresses, whereas the logical drives are |
3520 | * exported on a virtual scsi channel. | 3519 | * exported on a virtual scsi channel. |
3521 | **/ | 3520 | */ |
3522 | static void | 3521 | static void |
3523 | megaraid_mbox_setup_device_map(adapter_t *adapter) | 3522 | megaraid_mbox_setup_device_map(adapter_t *adapter) |
3524 | { | 3523 | { |
@@ -3556,7 +3555,7 @@ megaraid_mbox_setup_device_map(adapter_t *adapter) | |||
3556 | 3555 | ||
3557 | /** | 3556 | /** |
3558 | * megaraid_cmm_register - register with the mangement module | 3557 | * megaraid_cmm_register - register with the mangement module |
3559 | * @param adapter : HBA soft state | 3558 | * @adapter : HBA soft state |
3560 | * | 3559 | * |
3561 | * Register with the management module, which allows applications to issue | 3560 | * Register with the management module, which allows applications to issue |
3562 | * ioctl calls to the drivers. This interface is used by the management module | 3561 | * ioctl calls to the drivers. This interface is used by the management module |
@@ -3646,11 +3645,11 @@ megaraid_cmm_register(adapter_t *adapter) | |||
3646 | 3645 | ||
3647 | /** | 3646 | /** |
3648 | * megaraid_cmm_unregister - un-register with the mangement module | 3647 | * megaraid_cmm_unregister - un-register with the mangement module |
3649 | * @param adapter : HBA soft state | 3648 | * @adapter : HBA soft state |
3650 | * | 3649 | * |
3651 | * Un-register with the management module. | 3650 | * Un-register with the management module. |
3652 | * FIXME: mgmt module must return failure for unregister if it has pending | 3651 | * FIXME: mgmt module must return failure for unregister if it has pending |
3653 | * commands in LLD | 3652 | * commands in LLD. |
3654 | */ | 3653 | */ |
3655 | static int | 3654 | static int |
3656 | megaraid_cmm_unregister(adapter_t *adapter) | 3655 | megaraid_cmm_unregister(adapter_t *adapter) |
@@ -3663,9 +3662,9 @@ megaraid_cmm_unregister(adapter_t *adapter) | |||
3663 | 3662 | ||
3664 | /** | 3663 | /** |
3665 | * megaraid_mbox_mm_handler - interface for CMM to issue commands to LLD | 3664 | * megaraid_mbox_mm_handler - interface for CMM to issue commands to LLD |
3666 | * @param drvr_data : LLD specific data | 3665 | * @drvr_data : LLD specific data |
3667 | * @param kioc : CMM interface packet | 3666 | * @kioc : CMM interface packet |
3668 | * @param action : command action | 3667 | * @action : command action |
3669 | * | 3668 | * |
3670 | * This routine is invoked whenever the Common Mangement Module (CMM) has a | 3669 | * This routine is invoked whenever the Common Mangement Module (CMM) has a |
3671 | * command for us. The 'action' parameter specifies if this is a new command | 3670 | * command for us. The 'action' parameter specifies if this is a new command |
@@ -3718,8 +3717,8 @@ megaraid_mbox_mm_handler(unsigned long drvr_data, uioc_t *kioc, uint32_t action) | |||
3718 | 3717 | ||
3719 | /** | 3718 | /** |
3720 | * megaraid_mbox_mm_command - issues commands routed through CMM | 3719 | * megaraid_mbox_mm_command - issues commands routed through CMM |
3721 | * @param adapter : HBA soft state | 3720 | * @adapter : HBA soft state |
3722 | * @param kioc : management command packet | 3721 | * @kioc : management command packet |
3723 | * | 3722 | * |
3724 | * Issues commands, which are routed through the management module. | 3723 | * Issues commands, which are routed through the management module. |
3725 | */ | 3724 | */ |
@@ -3888,8 +3887,8 @@ megaraid_mbox_mm_done(adapter_t *adapter, scb_t *scb) | |||
3888 | 3887 | ||
3889 | /** | 3888 | /** |
3890 | * gather_hbainfo - HBA characteristics for the applications | 3889 | * gather_hbainfo - HBA characteristics for the applications |
3891 | * @param adapter : HBA soft state | 3890 | * @adapter : HBA soft state |
3892 | * @param hinfo : pointer to the caller's host info strucuture | 3891 | * @hinfo : pointer to the caller's host info strucuture |
3893 | */ | 3892 | */ |
3894 | static int | 3893 | static int |
3895 | gather_hbainfo(adapter_t *adapter, mraid_hba_info_t *hinfo) | 3894 | gather_hbainfo(adapter_t *adapter, mraid_hba_info_t *hinfo) |
@@ -3923,16 +3922,15 @@ gather_hbainfo(adapter_t *adapter, mraid_hba_info_t *hinfo) | |||
3923 | 3922 | ||
3924 | /** | 3923 | /** |
3925 | * megaraid_sysfs_alloc_resources - allocate sysfs related resources | 3924 | * megaraid_sysfs_alloc_resources - allocate sysfs related resources |
3925 | * @adapter : controller's soft state | ||
3926 | * | 3926 | * |
3927 | * Allocate packets required to issue FW calls whenever the sysfs attributes | 3927 | * Allocate packets required to issue FW calls whenever the sysfs attributes |
3928 | * are read. These attributes would require up-to-date information from the | 3928 | * are read. These attributes would require up-to-date information from the |
3929 | * FW. Also set up resources for mutual exclusion to share these resources and | 3929 | * FW. Also set up resources for mutual exclusion to share these resources and |
3930 | * the wait queue. | 3930 | * the wait queue. |
3931 | * | 3931 | * |
3932 | * @param adapter : controller's soft state | 3932 | * Return 0 on success. |
3933 | * | 3933 | * Return -ERROR_CODE on failure. |
3934 | * @return 0 on success | ||
3935 | * @return -ERROR_CODE on failure | ||
3936 | */ | 3934 | */ |
3937 | static int | 3935 | static int |
3938 | megaraid_sysfs_alloc_resources(adapter_t *adapter) | 3936 | megaraid_sysfs_alloc_resources(adapter_t *adapter) |
@@ -3969,10 +3967,9 @@ megaraid_sysfs_alloc_resources(adapter_t *adapter) | |||
3969 | 3967 | ||
3970 | /** | 3968 | /** |
3971 | * megaraid_sysfs_free_resources - free sysfs related resources | 3969 | * megaraid_sysfs_free_resources - free sysfs related resources |
3970 | * @adapter : controller's soft state | ||
3972 | * | 3971 | * |
3973 | * Free packets allocated for sysfs FW commands | 3972 | * Free packets allocated for sysfs FW commands |
3974 | * | ||
3975 | * @param adapter : controller's soft state | ||
3976 | */ | 3973 | */ |
3977 | static void | 3974 | static void |
3978 | megaraid_sysfs_free_resources(adapter_t *adapter) | 3975 | megaraid_sysfs_free_resources(adapter_t *adapter) |
@@ -3991,10 +3988,9 @@ megaraid_sysfs_free_resources(adapter_t *adapter) | |||
3991 | 3988 | ||
3992 | /** | 3989 | /** |
3993 | * megaraid_sysfs_get_ldmap_done - callback for get ldmap | 3990 | * megaraid_sysfs_get_ldmap_done - callback for get ldmap |
3991 | * @uioc : completed packet | ||
3994 | * | 3992 | * |
3995 | * Callback routine called in the ISR/tasklet context for get ldmap call | 3993 | * Callback routine called in the ISR/tasklet context for get ldmap call |
3996 | * | ||
3997 | * @param uioc : completed packet | ||
3998 | */ | 3994 | */ |
3999 | static void | 3995 | static void |
4000 | megaraid_sysfs_get_ldmap_done(uioc_t *uioc) | 3996 | megaraid_sysfs_get_ldmap_done(uioc_t *uioc) |
@@ -4010,12 +4006,11 @@ megaraid_sysfs_get_ldmap_done(uioc_t *uioc) | |||
4010 | 4006 | ||
4011 | /** | 4007 | /** |
4012 | * megaraid_sysfs_get_ldmap_timeout - timeout handling for get ldmap | 4008 | * megaraid_sysfs_get_ldmap_timeout - timeout handling for get ldmap |
4009 | * @data : timed out packet | ||
4013 | * | 4010 | * |
4014 | * Timeout routine to recover and return to application, in case the adapter | 4011 | * Timeout routine to recover and return to application, in case the adapter |
4015 | * has stopped responding. A timeout of 60 seconds for this command seem like | 4012 | * has stopped responding. A timeout of 60 seconds for this command seems like |
4016 | * a good value | 4013 | * a good value. |
4017 | * | ||
4018 | * @param uioc : timed out packet | ||
4019 | */ | 4014 | */ |
4020 | static void | 4015 | static void |
4021 | megaraid_sysfs_get_ldmap_timeout(unsigned long data) | 4016 | megaraid_sysfs_get_ldmap_timeout(unsigned long data) |
@@ -4032,6 +4027,7 @@ megaraid_sysfs_get_ldmap_timeout(unsigned long data) | |||
4032 | 4027 | ||
4033 | /** | 4028 | /** |
4034 | * megaraid_sysfs_get_ldmap - get update logical drive map | 4029 | * megaraid_sysfs_get_ldmap - get update logical drive map |
4030 | * @adapter : controller's soft state | ||
4035 | * | 4031 | * |
4036 | * This routine will be called whenever user reads the logical drive | 4032 | * This routine will be called whenever user reads the logical drive |
4037 | * attributes, go get the current logical drive mapping table from the | 4033 | * attributes, go get the current logical drive mapping table from the |
@@ -4043,10 +4039,8 @@ megaraid_sysfs_get_ldmap_timeout(unsigned long data) | |||
4043 | * standalone libary. For now, this should suffice since there is no other | 4039 | * standalone libary. For now, this should suffice since there is no other |
4044 | * user of this interface. | 4040 | * user of this interface. |
4045 | * | 4041 | * |
4046 | * @param adapter : controller's soft state | 4042 | * Return 0 on success. |
4047 | * | 4043 | * Return -1 on failure. |
4048 | * @return 0 on success | ||
4049 | * @return -1 on failure | ||
4050 | */ | 4044 | */ |
4051 | static int | 4045 | static int |
4052 | megaraid_sysfs_get_ldmap(adapter_t *adapter) | 4046 | megaraid_sysfs_get_ldmap(adapter_t *adapter) |
@@ -4148,13 +4142,12 @@ megaraid_sysfs_get_ldmap(adapter_t *adapter) | |||
4148 | 4142 | ||
4149 | /** | 4143 | /** |
4150 | * megaraid_sysfs_show_app_hndl - display application handle for this adapter | 4144 | * megaraid_sysfs_show_app_hndl - display application handle for this adapter |
4145 | * @cdev : class device object representation for the host | ||
4146 | * @buf : buffer to send data to | ||
4151 | * | 4147 | * |
4152 | * Display the handle used by the applications while executing management | 4148 | * Display the handle used by the applications while executing management |
4153 | * tasks on the adapter. We invoke a management module API to get the adapter | 4149 | * tasks on the adapter. We invoke a management module API to get the adapter |
4154 | * handle, since we do not interface with applications directly. | 4150 | * handle, since we do not interface with applications directly. |
4155 | * | ||
4156 | * @param cdev : class device object representation for the host | ||
4157 | * @param buf : buffer to send data to | ||
4158 | */ | 4151 | */ |
4159 | static ssize_t | 4152 | static ssize_t |
4160 | megaraid_sysfs_show_app_hndl(struct class_device *cdev, char *buf) | 4153 | megaraid_sysfs_show_app_hndl(struct class_device *cdev, char *buf) |
@@ -4171,16 +4164,18 @@ megaraid_sysfs_show_app_hndl(struct class_device *cdev, char *buf) | |||
4171 | 4164 | ||
4172 | /** | 4165 | /** |
4173 | * megaraid_sysfs_show_ldnum - display the logical drive number for this device | 4166 | * megaraid_sysfs_show_ldnum - display the logical drive number for this device |
4167 | * @dev : device object representation for the scsi device | ||
4168 | * @attr : device attribute to show | ||
4169 | * @buf : buffer to send data to | ||
4174 | * | 4170 | * |
4175 | * Display the logical drive number for the device in question, if it a valid | 4171 | * Display the logical drive number for the device in question, if it a valid |
4176 | * logical drive. For physical devices, "-1" is returned | 4172 | * logical drive. For physical devices, "-1" is returned. |
4177 | * The logical drive number is displayed in following format | 4173 | * |
4174 | * The logical drive number is displayed in following format: | ||
4178 | * | 4175 | * |
4179 | * <SCSI ID> <LD NUM> <LD STICKY ID> <APP ADAPTER HANDLE> | 4176 | * <SCSI ID> <LD NUM> <LD STICKY ID> <APP ADAPTER HANDLE> |
4180 | * <int> <int> <int> <int> | ||
4181 | * | 4177 | * |
4182 | * @param dev : device object representation for the scsi device | 4178 | * <int> <int> <int> <int> |
4183 | * @param buf : buffer to send data to | ||
4184 | */ | 4179 | */ |
4185 | static ssize_t | 4180 | static ssize_t |
4186 | megaraid_sysfs_show_ldnum(struct device *dev, struct device_attribute *attr, char *buf) | 4181 | megaraid_sysfs_show_ldnum(struct device *dev, struct device_attribute *attr, char *buf) |