aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas/mpt2sas_ctl.c
diff options
context:
space:
mode:
authorKashyap, Desai <kashyap.desai@lsi.com>2009-09-14 01:32:48 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-10-02 10:48:26 -0400
commit595bb0bd62edb28a965993d90e0fa1285560ce53 (patch)
tree0447a980d9c99e21ab1c9bac0b7f893da75d18e3 /drivers/scsi/mpt2sas/mpt2sas_ctl.c
parent19d3ebe3d5c4d56c8309a64561d99e7920a35fbb (diff)
[SCSI] mpt2sas: Added SCSIIO, Internal and high priority memory pools to support multiple TM
1) create a pool of high priority message frames in the region of memory between message frames and chains. The modifications are in _base_allocate_memory_pools. Also create a seperate pool of memory for internal commands located near the same region of memory. The pool of high priority message frames is restriced by the facts->HighPriorityCredit. 2) Create additional API for accessing request message frames. New function mpt2sas_base_get_smid_hpr is for highpriority request. New function mpt2sas_base_get_smid_scsiio for SCSI_IO, passing in the scsi command pointer. The mpt2sas_base_get_smid function is for requesting internal commands. 3) Added new function _base_get_cb_idx to obtain the callback index from one of the three pools of request message frames. 4) Removed wrapper functions _scsih_scsi_lookup_set and _scsih_scsi_lookup_getclear. These were removed because this handling was moved into mpt2sas_base_get_smid_scsiio and mpt2sas_base_free_smid. 5) The function mpt2sas_base_free_smid is modified so the request message frames are put back on one of the three pools of request message frames. Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_ctl.c')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_ctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_ctl.c b/drivers/scsi/mpt2sas/mpt2sas_ctl.c
index 37961504aaae..466e2f42367f 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_ctl.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_ctl.c
@@ -509,7 +509,7 @@ _ctl_set_task_mid(struct MPT2SAS_ADAPTER *ioc, struct mpt2_ioctl_command *karg,
509 509
510 handle = le16_to_cpu(tm_request->DevHandle); 510 handle = le16_to_cpu(tm_request->DevHandle);
511 spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); 511 spin_lock_irqsave(&ioc->scsi_lookup_lock, flags);
512 for (i = ioc->request_depth; i && !found; i--) { 512 for (i = ioc->scsiio_depth; i && !found; i--) {
513 scmd = ioc->scsi_lookup[i - 1].scmd; 513 scmd = ioc->scsi_lookup[i - 1].scmd;
514 if (scmd == NULL || scmd->device == NULL || 514 if (scmd == NULL || scmd->device == NULL ||
515 scmd->device->hostdata == NULL) 515 scmd->device->hostdata == NULL)
@@ -616,7 +616,7 @@ _ctl_do_mpt_command(struct MPT2SAS_ADAPTER *ioc,
616 printk(MPT2SAS_INFO_FMT "%s: ioc is operational\n", 616 printk(MPT2SAS_INFO_FMT "%s: ioc is operational\n",
617 ioc->name, __func__); 617 ioc->name, __func__);
618 618
619 smid = mpt2sas_base_get_smid(ioc, ioc->ctl_cb_idx); 619 smid = mpt2sas_base_get_smid_scsiio(ioc, ioc->ctl_cb_idx, NULL);
620 if (!smid) { 620 if (!smid) {
621 printk(MPT2SAS_ERR_FMT "%s: failed obtaining a smid\n", 621 printk(MPT2SAS_ERR_FMT "%s: failed obtaining a smid\n",
622 ioc->name, __func__); 622 ioc->name, __func__);