Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
[powerpc.git] / drivers / scsi / aacraid / aachba.c
index b0f314e..8df4a0e 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/slab.h>
 #include <linux/completion.h>
 #include <linux/blkdev.h>
+#include <linux/dma-mapping.h>
 #include <asm/semaphore.h>
 #include <asm/uaccess.h>
 
@@ -1465,7 +1466,7 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd)
         *      itself.
         */
        if (scmd_id(scsicmd) != host->this_id) {
-               if ((scsicmd->device->channel == 0) ){
+               if ((scsicmd->device->channel == CONTAINER_CHANNEL)) {
                        if( (scsicmd->device->id >= dev->maximum_num_containers) || (scsicmd->device->lun != 0)){ 
                                scsicmd->result = DID_NO_CONNECT << 16;
                                scsicmd->scsi_done(scsicmd);
@@ -1935,33 +1936,7 @@ static void aac_srb_callback(void *context, struct fib * fibptr)
        case SRB_STATUS_ERROR_RECOVERY:
        case SRB_STATUS_PENDING:
        case SRB_STATUS_SUCCESS:
-               if(scsicmd->cmnd[0] == INQUIRY ){
-                       u8 b;
-                       u8 b1;
-                       /* We can't expose disk devices because we can't tell whether they
-                        * are the raw container drives or stand alone drives.  If they have
-                        * the removable bit set then we should expose them though.
-                        */
-                       b = (*(u8*)scsicmd->buffer)&0x1f;
-                       b1 = ((u8*)scsicmd->buffer)[1];
-                       if( b==TYPE_TAPE || b==TYPE_WORM || b==TYPE_ROM || b==TYPE_MOD|| b==TYPE_MEDIUM_CHANGER 
-                                       || (b==TYPE_DISK && (b1&0x80)) ){
-                               scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8;
-                       /*
-                        * We will allow disk devices if in RAID/SCSI mode and
-                        * the channel is 2
-                        */
-                       } else if ((dev->raid_scsi_mode) &&
-                                       (scmd_channel(scsicmd) == 2)) {
-                               scsicmd->result = DID_OK << 16 | 
-                                               COMMAND_COMPLETE << 8;
-                       } else {
-                               scsicmd->result = DID_NO_CONNECT << 16 | 
-                                               COMMAND_COMPLETE << 8;
-                       }
-               } else {
-                       scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8;
-               }
+               scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8;
                break;
        case SRB_STATUS_DATA_OVERRUN:
                switch(scsicmd->cmnd[0]){
@@ -1981,28 +1956,7 @@ static void aac_srb_callback(void *context, struct fib * fibptr)
                        scsicmd->result = DID_ERROR << 16 | COMMAND_COMPLETE << 8;
                        break;
                case INQUIRY: {
-                       u8 b;
-                       u8 b1;
-                       /* We can't expose disk devices because we can't tell whether they
-                       * are the raw container drives or stand alone drives
-                       */
-                       b = (*(u8*)scsicmd->buffer)&0x0f;
-                       b1 = ((u8*)scsicmd->buffer)[1];
-                       if( b==TYPE_TAPE || b==TYPE_WORM || b==TYPE_ROM || b==TYPE_MOD|| b==TYPE_MEDIUM_CHANGER
-                                       || (b==TYPE_DISK && (b1&0x80)) ){
-                               scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8;
-                       /*
-                        * We will allow disk devices if in RAID/SCSI mode and
-                        * the channel is 2
-                        */
-                       } else if ((dev->raid_scsi_mode) &&
-                                       (scmd_channel(scsicmd) == 2)) {
-                               scsicmd->result = DID_OK << 16 | 
-                                               COMMAND_COMPLETE << 8;
-                       } else {
-                               scsicmd->result = DID_NO_CONNECT << 16 | 
-                                               COMMAND_COMPLETE << 8;
-                       }
+                       scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8;
                        break;
                }
                default: