u32 error:8;
};
-
-/**
- * struct sata_fis_reg_h2d - This is the definition for a SATA Host to Device
- * Register FIS.
- *
- *
- */
-struct sata_fis_reg_h2d {
- u32 fis_type:8; /* word 0 */
- u32 pm_port:4;
- u32 reserved0:3;
- u32 command_flag:1;
- u32 command:8;
- u32 features:8;
- u32 lba_low:8; /* word 1 */
- u32 lba_mid:8;
- u32 lba_high:8;
- u32 device:8;
- u32 lba_low_exp:8; /* word 2 */
- u32 lba_mid_exp:8;
- u32 lba_high_exp:8;
- u32 features_exp:8;
- u32 sector_count:8; /* word 3 */
- u32 sector_count_exp:8;
- u32 reserved1:8;
- u32 control:8;
- u32 reserved2; /* word 4 */
-};
-
-/**
- * struct sata_fis_reg_d2h - SATA Device To Host FIS
- *
- *
- */
-struct sata_fis_reg_d2h {
- u32 fis_type:8; /* word 0 */
- u32 pm_port:4;
- u32 reserved0:2;
- u32 irq:1;
- u32 reserved1:1;
- u32 status:8;
- u32 error:8;
- u8 lba_low; /* word 1 */
- u8 lba_mid;
- u8 lba_high;
- u8 device;
- u8 lba_low_exp; /* word 2 */
- u8 lba_mid_exp;
- u8 lba_high_exp;
- u8 reserved;
- u8 sector_count; /* word 3 */
- u8 sector_count_exp;
- u16 reserved2;
- u32 reserved3;
-};
-
/**
*
*
*/
+#include <scsi/sas.h>
+#include <scsi/libsas.h>
#include "sci_status.h"
-
#include "intel_sata.h"
#include "intel_sas.h"
-#include <scsi/libsas.h>
struct scic_sds_phy;
struct scic_sds_port;
* This field delineates the signature FIS received from the
* attached target.
*/
- struct sata_fis_reg_d2h signature_fis;
+ struct dev_to_host_fis signature_fis;
/**
* This field specifies to the user if a port selector is connected
*/
#include <linux/device.h>
+#include <scsi/sas.h>
#include "scic_controller.h"
#include "scic_phy.h"
#include "scic_port.h"
void *frame_header,
void *frame_buffer)
{
- memcpy(
- response_buffer,
- frame_header,
- sizeof(u32)
- );
+ memcpy(response_buffer, frame_header, sizeof(u32));
- memcpy(
- (char *)((char *)response_buffer + sizeof(u32)),
- frame_buffer,
- sizeof(struct sata_fis_reg_d2h) - sizeof(u32)
- );
+ memcpy(response_buffer + sizeof(u32),
+ frame_buffer,
+ sizeof(struct dev_to_host_fis) - sizeof(u32));
}
/**
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <scsi/sas.h>
#include "intel_ata.h"
#include "intel_sata.h"
#include "sci_base_state.h"
struct scic_sata_phy_properties *properties)
{
if (sci_phy->protocol == SCIC_SDS_PHY_PROTOCOL_SATA) {
- memcpy(
- &properties->signature_fis,
- &sci_phy->phy_type.sata.signature_fis_buffer,
- sizeof(struct sata_fis_reg_d2h)
- );
+ memcpy(&properties->signature_fis,
+ &sci_phy->phy_type.sata.signature_fis_buffer,
+ sizeof(struct dev_to_host_fis));
/* / @todo add support for port selectors. */
properties->is_port_selector_present = false;
} sas;
struct {
- struct sata_fis_reg_d2h signature_fis_buffer;
+ struct dev_to_host_fis signature_fis_buffer;
} sata;
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
+#include <scsi/sas.h>
#include "intel_sas.h"
#include "intel_sata.h"
#include "intel_sat.h"
scic_sds_ssp_io_request_assign_buffers(sci_req);
} else if (dev->dev_type == SATA_DEV || (dev->tproto & SAS_PROTOCOL_STP)) {
scic_sds_stp_request_assign_buffers(sci_req);
- memset(sci_req->command_buffer, 0, sizeof(struct sata_fis_reg_h2d));
+ memset(sci_req->command_buffer, 0, sizeof(struct host_to_dev_fis));
} else if (dev_is_expander(dev)) {
scic_sds_smp_request_assign_buffers(sci_req);
memset(sci_req->command_buffer, 0, sizeof(struct smp_request));
* request memory
*/
#define scic_sds_stp_request_get_h2d_reg_buffer(memory) \
- ((struct sata_fis_reg_h2d *)(\
+ ((struct host_to_dev_fis *)(\
((char *)(memory)) + sizeof(struct scic_sds_stp_request) \
))
* request memory
*/
#define scic_sds_stp_request_get_response_buffer(memory) \
- ((struct sata_fis_reg_d2h *)(\
+ ((struct dev_to_host_fis *)(\
((char *)(scic_sds_stp_request_get_h2d_reg_buffer(memory))) \
- + sizeof(struct sata_fis_reg_h2d) \
+ + sizeof(struct host_to_dev_fis) \
))
/**
u32 scic_sds_stp_request_get_object_size(void)
{
return sizeof(struct scic_sds_stp_request)
- + sizeof(struct sata_fis_reg_h2d)
- + sizeof(struct sata_fis_reg_d2h)
+ + sizeof(struct host_to_dev_fis)
+ + sizeof(struct dev_to_host_fis)
+ sizeof(struct scu_task_context)
+ SMP_CACHE_BYTES
+ sizeof(struct scu_sgl_element_pair) * SCU_MAX_SGL_ELEMENT_PAIRS;
task_context->task_phase = 0x01;
task_context->ssp_command_iu_length =
- (sizeof(struct sata_fis_reg_h2d) - sizeof(u32)) / sizeof(u32);
+ (sizeof(struct host_to_dev_fis) - sizeof(u32)) / sizeof(u32);
/* Set the first word of the H2D REG FIS */
task_context->type.words[0] = *(u32 *)sds_request->command_buffer;
task_context->priority = SCU_TASK_PRIORITY_NORMAL;
task_context->task_type = SCU_TASK_TYPE_SATA_RAW_FRAME;
task_context->type.stp.fis_type = SATA_FIS_TYPE_REGH2D;
- task_context->transfer_length_bytes = sizeof(struct sata_fis_reg_h2d) - sizeof(u32);
+ task_context->transfer_length_bytes =
+ sizeof(struct host_to_dev_fis) - sizeof(u32);
}
void scic_stp_io_request_set_ncq_tag(
{
struct scic_sds_request *sci_req = object;
struct scu_task_context *task_context;
- struct sata_fis_reg_h2d *h2d_fis;
+ struct host_to_dev_fis *h2d_fis;
enum sci_status status;
/* Clear the SRST bit */
struct scic_sds_stp_request {
struct scic_sds_request parent;
- struct sata_fis_reg_d2h d2h_reg_fis;
+ struct dev_to_host_fis d2h_reg_fis;
union {
u32 ncq;
#include "port.h"
#include "host.h"
+#include <scsi/sas.h>
#include <scsi/libsas.h>
u8 sas_addr[SAS_ADDR_SIZE];
union {
-
u8 aif[sizeof(struct sci_sas_identify_address_frame)];
- u8 fis[sizeof(struct sata_fis_reg_d2h)];
-
+ struct dev_to_host_fis fis;
} frame_rcvd;
};
*/
BUG_ON(call_status != SCI_SUCCESS);
- memcpy(isci_phy->frame_rcvd.fis,
- &sata_phy_properties.signature_fis,
- sizeof(struct sata_fis_reg_d2h));
-
- isci_phy->sas_phy.frame_rcvd_size = sizeof(struct sata_fis_reg_d2h);
+ isci_phy->frame_rcvd.fis = sata_phy_properties.signature_fis;
+ isci_phy->sas_phy.frame_rcvd_size = sizeof(struct dev_to_host_fis);
/*
* For direct-attached SATA devices, the SCI core will
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <scsi/sas.h>
#include "isci.h"
#include "remote_device.h"
#include "scic_io_request.h"
*
* none.
*/
-void isci_request_process_stp_response(
- struct sas_task *task,
- void *response_buffer)
+void isci_request_process_stp_response(struct sas_task *task,
+ void *response_buffer)
{
- struct sata_fis_reg_d2h *d2h_reg_fis = (struct sata_fis_reg_d2h *)response_buffer;
+ struct dev_to_host_fis *d2h_reg_fis = response_buffer;
struct task_status_struct *ts = &task->task_status;
struct ata_task_resp *resp = (void *)&ts->buf[0];
memcpy(&tmf->resp.d2h_fis,
scic_stp_io_request_get_d2h_reg_address(
- request->sci_request_handle
- ),
- sizeof(struct sata_fis_reg_d2h)
- );
+ request->sci_request_handle),
+ sizeof(struct dev_to_host_fis));
}
/* Manage the timer if it is still running. */