summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2011-05-04 16:13:17 -0700
committerDan Williams <dan.j.williams@intel.com>2011-07-03 04:04:46 -0700
commit1dea554fce698b7e8ad03cab1525f41cd6c28092 (patch)
treebff62cbf1c839c9ea591375348352ca4913444ab /drivers
parent4b7ebd05fc074ac2ffdc803232d83f3593d4f548 (diff)
isci: Collapsing of phy_type data structure
Collapsing of struct scic_sds_phy phy_type data structure Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/isci/core/scic_sds_phy.c12
-rw-r--r--drivers/scsi/isci/core/scic_sds_phy.h12
2 files changed, 8 insertions, 16 deletions
diff --git a/drivers/scsi/isci/core/scic_sds_phy.c b/drivers/scsi/isci/core/scic_sds_phy.c
index 672e81b57711..0e381cff25a9 100644
--- a/drivers/scsi/isci/core/scic_sds_phy.c
+++ b/drivers/scsi/isci/core/scic_sds_phy.c
@@ -434,7 +434,7 @@ void scic_sds_phy_get_attached_sas_address(struct scic_sds_phy *sci_phy,
{
struct sas_identify_frame *iaf;
- iaf = &sci_phy->phy_type.sas.identify_address_frame_buffer;
+ iaf = &sci_phy->phy_type.sas_id_frame;
memcpy(sas_address, iaf->sas_addr, SAS_ADDR_SIZE);
}
@@ -457,7 +457,7 @@ void scic_sds_phy_get_attached_phy_protocols(
if (sci_phy->protocol == SCIC_SDS_PHY_PROTOCOL_SAS) {
struct sas_identify_frame *iaf;
- iaf = &sci_phy->phy_type.sas.identify_address_frame_buffer;
+ iaf = &sci_phy->phy_type.sas_id_frame;
memcpy(&protocols->u.all, &iaf->initiator_bits, 2);
} else if (sci_phy->protocol == SCIC_SDS_PHY_PROTOCOL_SATA) {
protocols->u.bits.stp_target = 1;
@@ -558,7 +558,7 @@ enum sci_status scic_sas_phy_get_properties(
{
if (sci_phy->protocol == SCIC_SDS_PHY_PROTOCOL_SAS) {
memcpy(&properties->rcvd_iaf,
- &sci_phy->phy_type.sas.identify_address_frame_buffer,
+ &sci_phy->phy_type.sas_id_frame,
sizeof(struct sas_identify_frame));
properties->received_capabilities.u.all =
@@ -577,7 +577,7 @@ enum sci_status scic_sata_phy_get_properties(
{
if (sci_phy->protocol == SCIC_SDS_PHY_PROTOCOL_SATA) {
memcpy(&properties->signature_fis,
- &sci_phy->phy_type.sata.signature_fis_buffer,
+ &sci_phy->phy_type.sata_sig_fis,
sizeof(struct dev_to_host_fis));
/* / @todo add support for port selectors. */
@@ -1185,7 +1185,7 @@ static enum sci_status scic_sds_phy_starting_substate_await_iaf_uf_frame_handler
frame_words[4] = SCIC_SWAP_DWORD(frame_words[4]);
frame_words[5] = SCIC_SWAP_DWORD(frame_words[5]);
- memcpy(&sci_phy->phy_type.sas.identify_address_frame_buffer,
+ memcpy(&sci_phy->phy_type.sas_id_frame,
identify_frame,
sizeof(struct sas_identify_frame));
@@ -1253,7 +1253,7 @@ static enum sci_status scic_sds_phy_starting_substate_await_sig_fis_frame_handle
(void **)&fis_frame_data);
scic_sds_controller_copy_sata_response(
- &sci_phy->phy_type.sata.signature_fis_buffer,
+ &sci_phy->phy_type.sata_sig_fis,
frame_header,
fis_frame_data);
diff --git a/drivers/scsi/isci/core/scic_sds_phy.h b/drivers/scsi/isci/core/scic_sds_phy.h
index 7bf95539b2a0..47b2194574a0 100644
--- a/drivers/scsi/isci/core/scic_sds_phy.h
+++ b/drivers/scsi/isci/core/scic_sds_phy.h
@@ -273,16 +273,8 @@ struct scic_sds_phy {
bool is_in_link_training;
union {
- struct {
- struct sas_identify_frame identify_address_frame_buffer;
-
- } sas;
-
- struct {
- struct dev_to_host_fis signature_fis_buffer;
-
- } sata;
-
+ struct sas_identify_frame sas_id_frame;
+ struct dev_to_host_fis sata_sig_fis;
} phy_type;
/**