summaryrefslogtreecommitdiff
path: root/drivers/scsi/isci/request.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-05-08 11:47:15 -0700
committerDan Williams <dan.j.williams@intel.com>2011-07-03 04:04:47 -0700
commit67ea838d17acdad3331aeae848683c768df96aaa (patch)
tree30a80c95a1add14babf985a108973cc9c3caac83 /drivers/scsi/isci/request.h
parentb7645818cff1536038c0b21407eefb6b9d5755e6 (diff)
isci: unify request data structures
Make scic_sds_request a proper member of isci_request. Also let's us get rid of the dma pool object size tracking since we now know that all requests are sizeof(isci_request). While cleaning up the construct routine incidentally replaced SCI_FIELD_OFFSET with offsetof. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/request.h')
-rw-r--r--drivers/scsi/isci/request.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/scsi/isci/request.h b/drivers/scsi/isci/request.h
index ddfbf71c97e5..89d8b0a27dfe 100644
--- a/drivers/scsi/isci/request.h
+++ b/drivers/scsi/isci/request.h
@@ -82,11 +82,11 @@ enum task_type {
};
struct isci_request {
- struct scic_sds_request *sci_request_handle;
enum isci_request_status status;
enum task_type ttype;
unsigned short io_tag;
bool complete_in_target;
+ bool terminated;
union ttype_ptr_union {
struct sas_task *io_task_ptr; /* When ttype==io_task */
@@ -103,7 +103,6 @@ struct isci_request {
dma_addr_t zero_scatter_daddr;
unsigned int num_sg_entries; /* returned by pci_alloc_sg */
- unsigned int request_alloc_size; /* size of block from dma_pool_alloc */
/** Note: "io_request_completion" is completed in two different ways
* depending on whether this is a TMF or regular request.
@@ -115,9 +114,16 @@ struct isci_request {
* TMF was aborting is guaranteed to have completed.
*/
struct completion *io_request_completion;
- struct scic_sds_request sci_req[0] ____cacheline_aligned;
+ struct scic_sds_request sci;
};
+static inline struct isci_request *sci_req_to_ireq(struct scic_sds_request *sci_req)
+{
+ struct isci_request *ireq = container_of(sci_req, typeof(*ireq), sci);
+
+ return ireq;
+}
+
/**
* This function gets the status of the request object.
* @request: This parameter points to the isci_request object