diff --git a/drivers/scsi/isci/core/intel_sas.h b/drivers/scsi/isci/core/intel_sas.h
index f7301aa..3d4ca12 100644
--- a/drivers/scsi/isci/core/intel_sas.h
+++ b/drivers/scsi/isci/core/intel_sas.h
@@ -160,52 +160,6 @@
 	SCI_SAS_TASK_FRAME = 0x16
 };
 
-#define SSP_RESPONSE_IU_MAX_DATA 64
-
-#define SCI_SSP_RESPONSE_IU_DATA_PRESENT_MASK   (0x03)
-
-
-#define sci_ssp_get_sense_data_length(sense_data_length_buffer)	\
-	SCIC_BUILD_DWORD(sense_data_length_buffer)
-
-#define sci_ssp_get_response_data_length(response_data_length_buffer) \
-	SCIC_BUILD_DWORD(response_data_length_buffer)
-
-/**
- * struct sci_ssp_response_iu - This structure depicts the contents of the SSP
- *    RESPONSE INFORMATION UNIT. For specific information on each of these
- *    individual fields please reference the SAS specification SSP transport
- *    layer section.
- *
- *
- */
-struct sci_ssp_response_iu {
-	u8 reserved0[8];
-
-	u8 retry_delay_timer[2];
-	u8 data_present;
-	u8 status;
-
-	u8 reserved1[4];
-	u8 sense_data_length[4];
-	u8 response_data_length[4];
-
-	u32 data[SSP_RESPONSE_IU_MAX_DATA];
-
-};
-
-/**
- * enum _SCI_SAS_DATA_PRESENT_TYPE - This enumeration depicts the SAS
- *    specification defined SSP data present types in struct sci_ssp_response_iu.
- *
- *
- */
-enum sci_ssp_response_iu_data_present_type {
-	SCI_SSP_RESPONSE_IU_NO_DATA = 0x00,
-	SCI_SSP_RESPONSE_IU_RESPONSE_DATA = 0x01,
-	SCI_SSP_RESPONSE_IU_SENSE_DATA = 0x02
-};
-
 /**
  * struct sci_ssp_frame_header - This structure depicts the contents of an SSP
  *    frame header.  For specific information on the individual fields please
diff --git a/drivers/scsi/isci/core/scic_sds_request.c b/drivers/scsi/isci/core/scic_sds_request.c
index b6d1333..ef59e01 100644
--- a/drivers/scsi/isci/core/scic_sds_request.c
+++ b/drivers/scsi/isci/core/scic_sds_request.c
@@ -100,7 +100,7 @@
 #define scic_ssp_io_request_get_object_size() \
 	(\
 		sizeof(struct ssp_cmd_iu) \
-		+ sizeof(struct sci_ssp_response_iu)	\
+		+ SSP_RESP_IU_MAX_SIZE	\
 	)
 
 /**
@@ -121,7 +121,7 @@
  * memory
  */
 #define scic_sds_ssp_request_get_response_buffer(memory) \
-	((struct sci_ssp_response_iu *)(\
+	((struct ssp_response_iu *)(\
 		 ((char *)(scic_sds_ssp_request_get_command_buffer(memory))) \
 		 + sizeof(struct ssp_cmd_iu)	\
 		 ))
@@ -135,7 +135,7 @@
 #define scic_sds_ssp_request_get_task_context_buffer(memory) \
 	((struct scu_task_context *)(\
 		 ((char *)(scic_sds_ssp_request_get_response_buffer(memory))) \
-		 + sizeof(struct sci_ssp_response_iu) \
+		 + SSP_RESP_IU_MAX_SIZE \
 		 ))
 
 /**
@@ -160,7 +160,7 @@
 #define scic_ssp_task_request_get_object_size()	\
 	(\
 		sizeof(struct ssp_task_iu) \
-		+ sizeof(struct sci_ssp_response_iu)	\
+		+ SSP_RESP_IU_MAX_SIZE \
 	)
 
 /**
@@ -181,7 +181,7 @@
  * request memory.
  */
 #define scic_sds_ssp_task_request_get_response_buffer(memory) \
-	((struct sci_ssp_response_iu *)(\
+	((struct ssp_response_iu *)(\
 		 ((char *)(scic_sds_ssp_task_request_get_command_buffer(memory))) \
 		 + sizeof(struct ssp_task_iu) \
 		 ))
@@ -194,7 +194,7 @@
 #define scic_sds_ssp_task_request_get_task_context_buffer(memory) \
 	((struct scu_task_context *)(\
 		 ((char *)(scic_sds_ssp_task_request_get_response_buffer(memory))) \
-		 + sizeof(struct sci_ssp_response_iu) \
+		 + SSP_RESP_IU_MAX_SIZE \
 		 ))
 
 
@@ -937,52 +937,29 @@
 	return SCI_FAILURE_INVALID_STATE;
 }
 
-/**
- *
- * @sci_req: The SCIC_SDS_IO_REQUEST_T object for which the task start
- *    operation is to be executed.
- *
- * This method invokes the core state task complete handler for the
- * SCIC_SDS_IO_REQUEST_T object. enum sci_status
- */
-
 /*
- * ****************************************************************************
- * * SCIC SDS PROTECTED METHODS
- * **************************************************************************** */
-
-/**
- * This method copies response data for requests returning response data
+ * This function copies response data for requests returning response data
  *    instead of sense data.
  * @sci_req: This parameter specifies the request object for which to copy
  *    the response data.
- *
  */
-void scic_sds_io_request_copy_response(struct scic_sds_request *sds_request)
+void scic_sds_io_request_copy_response(struct scic_sds_request *sci_req)
 {
-	void *response_buffer;
-	u32 user_response_length;
-	u32 core_response_length;
-	struct sci_ssp_response_iu *ssp_response;
-	struct isci_request *isci_request = sds_request->ireq;
+	void *resp_buf;
+	u32 len;
+	struct ssp_response_iu *ssp_response;
+	struct isci_request *ireq = sci_req->ireq;
+	struct isci_tmf *isci_tmf = isci_request_access_tmf(ireq);
 
-	ssp_response =
-		(struct sci_ssp_response_iu *)sds_request->response_buffer;
+	ssp_response = sci_req->response_buffer;
 
-	response_buffer =
-		isci_task_ssp_request_get_response_data_address(
-				isci_request);
+	resp_buf = &isci_tmf->resp.resp_iu;
 
-	user_response_length =
-		isci_task_ssp_request_get_response_data_length(
-				isci_request);
+	len = min_t(u32,
+		    SSP_RESP_IU_MAX_SIZE,
+		    be32_to_cpu(ssp_response->response_data_len));
 
-	core_response_length = sci_ssp_get_response_data_length(
-					ssp_response->response_data_length);
-
-	user_response_length = min(user_response_length, core_response_length);
-
-	memcpy(response_buffer, ssp_response->data, user_response_length);
+	memcpy(resp_buf, ssp_response->resp_data, len);
 }
 
 /*
@@ -1102,7 +1079,7 @@
 	return SCI_SUCCESS;
 }
 
-/**
+/*
  * scic_sds_request_started_state_tc_completion_handler() - This method process
  *    TC (task context) completions for normal IO request (i.e. Task/Abort
  *    Completions of type 0).  This method will update the
@@ -1113,50 +1090,51 @@
  *    the SCU.
  *
  */
-enum sci_status scic_sds_request_started_state_tc_completion_handler(
-	struct scic_sds_request *sci_req,
-	u32 completion_code)
+enum sci_status
+scic_sds_request_started_state_tc_completion_handler(
+		struct scic_sds_request *sci_req,
+		u32 completion_code)
 {
-	u8 data_present;
-	struct sci_ssp_response_iu *response_buffer;
+	u8 datapres;
+	struct ssp_response_iu *resp_iu;
 
-	/**
-	 * @todo Any SDMA return code of other than 0 is bad
+	/*
+	 * TODO: Any SDMA return code of other than 0 is bad
 	 *       decode 0x003C0000 to determine SDMA status
 	 */
 	switch (SCU_GET_COMPLETION_TL_STATUS(completion_code)) {
 	case SCU_MAKE_COMPLETION_STATUS(SCU_TASK_DONE_GOOD):
-		scic_sds_request_set_status(
-			sci_req, SCU_TASK_DONE_GOOD, SCI_SUCCESS
-			);
+		scic_sds_request_set_status(sci_req,
+					    SCU_TASK_DONE_GOOD,
+					    SCI_SUCCESS);
 		break;
 
 	case SCU_MAKE_COMPLETION_STATUS(SCU_TASK_DONE_EARLY_RESP):
 	{
 		/*
-		 * There are times when the SCU hardware will return an early response
-		 * because the io request specified more data than is returned by the
-		 * target device (mode pages, inquiry data, etc.).  We must check the
-		 * response stats to see if this is truly a failed request or a good
-		 * request that just got completed early. */
-		struct sci_ssp_response_iu *response = (struct sci_ssp_response_iu *)
-						  sci_req->response_buffer;
+		 * There are times when the SCU hardware will return an early
+		 * response because the io request specified more data than is
+		 * returned by the target device (mode pages, inquiry data,
+		 * etc.).  We must check the response stats to see if this is
+		 * truly a failed request or a good request that just got
+		 * completed early.
+		 */
+		struct ssp_response_iu *resp = sci_req->response_buffer;
 		scic_word_copy_with_swap(
 			sci_req->response_buffer,
 			sci_req->response_buffer,
-			sizeof(struct sci_ssp_response_iu) / sizeof(u32)
-			);
+			SSP_RESP_IU_MAX_SIZE / sizeof(u32));
 
-		if (response->status == 0) {
+		if (resp->status == 0) {
 			scic_sds_request_set_status(
-				sci_req, SCU_TASK_DONE_GOOD, SCI_SUCCESS_IO_DONE_EARLY
-				);
+				sci_req,
+				SCU_TASK_DONE_GOOD,
+				SCI_SUCCESS_IO_DONE_EARLY);
 		} else {
 			scic_sds_request_set_status(
 				sci_req,
 				SCU_TASK_DONE_CHECK_RESPONSE,
-				SCI_FAILURE_IO_RESPONSE_VALID
-				);
+				SCI_FAILURE_IO_RESPONSE_VALID);
 		}
 	}
 	break;
@@ -1165,36 +1143,31 @@
 		scic_word_copy_with_swap(
 			sci_req->response_buffer,
 			sci_req->response_buffer,
-			sizeof(struct sci_ssp_response_iu) / sizeof(u32)
-			);
+			SSP_RESP_IU_MAX_SIZE / sizeof(u32));
 
 		scic_sds_request_set_status(
 			sci_req,
 			SCU_TASK_DONE_CHECK_RESPONSE,
-			SCI_FAILURE_IO_RESPONSE_VALID
-			);
+			SCI_FAILURE_IO_RESPONSE_VALID);
 		break;
 
 	case SCU_MAKE_COMPLETION_STATUS(SCU_TASK_DONE_RESP_LEN_ERR):
 		/*
-		 * / @todo With TASK_DONE_RESP_LEN_ERR is the response frame guaranteed
-		 * /       to be received before this completion status is posted? */
-		response_buffer =
-			(struct sci_ssp_response_iu *)sci_req->response_buffer;
-		data_present =
-			response_buffer->data_present & SCI_SSP_RESPONSE_IU_DATA_PRESENT_MASK;
+		 * / @todo With TASK_DONE_RESP_LEN_ERR is the response frame
+		 * guaranteed to be received before this completion status is
+		 * posted?
+		 */
+		resp_iu = sci_req->response_buffer;
+		datapres = resp_iu->datapres;
 
-		if ((data_present == 0x01) || (data_present == 0x02)) {
+		if ((datapres == 0x01) || (datapres == 0x02)) {
 			scic_sds_request_set_status(
 				sci_req,
 				SCU_TASK_DONE_CHECK_RESPONSE,
-				SCI_FAILURE_IO_RESPONSE_VALID
-				);
-		} else {
+				SCI_FAILURE_IO_RESPONSE_VALID);
+		} else
 			scic_sds_request_set_status(
-				sci_req, SCU_TASK_DONE_GOOD, SCI_SUCCESS
-				);
-		}
+				sci_req, SCU_TASK_DONE_GOOD, SCI_SUCCESS);
 		break;
 
 	/* only stp device gets suspended. */
@@ -1212,15 +1185,15 @@
 		if (sci_req->protocol == SCIC_STP_PROTOCOL) {
 			scic_sds_request_set_status(
 				sci_req,
-				SCU_GET_COMPLETION_TL_STATUS(completion_code) >> SCU_COMPLETION_TL_STATUS_SHIFT,
-				SCI_FAILURE_REMOTE_DEVICE_RESET_REQUIRED
-				);
+				SCU_GET_COMPLETION_TL_STATUS(completion_code) >>
+				SCU_COMPLETION_TL_STATUS_SHIFT,
+				SCI_FAILURE_REMOTE_DEVICE_RESET_REQUIRED);
 		} else {
 			scic_sds_request_set_status(
 				sci_req,
-				SCU_GET_COMPLETION_TL_STATUS(completion_code) >> SCU_COMPLETION_TL_STATUS_SHIFT,
-				SCI_FAILURE_CONTROLLER_SPECIFIC_IO_ERR
-				);
+				SCU_GET_COMPLETION_TL_STATUS(completion_code) >>
+				SCU_COMPLETION_TL_STATUS_SHIFT,
+				SCI_FAILURE_CONTROLLER_SPECIFIC_IO_ERR);
 		}
 		break;
 
@@ -1237,9 +1210,9 @@
 	case SCU_MAKE_COMPLETION_STATUS(SCU_TASK_OPEN_REJECT_CONNECTION_RATE_NOT_SUPPORTED):
 		scic_sds_request_set_status(
 			sci_req,
-			SCU_GET_COMPLETION_TL_STATUS(completion_code) >> SCU_COMPLETION_TL_STATUS_SHIFT,
-			SCI_FAILURE_REMOTE_DEVICE_RESET_REQUIRED
-			);
+			SCU_GET_COMPLETION_TL_STATUS(completion_code) >>
+			SCU_COMPLETION_TL_STATUS_SHIFT,
+			SCI_FAILURE_REMOTE_DEVICE_RESET_REQUIRED);
 		break;
 
 	/* neither ssp nor stp gets suspended. */
@@ -1261,19 +1234,20 @@
 	default:
 		scic_sds_request_set_status(
 			sci_req,
-			SCU_GET_COMPLETION_TL_STATUS(completion_code) >> SCU_COMPLETION_TL_STATUS_SHIFT,
-			SCI_FAILURE_CONTROLLER_SPECIFIC_IO_ERR
-			);
+			SCU_GET_COMPLETION_TL_STATUS(completion_code) >>
+			SCU_COMPLETION_TL_STATUS_SHIFT,
+			SCI_FAILURE_CONTROLLER_SPECIFIC_IO_ERR);
 		break;
 	}
 
-	/**
-	 * @todo This is probably wrong for ACK/NAK timeout conditions
+	/*
+	 * TODO: This is probably wrong for ACK/NAK timeout conditions
 	 */
 
-	/* In all cases we will treat this as the completion of the IO request. */
-	sci_base_state_machine_change_state(&sci_req->state_machine,
-		SCI_BASE_REQUEST_STATE_COMPLETED);
+	/* In all cases we will treat this as the completion of the IO req. */
+	sci_base_state_machine_change_state(
+			&sci_req->state_machine,
+			SCI_BASE_REQUEST_STATE_COMPLETED);
 	return SCI_SUCCESS;
 }
 
@@ -1285,49 +1259,42 @@
  * at completion time. If the frame type is not a response buffer an error is
  * logged. enum sci_status SCI_SUCCESS SCI_FAILURE_INVALID_PARAMETER_VALUE
  */
-static enum sci_status scic_sds_request_started_state_frame_handler(
-	struct scic_sds_request *sci_req,
-	u32 frame_index)
+static enum sci_status
+scic_sds_request_started_state_frame_handler(struct scic_sds_request *sci_req,
+					     u32 frame_index)
 {
 	enum sci_status status;
 	struct sci_ssp_frame_header *frame_header;
 
-	/* / @todo If this is a response frame we must record that we received it */
 	status = scic_sds_unsolicited_frame_control_get_header(
 		&(scic_sds_request_get_controller(sci_req)->uf_control),
 		frame_index,
-		(void **)&frame_header
-		);
+		(void **)&frame_header);
 
 	if (frame_header->frame_type == SCI_SAS_RESPONSE_FRAME) {
-		struct sci_ssp_response_iu *response_buffer;
+		struct ssp_response_iu *resp_iu;
 
 		status = scic_sds_unsolicited_frame_control_get_buffer(
 			&(scic_sds_request_get_controller(sci_req)->uf_control),
 			frame_index,
-			(void **)&response_buffer
-			);
+			(void **)&resp_iu);
 
-		scic_word_copy_with_swap(
-			sci_req->response_buffer,
-			(u32 *)response_buffer,
-			sizeof(struct sci_ssp_response_iu)
-			);
+		scic_word_copy_with_swap(sci_req->response_buffer,
+					 (u32 *)resp_iu,
+					 SSP_RESP_IU_MAX_SIZE);
 
-		response_buffer = (struct sci_ssp_response_iu *)sci_req->response_buffer;
+		resp_iu = sci_req->response_buffer;
 
-		if ((response_buffer->data_present == 0x01) ||
-		    (response_buffer->data_present == 0x02)) {
+		if ((resp_iu->datapres == 0x01) ||
+		    (resp_iu->datapres == 0x02)) {
 			scic_sds_request_set_status(
 				sci_req,
 				SCU_TASK_DONE_CHECK_RESPONSE,
-				SCI_FAILURE_CONTROLLER_SPECIFIC_IO_ERR
-				);
+				SCI_FAILURE_CONTROLLER_SPECIFIC_IO_ERR);
 		} else
 			scic_sds_request_set_status(
-				sci_req, SCU_TASK_DONE_GOOD, SCI_SUCCESS
-				);
-	} else
+				sci_req, SCU_TASK_DONE_GOOD, SCI_SUCCESS);
+	} else {
 		/* This was not a response frame why did it get forwarded? */
 		dev_err(scic_to_dev(sci_req->owning_controller),
 			"%s: SCIC IO Request 0x%p received unexpected "
@@ -1336,13 +1303,14 @@
 			sci_req,
 			frame_index,
 			frame_header->frame_type);
+	}
 
 	/*
 	 * In any case we are done with this frame buffer return it to the
-	 * controller */
+	 * controller
+	 */
 	scic_sds_controller_release_frame(
-		sci_req->owning_controller, frame_index
-		);
+		sci_req->owning_controller, frame_index);
 
 	return SCI_SUCCESS;
 }
diff --git a/drivers/scsi/isci/core/scic_sds_stp_request.c b/drivers/scsi/isci/core/scic_sds_stp_request.c
index b3ad33b..8569dba 100644
--- a/drivers/scsi/isci/core/scic_sds_stp_request.c
+++ b/drivers/scsi/isci/core/scic_sds_stp_request.c
@@ -102,7 +102,7 @@
 #define scic_sds_stp_request_get_task_context_buffer(memory) \
 	((struct scu_task_context *)(\
 		 ((char *)(scic_sds_stp_request_get_response_buffer(memory))) \
-		 + sizeof(struct sci_ssp_response_iu) \
+		 + SSP_RESP_IU_MAX_SIZE \
 		 ))
 
 /**
diff --git a/drivers/scsi/isci/sas.h b/drivers/scsi/isci/sas.h
index 21ddd63..1a1e9bc 100644
--- a/drivers/scsi/isci/sas.h
+++ b/drivers/scsi/isci/sas.h
@@ -69,6 +69,9 @@
 #define FIS_PIO_SETUP       0x5F
 #define FIS_DATA            0x46
 
+/**************************************************************************/
+#define SSP_RESP_IU_MAX_SIZE	280
+
 /*
  * contents of the SSP COMMAND INFORMATION UNIT.
  * For specific information on each of these individual fields please
diff --git a/drivers/scsi/isci/task.c b/drivers/scsi/isci/task.c
index c4db959..8449d8a 100644
--- a/drivers/scsi/isci/task.c
+++ b/drivers/scsi/isci/task.c
@@ -55,6 +55,7 @@
 
 #include <linux/completion.h>
 #include <linux/irqflags.h>
+#include "sas.h"
 #include "scic_task_request.h"
 #include "scic_io_request.h"
 #include "remote_device.h"
@@ -63,7 +64,8 @@
 #include "request.h"
 #include "sata.h"
 #include "task.h"
-#include "core/scic_sds_request.h"
+#include "scic_sds_stp_request.h"
+
 /**
 * isci_task_refuse() - complete the request to the upper layer driver in
 *     the case where an I/O needs to be completed back in the submit path.
@@ -1411,109 +1413,75 @@
 		return TMF_RESP_FUNC_SUCC;
 }
 
-/**
+/*
  * isci_task_request_complete() - This function is called by the sci core when
  *    an task request completes.
- * @isci_host: This parameter specifies the ISCI host object
- * @request: This parameter is the completed isci_request object.
+ * @ihost: This parameter specifies the ISCI host object
+ * @ireq: This parameter is the completed isci_request object.
  * @completion_status: This parameter specifies the completion status from the
  *    sci core.
  *
  * none.
  */
-void isci_task_request_complete(
-	struct isci_host *isci_host,
-	struct isci_request *request,
-	enum sci_task_status completion_status)
+void
+isci_task_request_complete(struct isci_host *ihost,
+			   struct isci_request *ireq,
+			   enum sci_task_status completion_status)
 {
-	struct isci_remote_device *isci_device = request->isci_device;
+	struct isci_remote_device *idev = ireq->isci_device;
 	enum isci_request_status old_state;
-	struct isci_tmf *tmf = isci_request_access_tmf(request);
+	struct isci_tmf *tmf = isci_request_access_tmf(ireq);
 	struct completion *tmf_complete;
+	struct scic_sds_request *sci_req = ireq->sci_request_handle;
+	struct scic_sds_stp_request *stp_req =
+		container_of(sci_req, typeof(*stp_req), parent);
 
-	dev_dbg(&isci_host->pdev->dev,
+	dev_dbg(&ihost->pdev->dev,
 		"%s: request = %p, status=%d\n",
-		__func__, request, completion_status);
+		__func__, ireq, completion_status);
 
-	old_state = isci_request_change_state(request, completed);
+	old_state = isci_request_change_state(ireq, completed);
 
 	tmf->status = completion_status;
-	request->complete_in_target = true;
+	ireq->complete_in_target = true;
 
-	if (SAS_PROTOCOL_SSP == tmf->proto) {
-
+	if (tmf->proto == SAS_PROTOCOL_SSP) {
 		memcpy(&tmf->resp.resp_iu,
-		       scic_io_request_get_response_iu_address(
-			       request->sci_request_handle
-			       ),
-		       sizeof(struct sci_ssp_response_iu));
-
-	} else if (SAS_PROTOCOL_SATA == tmf->proto) {
-
+		       sci_req->response_buffer,
+		       SSP_RESP_IU_MAX_SIZE);
+	} else if (tmf->proto == SAS_PROTOCOL_SATA) {
 		memcpy(&tmf->resp.d2h_fis,
-		       scic_stp_io_request_get_d2h_reg_address(
-			       request->sci_request_handle),
+		       &stp_req->d2h_reg_fis,
 		       sizeof(struct dev_to_host_fis));
 	}
 
 	/* Manage the timer if it is still running. */
 	if (tmf->timeout_timer) {
-		isci_del_timer(isci_host, tmf->timeout_timer);
+		isci_del_timer(ihost, tmf->timeout_timer);
 		tmf->timeout_timer = NULL;
 	}
 
 	/* PRINT_TMF( ((struct isci_tmf *)request->task)); */
 	tmf_complete = tmf->complete;
 
-	scic_controller_complete_io(
-		isci_host->core_controller,
-		&isci_device->sci,
-		request->sci_request_handle);
-	/* NULL the request handle to make sure it cannot be terminated
+	scic_controller_complete_io(ihost->core_controller,
+				    &idev->sci,
+				    ireq->sci_request_handle);
+
+	/*
+	 * NULL the request handle to make sure it cannot be terminated
 	 *  or completed again.
 	 */
-	request->sci_request_handle = NULL;
+	ireq->sci_request_handle = NULL;
 
-	isci_request_change_state(request, unallocated);
-	list_del_init(&request->dev_node);
+	isci_request_change_state(ireq, unallocated);
+	list_del_init(&ireq->dev_node);
 
 	/* The task management part completes last. */
 	complete(tmf_complete);
 }
 
 /**
- * isci_task_ssp_request_get_response_data_address() - This function is called
- *    by the sci core to retrieve the response data address for a given task
- *    request.
- * @request: This parameter is the isci_request object.
- *
- * response data address for specified task request.
- */
-void *isci_task_ssp_request_get_response_data_address(
-	struct isci_request *request)
-{
-	struct isci_tmf *isci_tmf = isci_request_access_tmf(request);
-
-	return &isci_tmf->resp.resp_iu;
-}
-
-/**
- * isci_task_ssp_request_get_response_data_length() - This function is called
- *    by the sci core to retrieve the response data length for a given task
- *    request.
- * @request: This parameter is the isci_request object.
- *
- * response data length for specified task request.
- */
-u32 isci_task_ssp_request_get_response_data_length(
-	struct isci_request *request)
-{
-	struct isci_tmf *isci_tmf = isci_request_access_tmf(request);
-
-	return sizeof(isci_tmf->resp.resp_iu);
-}
-
-/**
  * isci_bus_reset_handler() - This function performs a target reset of the
  *    device referenced by "cmd'.  This function is exported through the
  *    "struct scsi_host_template" structure such that it is called when an I/O
diff --git a/drivers/scsi/isci/task.h b/drivers/scsi/isci/task.h
index c5afd1c..77cc54d 100644
--- a/drivers/scsi/isci/task.h
+++ b/drivers/scsi/isci/task.h
@@ -99,7 +99,7 @@
 	struct completion *complete;
 	enum sas_protocol proto;
 	union {
-		struct sci_ssp_response_iu resp_iu;
+		struct ssp_response_iu resp_iu;
 		struct dev_to_host_fis d2h_fis;
 	}                            resp;
 	unsigned char lun[8];
@@ -120,8 +120,7 @@
 
 };
 
-static inline void isci_print_tmf(
-	struct isci_tmf *tmf)
+static inline void isci_print_tmf(struct isci_tmf *tmf)
 {
 	if (SAS_PROTOCOL_SATA == tmf->proto)
 		dev_dbg(&tmf->device->isci_port->isci_host->pdev->dev,
@@ -144,16 +143,13 @@
 			"tmf->resp.resp_iu.data[3] = %x\n",
 			__func__,
 			tmf->status,
-			tmf->resp.resp_iu.data_present,
+			tmf->resp.resp_iu.datapres,
 			tmf->resp.resp_iu.status,
-			(tmf->resp.resp_iu.response_data_length[0] << 24) +
-			(tmf->resp.resp_iu.response_data_length[1] << 16) +
-			(tmf->resp.resp_iu.response_data_length[2] << 8) +
-			tmf->resp.resp_iu.response_data_length[3],
-			tmf->resp.resp_iu.data[0],
-			tmf->resp.resp_iu.data[1],
-			tmf->resp.resp_iu.data[2],
-			tmf->resp.resp_iu.data[3]);
+			be32_to_cpu(tmf->resp.resp_iu.response_data_len),
+			tmf->resp.resp_iu.resp_data[0],
+			tmf->resp.resp_iu.resp_data[1],
+			tmf->resp.resp_iu.resp_data[2],
+			tmf->resp.resp_iu.resp_data[3]);
 }
 
 
