diff options
Diffstat (limited to 'drivers/scsi/aacraid/commsup.c')
-rw-r--r-- | drivers/scsi/aacraid/commsup.c | 50 |
1 files changed, 26 insertions, 24 deletions
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 38d6d00fb0fc..97354ba7b185 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c | |||
@@ -67,27 +67,27 @@ static int fib_map_alloc(struct aac_dev *dev) | |||
67 | } | 67 | } |
68 | 68 | ||
69 | /** | 69 | /** |
70 | * fib_map_free - free the fib objects | 70 | * aac_fib_map_free - free the fib objects |
71 | * @dev: Adapter to free | 71 | * @dev: Adapter to free |
72 | * | 72 | * |
73 | * Free the PCI mappings and the memory allocated for FIB blocks | 73 | * Free the PCI mappings and the memory allocated for FIB blocks |
74 | * on this adapter. | 74 | * on this adapter. |
75 | */ | 75 | */ |
76 | 76 | ||
77 | void fib_map_free(struct aac_dev *dev) | 77 | void aac_fib_map_free(struct aac_dev *dev) |
78 | { | 78 | { |
79 | pci_free_consistent(dev->pdev, dev->max_fib_size * (dev->scsi_host_ptr->can_queue + AAC_NUM_MGT_FIB), dev->hw_fib_va, dev->hw_fib_pa); | 79 | pci_free_consistent(dev->pdev, dev->max_fib_size * (dev->scsi_host_ptr->can_queue + AAC_NUM_MGT_FIB), dev->hw_fib_va, dev->hw_fib_pa); |
80 | } | 80 | } |
81 | 81 | ||
82 | /** | 82 | /** |
83 | * fib_setup - setup the fibs | 83 | * aac_fib_setup - setup the fibs |
84 | * @dev: Adapter to set up | 84 | * @dev: Adapter to set up |
85 | * | 85 | * |
86 | * Allocate the PCI space for the fibs, map it and then intialise the | 86 | * Allocate the PCI space for the fibs, map it and then intialise the |
87 | * fib area, the unmapped fib data and also the free list | 87 | * fib area, the unmapped fib data and also the free list |
88 | */ | 88 | */ |
89 | 89 | ||
90 | int fib_setup(struct aac_dev * dev) | 90 | int aac_fib_setup(struct aac_dev * dev) |
91 | { | 91 | { |
92 | struct fib *fibptr; | 92 | struct fib *fibptr; |
93 | struct hw_fib *hw_fib_va; | 93 | struct hw_fib *hw_fib_va; |
@@ -134,14 +134,14 @@ int fib_setup(struct aac_dev * dev) | |||
134 | } | 134 | } |
135 | 135 | ||
136 | /** | 136 | /** |
137 | * fib_alloc - allocate a fib | 137 | * aac_fib_alloc - allocate a fib |
138 | * @dev: Adapter to allocate the fib for | 138 | * @dev: Adapter to allocate the fib for |
139 | * | 139 | * |
140 | * Allocate a fib from the adapter fib pool. If the pool is empty we | 140 | * Allocate a fib from the adapter fib pool. If the pool is empty we |
141 | * return NULL. | 141 | * return NULL. |
142 | */ | 142 | */ |
143 | 143 | ||
144 | struct fib * fib_alloc(struct aac_dev *dev) | 144 | struct fib *aac_fib_alloc(struct aac_dev *dev) |
145 | { | 145 | { |
146 | struct fib * fibptr; | 146 | struct fib * fibptr; |
147 | unsigned long flags; | 147 | unsigned long flags; |
@@ -170,14 +170,14 @@ struct fib * fib_alloc(struct aac_dev *dev) | |||
170 | } | 170 | } |
171 | 171 | ||
172 | /** | 172 | /** |
173 | * fib_free - free a fib | 173 | * aac_fib_free - free a fib |
174 | * @fibptr: fib to free up | 174 | * @fibptr: fib to free up |
175 | * | 175 | * |
176 | * Frees up a fib and places it on the appropriate queue | 176 | * Frees up a fib and places it on the appropriate queue |
177 | * (either free or timed out) | 177 | * (either free or timed out) |
178 | */ | 178 | */ |
179 | 179 | ||
180 | void fib_free(struct fib * fibptr) | 180 | void aac_fib_free(struct fib *fibptr) |
181 | { | 181 | { |
182 | unsigned long flags; | 182 | unsigned long flags; |
183 | 183 | ||
@@ -188,7 +188,7 @@ void fib_free(struct fib * fibptr) | |||
188 | fibptr->dev->timeout_fib = fibptr; | 188 | fibptr->dev->timeout_fib = fibptr; |
189 | } else { | 189 | } else { |
190 | if (fibptr->hw_fib->header.XferState != 0) { | 190 | if (fibptr->hw_fib->header.XferState != 0) { |
191 | printk(KERN_WARNING "fib_free, XferState != 0, fibptr = 0x%p, XferState = 0x%x\n", | 191 | printk(KERN_WARNING "aac_fib_free, XferState != 0, fibptr = 0x%p, XferState = 0x%x\n", |
192 | (void*)fibptr, | 192 | (void*)fibptr, |
193 | le32_to_cpu(fibptr->hw_fib->header.XferState)); | 193 | le32_to_cpu(fibptr->hw_fib->header.XferState)); |
194 | } | 194 | } |
@@ -199,13 +199,13 @@ void fib_free(struct fib * fibptr) | |||
199 | } | 199 | } |
200 | 200 | ||
201 | /** | 201 | /** |
202 | * fib_init - initialise a fib | 202 | * aac_fib_init - initialise a fib |
203 | * @fibptr: The fib to initialize | 203 | * @fibptr: The fib to initialize |
204 | * | 204 | * |
205 | * Set up the generic fib fields ready for use | 205 | * Set up the generic fib fields ready for use |
206 | */ | 206 | */ |
207 | 207 | ||
208 | void fib_init(struct fib *fibptr) | 208 | void aac_fib_init(struct fib *fibptr) |
209 | { | 209 | { |
210 | struct hw_fib *hw_fib = fibptr->hw_fib; | 210 | struct hw_fib *hw_fib = fibptr->hw_fib; |
211 | 211 | ||
@@ -362,7 +362,7 @@ static int aac_queue_get(struct aac_dev * dev, u32 * index, u32 qid, struct hw_f | |||
362 | */ | 362 | */ |
363 | 363 | ||
364 | /** | 364 | /** |
365 | * fib_send - send a fib to the adapter | 365 | * aac_fib_send - send a fib to the adapter |
366 | * @command: Command to send | 366 | * @command: Command to send |
367 | * @fibptr: The fib | 367 | * @fibptr: The fib |
368 | * @size: Size of fib data area | 368 | * @size: Size of fib data area |
@@ -378,7 +378,9 @@ static int aac_queue_get(struct aac_dev * dev, u32 * index, u32 qid, struct hw_f | |||
378 | * response FIB is received from the adapter. | 378 | * response FIB is received from the adapter. |
379 | */ | 379 | */ |
380 | 380 | ||
381 | int fib_send(u16 command, struct fib * fibptr, unsigned long size, int priority, int wait, int reply, fib_callback callback, void * callback_data) | 381 | int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size, |
382 | int priority, int wait, int reply, fib_callback callback, | ||
383 | void *callback_data) | ||
382 | { | 384 | { |
383 | struct aac_dev * dev = fibptr->dev; | 385 | struct aac_dev * dev = fibptr->dev; |
384 | struct hw_fib * hw_fib = fibptr->hw_fib; | 386 | struct hw_fib * hw_fib = fibptr->hw_fib; |
@@ -493,7 +495,7 @@ int fib_send(u16 command, struct fib * fibptr, unsigned long size, int priority | |||
493 | q->numpending++; | 495 | q->numpending++; |
494 | *(q->headers.producer) = cpu_to_le32(index + 1); | 496 | *(q->headers.producer) = cpu_to_le32(index + 1); |
495 | spin_unlock_irqrestore(q->lock, qflags); | 497 | spin_unlock_irqrestore(q->lock, qflags); |
496 | dprintk((KERN_DEBUG "fib_send: inserting a queue entry at index %d.\n",index)); | 498 | dprintk((KERN_DEBUG "aac_fib_send: inserting a queue entry at index %d.\n",index)); |
497 | if (!(nointr & aac_config.irq_mod)) | 499 | if (!(nointr & aac_config.irq_mod)) |
498 | aac_adapter_notify(dev, AdapNormCmdQueue); | 500 | aac_adapter_notify(dev, AdapNormCmdQueue); |
499 | } | 501 | } |
@@ -520,7 +522,7 @@ int fib_send(u16 command, struct fib * fibptr, unsigned long size, int priority | |||
520 | list_del(&fibptr->queue); | 522 | list_del(&fibptr->queue); |
521 | spin_unlock_irqrestore(q->lock, qflags); | 523 | spin_unlock_irqrestore(q->lock, qflags); |
522 | if (wait == -1) { | 524 | if (wait == -1) { |
523 | printk(KERN_ERR "aacraid: fib_send: first asynchronous command timed out.\n" | 525 | printk(KERN_ERR "aacraid: aac_fib_send: first asynchronous command timed out.\n" |
524 | "Usually a result of a PCI interrupt routing problem;\n" | 526 | "Usually a result of a PCI interrupt routing problem;\n" |
525 | "update mother board BIOS or consider utilizing one of\n" | 527 | "update mother board BIOS or consider utilizing one of\n" |
526 | "the SAFE mode kernel options (acpi, apic etc)\n"); | 528 | "the SAFE mode kernel options (acpi, apic etc)\n"); |
@@ -624,7 +626,7 @@ void aac_consumer_free(struct aac_dev * dev, struct aac_queue *q, u32 qid) | |||
624 | } | 626 | } |
625 | 627 | ||
626 | /** | 628 | /** |
627 | * fib_adapter_complete - complete adapter issued fib | 629 | * aac_fib_adapter_complete - complete adapter issued fib |
628 | * @fibptr: fib to complete | 630 | * @fibptr: fib to complete |
629 | * @size: size of fib | 631 | * @size: size of fib |
630 | * | 632 | * |
@@ -632,7 +634,7 @@ void aac_consumer_free(struct aac_dev * dev, struct aac_queue *q, u32 qid) | |||
632 | * the adapter. | 634 | * the adapter. |
633 | */ | 635 | */ |
634 | 636 | ||
635 | int fib_adapter_complete(struct fib * fibptr, unsigned short size) | 637 | int aac_fib_adapter_complete(struct fib *fibptr, unsigned short size) |
636 | { | 638 | { |
637 | struct hw_fib * hw_fib = fibptr->hw_fib; | 639 | struct hw_fib * hw_fib = fibptr->hw_fib; |
638 | struct aac_dev * dev = fibptr->dev; | 640 | struct aac_dev * dev = fibptr->dev; |
@@ -683,20 +685,20 @@ int fib_adapter_complete(struct fib * fibptr, unsigned short size) | |||
683 | } | 685 | } |
684 | else | 686 | else |
685 | { | 687 | { |
686 | printk(KERN_WARNING "fib_adapter_complete: Unknown xferstate detected.\n"); | 688 | printk(KERN_WARNING "aac_fib_adapter_complete: Unknown xferstate detected.\n"); |
687 | BUG(); | 689 | BUG(); |
688 | } | 690 | } |
689 | return 0; | 691 | return 0; |
690 | } | 692 | } |
691 | 693 | ||
692 | /** | 694 | /** |
693 | * fib_complete - fib completion handler | 695 | * aac_fib_complete - fib completion handler |
694 | * @fib: FIB to complete | 696 | * @fib: FIB to complete |
695 | * | 697 | * |
696 | * Will do all necessary work to complete a FIB. | 698 | * Will do all necessary work to complete a FIB. |
697 | */ | 699 | */ |
698 | 700 | ||
699 | int fib_complete(struct fib * fibptr) | 701 | int aac_fib_complete(struct fib *fibptr) |
700 | { | 702 | { |
701 | struct hw_fib * hw_fib = fibptr->hw_fib; | 703 | struct hw_fib * hw_fib = fibptr->hw_fib; |
702 | 704 | ||
@@ -995,14 +997,14 @@ static void aac_handle_aif(struct aac_dev * dev, struct fib * fibptr) | |||
995 | if (!dev || !dev->scsi_host_ptr) | 997 | if (!dev || !dev->scsi_host_ptr) |
996 | return; | 998 | return; |
997 | /* | 999 | /* |
998 | * force reload of disk info via probe_container | 1000 | * force reload of disk info via aac_probe_container |
999 | */ | 1001 | */ |
1000 | if ((device_config_needed == CHANGE) | 1002 | if ((device_config_needed == CHANGE) |
1001 | && (dev->fsa_dev[container].valid == 1)) | 1003 | && (dev->fsa_dev[container].valid == 1)) |
1002 | dev->fsa_dev[container].valid = 2; | 1004 | dev->fsa_dev[container].valid = 2; |
1003 | if ((device_config_needed == CHANGE) || | 1005 | if ((device_config_needed == CHANGE) || |
1004 | (device_config_needed == ADD)) | 1006 | (device_config_needed == ADD)) |
1005 | probe_container(dev, container); | 1007 | aac_probe_container(dev, container); |
1006 | device = scsi_device_lookup(dev->scsi_host_ptr, | 1008 | device = scsi_device_lookup(dev->scsi_host_ptr, |
1007 | CONTAINER_TO_CHANNEL(container), | 1009 | CONTAINER_TO_CHANNEL(container), |
1008 | CONTAINER_TO_ID(container), | 1010 | CONTAINER_TO_ID(container), |
@@ -1104,7 +1106,7 @@ int aac_command_thread(struct aac_dev * dev) | |||
1104 | /* Handle Driver Notify Events */ | 1106 | /* Handle Driver Notify Events */ |
1105 | aac_handle_aif(dev, fib); | 1107 | aac_handle_aif(dev, fib); |
1106 | *(__le32 *)hw_fib->data = cpu_to_le32(ST_OK); | 1108 | *(__le32 *)hw_fib->data = cpu_to_le32(ST_OK); |
1107 | fib_adapter_complete(fib, (u16)sizeof(u32)); | 1109 | aac_fib_adapter_complete(fib, (u16)sizeof(u32)); |
1108 | } else { | 1110 | } else { |
1109 | struct list_head *entry; | 1111 | struct list_head *entry; |
1110 | /* The u32 here is important and intended. We are using | 1112 | /* The u32 here is important and intended. We are using |
@@ -1241,7 +1243,7 @@ int aac_command_thread(struct aac_dev * dev) | |||
1241 | * Set the status of this FIB | 1243 | * Set the status of this FIB |
1242 | */ | 1244 | */ |
1243 | *(__le32 *)hw_fib->data = cpu_to_le32(ST_OK); | 1245 | *(__le32 *)hw_fib->data = cpu_to_le32(ST_OK); |
1244 | fib_adapter_complete(fib, sizeof(u32)); | 1246 | aac_fib_adapter_complete(fib, sizeof(u32)); |
1245 | spin_unlock_irqrestore(&dev->fib_lock, flagv); | 1247 | spin_unlock_irqrestore(&dev->fib_lock, flagv); |
1246 | /* Free up the remaining resources */ | 1248 | /* Free up the remaining resources */ |
1247 | hw_fib_p = hw_fib_pool; | 1249 | hw_fib_p = hw_fib_pool; |