aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/aachba.c
diff options
context:
space:
mode:
authorMark Haverkamp <markh@osdl.org>2005-06-20 14:55:24 -0400
committerJames Bottomley <jejb@titanic.(none)>2005-06-26 09:33:10 -0400
commit849717383abc795b8f5efe7b9e0792b2e1f8916a (patch)
tree98e91d7c9ebdc1ad976175c855939459a4c29932 /drivers/scsi/aacraid/aachba.c
parent12413197eef2a29e0b9fb0fa541f5cbaeb1d3f3f (diff)
[SCSI] aacraid: New products patch
This patch add the following products to the driver: IBM ServeRAID 8i ICP 9014R0 ICP 9024R0 ICP 9047MA ICP 9087MA ICP 9085LI ICP 5085AU Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aacraid/aachba.c')
-rw-r--r--drivers/scsi/aacraid/aachba.c44
1 files changed, 41 insertions, 3 deletions
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;