summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/aachba.c
diff options
context:
space:
mode:
authorMark Haverkamp <markh@osdl.org>2005-06-20 11:55:24 -0700
committerJames Bottomley <jejb@titanic.(none)>2005-06-26 08:33:10 -0500
commit849717383abc795b8f5efe7b9e0792b2e1f8916a (patch)
tree98e91d7c9ebdc1ad976175c855939459a4c29932 /drivers/scsi/aacraid/aachba.c
parent12413197eef2a29e0b9fb0fa541f5cbaeb1d3f3f (diff)
downloadop-kernel-dev-849717383abc795b8f5efe7b9e0792b2e1f8916a.zip
op-kernel-dev-849717383abc795b8f5efe7b9e0792b2e1f8916a.tar.gz
[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 f02c996..ccdf440 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)
if (maximum_num_containers < MAXIMUM_NUM_CONTAINERS)
maximum_num_containers = MAXIMUM_NUM_CONTAINERS;
-
fsa_dev_ptr = (struct fsa_dev_info *) kmalloc(
sizeof(*fsa_dev_ptr) * maximum_num_containers, GFP_KERNEL);
if (!fsa_dev_ptr) {
@@ -527,6 +526,11 @@ static char *container_types[] = {
"V-MIRRORS",
"PSEUDO R4",
"RAID50",
+ "RAID5D",
+ "RAID5D0",
+ "RAID1E",
+ "RAID6",
+ "RAID60",
"Unknown"
};
@@ -610,7 +614,9 @@ int aac_get_adapter_info(struct aac_dev* dev)
struct fib* fibptr;
int rcode;
u32 tmp;
- struct aac_adapter_info * info;
+ struct aac_adapter_info *info;
+ struct aac_bus_info *command;
+ struct aac_bus_info_response *bus_info;
if (!(fibptr = fib_alloc(dev)))
return -ENOMEM;
@@ -655,6 +661,36 @@ int aac_get_adapter_info(struct aac_dev* dev)
memcpy(&dev->supplement_adapter_info, info, sizeof(*info));
}
+
+ /*
+ * GetBusInfo
+ */
+
+ fib_init(fibptr);
+
+ bus_info = (struct aac_bus_info_response *) fib_data(fibptr);
+
+ memset(bus_info, 0, sizeof(*bus_info));
+
+ command = (struct aac_bus_info *)bus_info;
+
+ command->Command = cpu_to_le32(VM_Ioctl);
+ command->ObjType = cpu_to_le32(FT_DRIVE);
+ command->MethodId = cpu_to_le32(1);
+ command->CtlCmd = cpu_to_le32(GetBusInfo);
+
+ rcode = fib_send(ContainerCommand,
+ fibptr,
+ sizeof (*bus_info),
+ FsaNormal,
+ 1, 1,
+ NULL, NULL);
+
+ if (rcode >= 0 && le32_to_cpu(bus_info->Status) == ST_OK) {
+ dev->maximum_num_physicals = le32_to_cpu(bus_info->TargetsPerBus);
+ dev->maximum_num_channels = le32_to_cpu(bus_info->BusCount);
+ }
+
tmp = le32_to_cpu(dev->adapter_info.kernelrev);
printk(KERN_INFO "%s%d: kernel %d.%d-%d[%d] %.*s\n",
dev->name,
@@ -1818,7 +1854,9 @@ static int aac_send_srb_fib(struct scsi_cmnd* scsicmd)
u32 flag;
u32 timeout;
- if( scsicmd->device->id > 15 || scsicmd->device->lun > 7) {
+ dev = (struct aac_dev *)scsicmd->device->host->hostdata;
+ if (scsicmd->device->id >= dev->maximum_num_physicals ||
+ scsicmd->device->lun > 7) {
scsicmd->result = DID_NO_CONNECT << 16;
scsicmd->scsi_done(scsicmd);
return 0;
OpenPOWER on IntegriCloud