aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/host.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-06-30 19:31:37 -0400
committerDan Williams <dan.j.williams@intel.com>2011-07-03 07:04:52 -0400
commit78a6f06e0e82125787d7aa308fe28c2c8381540c (patch)
tree55ab54546aab6dbaccda4ff6d196d8995f453c83 /drivers/scsi/isci/host.h
parentffe191c92ff195d73f9130b1490045ca2dd4c5e0 (diff)
isci: unify isci_remote_device and scic_sds_remote_device
Remove the distinction between these two implementations and unify on isci_remote_device (local instances named idev). Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/host.h')
-rw-r--r--drivers/scsi/isci/host.h27
1 files changed, 12 insertions, 15 deletions
diff --git a/drivers/scsi/isci/host.h b/drivers/scsi/isci/host.h
index fb8048e5fce7..ca2e3b0ee0dd 100644
--- a/drivers/scsi/isci/host.h
+++ b/drivers/scsi/isci/host.h
@@ -163,7 +163,7 @@ struct scic_sds_controller {
163 * objects that need to handle device completion notifications from the 163 * objects that need to handle device completion notifications from the
164 * hardware. The table is RNi based. 164 * hardware. The table is RNi based.
165 */ 165 */
166 struct scic_sds_remote_device *device_table[SCI_MAX_REMOTE_DEVICES]; 166 struct isci_remote_device *device_table[SCI_MAX_REMOTE_DEVICES];
167 167
168 /** 168 /**
169 * This field is the free RNi data structure 169 * This field is the free RNi data structure
@@ -488,12 +488,12 @@ static inline struct isci_host *scic_to_ihost(struct scic_sds_controller *scic)
488#define ISCI_TAG_TCI(tag) ((tag) & (SCI_MAX_IO_REQUESTS-1)) 488#define ISCI_TAG_TCI(tag) ((tag) & (SCI_MAX_IO_REQUESTS-1))
489 489
490/* expander attached sata devices require 3 rnc slots */ 490/* expander attached sata devices require 3 rnc slots */
491static inline int scic_sds_remote_device_node_count(struct scic_sds_remote_device *sci_dev) 491static inline int scic_sds_remote_device_node_count(struct isci_remote_device *idev)
492{ 492{
493 struct domain_device *dev = sci_dev_to_domain(sci_dev); 493 struct domain_device *dev = idev->domain_dev;
494 494
495 if ((dev->dev_type == SATA_DEV || (dev->tproto & SAS_PROTOCOL_STP)) && 495 if ((dev->dev_type == SATA_DEV || (dev->tproto & SAS_PROTOCOL_STP)) &&
496 !sci_dev->is_direct_attached) 496 !idev->is_direct_attached)
497 return SCU_STP_REMOTE_NODE_COUNT; 497 return SCU_STP_REMOTE_NODE_COUNT;
498 return SCU_SSP_REMOTE_NODE_COUNT; 498 return SCU_SSP_REMOTE_NODE_COUNT;
499} 499}
@@ -541,11 +541,8 @@ static inline struct device *sciport_to_dev(struct isci_port *iport)
541 return &iport->isci_host->pdev->dev; 541 return &iport->isci_host->pdev->dev;
542} 542}
543 543
544static inline struct device *scirdev_to_dev(struct scic_sds_remote_device *sci_dev) 544static inline struct device *scirdev_to_dev(struct isci_remote_device *idev)
545{ 545{
546 struct isci_remote_device *idev =
547 container_of(sci_dev, typeof(*idev), sci);
548
549 if (!idev || !idev->isci_port || !idev->isci_port->isci_host) 546 if (!idev || !idev->isci_port || !idev->isci_port->isci_host)
550 return NULL; 547 return NULL;
551 548
@@ -589,11 +586,11 @@ void scic_sds_controller_copy_sata_response(void *response_buffer,
589 void *frame_header, 586 void *frame_header,
590 void *frame_buffer); 587 void *frame_buffer);
591enum sci_status scic_sds_controller_allocate_remote_node_context(struct scic_sds_controller *scic, 588enum sci_status scic_sds_controller_allocate_remote_node_context(struct scic_sds_controller *scic,
592 struct scic_sds_remote_device *sci_dev, 589 struct isci_remote_device *idev,
593 u16 *node_id); 590 u16 *node_id);
594void scic_sds_controller_free_remote_node_context( 591void scic_sds_controller_free_remote_node_context(
595 struct scic_sds_controller *scic, 592 struct scic_sds_controller *scic,
596 struct scic_sds_remote_device *sci_dev, 593 struct isci_remote_device *idev,
597 u16 node_id); 594 u16 node_id);
598union scu_remote_node_context *scic_sds_controller_get_remote_node_context_buffer( 595union scu_remote_node_context *scic_sds_controller_get_remote_node_context_buffer(
599 struct scic_sds_controller *scic, 596 struct scic_sds_controller *scic,
@@ -622,7 +619,7 @@ void scic_sds_controller_link_down(
622 619
623void scic_sds_controller_remote_device_stopped( 620void scic_sds_controller_remote_device_stopped(
624 struct scic_sds_controller *scic, 621 struct scic_sds_controller *scic,
625 struct scic_sds_remote_device *sci_dev); 622 struct isci_remote_device *idev);
626 623
627void scic_sds_controller_copy_task_context( 624void scic_sds_controller_copy_task_context(
628 struct scic_sds_controller *scic, 625 struct scic_sds_controller *scic,
@@ -662,22 +659,22 @@ void scic_controller_disable_interrupts(
662 659
663enum sci_status scic_controller_start_io( 660enum sci_status scic_controller_start_io(
664 struct scic_sds_controller *scic, 661 struct scic_sds_controller *scic,
665 struct scic_sds_remote_device *remote_device, 662 struct isci_remote_device *idev,
666 struct isci_request *ireq); 663 struct isci_request *ireq);
667 664
668enum sci_task_status scic_controller_start_task( 665enum sci_task_status scic_controller_start_task(
669 struct scic_sds_controller *scic, 666 struct scic_sds_controller *scic,
670 struct scic_sds_remote_device *remote_device, 667 struct isci_remote_device *idev,
671 struct isci_request *ireq); 668 struct isci_request *ireq);
672 669
673enum sci_status scic_controller_terminate_request( 670enum sci_status scic_controller_terminate_request(
674 struct scic_sds_controller *scic, 671 struct scic_sds_controller *scic,
675 struct scic_sds_remote_device *remote_device, 672 struct isci_remote_device *idev,
676 struct isci_request *ireq); 673 struct isci_request *ireq);
677 674
678enum sci_status scic_controller_complete_io( 675enum sci_status scic_controller_complete_io(
679 struct scic_sds_controller *scic, 676 struct scic_sds_controller *scic,
680 struct scic_sds_remote_device *remote_device, 677 struct isci_remote_device *idev,
681 struct isci_request *ireq); 678 struct isci_request *ireq);
682 679
683void scic_sds_port_configuration_agent_construct( 680void scic_sds_port_configuration_agent_construct(