aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-26 16:28:47 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-26 16:28:47 -0400
commit2d986010ad13a00b83851238d52601d6092df40e (patch)
tree6a43ffd30290fc051435643d485ad12fb1448ed5 /drivers/scsi/aacraid
parent6b6a93c6876ea1c530d5d3f68e3678093a27fab0 (diff)
parente10fb91c4dc81a4ae47caf0828df152f600f2546 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6
Diffstat (limited to 'drivers/scsi/aacraid')
-rw-r--r--drivers/scsi/aacraid/README8
-rw-r--r--drivers/scsi/aacraid/TODO2
-rw-r--r--drivers/scsi/aacraid/aachba.c44
-rw-r--r--drivers/scsi/aacraid/aacraid.h24
-rw-r--r--drivers/scsi/aacraid/commctrl.c2
-rw-r--r--drivers/scsi/aacraid/linit.c81
6 files changed, 126 insertions, 35 deletions
diff --git a/drivers/scsi/aacraid/README b/drivers/scsi/aacraid/README
index fdb0f45f7336..4fa524687bc5 100644
--- a/drivers/scsi/aacraid/README
+++ b/drivers/scsi/aacraid/README
@@ -13,6 +13,7 @@ Supported Cards/Chipsets
13 Adaptec 2020S 13 Adaptec 2020S
14 Adaptec 2025S 14 Adaptec 2025S
15 Adaptec 2120S 15 Adaptec 2120S
16 Adaptec 2130S
16 Adaptec 2200S 17 Adaptec 2200S
17 Adaptec 2230S 18 Adaptec 2230S
18 Adaptec 2240S 19 Adaptec 2240S
@@ -35,6 +36,13 @@ Supported Cards/Chipsets
35 HP NetRAID-4M 36 HP NetRAID-4M
36 Legend S220 37 Legend S220
37 Legend S230 38 Legend S230
39 IBM ServeRAID 8i
40 ICP 9014R0
41 ICP 9024R0
42 ICP 9047MA
43 ICP 9087MA
44 ICP 9085LI
45 ICP 5085AU
38 46
39People 47People
40------------------------- 48-------------------------
diff --git a/drivers/scsi/aacraid/TODO b/drivers/scsi/aacraid/TODO
index 25856a21d982..2f148b4617dc 100644
--- a/drivers/scsi/aacraid/TODO
+++ b/drivers/scsi/aacraid/TODO
@@ -1,6 +1,4 @@
1o Testing 1o Testing
2o More testing 2o More testing
3o Feature request: display the firmware/bios/etc revisions in the
4 /proc info
5o Drop irq_mask, basically unused 3o Drop irq_mask, basically unused
6o I/O size increase 4o I/O size increase
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index f02c99641467..ccdf440021fb 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -276,7 +276,6 @@ int aac_get_containers(struct aac_dev *dev)
276 276
277 if (maximum_num_containers < MAXIMUM_NUM_CONTAINERS) 277 if (maximum_num_containers < MAXIMUM_NUM_CONTAINERS)
278 maximum_num_containers = MAXIMUM_NUM_CONTAINERS; 278 maximum_num_containers = MAXIMUM_NUM_CONTAINERS;
279
280 fsa_dev_ptr = (struct fsa_dev_info *) kmalloc( 279 fsa_dev_ptr = (struct fsa_dev_info *) kmalloc(
281 sizeof(*fsa_dev_ptr) * maximum_num_containers, GFP_KERNEL); 280 sizeof(*fsa_dev_ptr) * maximum_num_containers, GFP_KERNEL);
282 if (!fsa_dev_ptr) { 281 if (!fsa_dev_ptr) {
@@ -527,6 +526,11 @@ static char *container_types[] = {
527 "V-MIRRORS", 526 "V-MIRRORS",
528 "PSEUDO R4", 527 "PSEUDO R4",
529 "RAID50", 528 "RAID50",
529 "RAID5D",
530 "RAID5D0",
531 "RAID1E",
532 "RAID6",
533 "RAID60",
530 "Unknown" 534 "Unknown"
531}; 535};
532 536
@@ -610,7 +614,9 @@ int aac_get_adapter_info(struct aac_dev* dev)
610 struct fib* fibptr; 614 struct fib* fibptr;
611 int rcode; 615 int rcode;
612 u32 tmp; 616 u32 tmp;
613 struct aac_adapter_info * info; 617 struct aac_adapter_info *info;
618 struct aac_bus_info *command;
619 struct aac_bus_info_response *bus_info;
614 620
615 if (!(fibptr = fib_alloc(dev))) 621 if (!(fibptr = fib_alloc(dev)))
616 return -ENOMEM; 622 return -ENOMEM;
@@ -655,6 +661,36 @@ int aac_get_adapter_info(struct aac_dev* dev)
655 memcpy(&dev->supplement_adapter_info, info, sizeof(*info)); 661 memcpy(&dev->supplement_adapter_info, info, sizeof(*info));
656 } 662 }
657 663
664
665 /*
666 * GetBusInfo
667 */
668
669 fib_init(fibptr);
670
671 bus_info = (struct aac_bus_info_response *) fib_data(fibptr);
672
673 memset(bus_info, 0, sizeof(*bus_info));
674
675 command = (struct aac_bus_info *)bus_info;
676
677 command->Command = cpu_to_le32(VM_Ioctl);
678 command->ObjType = cpu_to_le32(FT_DRIVE);
679 command->MethodId = cpu_to_le32(1);
680 command->CtlCmd = cpu_to_le32(GetBusInfo);
681
682 rcode = fib_send(ContainerCommand,
683 fibptr,
684 sizeof (*bus_info),
685 FsaNormal,
686 1, 1,
687 NULL, NULL);
688
689 if (rcode >= 0 && le32_to_cpu(bus_info->Status) == ST_OK) {
690 dev->maximum_num_physicals = le32_to_cpu(bus_info->TargetsPerBus);
691 dev->maximum_num_channels = le32_to_cpu(bus_info->BusCount);
692 }
693
658 tmp = le32_to_cpu(dev->adapter_info.kernelrev); 694 tmp = le32_to_cpu(dev->adapter_info.kernelrev);
659 printk(KERN_INFO "%s%d: kernel %d.%d-%d[%d] %.*s\n", 695 printk(KERN_INFO "%s%d: kernel %d.%d-%d[%d] %.*s\n",
660 dev->name, 696 dev->name,
@@ -1818,7 +1854,9 @@ static int aac_send_srb_fib(struct scsi_cmnd* scsicmd)
1818 u32 flag; 1854 u32 flag;
1819 u32 timeout; 1855 u32 timeout;
1820 1856
1821 if( scsicmd->device->id > 15 || scsicmd->device->lun > 7) { 1857 dev = (struct aac_dev *)scsicmd->device->host->hostdata;
1858 if (scsicmd->device->id >= dev->maximum_num_physicals ||
1859 scsicmd->device->lun > 7) {
1822 scsicmd->result = DID_NO_CONNECT << 16; 1860 scsicmd->result = DID_NO_CONNECT << 16;
1823 scsicmd->scsi_done(scsicmd); 1861 scsicmd->scsi_done(scsicmd);
1824 return 0; 1862 return 0;
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index 42484417cef7..3a11a536c0da 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -845,6 +845,28 @@ struct aac_supplement_adapter_info
845#define AAC_SIS_VERSION_V3 3 845#define AAC_SIS_VERSION_V3 3
846#define AAC_SIS_SLOT_UNKNOWN 0xFF 846#define AAC_SIS_SLOT_UNKNOWN 0xFF
847 847
848#define GetBusInfo 0x00000009
849struct aac_bus_info {
850 __le32 Command; /* VM_Ioctl */
851 __le32 ObjType; /* FT_DRIVE */
852 __le32 MethodId; /* 1 = SCSI Layer */
853 __le32 ObjectId; /* Handle */
854 __le32 CtlCmd; /* GetBusInfo */
855};
856
857struct aac_bus_info_response {
858 __le32 Status; /* ST_OK */
859 __le32 ObjType;
860 __le32 MethodId; /* unused */
861 __le32 ObjectId; /* unused */
862 __le32 CtlCmd; /* unused */
863 __le32 ProbeComplete;
864 __le32 BusCount;
865 __le32 TargetsPerBus;
866 u8 InitiatorBusId[10];
867 u8 BusValid[10];
868};
869
848/* 870/*
849 * Battery platforms 871 * Battery platforms
850 */ 872 */
@@ -934,6 +956,8 @@ struct aac_dev
934 956
935 struct Scsi_Host *scsi_host_ptr; 957 struct Scsi_Host *scsi_host_ptr;
936 int maximum_num_containers; 958 int maximum_num_containers;
959 int maximum_num_physicals;
960 int maximum_num_channels;
937 struct fsa_dev_info *fsa_dev; 961 struct fsa_dev_info *fsa_dev;
938 pid_t thread_pid; 962 pid_t thread_pid;
939 int cardtype; 963 int cardtype;
diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c
index 390cd67c57c0..85387099aab2 100644
--- a/drivers/scsi/aacraid/commctrl.c
+++ b/drivers/scsi/aacraid/commctrl.c
@@ -517,7 +517,7 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg)
517 } 517 }
518 if (dev->dac_support == 1) { 518 if (dev->dac_support == 1) {
519 struct user_sgmap64* upsg = (struct user_sgmap64*)&user_srbcmd->sg; 519 struct user_sgmap64* upsg = (struct user_sgmap64*)&user_srbcmd->sg;
520 struct sgmap64* psg = (struct sgmap64*)&user_srbcmd->sg; 520 struct sgmap64* psg = (struct sgmap64*)&srbcmd->sg;
521 struct user_sgmap* usg; 521 struct user_sgmap* usg;
522 byte_count = 0; 522 byte_count = 0;
523 523
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index f7e9c89c4915..c1a4f978fcba 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -102,32 +102,43 @@ static struct pci_device_id aac_pci_tbl[] = {
102 { 0x9005, 0x0286, 0x9005, 0x029b, 0, 0, 22 }, /* AAR-2820SA (Intruder) */ 102 { 0x9005, 0x0286, 0x9005, 0x029b, 0, 0, 22 }, /* AAR-2820SA (Intruder) */
103 { 0x9005, 0x0286, 0x9005, 0x029c, 0, 0, 23 }, /* AAR-2620SA (Intruder) */ 103 { 0x9005, 0x0286, 0x9005, 0x029c, 0, 0, 23 }, /* AAR-2620SA (Intruder) */
104 { 0x9005, 0x0286, 0x9005, 0x029d, 0, 0, 24 }, /* AAR-2420SA (Intruder) */ 104 { 0x9005, 0x0286, 0x9005, 0x029d, 0, 0, 24 }, /* AAR-2420SA (Intruder) */
105 { 0x9005, 0x0286, 0x9005, 0x0800, 0, 0, 25 }, /* Callisto Jupiter Platform */ 105 { 0x9005, 0x0286, 0x9005, 0x029e, 0, 0, 25 }, /* ICP9024R0 (Lancer) */
106 { 0x9005, 0x0285, 0x9005, 0x028e, 0, 0, 26 }, /* ASR-2020SA SATA PCI-X ZCR (Skyhawk) */ 106 { 0x9005, 0x0286, 0x9005, 0x029f, 0, 0, 26 }, /* ICP9014R0 (Lancer) */
107 { 0x9005, 0x0285, 0x9005, 0x028f, 0, 0, 27 }, /* ASR-2025SA SATA SO-DIMM PCI-X ZCR (Terminator) */ 107 { 0x9005, 0x0286, 0x9005, 0x02a0, 0, 0, 27 }, /* ICP9047MA (Lancer) */
108 { 0x9005, 0x0285, 0x9005, 0x0290, 0, 0, 28 }, /* AAR-2410SA PCI SATA 4ch (Jaguar II) */ 108 { 0x9005, 0x0286, 0x9005, 0x02a1, 0, 0, 28 }, /* ICP9087MA (Lancer) */
109 { 0x9005, 0x0285, 0x1028, 0x0291, 0, 0, 29 }, /* CERC SATA RAID 2 PCI SATA 6ch (DellCorsair) */ 109 { 0x9005, 0x0286, 0x9005, 0x02a3, 0, 0, 29 }, /* ICP5085AU (Hurricane) */
110 { 0x9005, 0x0285, 0x9005, 0x0292, 0, 0, 30 }, /* AAR-2810SA PCI SATA 8ch (Corsair-8) */ 110 { 0x9005, 0x0285, 0x9005, 0x02a4, 0, 0, 30 }, /* ICP9085LI (Marauder-X) */
111 { 0x9005, 0x0285, 0x9005, 0x0293, 0, 0, 31 }, /* AAR-21610SA PCI SATA 16ch (Corsair-16) */ 111 { 0x9005, 0x0285, 0x9005, 0x02a5, 0, 0, 31 }, /* ICP5085BR (Marauder-E) */
112 { 0x9005, 0x0285, 0x9005, 0x0294, 0, 0, 32 }, /* ESD SO-DIMM PCI-X SATA ZCR (Prowler) */ 112 { 0x9005, 0x0287, 0x9005, 0x0800, 0, 0, 32 }, /* Themisto Jupiter Platform */
113 { 0x9005, 0x0285, 0x103C, 0x3227, 0, 0, 33 }, /* AAR-2610SA PCI SATA 6ch */ 113 { 0x9005, 0x0200, 0x9005, 0x0200, 0, 0, 32 }, /* Themisto Jupiter Platform */
114 { 0x9005, 0x0285, 0x9005, 0x0296, 0, 0, 34 }, /* ASR-2240S (SabreExpress) */ 114 { 0x9005, 0x0286, 0x9005, 0x0800, 0, 0, 33 }, /* Callisto Jupiter Platform */
115 { 0x9005, 0x0285, 0x9005, 0x0297, 0, 0, 35 }, /* ASR-4005SAS */ 115 { 0x9005, 0x0285, 0x9005, 0x028e, 0, 0, 34 }, /* ASR-2020SA SATA PCI-X ZCR (Skyhawk) */
116 { 0x9005, 0x0285, 0x1014, 0x02F2, 0, 0, 36 }, /* IBM 8i (AvonPark) */ 116 { 0x9005, 0x0285, 0x9005, 0x028f, 0, 0, 35 }, /* ASR-2025SA SATA SO-DIMM PCI-X ZCR (Terminator) */
117 { 0x9005, 0x0285, 0x9005, 0x0298, 0, 0, 37 }, /* ASR-4000SAS (BlackBird) */ 117 { 0x9005, 0x0285, 0x9005, 0x0290, 0, 0, 36 }, /* AAR-2410SA PCI SATA 4ch (Jaguar II) */
118 { 0x9005, 0x0285, 0x9005, 0x0299, 0, 0, 38 }, /* ASR-4800SAS (Marauder-X) */ 118 { 0x9005, 0x0285, 0x1028, 0x0291, 0, 0, 37 }, /* CERC SATA RAID 2 PCI SATA 6ch (DellCorsair) */
119 { 0x9005, 0x0285, 0x9005, 0x029A, 0, 0, 39 }, /* ASR-4805SAS (Marauder-E) */ 119 { 0x9005, 0x0285, 0x9005, 0x0292, 0, 0, 38 }, /* AAR-2810SA PCI SATA 8ch (Corsair-8) */
120 120 { 0x9005, 0x0285, 0x9005, 0x0293, 0, 0, 39 }, /* AAR-21610SA PCI SATA 16ch (Corsair-16) */
121 { 0x9005, 0x0285, 0x1028, 0x0287, 0, 0, 40 }, /* Perc 320/DC*/ 121 { 0x9005, 0x0285, 0x9005, 0x0294, 0, 0, 40 }, /* ESD SO-DIMM PCI-X SATA ZCR (Prowler) */
122 { 0x1011, 0x0046, 0x9005, 0x0365, 0, 0, 41 }, /* Adaptec 5400S (Mustang)*/ 122 { 0x9005, 0x0285, 0x103C, 0x3227, 0, 0, 41 }, /* AAR-2610SA PCI SATA 6ch */
123 { 0x1011, 0x0046, 0x9005, 0x0364, 0, 0, 42 }, /* Adaptec 5400S (Mustang)*/ 123 { 0x9005, 0x0285, 0x9005, 0x0296, 0, 0, 42 }, /* ASR-2240S (SabreExpress) */
124 { 0x1011, 0x0046, 0x9005, 0x1364, 0, 0, 43 }, /* Dell PERC2/QC */ 124 { 0x9005, 0x0285, 0x9005, 0x0297, 0, 0, 43 }, /* ASR-4005SAS */
125 { 0x1011, 0x0046, 0x103c, 0x10c2, 0, 0, 44 }, /* HP NetRAID-4M */ 125 { 0x9005, 0x0285, 0x1014, 0x02F2, 0, 0, 44 }, /* IBM 8i (AvonPark) */
126 126 { 0x9005, 0x0285, 0x1014, 0x0312, 0, 0, 44 }, /* IBM 8i (AvonPark Lite) */
127 { 0x9005, 0x0285, 0x1028, PCI_ANY_ID, 0, 0, 45 }, /* Dell Catchall */ 127 { 0x9005, 0x0285, 0x9005, 0x0298, 0, 0, 45 }, /* ASR-4000SAS (BlackBird) */
128 { 0x9005, 0x0285, 0x17aa, PCI_ANY_ID, 0, 0, 46 }, /* Legend Catchall */ 128 { 0x9005, 0x0285, 0x9005, 0x0299, 0, 0, 46 }, /* ASR-4800SAS (Marauder-X) */
129 { 0x9005, 0x0285, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 47 }, /* Adaptec Catch All */ 129 { 0x9005, 0x0285, 0x9005, 0x029a, 0, 0, 47 }, /* ASR-4805SAS (Marauder-E) */
130 { 0x9005, 0x0286, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 48 }, /* Adaptec Rocket Catch All */ 130 { 0x9005, 0x0286, 0x9005, 0x02a2, 0, 0, 48 }, /* ASR-4810SAS (Hurricane */
131
132 { 0x9005, 0x0285, 0x1028, 0x0287, 0, 0, 49 }, /* Perc 320/DC*/
133 { 0x1011, 0x0046, 0x9005, 0x0365, 0, 0, 50 }, /* Adaptec 5400S (Mustang)*/
134 { 0x1011, 0x0046, 0x9005, 0x0364, 0, 0, 51 }, /* Adaptec 5400S (Mustang)*/
135 { 0x1011, 0x0046, 0x9005, 0x1364, 0, 0, 52 }, /* Dell PERC2/QC */
136 { 0x1011, 0x0046, 0x103c, 0x10c2, 0, 0, 53 }, /* HP NetRAID-4M */
137
138 { 0x9005, 0x0285, 0x1028, PCI_ANY_ID, 0, 0, 54 }, /* Dell Catchall */
139 { 0x9005, 0x0285, 0x17aa, PCI_ANY_ID, 0, 0, 55 }, /* Legend Catchall */
140 { 0x9005, 0x0285, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 56 }, /* Adaptec Catch All */
141 { 0x9005, 0x0286, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 57 }, /* Adaptec Rocket Catch All */
131 { 0,} 142 { 0,}
132}; 143};
133MODULE_DEVICE_TABLE(pci, aac_pci_tbl); 144MODULE_DEVICE_TABLE(pci, aac_pci_tbl);
@@ -164,6 +175,14 @@ static struct aac_driver_ident aac_drivers[] = {
164 { aac_rkt_init, "aacraid", "ADAPTEC ", "AAR-2820SA ", 1 }, /* AAR-2820SA (Intruder) */ 175 { aac_rkt_init, "aacraid", "ADAPTEC ", "AAR-2820SA ", 1 }, /* AAR-2820SA (Intruder) */
165 { aac_rkt_init, "aacraid", "ADAPTEC ", "AAR-2620SA ", 1 }, /* AAR-2620SA (Intruder) */ 176 { aac_rkt_init, "aacraid", "ADAPTEC ", "AAR-2620SA ", 1 }, /* AAR-2620SA (Intruder) */
166 { aac_rkt_init, "aacraid", "ADAPTEC ", "AAR-2420SA ", 1 }, /* AAR-2420SA (Intruder) */ 177 { aac_rkt_init, "aacraid", "ADAPTEC ", "AAR-2420SA ", 1 }, /* AAR-2420SA (Intruder) */
178 { aac_rkt_init, "aacraid", "ICP ", "ICP9024R0 ", 2 }, /* ICP9024R0 (Lancer) */
179 { aac_rkt_init, "aacraid", "ICP ", "ICP9014R0 ", 1 }, /* ICP9014R0 (Lancer) */
180 { aac_rkt_init, "aacraid", "ICP ", "ICP9047MA ", 1 }, /* ICP9047MA (Lancer) */
181 { aac_rkt_init, "aacraid", "ICP ", "ICP9087MA ", 1 }, /* ICP9087MA (Lancer) */
182 { aac_rkt_init, "aacraid", "ICP ", "ICP5085AU ", 1 }, /* ICP5085AU (Hurricane) */
183 { aac_rkt_init, "aacraid", "ICP ", "ICP9085LI ", 1 }, /* ICP9085LI (Marauder-X) */
184 { aac_rkt_init, "aacraid", "ICP ", "ICP5085BR ", 1 }, /* ICP5085BR (Marauder-E) */
185 { NULL , "aacraid", "ADAPTEC ", "Themisto ", 0, AAC_QUIRK_SLAVE }, /* Jupiter Platform */
167 { aac_rkt_init, "aacraid", "ADAPTEC ", "Callisto ", 2, AAC_QUIRK_MASTER }, /* Jupiter Platform */ 186 { aac_rkt_init, "aacraid", "ADAPTEC ", "Callisto ", 2, AAC_QUIRK_MASTER }, /* Jupiter Platform */
168 { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2020SA ", 1 }, /* ASR-2020SA SATA PCI-X ZCR (Skyhawk) */ 187 { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2020SA ", 1 }, /* ASR-2020SA SATA PCI-X ZCR (Skyhawk) */
169 { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2025SA ", 1 }, /* ASR-2025SA SATA SO-DIMM PCI-X ZCR (Terminator) */ 188 { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2025SA ", 1 }, /* ASR-2025SA SATA SO-DIMM PCI-X ZCR (Terminator) */
@@ -175,10 +194,11 @@ static struct aac_driver_ident aac_drivers[] = {
175 { aac_rx_init, "aacraid", "ADAPTEC ", "AAR-2610SA ", 1 }, /* SATA 6Ch (Bearcat) */ 194 { aac_rx_init, "aacraid", "ADAPTEC ", "AAR-2610SA ", 1 }, /* SATA 6Ch (Bearcat) */
176 { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2240S ", 1 }, /* ASR-2240S (SabreExpress) */ 195 { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2240S ", 1 }, /* ASR-2240S (SabreExpress) */
177 { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4005SAS ", 1 }, /* ASR-4005SAS */ 196 { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4005SAS ", 1 }, /* ASR-4005SAS */
178 { aac_rx_init, "aacraid", "IBM ", "ServeRAID 8i ", 1 }, /* IBM 8i (AvonPark) */ 197 { aac_rx_init, "ServeRAID","IBM ", "ServeRAID 8i ", 1 }, /* IBM 8i (AvonPark) */
179 { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4000SAS ", 1 }, /* ASR-4000SAS (BlackBird & AvonPark) */ 198 { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4000SAS ", 1 }, /* ASR-4000SAS (BlackBird & AvonPark) */
180 { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4800SAS ", 1 }, /* ASR-4800SAS (Marauder-X) */ 199 { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4800SAS ", 1 }, /* ASR-4800SAS (Marauder-X) */
181 { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4805SAS ", 1 }, /* ASR-4805SAS (Marauder-E) */ 200 { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4805SAS ", 1 }, /* ASR-4805SAS (Marauder-E) */
201 { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4810SAS ", 1 }, /* ASR-4810SAS (Hurricane) */
182 202
183 { aac_rx_init, "percraid", "DELL ", "PERC 320/DC ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Perc 320/DC*/ 203 { aac_rx_init, "percraid", "DELL ", "PERC 320/DC ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Perc 320/DC*/
184 { aac_sa_init, "aacraid", "ADAPTEC ", "Adaptec 5400S ", 4, AAC_QUIRK_34SG }, /* Adaptec 5400S (Mustang)*/ 204 { aac_sa_init, "aacraid", "ADAPTEC ", "Adaptec 5400S ", 4, AAC_QUIRK_34SG }, /* Adaptec 5400S (Mustang)*/
@@ -681,7 +701,7 @@ static struct scsi_host_template aac_driver_template = {
681 .slave_configure = aac_slave_configure, 701 .slave_configure = aac_slave_configure,
682 .eh_host_reset_handler = aac_eh_reset, 702 .eh_host_reset_handler = aac_eh_reset,
683 .can_queue = AAC_NUM_IO_FIB, 703 .can_queue = AAC_NUM_IO_FIB,
684 .this_id = 16, 704 .this_id = MAXIMUM_NUM_CONTAINERS,
685 .sg_tablesize = 16, 705 .sg_tablesize = 16,
686 .max_sectors = 128, 706 .max_sectors = 128,
687#if (AAC_NUM_IO_FIB > 256) 707#if (AAC_NUM_IO_FIB > 256)
@@ -760,6 +780,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
760 if (pci_set_dma_mask(pdev, 0xFFFFFFFFULL)) 780 if (pci_set_dma_mask(pdev, 0xFFFFFFFFULL))
761 goto out_free_fibs; 781 goto out_free_fibs;
762 782
783 aac->maximum_num_channels = aac_drivers[index].channels;
763 aac_get_adapter_info(aac); 784 aac_get_adapter_info(aac);
764 785
765 /* 786 /*
@@ -786,7 +807,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
786 * physical channels are address by their actual physical number+1 807 * physical channels are address by their actual physical number+1
787 */ 808 */
788 if (aac->nondasd_support == 1) 809 if (aac->nondasd_support == 1)
789 shost->max_channel = aac_drivers[index].channels+1; 810 shost->max_channel = aac->maximum_num_channels + 1;
790 else 811 else
791 shost->max_channel = 1; 812 shost->max_channel = 1;
792 813
@@ -795,6 +816,8 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
795 list_add(&aac->entry, insert); 816 list_add(&aac->entry, insert);
796 817
797 shost->max_id = aac->maximum_num_containers; 818 shost->max_id = aac->maximum_num_containers;
819 if (shost->max_id < aac->maximum_num_physicals)
820 shost->max_id = aac->maximum_num_physicals;
798 if (shost->max_id < MAXIMUM_NUM_CONTAINERS) 821 if (shost->max_id < MAXIMUM_NUM_CONTAINERS)
799 shost->max_id = MAXIMUM_NUM_CONTAINERS; 822 shost->max_id = MAXIMUM_NUM_CONTAINERS;
800 else 823 else