summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hptiop.c
diff options
context:
space:
mode:
authorHighPoint Linux Team <linux@highpoint-tech.com>2006-06-14 16:50:57 +0800
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-06-19 19:30:15 -0500
commit4f2ddba39a550eba9233d9f0e8309092da0ba293 (patch)
tree8fdfacf8a5b7ffcb58a093c5887ff1c9753e8d2e /drivers/scsi/hptiop.c
parenta623e14dafe72329dd1defe36ee2cd4ff4b2e6f1 (diff)
downloadlinux-4f2ddba39a550eba9233d9f0e8309092da0ba293.tar.bz2
[SCSI] hptiop: HighPoint RocketRAID 3xxx controller driver
Updates: - don't bypass SYNCHRONIZE_CACHE command - return SCSI_MLQUEUE_HOST_BUSY when no free request slots - move scsi_remove_host() to the begin of hpt_remove(), or it will not work after resources being released. Signed-off-by: HighPoint Linux Team <linux@highpoint-tech.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/hptiop.c')
-rw-r--r--drivers/scsi/hptiop.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c
index 8302f3ba31ce..a96751cad8cf 100644
--- a/drivers/scsi/hptiop.c
+++ b/drivers/scsi/hptiop.c
@@ -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;
@@ -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);
}