diff options
author | Dave Jiang <dave.jiang@intel.com> | 2011-05-04 19:13:17 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 07:04:46 -0400 |
commit | 1dea554fce698b7e8ad03cab1525f41cd6c28092 (patch) | |
tree | bff62cbf1c839c9ea591375348352ca4913444ab /drivers/scsi/isci | |
parent | 4b7ebd05fc074ac2ffdc803232d83f3593d4f548 (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/scsi/isci')
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_phy.c | 12 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_phy.h | 12 |
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, | |||
434 | { | 434 | { |
435 | struct sas_identify_frame *iaf; | 435 | struct sas_identify_frame *iaf; |
436 | 436 | ||
437 | iaf = &sci_phy->phy_type.sas.identify_address_frame_buffer; | 437 | iaf = &sci_phy->phy_type.sas_id_frame; |
438 | memcpy(sas_address, iaf->sas_addr, SAS_ADDR_SIZE); | 438 | memcpy(sas_address, iaf->sas_addr, SAS_ADDR_SIZE); |
439 | } | 439 | } |
440 | 440 | ||
@@ -457,7 +457,7 @@ void scic_sds_phy_get_attached_phy_protocols( | |||
457 | if (sci_phy->protocol == SCIC_SDS_PHY_PROTOCOL_SAS) { | 457 | if (sci_phy->protocol == SCIC_SDS_PHY_PROTOCOL_SAS) { |
458 | struct sas_identify_frame *iaf; | 458 | struct sas_identify_frame *iaf; |
459 | 459 | ||
460 | iaf = &sci_phy->phy_type.sas.identify_address_frame_buffer; | 460 | iaf = &sci_phy->phy_type.sas_id_frame; |
461 | memcpy(&protocols->u.all, &iaf->initiator_bits, 2); | 461 | memcpy(&protocols->u.all, &iaf->initiator_bits, 2); |
462 | } else if (sci_phy->protocol == SCIC_SDS_PHY_PROTOCOL_SATA) { | 462 | } else if (sci_phy->protocol == SCIC_SDS_PHY_PROTOCOL_SATA) { |
463 | protocols->u.bits.stp_target = 1; | 463 | protocols->u.bits.stp_target = 1; |
@@ -558,7 +558,7 @@ enum sci_status scic_sas_phy_get_properties( | |||
558 | { | 558 | { |
559 | if (sci_phy->protocol == SCIC_SDS_PHY_PROTOCOL_SAS) { | 559 | if (sci_phy->protocol == SCIC_SDS_PHY_PROTOCOL_SAS) { |
560 | memcpy(&properties->rcvd_iaf, | 560 | memcpy(&properties->rcvd_iaf, |
561 | &sci_phy->phy_type.sas.identify_address_frame_buffer, | 561 | &sci_phy->phy_type.sas_id_frame, |
562 | sizeof(struct sas_identify_frame)); | 562 | sizeof(struct sas_identify_frame)); |
563 | 563 | ||
564 | properties->received_capabilities.u.all = | 564 | properties->received_capabilities.u.all = |
@@ -577,7 +577,7 @@ enum sci_status scic_sata_phy_get_properties( | |||
577 | { | 577 | { |
578 | if (sci_phy->protocol == SCIC_SDS_PHY_PROTOCOL_SATA) { | 578 | if (sci_phy->protocol == SCIC_SDS_PHY_PROTOCOL_SATA) { |
579 | memcpy(&properties->signature_fis, | 579 | memcpy(&properties->signature_fis, |
580 | &sci_phy->phy_type.sata.signature_fis_buffer, | 580 | &sci_phy->phy_type.sata_sig_fis, |
581 | sizeof(struct dev_to_host_fis)); | 581 | sizeof(struct dev_to_host_fis)); |
582 | 582 | ||
583 | /* / @todo add support for port selectors. */ | 583 | /* / @todo add support for port selectors. */ |
@@ -1185,7 +1185,7 @@ static enum sci_status scic_sds_phy_starting_substate_await_iaf_uf_frame_handler | |||
1185 | frame_words[4] = SCIC_SWAP_DWORD(frame_words[4]); | 1185 | frame_words[4] = SCIC_SWAP_DWORD(frame_words[4]); |
1186 | frame_words[5] = SCIC_SWAP_DWORD(frame_words[5]); | 1186 | frame_words[5] = SCIC_SWAP_DWORD(frame_words[5]); |
1187 | 1187 | ||
1188 | memcpy(&sci_phy->phy_type.sas.identify_address_frame_buffer, | 1188 | memcpy(&sci_phy->phy_type.sas_id_frame, |
1189 | identify_frame, | 1189 | identify_frame, |
1190 | sizeof(struct sas_identify_frame)); | 1190 | sizeof(struct sas_identify_frame)); |
1191 | 1191 | ||
@@ -1253,7 +1253,7 @@ static enum sci_status scic_sds_phy_starting_substate_await_sig_fis_frame_handle | |||
1253 | (void **)&fis_frame_data); | 1253 | (void **)&fis_frame_data); |
1254 | 1254 | ||
1255 | scic_sds_controller_copy_sata_response( | 1255 | scic_sds_controller_copy_sata_response( |
1256 | &sci_phy->phy_type.sata.signature_fis_buffer, | 1256 | &sci_phy->phy_type.sata_sig_fis, |
1257 | frame_header, | 1257 | frame_header, |
1258 | fis_frame_data); | 1258 | fis_frame_data); |
1259 | 1259 | ||
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 { | |||
273 | bool is_in_link_training; | 273 | bool is_in_link_training; |
274 | 274 | ||
275 | union { | 275 | union { |
276 | struct { | 276 | struct sas_identify_frame sas_id_frame; |
277 | struct sas_identify_frame identify_address_frame_buffer; | 277 | struct dev_to_host_fis sata_sig_fis; |
278 | |||
279 | } sas; | ||
280 | |||
281 | struct { | ||
282 | struct dev_to_host_fis signature_fis_buffer; | ||
283 | |||
284 | } sata; | ||
285 | |||
286 | } phy_type; | 278 | } phy_type; |
287 | 279 | ||
288 | /** | 280 | /** |