diff options
author | Jeff Skirvin <jeffrey.d.skirvin@intel.com> | 2011-03-04 17:06:46 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 06:55:30 -0400 |
commit | 1fad9e934a43407c1ba397b1b6b8882aa8a2cafd (patch) | |
tree | 7fed301ac4a17e70b8a6d3ba1111e149cb04f05f | |
parent | ec6c9638b0d0537430f78a3e20503b5e68a537b6 (diff) |
isci: save the i/o tag outside the scic request structure.
The pointer to the core representation of a request is marked NULL at
completion, but we need to save the i/o tag for task management.
Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Jacek Danecki <Jacek.Danecki@intel.com>
[revise changelog]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r-- | drivers/scsi/isci/request.c | 6 | ||||
-rw-r--r-- | drivers/scsi/isci/task.c | 10 | ||||
-rw-r--r-- | drivers/scsi/isci/task.h | 2 |
3 files changed, 11 insertions, 7 deletions
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c index 6cd80bbdae15..f19a952754b9 100644 --- a/drivers/scsi/isci/request.c +++ b/drivers/scsi/isci/request.c | |||
@@ -463,6 +463,12 @@ int isci_request_execute( | |||
463 | */ | 463 | */ |
464 | status = SCI_SUCCESS; | 464 | status = SCI_SUCCESS; |
465 | } | 465 | } |
466 | else | ||
467 | /* Save the tag for possible task mgmt later. */ | ||
468 | request->io_tag = scic_io_request_get_io_tag( | ||
469 | request->sci_request_handle); | ||
470 | |||
471 | |||
466 | } else | 472 | } else |
467 | dev_warn(&isci_host->pdev->dev, | 473 | dev_warn(&isci_host->pdev->dev, |
468 | "%s: failed request start\n", | 474 | "%s: failed request start\n", |
diff --git a/drivers/scsi/isci/task.c b/drivers/scsi/isci/task.c index 02c40c00cb8b..e9bfc22d91d0 100644 --- a/drivers/scsi/isci/task.c +++ b/drivers/scsi/isci/task.c | |||
@@ -544,7 +544,7 @@ void isci_task_build_tmf( | |||
544 | void (*tmf_sent_cb)(enum isci_tmf_cb_state, | 544 | void (*tmf_sent_cb)(enum isci_tmf_cb_state, |
545 | struct isci_tmf *, | 545 | struct isci_tmf *, |
546 | void *), | 546 | void *), |
547 | void *cb_data) | 547 | struct isci_request *old_request) |
548 | { | 548 | { |
549 | dev_dbg(&isci_device->isci_port->isci_host->pdev->dev, | 549 | dev_dbg(&isci_device->isci_port->isci_host->pdev->dev, |
550 | "%s: isci_device = %p\n", __func__, isci_device); | 550 | "%s: isci_device = %p\n", __func__, isci_device); |
@@ -555,7 +555,9 @@ void isci_task_build_tmf( | |||
555 | tmf->tmf_code = code; | 555 | tmf->tmf_code = code; |
556 | tmf->timeout_timer = NULL; | 556 | tmf->timeout_timer = NULL; |
557 | tmf->cb_state_func = tmf_sent_cb; | 557 | tmf->cb_state_func = tmf_sent_cb; |
558 | tmf->cb_data = cb_data; | 558 | tmf->cb_data = old_request; |
559 | tmf->io_tag = old_request->io_tag; | ||
560 | |||
559 | } | 561 | } |
560 | 562 | ||
561 | static struct isci_request *isci_task_get_request_from_task( | 563 | static struct isci_request *isci_task_get_request_from_task( |
@@ -1248,10 +1250,6 @@ int isci_task_abort_task(struct sas_task *task) | |||
1248 | isci_task_build_tmf(&tmf, isci_device, isci_tmf_ssp_task_abort, | 1250 | isci_task_build_tmf(&tmf, isci_device, isci_tmf_ssp_task_abort, |
1249 | isci_abort_task_process_cb, old_request); | 1251 | isci_abort_task_process_cb, old_request); |
1250 | 1252 | ||
1251 | tmf.io_tag = scic_io_request_get_io_tag( | ||
1252 | old_request->sci_request_handle | ||
1253 | ); | ||
1254 | |||
1255 | spin_unlock_irqrestore(&isci_host->scic_lock, flags); | 1253 | spin_unlock_irqrestore(&isci_host->scic_lock, flags); |
1256 | 1254 | ||
1257 | #define ISCI_ABORT_TASK_TIMEOUT_MS 500 /* half second timeout. */ | 1255 | #define ISCI_ABORT_TASK_TIMEOUT_MS 500 /* half second timeout. */ |
diff --git a/drivers/scsi/isci/task.h b/drivers/scsi/isci/task.h index 68d8e5e65a73..5a5a4ec2dc90 100644 --- a/drivers/scsi/isci/task.h +++ b/drivers/scsi/isci/task.h | |||
@@ -224,7 +224,7 @@ void isci_task_build_tmf( | |||
224 | void (*tmf_sent_cb)( | 224 | void (*tmf_sent_cb)( |
225 | enum isci_tmf_cb_state, | 225 | enum isci_tmf_cb_state, |
226 | struct isci_tmf *, void *), | 226 | struct isci_tmf *, void *), |
227 | void *cb_data); | 227 | struct isci_request *old_request); |
228 | 228 | ||
229 | int isci_task_execute_tmf( | 229 | int isci_task_execute_tmf( |
230 | struct isci_host *isci_host, | 230 | struct isci_host *isci_host, |