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 | |
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>
-rw-r--r-- | drivers/scsi/megaraid/mega_common.h | 120 | ||||
-rw-r--r-- | drivers/scsi/megaraid/megaraid_ioctl.h | 36 | ||||
-rw-r--r-- | drivers/scsi/megaraid/megaraid_mbox.c | 285 | ||||
-rw-r--r-- | drivers/scsi/megaraid/megaraid_mbox.h | 42 | ||||
-rw-r--r-- | drivers/scsi/megaraid/megaraid_mm.c | 65 | ||||
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas.h | 14 |
6 files changed, 275 insertions, 287 deletions
diff --git a/drivers/scsi/megaraid/mega_common.h b/drivers/scsi/megaraid/mega_common.h index b50e27e66024..ab45e7a27d8c 100644 --- a/drivers/scsi/megaraid/mega_common.h +++ b/drivers/scsi/megaraid/mega_common.h | |||
@@ -46,17 +46,17 @@ | |||
46 | 46 | ||
47 | /** | 47 | /** |
48 | * scb_t - scsi command control block | 48 | * scb_t - scsi command control block |
49 | * @param ccb : command control block for individual driver | 49 | * @ccb : command control block for individual driver |
50 | * @param list : list of control blocks | 50 | * @list : list of control blocks |
51 | * @param gp : general purpose field for LLDs | 51 | * @gp : general purpose field for LLDs |
52 | * @param sno : all SCBs have a serial number | 52 | * @sno : all SCBs have a serial number |
53 | * @param scp : associated scsi command | 53 | * @scp : associated scsi command |
54 | * @param state : current state of scb | 54 | * @state : current state of scb |
55 | * @param dma_dir : direction of data transfer | 55 | * @dma_dir : direction of data transfer |
56 | * @param dma_type : transfer with sg list, buffer, or no data transfer | 56 | * @dma_type : transfer with sg list, buffer, or no data transfer |
57 | * @param dev_channel : actual channel on the device | 57 | * @dev_channel : actual channel on the device |
58 | * @param dev_target : actual target on the device | 58 | * @dev_target : actual target on the device |
59 | * @param status : completion status | 59 | * @status : completion status |
60 | * | 60 | * |
61 | * This is our central data structure to issue commands the each driver. | 61 | * This is our central data structure to issue commands the each driver. |
62 | * Driver specific data structures are maintained in the ccb field. | 62 | * Driver specific data structures are maintained in the ccb field. |
@@ -99,42 +99,42 @@ typedef struct { | |||
99 | 99 | ||
100 | /** | 100 | /** |
101 | * struct adapter_t - driver's initialization structure | 101 | * struct adapter_t - driver's initialization structure |
102 | * @param dpc_h : tasklet handle | 102 | * @aram dpc_h : tasklet handle |
103 | * @param pdev : pci configuration pointer for kernel | 103 | * @pdev : pci configuration pointer for kernel |
104 | * @param host : pointer to host structure of mid-layer | 104 | * @host : pointer to host structure of mid-layer |
105 | * @param lock : synchronization lock for mid-layer and driver | 105 | * @lock : synchronization lock for mid-layer and driver |
106 | * @param quiescent : driver is quiescent for now. | 106 | * @quiescent : driver is quiescent for now. |
107 | * @param outstanding_cmds : number of commands pending in the driver | 107 | * @outstanding_cmds : number of commands pending in the driver |
108 | * @param kscb_list : pointer to the bulk of SCBs pointers for IO | 108 | * @kscb_list : pointer to the bulk of SCBs pointers for IO |
109 | * @param kscb_pool : pool of free scbs for IO | 109 | * @kscb_pool : pool of free scbs for IO |
110 | * @param kscb_pool_lock : lock for pool of free scbs | 110 | * @kscb_pool_lock : lock for pool of free scbs |
111 | * @param pend_list : pending commands list | 111 | * @pend_list : pending commands list |
112 | * @param pend_list_lock : exlusion lock for pending commands list | 112 | * @pend_list_lock : exclusion lock for pending commands list |
113 | * @param completed_list : list of completed commands | 113 | * @completed_list : list of completed commands |
114 | * @param completed_list_lock : exclusion lock for list of completed commands | 114 | * @completed_list_lock : exclusion lock for list of completed commands |
115 | * @param sglen : max sg elements supported | 115 | * @sglen : max sg elements supported |
116 | * @param device_ids : to convert kernel device addr to our devices. | 116 | * @device_ids : to convert kernel device addr to our devices. |
117 | * @param raid_device : raid adapter specific pointer | 117 | * @raid_device : raid adapter specific pointer |
118 | * @param max_channel : maximum channel number supported - inclusive | 118 | * @max_channel : maximum channel number supported - inclusive |
119 | * @param max_target : max target supported - inclusive | 119 | * @max_target : max target supported - inclusive |
120 | * @param max_lun : max lun supported - inclusive | 120 | * @max_lun : max lun supported - inclusive |
121 | * @param unique_id : unique identifier for each adapter | 121 | * @unique_id : unique identifier for each adapter |
122 | * @param irq : IRQ for this adapter | 122 | * @irq : IRQ for this adapter |
123 | * @param ito : internal timeout value, (-1) means no timeout | 123 | * @ito : internal timeout value, (-1) means no timeout |
124 | * @param ibuf : buffer to issue internal commands | 124 | * @ibuf : buffer to issue internal commands |
125 | * @param ibuf_dma_h : dma handle for the above buffer | 125 | * @ibuf_dma_h : dma handle for the above buffer |
126 | * @param uscb_list : SCB pointers for user cmds, common mgmt module | 126 | * @uscb_list : SCB pointers for user cmds, common mgmt module |
127 | * @param uscb_pool : pool of SCBs for user commands | 127 | * @uscb_pool : pool of SCBs for user commands |
128 | * @param uscb_pool_lock : exclusion lock for these SCBs | 128 | * @uscb_pool_lock : exclusion lock for these SCBs |
129 | * @param max_cmds : max outstanding commands | 129 | * @max_cmds : max outstanding commands |
130 | * @param fw_version : firmware version | 130 | * @fw_version : firmware version |
131 | * @param bios_version : bios version | 131 | * @bios_version : bios version |
132 | * @param max_cdb_sz : biggest CDB size supported. | 132 | * @max_cdb_sz : biggest CDB size supported. |
133 | * @param ha : is high availability present - clustering | 133 | * @ha : is high availability present - clustering |
134 | * @param init_id : initiator ID, the default value should be 7 | 134 | * @init_id : initiator ID, the default value should be 7 |
135 | * @param max_sectors : max sectors per request | 135 | * @max_sectors : max sectors per request |
136 | * @param cmd_per_lun : max outstanding commands per LUN | 136 | * @cmd_per_lun : max outstanding commands per LUN |
137 | * @param being_detached : set when unloading, no more mgmt calls | 137 | * @being_detached : set when unloading, no more mgmt calls |
138 | * | 138 | * |
139 | * | 139 | * |
140 | * mraid_setup_device_map() can be called anytime after the device map is | 140 | * mraid_setup_device_map() can be called anytime after the device map is |
@@ -211,23 +211,23 @@ typedef struct { | |||
211 | #define SCP2ADAPTER(scp) (adapter_t *)SCSIHOST2ADAP(SCP2HOST(scp)) | 211 | #define SCP2ADAPTER(scp) (adapter_t *)SCSIHOST2ADAP(SCP2HOST(scp)) |
212 | 212 | ||
213 | 213 | ||
214 | /** | ||
215 | * MRAID_GET_DEVICE_MAP - device ids | ||
216 | * @param adp - Adapter's soft state | ||
217 | * @param scp - mid-layer scsi command pointer | ||
218 | * @param p_chan - physical channel on the controller | ||
219 | * @param target - target id of the device or logical drive number | ||
220 | * @param islogical - set if the command is for the logical drive | ||
221 | * | ||
222 | * Macro to retrieve information about device class, logical or physical and | ||
223 | * the corresponding physical channel and target or logical drive number | ||
224 | **/ | ||
225 | #define MRAID_IS_LOGICAL(adp, scp) \ | 214 | #define MRAID_IS_LOGICAL(adp, scp) \ |
226 | (SCP2CHANNEL(scp) == (adp)->max_channel) ? 1 : 0 | 215 | (SCP2CHANNEL(scp) == (adp)->max_channel) ? 1 : 0 |
227 | 216 | ||
228 | #define MRAID_IS_LOGICAL_SDEV(adp, sdev) \ | 217 | #define MRAID_IS_LOGICAL_SDEV(adp, sdev) \ |
229 | (sdev->channel == (adp)->max_channel) ? 1 : 0 | 218 | (sdev->channel == (adp)->max_channel) ? 1 : 0 |
230 | 219 | ||
220 | /** | ||
221 | * MRAID_GET_DEVICE_MAP - device ids | ||
222 | * @adp : adapter's soft state | ||
223 | * @scp : mid-layer scsi command pointer | ||
224 | * @p_chan : physical channel on the controller | ||
225 | * @target : target id of the device or logical drive number | ||
226 | * @islogical : set if the command is for the logical drive | ||
227 | * | ||
228 | * Macro to retrieve information about device class, logical or physical and | ||
229 | * the corresponding physical channel and target or logical drive number | ||
230 | */ | ||
231 | #define MRAID_GET_DEVICE_MAP(adp, scp, p_chan, target, islogical) \ | 231 | #define MRAID_GET_DEVICE_MAP(adp, scp, p_chan, target, islogical) \ |
232 | /* \ | 232 | /* \ |
233 | * Is the request coming for the virtual channel \ | 233 | * Is the request coming for the virtual channel \ |
@@ -273,8 +273,8 @@ typedef struct { | |||
273 | 273 | ||
274 | /* | 274 | /* |
275 | * struct mraid_pci_blk - structure holds DMA memory block info | 275 | * struct mraid_pci_blk - structure holds DMA memory block info |
276 | * @param vaddr : virtual address to a memory block | 276 | * @vaddr : virtual address to a memory block |
277 | * @param dma_addr : DMA handle to a memory block | 277 | * @dma_addr : DMA handle to a memory block |
278 | * | 278 | * |
279 | * This structure is filled up for the caller. It is the responsibilty of the | 279 | * This structure is filled up for the caller. It is the responsibilty of the |
280 | * caller to allocate this array big enough to store addresses for all | 280 | * caller to allocate this array big enough to store addresses for all |
diff --git a/drivers/scsi/megaraid/megaraid_ioctl.h b/drivers/scsi/megaraid/megaraid_ioctl.h index b8aa34202ec3..706fa05a187a 100644 --- a/drivers/scsi/megaraid/megaraid_ioctl.h +++ b/drivers/scsi/megaraid/megaraid_ioctl.h | |||
@@ -22,23 +22,23 @@ | |||
22 | 22 | ||
23 | #include "mbox_defs.h" | 23 | #include "mbox_defs.h" |
24 | 24 | ||
25 | /* | ||
26 | * console messages debug levels | ||
27 | */ | ||
28 | #define CL_ANN 0 /* print unconditionally, announcements */ | ||
29 | #define CL_DLEVEL1 1 /* debug level 1, informative */ | ||
30 | #define CL_DLEVEL2 2 /* debug level 2, verbose */ | ||
31 | #define CL_DLEVEL3 3 /* debug level 3, very verbose */ | ||
32 | |||
25 | /** | 33 | /** |
26 | * con_log() - console log routine | 34 | * con_log() - console log routine |
27 | * @param level : indicates the severity of the message. | 35 | * @level : indicates the severity of the message. |
28 | * @fparam mt : format string | 36 | * @fmt : format string |
29 | * | 37 | * |
30 | * con_log displays the error messages on the console based on the current | 38 | * con_log displays the error messages on the console based on the current |
31 | * debug level. Also it attaches the appropriate kernel severity level with | 39 | * debug level. Also it attaches the appropriate kernel severity level with |
32 | * the message. | 40 | * the message. |
33 | * | ||
34 | * | ||
35 | * consolge messages debug levels | ||
36 | */ | 41 | */ |
37 | #define CL_ANN 0 /* print unconditionally, announcements */ | ||
38 | #define CL_DLEVEL1 1 /* debug level 1, informative */ | ||
39 | #define CL_DLEVEL2 2 /* debug level 2, verbose */ | ||
40 | #define CL_DLEVEL3 3 /* debug level 3, very verbose */ | ||
41 | |||
42 | #define con_log(level, fmt) if (LSI_DBGLVL >= level) printk fmt; | 42 | #define con_log(level, fmt) if (LSI_DBGLVL >= level) printk fmt; |
43 | 43 | ||
44 | /* | 44 | /* |
@@ -157,14 +157,14 @@ typedef struct uioc { | |||
157 | /** | 157 | /** |
158 | * struct mraid_hba_info - information about the controller | 158 | * struct mraid_hba_info - information about the controller |
159 | * | 159 | * |
160 | * @param pci_vendor_id : PCI vendor id | 160 | * @pci_vendor_id : PCI vendor id |
161 | * @param pci_device_id : PCI device id | 161 | * @pci_device_id : PCI device id |
162 | * @param subsystem_vendor_id : PCI subsystem vendor id | 162 | * @subsystem_vendor_id : PCI subsystem vendor id |
163 | * @param subsystem_device_id : PCI subsystem device id | 163 | * @subsystem_device_id : PCI subsystem device id |
164 | * @param baseport : base port of hba memory | 164 | * @baseport : base port of hba memory |
165 | * @param pci_bus : PCI bus | 165 | * @pci_bus : PCI bus |
166 | * @param pci_dev_fn : PCI device/function values | 166 | * @pci_dev_fn : PCI device/function values |
167 | * @param irq : interrupt vector for the device | 167 | * @irq : interrupt vector for the device |
168 | * | 168 | * |
169 | * Extended information of 256 bytes about the controller. Align on the single | 169 | * Extended information of 256 bytes about the controller. Align on the single |
170 | * byte boundary so that 32-bit applications can be run on 64-bit platform | 170 | * byte boundary so that 32-bit applications can be run on 64-bit platform |
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) |
diff --git a/drivers/scsi/megaraid/megaraid_mbox.h b/drivers/scsi/megaraid/megaraid_mbox.h index 963e0d2dbd97..9de803cebd4b 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.h +++ b/drivers/scsi/megaraid/megaraid_mbox.h | |||
@@ -146,27 +146,27 @@ typedef struct { | |||
146 | 146 | ||
147 | /** | 147 | /** |
148 | * mraid_device_t - adapter soft state structure for mailbox controllers | 148 | * mraid_device_t - adapter soft state structure for mailbox controllers |
149 | * @param una_mbox64 : 64-bit mbox - unaligned | 149 | * @una_mbox64 : 64-bit mbox - unaligned |
150 | * @param una_mbox64_dma : mbox dma addr - unaligned | 150 | * @una_mbox64_dma : mbox dma addr - unaligned |
151 | * @param mbox : 32-bit mbox - aligned | 151 | * @mbox : 32-bit mbox - aligned |
152 | * @param mbox64 : 64-bit mbox - aligned | 152 | * @mbox64 : 64-bit mbox - aligned |
153 | * @param mbox_dma : mbox dma addr - aligned | 153 | * @mbox_dma : mbox dma addr - aligned |
154 | * @param mailbox_lock : exclusion lock for the mailbox | 154 | * @mailbox_lock : exclusion lock for the mailbox |
155 | * @param baseport : base port of hba memory | 155 | * @baseport : base port of hba memory |
156 | * @param baseaddr : mapped addr of hba memory | 156 | * @baseaddr : mapped addr of hba memory |
157 | * @param mbox_pool : pool of mailboxes | 157 | * @mbox_pool : pool of mailboxes |
158 | * @param mbox_pool_handle : handle for the mailbox pool memory | 158 | * @mbox_pool_handle : handle for the mailbox pool memory |
159 | * @param epthru_pool : a pool for extended passthru commands | 159 | * @epthru_pool : a pool for extended passthru commands |
160 | * @param epthru_pool_handle : handle to the pool above | 160 | * @epthru_pool_handle : handle to the pool above |
161 | * @param sg_pool : pool of scatter-gather lists for this driver | 161 | * @sg_pool : pool of scatter-gather lists for this driver |
162 | * @param sg_pool_handle : handle to the pool above | 162 | * @sg_pool_handle : handle to the pool above |
163 | * @param ccb_list : list of our command control blocks | 163 | * @ccb_list : list of our command control blocks |
164 | * @param uccb_list : list of cmd control blocks for mgmt module | 164 | * @uccb_list : list of cmd control blocks for mgmt module |
165 | * @param umbox64 : array of mailbox for user commands (cmm) | 165 | * @umbox64 : array of mailbox for user commands (cmm) |
166 | * @param pdrv_state : array for state of each physical drive. | 166 | * @pdrv_state : array for state of each physical drive. |
167 | * @param last_disp : flag used to show device scanning | 167 | * @last_disp : flag used to show device scanning |
168 | * @param hw_error : set if FW not responding | 168 | * @hw_error : set if FW not responding |
169 | * @param fast_load : If set, skip physical device scanning | 169 | * @fast_load : If set, skip physical device scanning |
170 | * @channel_class : channel class, RAID or SCSI | 170 | * @channel_class : channel class, RAID or SCSI |
171 | * @sysfs_sem : semaphore to serialize access to sysfs res. | 171 | * @sysfs_sem : semaphore to serialize access to sysfs res. |
172 | * @sysfs_uioc : management packet to issue FW calls from sysfs | 172 | * @sysfs_uioc : management packet to issue FW calls from sysfs |
diff --git a/drivers/scsi/megaraid/megaraid_mm.c b/drivers/scsi/megaraid/megaraid_mm.c index d85b9a8f1b8d..c1ff20c4747d 100644 --- a/drivers/scsi/megaraid/megaraid_mm.c +++ b/drivers/scsi/megaraid/megaraid_mm.c | |||
@@ -78,10 +78,10 @@ static struct file_operations lsi_fops = { | |||
78 | 78 | ||
79 | /** | 79 | /** |
80 | * mraid_mm_open - open routine for char node interface | 80 | * mraid_mm_open - open routine for char node interface |
81 | * @inod : unused | 81 | * @inode : unused |
82 | * @filep : unused | 82 | * @filep : unused |
83 | * | 83 | * |
84 | * allow ioctl operations by apps only if they superuser privilege | 84 | * Allow ioctl operations by apps only if they have superuser privilege. |
85 | */ | 85 | */ |
86 | static int | 86 | static int |
87 | mraid_mm_open(struct inode *inode, struct file *filep) | 87 | mraid_mm_open(struct inode *inode, struct file *filep) |
@@ -214,7 +214,9 @@ mraid_mm_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, | |||
214 | /** | 214 | /** |
215 | * mraid_mm_get_adapter - Returns corresponding adapters for the mimd packet | 215 | * mraid_mm_get_adapter - Returns corresponding adapters for the mimd packet |
216 | * @umimd : User space mimd_t ioctl packet | 216 | * @umimd : User space mimd_t ioctl packet |
217 | * @adapter : pointer to the adapter (OUT) | 217 | * @rval : returned success/error status |
218 | * | ||
219 | * The function return value is a pointer to the located @adapter. | ||
218 | */ | 220 | */ |
219 | static mraid_mmadp_t * | 221 | static mraid_mmadp_t * |
220 | mraid_mm_get_adapter(mimd_t __user *umimd, int *rval) | 222 | mraid_mm_get_adapter(mimd_t __user *umimd, int *rval) |
@@ -252,11 +254,11 @@ mraid_mm_get_adapter(mimd_t __user *umimd, int *rval) | |||
252 | return adapter; | 254 | return adapter; |
253 | } | 255 | } |
254 | 256 | ||
255 | /* | 257 | /** |
256 | * handle_drvrcmd - This routine checks if the opcode is a driver | 258 | * handle_drvrcmd - Checks if the opcode is a driver cmd and if it is, handles it. |
257 | * cmd and if it is, handles it. | ||
258 | * @arg : packet sent by the user app | 259 | * @arg : packet sent by the user app |
259 | * @old_ioctl : mimd if 1; uioc otherwise | 260 | * @old_ioctl : mimd if 1; uioc otherwise |
261 | * @rval : pointer for command's returned value (not function status) | ||
260 | */ | 262 | */ |
261 | static int | 263 | static int |
262 | handle_drvrcmd(void __user *arg, uint8_t old_ioctl, int *rval) | 264 | handle_drvrcmd(void __user *arg, uint8_t old_ioctl, int *rval) |
@@ -322,8 +324,8 @@ old_packet: | |||
322 | 324 | ||
323 | /** | 325 | /** |
324 | * mimd_to_kioc - Converter from old to new ioctl format | 326 | * mimd_to_kioc - Converter from old to new ioctl format |
325 | * | ||
326 | * @umimd : user space old MIMD IOCTL | 327 | * @umimd : user space old MIMD IOCTL |
328 | * @adp : adapter softstate | ||
327 | * @kioc : kernel space new format IOCTL | 329 | * @kioc : kernel space new format IOCTL |
328 | * | 330 | * |
329 | * Routine to convert MIMD interface IOCTL to new interface IOCTL packet. The | 331 | * Routine to convert MIMD interface IOCTL to new interface IOCTL packet. The |
@@ -474,7 +476,6 @@ mimd_to_kioc(mimd_t __user *umimd, mraid_mmadp_t *adp, uioc_t *kioc) | |||
474 | 476 | ||
475 | /** | 477 | /** |
476 | * mraid_mm_attch_buf - Attach a free dma buffer for required size | 478 | * mraid_mm_attch_buf - Attach a free dma buffer for required size |
477 | * | ||
478 | * @adp : Adapter softstate | 479 | * @adp : Adapter softstate |
479 | * @kioc : kioc that the buffer needs to be attached to | 480 | * @kioc : kioc that the buffer needs to be attached to |
480 | * @xferlen : required length for buffer | 481 | * @xferlen : required length for buffer |
@@ -607,7 +608,6 @@ mraid_mm_alloc_kioc(mraid_mmadp_t *adp) | |||
607 | 608 | ||
608 | /** | 609 | /** |
609 | * mraid_mm_dealloc_kioc - Return kioc to free pool | 610 | * mraid_mm_dealloc_kioc - Return kioc to free pool |
610 | * | ||
611 | * @adp : Adapter softstate | 611 | * @adp : Adapter softstate |
612 | * @kioc : uioc_t node to be returned to free pool | 612 | * @kioc : uioc_t node to be returned to free pool |
613 | */ | 613 | */ |
@@ -652,7 +652,6 @@ mraid_mm_dealloc_kioc(mraid_mmadp_t *adp, uioc_t *kioc) | |||
652 | 652 | ||
653 | /** | 653 | /** |
654 | * lld_ioctl - Routine to issue ioctl to low level drvr | 654 | * lld_ioctl - Routine to issue ioctl to low level drvr |
655 | * | ||
656 | * @adp : The adapter handle | 655 | * @adp : The adapter handle |
657 | * @kioc : The ioctl packet with kernel addresses | 656 | * @kioc : The ioctl packet with kernel addresses |
658 | */ | 657 | */ |
@@ -705,7 +704,6 @@ lld_ioctl(mraid_mmadp_t *adp, uioc_t *kioc) | |||
705 | 704 | ||
706 | /** | 705 | /** |
707 | * ioctl_done - callback from the low level driver | 706 | * ioctl_done - callback from the low level driver |
708 | * | ||
709 | * @kioc : completed ioctl packet | 707 | * @kioc : completed ioctl packet |
710 | */ | 708 | */ |
711 | static void | 709 | static void |
@@ -756,9 +754,8 @@ ioctl_done(uioc_t *kioc) | |||
756 | } | 754 | } |
757 | 755 | ||
758 | 756 | ||
759 | /* | 757 | /** |
760 | * lld_timedout : callback from the expired timer | 758 | * lld_timedout - callback from the expired timer |
761 | * | ||
762 | * @ptr : ioctl packet that timed out | 759 | * @ptr : ioctl packet that timed out |
763 | */ | 760 | */ |
764 | static void | 761 | static void |
@@ -776,8 +773,7 @@ lld_timedout(unsigned long ptr) | |||
776 | 773 | ||
777 | 774 | ||
778 | /** | 775 | /** |
779 | * kioc_to_mimd : Converter from new back to old format | 776 | * kioc_to_mimd - Converter from new back to old format |
780 | * | ||
781 | * @kioc : Kernel space IOCTL packet (successfully issued) | 777 | * @kioc : Kernel space IOCTL packet (successfully issued) |
782 | * @mimd : User space MIMD packet | 778 | * @mimd : User space MIMD packet |
783 | */ | 779 | */ |
@@ -855,7 +851,6 @@ kioc_to_mimd(uioc_t *kioc, mimd_t __user *mimd) | |||
855 | 851 | ||
856 | /** | 852 | /** |
857 | * hinfo_to_cinfo - Convert new format hba info into old format | 853 | * hinfo_to_cinfo - Convert new format hba info into old format |
858 | * | ||
859 | * @hinfo : New format, more comprehensive adapter info | 854 | * @hinfo : New format, more comprehensive adapter info |
860 | * @cinfo : Old format adapter info to support mimd_t apps | 855 | * @cinfo : Old format adapter info to support mimd_t apps |
861 | */ | 856 | */ |
@@ -878,10 +873,9 @@ hinfo_to_cinfo(mraid_hba_info_t *hinfo, mcontroller_t *cinfo) | |||
878 | } | 873 | } |
879 | 874 | ||
880 | 875 | ||
881 | /* | 876 | /** |
882 | * mraid_mm_register_adp - Registration routine for low level drvrs | 877 | * mraid_mm_register_adp - Registration routine for low level drivers |
883 | * | 878 | * @lld_adp : Adapter objejct |
884 | * @adp : Adapter objejct | ||
885 | */ | 879 | */ |
886 | int | 880 | int |
887 | mraid_mm_register_adp(mraid_mmadp_t *lld_adp) | 881 | mraid_mm_register_adp(mraid_mmadp_t *lld_adp) |
@@ -1007,15 +1001,14 @@ memalloc_error: | |||
1007 | 1001 | ||
1008 | /** | 1002 | /** |
1009 | * mraid_mm_adapter_app_handle - return the application handle for this adapter | 1003 | * mraid_mm_adapter_app_handle - return the application handle for this adapter |
1004 | * @unique_id : adapter unique identifier | ||
1010 | * | 1005 | * |
1011 | * For the given driver data, locate the adadpter in our global list and | 1006 | * For the given driver data, locate the adapter in our global list and |
1012 | * return the corresponding handle, which is also used by applications to | 1007 | * return the corresponding handle, which is also used by applications to |
1013 | * uniquely identify an adapter. | 1008 | * uniquely identify an adapter. |
1014 | * | 1009 | * |
1015 | * @param unique_id : adapter unique identifier | 1010 | * Return adapter handle if found in the list. |
1016 | * | 1011 | * Return 0 if adapter could not be located, should never happen though. |
1017 | * @return adapter handle if found in the list | ||
1018 | * @return 0 if adapter could not be located, should never happen though | ||
1019 | */ | 1012 | */ |
1020 | uint32_t | 1013 | uint32_t |
1021 | mraid_mm_adapter_app_handle(uint32_t unique_id) | 1014 | mraid_mm_adapter_app_handle(uint32_t unique_id) |
@@ -1040,7 +1033,6 @@ mraid_mm_adapter_app_handle(uint32_t unique_id) | |||
1040 | 1033 | ||
1041 | /** | 1034 | /** |
1042 | * mraid_mm_setup_dma_pools - Set up dma buffer pools per adapter | 1035 | * mraid_mm_setup_dma_pools - Set up dma buffer pools per adapter |
1043 | * | ||
1044 | * @adp : Adapter softstate | 1036 | * @adp : Adapter softstate |
1045 | * | 1037 | * |
1046 | * We maintain a pool of dma buffers per each adapter. Each pool has one | 1038 | * We maintain a pool of dma buffers per each adapter. Each pool has one |
@@ -1093,11 +1085,11 @@ dma_pool_setup_error: | |||
1093 | } | 1085 | } |
1094 | 1086 | ||
1095 | 1087 | ||
1096 | /* | 1088 | /** |
1097 | * mraid_mm_unregister_adp - Unregister routine for low level drivers | 1089 | * mraid_mm_unregister_adp - Unregister routine for low level drivers |
1098 | * Assume no outstanding ioctls to llds. | ||
1099 | * | ||
1100 | * @unique_id : UID of the adpater | 1090 | * @unique_id : UID of the adpater |
1091 | * | ||
1092 | * Assumes no outstanding ioctls to llds. | ||
1101 | */ | 1093 | */ |
1102 | int | 1094 | int |
1103 | mraid_mm_unregister_adp(uint32_t unique_id) | 1095 | mraid_mm_unregister_adp(uint32_t unique_id) |
@@ -1131,7 +1123,6 @@ mraid_mm_unregister_adp(uint32_t unique_id) | |||
1131 | 1123 | ||
1132 | /** | 1124 | /** |
1133 | * mraid_mm_free_adp_resources - Free adapter softstate | 1125 | * mraid_mm_free_adp_resources - Free adapter softstate |
1134 | * | ||
1135 | * @adp : Adapter softstate | 1126 | * @adp : Adapter softstate |
1136 | */ | 1127 | */ |
1137 | static void | 1128 | static void |
@@ -1162,7 +1153,6 @@ mraid_mm_free_adp_resources(mraid_mmadp_t *adp) | |||
1162 | 1153 | ||
1163 | /** | 1154 | /** |
1164 | * mraid_mm_teardown_dma_pools - Free all per adapter dma buffers | 1155 | * mraid_mm_teardown_dma_pools - Free all per adapter dma buffers |
1165 | * | ||
1166 | * @adp : Adapter softstate | 1156 | * @adp : Adapter softstate |
1167 | */ | 1157 | */ |
1168 | static void | 1158 | static void |
@@ -1190,7 +1180,7 @@ mraid_mm_teardown_dma_pools(mraid_mmadp_t *adp) | |||
1190 | } | 1180 | } |
1191 | 1181 | ||
1192 | /** | 1182 | /** |
1193 | * mraid_mm_init : Module entry point | 1183 | * mraid_mm_init - Module entry point |
1194 | */ | 1184 | */ |
1195 | static int __init | 1185 | static int __init |
1196 | mraid_mm_init(void) | 1186 | mraid_mm_init(void) |
@@ -1214,10 +1204,13 @@ mraid_mm_init(void) | |||
1214 | } | 1204 | } |
1215 | 1205 | ||
1216 | 1206 | ||
1207 | #ifdef CONFIG_COMPAT | ||
1217 | /** | 1208 | /** |
1218 | * mraid_mm_compat_ioctl : 32bit to 64bit ioctl conversion routine | 1209 | * mraid_mm_compat_ioctl - 32bit to 64bit ioctl conversion routine |
1210 | * @filep : file operations pointer (ignored) | ||
1211 | * @cmd : ioctl command | ||
1212 | * @arg : user ioctl packet | ||
1219 | */ | 1213 | */ |
1220 | #ifdef CONFIG_COMPAT | ||
1221 | static long | 1214 | static long |
1222 | mraid_mm_compat_ioctl(struct file *filep, unsigned int cmd, | 1215 | mraid_mm_compat_ioctl(struct file *filep, unsigned int cmd, |
1223 | unsigned long arg) | 1216 | unsigned long arg) |
@@ -1231,7 +1224,7 @@ mraid_mm_compat_ioctl(struct file *filep, unsigned int cmd, | |||
1231 | #endif | 1224 | #endif |
1232 | 1225 | ||
1233 | /** | 1226 | /** |
1234 | * mraid_mm_exit : Module exit point | 1227 | * mraid_mm_exit - Module exit point |
1235 | */ | 1228 | */ |
1236 | static void __exit | 1229 | static void __exit |
1237 | mraid_mm_exit(void) | 1230 | mraid_mm_exit(void) |
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index 55eddcf8eb15..cacb3ad92527 100644 --- a/drivers/scsi/megaraid/megaraid_sas.h +++ b/drivers/scsi/megaraid/megaraid_sas.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #ifndef LSI_MEGARAID_SAS_H | 15 | #ifndef LSI_MEGARAID_SAS_H |
16 | #define LSI_MEGARAID_SAS_H | 16 | #define LSI_MEGARAID_SAS_H |
17 | 17 | ||
18 | /** | 18 | /* |
19 | * MegaRAID SAS Driver meta data | 19 | * MegaRAID SAS Driver meta data |
20 | */ | 20 | */ |
21 | #define MEGASAS_VERSION "00.00.03.05" | 21 | #define MEGASAS_VERSION "00.00.03.05" |
@@ -40,7 +40,7 @@ | |||
40 | * "message frames" | 40 | * "message frames" |
41 | */ | 41 | */ |
42 | 42 | ||
43 | /** | 43 | /* |
44 | * FW posts its state in upper 4 bits of outbound_msg_0 register | 44 | * FW posts its state in upper 4 bits of outbound_msg_0 register |
45 | */ | 45 | */ |
46 | #define MFI_STATE_MASK 0xF0000000 | 46 | #define MFI_STATE_MASK 0xF0000000 |
@@ -58,7 +58,7 @@ | |||
58 | 58 | ||
59 | #define MEGAMFI_FRAME_SIZE 64 | 59 | #define MEGAMFI_FRAME_SIZE 64 |
60 | 60 | ||
61 | /** | 61 | /* |
62 | * During FW init, clear pending cmds & reset state using inbound_msg_0 | 62 | * During FW init, clear pending cmds & reset state using inbound_msg_0 |
63 | * | 63 | * |
64 | * ABORT : Abort all pending cmds | 64 | * ABORT : Abort all pending cmds |
@@ -78,7 +78,7 @@ | |||
78 | MFI_INIT_MFIMODE| \ | 78 | MFI_INIT_MFIMODE| \ |
79 | MFI_INIT_ABORT | 79 | MFI_INIT_ABORT |
80 | 80 | ||
81 | /** | 81 | /* |
82 | * MFI frame flags | 82 | * MFI frame flags |
83 | */ | 83 | */ |
84 | #define MFI_FRAME_POST_IN_REPLY_QUEUE 0x0000 | 84 | #define MFI_FRAME_POST_IN_REPLY_QUEUE 0x0000 |
@@ -92,12 +92,12 @@ | |||
92 | #define MFI_FRAME_DIR_READ 0x0010 | 92 | #define MFI_FRAME_DIR_READ 0x0010 |
93 | #define MFI_FRAME_DIR_BOTH 0x0018 | 93 | #define MFI_FRAME_DIR_BOTH 0x0018 |
94 | 94 | ||
95 | /** | 95 | /* |
96 | * Definition for cmd_status | 96 | * Definition for cmd_status |
97 | */ | 97 | */ |
98 | #define MFI_CMD_STATUS_POLL_MODE 0xFF | 98 | #define MFI_CMD_STATUS_POLL_MODE 0xFF |
99 | 99 | ||
100 | /** | 100 | /* |
101 | * MFI command opcodes | 101 | * MFI command opcodes |
102 | */ | 102 | */ |
103 | #define MFI_CMD_INIT 0x00 | 103 | #define MFI_CMD_INIT 0x00 |
@@ -128,7 +128,7 @@ | |||
128 | #define MR_DCMD_CLUSTER_RESET_ALL 0x08010100 | 128 | #define MR_DCMD_CLUSTER_RESET_ALL 0x08010100 |
129 | #define MR_DCMD_CLUSTER_RESET_LD 0x08010200 | 129 | #define MR_DCMD_CLUSTER_RESET_LD 0x08010200 |
130 | 130 | ||
131 | /** | 131 | /* |
132 | * MFI command completion codes | 132 | * MFI command completion codes |
133 | */ | 133 | */ |
134 | enum MFI_STAT { | 134 | enum MFI_STAT { |