]> err.no Git - linux-2.6/blobdiff - drivers/scsi/hptiop.c
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6] / drivers / scsi / hptiop.c
index 8302f3ba31ce4b808238ba570c268ddf9f9dbd8e..f77808329e7cb8937913bb725ef4d0b402e8d9c0 100644 (file)
@@ -504,19 +504,10 @@ static int hptiop_queuecommand(struct scsi_cmnd *scp,
        BUG_ON(!done);
        scp->scsi_done = done;
 
-       /*
-        * hptiop_shutdown will flash controller cache.
-        */
-       if (scp->cmnd[0] == SYNCHRONIZE_CACHE)  {
-               scp->result = DID_OK<<16;
-               goto cmd_done;
-       }
-
        _req = get_req(hba);
        if (_req == NULL) {
                dprintk("hptiop_queuecmd : no free req\n");
-               scp->result = DID_BUS_BUSY << 16;
-               goto cmd_done;
+               return SCSI_MLQUEUE_HOST_BUSY;
        }
 
        _req->scp = scp;
@@ -554,7 +545,7 @@ static int hptiop_queuecommand(struct scsi_cmnd *scp,
        req->header.context = cpu_to_le32(IOPMU_QUEUE_ADDR_HOST_BIT |
                                                        (u32)_req->index);
        req->header.context_hi32 = 0;
-       req->dataxfer_length = cpu_to_le32(scp->bufflen);
+       req->dataxfer_length = cpu_to_le32(scp->request_bufflen);
        req->channel = scp->device->channel;
        req->target = scp->device->id;
        req->lun = scp->device->lun;
@@ -1429,6 +1420,8 @@ static void hptiop_remove(struct pci_dev *pcidev)
 
        dprintk("scsi%d: hptiop_remove\n", hba->host->host_no);
 
+       scsi_remove_host(host);
+
        spin_lock(&hptiop_hba_list_lock);
        list_del_init(&hba->link);
        spin_unlock(&hptiop_hba_list_lock);
@@ -1448,7 +1441,6 @@ static void hptiop_remove(struct pci_dev *pcidev)
        pci_set_drvdata(hba->pcidev, NULL);
        pci_disable_device(hba->pcidev);
 
-       scsi_remove_host(host);
        scsi_host_put(host);
 }