Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 827a84d4 authored by Dan Williams's avatar Dan Williams
Browse files

isci: move stp request info to scic_sds_request



In preparation for unifying allocation of all request information make stp
data available in all requests.  Incidentally collapse indentation.

Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent e531381e
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -710,8 +710,7 @@ enum sci_status scic_io_request_construct_basic_sata(
	struct isci_request *isci_request = sci_req->ireq;
	struct sas_task *task = isci_request_access_task(isci_request);

	stp_req = container_of(sci_req, typeof(*stp_req), parent);

	stp_req = &sci_req->stp.req;
	sci_req->protocol = SCIC_STP_PROTOCOL;

	copy = (task->data_dir == DMA_NONE) ? false : true;
+12 −7
Original line number Diff line number Diff line
@@ -56,16 +56,10 @@
#ifndef _SCIC_SDS_IO_REQUEST_H_
#define _SCIC_SDS_IO_REQUEST_H_

/**
 * This file contains the structures, constants and prototypes for the
 *    SCIC_SDS_IO_REQUEST object.
 *
 *
 */

#include "scic_io_request.h"
#include "sci_base_state_machine.h"
#include "scu_task_context.h"
#include "scic_sds_stp_request.h"

struct scic_sds_controller;
struct scic_sds_remote_device;
@@ -233,8 +227,19 @@ struct scic_sds_request {
	 */
	u8 device_sequence;

	struct {
		struct scic_sds_stp_request req;
	} stp;
};

static inline struct scic_sds_request *to_sci_req(struct scic_sds_stp_request *stp_req)
{
	struct scic_sds_request *sci_req;

	sci_req = container_of(stp_req, typeof(*sci_req), stp.req);
	return sci_req;
}

/**
 * enum sci_base_request_states - This enumeration depicts all the states for
 *    the common request state machine.