]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/device_handler/scsi_dh_rdac.c
[SCSI] scsi_dh: Initialize path state to be passive when path is not owned
[linux-2.6-omap-h63xx.git] / drivers / scsi / device_handler / scsi_dh_rdac.c
index 2dee69da35cf67f412143dd2c5f190bffcc43cbc..3d50cabca7eeba34bbdda3ae84eb8ce9228df5f3 100644 (file)
@@ -225,10 +225,9 @@ static struct request *get_rdac_req(struct scsi_device *sdev,
                return NULL;
        }
 
-       memset(rq->cmd, 0, BLK_MAX_CDB);
-
        rq->cmd_type = REQ_TYPE_BLOCK_PC;
-       rq->cmd_flags |= REQ_FAILFAST | REQ_NOMERGE;
+       rq->cmd_flags |= REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT |
+                        REQ_FAILFAST_DRIVER;
        rq->retries = RDAC_RETRIES;
        rq->timeout = RDAC_TIMEOUT;
 
@@ -402,6 +401,9 @@ static int check_ownership(struct scsi_device *sdev, struct rdac_dh_data *h)
                }
        }
 
+       if (h->lun_state == RDAC_LUN_UNOWNED)
+               h->state = RDAC_STATE_PASSIVE;
+
        return err;
 }
 
@@ -551,7 +553,7 @@ static int rdac_check_sense(struct scsi_device *sdev,
                         *
                         * Just retry and wait.
                         */
-                       return NEEDS_RETRY;
+                       return ADD_TO_MLQUEUE;
                break;
        case ILLEGAL_REQUEST:
                if (sense_hdr->asc == 0x94 && sense_hdr->ascq == 0x01) {
@@ -568,7 +570,7 @@ static int rdac_check_sense(struct scsi_device *sdev,
                        /*
                         * Power On, Reset, or Bus Device Reset, just retry.
                         */
-                       return NEEDS_RETRY;
+                       return ADD_TO_MLQUEUE;
                break;
        }
        /* success just means we do not care what scsi-ml does */
@@ -590,6 +592,8 @@ static const struct scsi_dh_devlist rdac_dev_list[] = {
        {"STK", "OPENstorage D280"},
        {"SUN", "CSM200_R"},
        {"SUN", "LCSM100_F"},
+       {"DELL", "MD3000"},
+       {"DELL", "MD3000i"},
        {NULL, NULL},
 };