diff options
author | Mark Haverkamp <markh@osdl.org> | 2005-10-24 13:52:22 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-10-28 12:41:53 -0400 |
commit | 8e0c5ebde82b08f6d996e11983890fc4cc085fab (patch) | |
tree | 3ba38ff8e7b9203b47d038c215d9c7d623c250ba /drivers/scsi/aacraid/linit.c | |
parent | 38a9a621aba953ddb8051547e98c10ec3c741312 (diff) |
[SCSI] aacraid: Newer adapter communication iterface support
Received from Mark Salyzyn.
This patch adds the 'new comm' interface, which modern AAC based
adapters that are less than a year old support in the name of much
improved performance. These modern adapters support both the legacy and
the 'new comm' interfaces.
Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aacraid/linit.c')
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index c235d0c0e7a7..ab383d1f59e2 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -788,8 +788,29 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, | |||
788 | goto out_free_host; | 788 | goto out_free_host; |
789 | spin_lock_init(&aac->fib_lock); | 789 | spin_lock_init(&aac->fib_lock); |
790 | 790 | ||
791 | if ((*aac_drivers[index].init)(aac)) | 791 | /* |
792 | * Map in the registers from the adapter. | ||
793 | */ | ||
794 | aac->base_size = AAC_MIN_FOOTPRINT_SIZE; | ||
795 | if ((aac->regs.sa = ioremap( | ||
796 | (unsigned long)aac->scsi_host_ptr->base, AAC_MIN_FOOTPRINT_SIZE)) | ||
797 | == NULL) { | ||
798 | printk(KERN_WARNING "%s: unable to map adapter.\n", | ||
799 | AAC_DRIVERNAME); | ||
792 | goto out_free_fibs; | 800 | goto out_free_fibs; |
801 | } | ||
802 | if ((*aac_drivers[index].init)(aac)) | ||
803 | goto out_unmap; | ||
804 | |||
805 | /* | ||
806 | * Start any kernel threads needed | ||
807 | */ | ||
808 | aac->thread_pid = kernel_thread((int (*)(void *))aac_command_thread, | ||
809 | aac, 0); | ||
810 | if (aac->thread_pid < 0) { | ||
811 | printk(KERN_ERR "aacraid: Unable to create command thread.\n"); | ||
812 | goto out_deinit; | ||
813 | } | ||
793 | 814 | ||
794 | /* | 815 | /* |
795 | * If we had set a smaller DMA mask earlier, set it to 4gig | 816 | * If we had set a smaller DMA mask earlier, set it to 4gig |
@@ -866,10 +887,11 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, | |||
866 | 887 | ||
867 | aac_send_shutdown(aac); | 888 | aac_send_shutdown(aac); |
868 | aac_adapter_disable_int(aac); | 889 | aac_adapter_disable_int(aac); |
890 | free_irq(pdev->irq, aac); | ||
891 | out_unmap: | ||
869 | fib_map_free(aac); | 892 | fib_map_free(aac); |
870 | pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, aac->comm_phys); | 893 | pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, aac->comm_phys); |
871 | kfree(aac->queues); | 894 | kfree(aac->queues); |
872 | free_irq(pdev->irq, aac); | ||
873 | iounmap(aac->regs.sa); | 895 | iounmap(aac->regs.sa); |
874 | out_free_fibs: | 896 | out_free_fibs: |
875 | kfree(aac->fibs); | 897 | kfree(aac->fibs); |
@@ -910,6 +932,7 @@ static void __devexit aac_remove_one(struct pci_dev *pdev) | |||
910 | iounmap(aac->regs.sa); | 932 | iounmap(aac->regs.sa); |
911 | 933 | ||
912 | kfree(aac->fibs); | 934 | kfree(aac->fibs); |
935 | kfree(aac->fsa_dev); | ||
913 | 936 | ||
914 | list_del(&aac->entry); | 937 | list_del(&aac->entry); |
915 | scsi_host_put(shost); | 938 | scsi_host_put(shost); |